556 class(Mesh2dModelType),
intent(inout) :: this
559 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
560 this%var_ids%mesh), this%nc_fname)
563 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
564 'mesh_topology'), this%nc_fname)
565 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
566 '2D mesh topology'), this%nc_fname)
567 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
568 'topology_dimension', 2), this%nc_fname)
569 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
570 'nmesh_face'), this%nc_fname)
571 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
572 'node_coordinates',
'mesh_node_x mesh_node_y'), &
574 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
575 'face_coordinates',
'mesh_face_x mesh_face_y'), &
577 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
578 'face_node_connectivity',
'mesh_face_nodes'), &
582 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
583 (/this%dim_ids%nmesh_node/), &
584 this%var_ids%mesh_node_x), this%nc_fname)
587 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
588 'units', this%lenunits), this%nc_fname)
589 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
590 'standard_name',
'projection_x_coordinate'), &
592 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
593 'long_name',
'Easting'), this%nc_fname)
595 if (this%gridmap_name /=
'')
then
597 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
598 'grid_mapping', this%gridmap_name), &
603 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
604 (/this%dim_ids%nmesh_node/), &
605 this%var_ids%mesh_node_y), this%nc_fname)
608 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
609 'units', this%lenunits), this%nc_fname)
610 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
611 'standard_name',
'projection_y_coordinate'), &
613 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
614 'long_name',
'Northing'), this%nc_fname)
616 if (this%gridmap_name /=
'')
then
618 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
619 'grid_mapping', this%gridmap_name), &
624 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
625 (/this%dim_ids%nmesh_face/), &
626 this%var_ids%mesh_face_x), this%nc_fname)
629 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
630 'units', this%lenunits), this%nc_fname)
631 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
632 'standard_name',
'projection_x_coordinate'), &
634 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
635 'long_name',
'Easting'), this%nc_fname)
636 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
637 'mesh_face_xbnds'), this%nc_fname)
638 if (this%gridmap_name /=
'')
then
640 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
641 'grid_mapping', this%gridmap_name), &
646 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
647 (/this%dim_ids%max_nmesh_face_nodes, &
648 this%dim_ids%nmesh_face/), &
649 this%var_ids%mesh_face_xbnds), &
653 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
654 (/this%dim_ids%nmesh_face/), &
655 this%var_ids%mesh_face_y), this%nc_fname)
658 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
659 'units', this%lenunits), this%nc_fname)
660 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
661 'standard_name',
'projection_y_coordinate'), &
663 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
664 'long_name',
'Northing'), this%nc_fname)
665 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
666 'mesh_face_ybnds'), this%nc_fname)
668 if (this%gridmap_name /=
'')
then
670 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
671 'grid_mapping', this%gridmap_name), &
676 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
677 (/this%dim_ids%max_nmesh_face_nodes, &
678 this%dim_ids%nmesh_face/), &
679 this%var_ids%mesh_face_ybnds), &
683 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
684 (/this%dim_ids%max_nmesh_face_nodes, &
685 this%dim_ids%nmesh_face/), &
686 this%var_ids%mesh_face_nodes), &
690 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
691 'cf_role',
'face_node_connectivity'), &
693 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
695 'Vertices bounding cell (counterclockwise)'), &
697 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
698 '_FillValue', (/nf90_fill_int/)), &
700 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
701 'start_index', 1), this%nc_fname)