525 class(Mesh2dModelType),
intent(inout) :: this
528 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
529 this%var_ids%mesh), this%nc_fname)
532 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
533 'mesh_topology'), this%nc_fname)
534 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
535 '2D mesh topology'), this%nc_fname)
536 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
537 'topology_dimension', 2), this%nc_fname)
538 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
539 'nmesh_face'), this%nc_fname)
540 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
541 'node_coordinates',
'mesh_node_x mesh_node_y'), &
543 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
544 'face_coordinates',
'mesh_face_x mesh_face_y'), &
546 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
547 'face_node_connectivity',
'mesh_face_nodes'), &
551 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
552 (/this%dim_ids%nmesh_node/), &
553 this%var_ids%mesh_node_x), this%nc_fname)
556 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
557 'units', this%lenunits), this%nc_fname)
558 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
559 'standard_name',
'projection_x_coordinate'), &
561 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
562 'long_name',
'Easting'), this%nc_fname)
564 if (this%gridmap_name /=
'')
then
566 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
567 'grid_mapping', this%gridmap_name), &
572 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
573 (/this%dim_ids%nmesh_node/), &
574 this%var_ids%mesh_node_y), this%nc_fname)
577 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
578 'units', this%lenunits), this%nc_fname)
579 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
580 'standard_name',
'projection_y_coordinate'), &
582 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
583 'long_name',
'Northing'), this%nc_fname)
585 if (this%gridmap_name /=
'')
then
587 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
588 'grid_mapping', this%gridmap_name), &
593 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
594 (/this%dim_ids%nmesh_face/), &
595 this%var_ids%mesh_face_x), this%nc_fname)
598 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
599 'units', this%lenunits), this%nc_fname)
600 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
601 'standard_name',
'projection_x_coordinate'), &
603 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
604 'long_name',
'Easting'), this%nc_fname)
605 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
606 'mesh_face_xbnds'), this%nc_fname)
607 if (this%gridmap_name /=
'')
then
609 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
610 'grid_mapping', this%gridmap_name), &
615 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
616 (/this%dim_ids%max_nmesh_face_nodes, &
617 this%dim_ids%nmesh_face/), &
618 this%var_ids%mesh_face_xbnds), &
622 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
623 (/this%dim_ids%nmesh_face/), &
624 this%var_ids%mesh_face_y), this%nc_fname)
627 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
628 'units', this%lenunits), this%nc_fname)
629 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
630 'standard_name',
'projection_y_coordinate'), &
632 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
633 'long_name',
'Northing'), this%nc_fname)
634 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
635 'mesh_face_ybnds'), this%nc_fname)
637 if (this%gridmap_name /=
'')
then
639 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
640 'grid_mapping', this%gridmap_name), &
645 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
646 (/this%dim_ids%max_nmesh_face_nodes, &
647 this%dim_ids%nmesh_face/), &
648 this%var_ids%mesh_face_ybnds), &
652 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
653 (/this%dim_ids%max_nmesh_face_nodes, &
654 this%dim_ids%nmesh_face/), &
655 this%var_ids%mesh_face_nodes), &
659 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
660 'cf_role',
'face_node_connectivity'), &
662 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
664 'Vertices bounding cell (counterclockwise)'), &
666 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
667 '_FillValue', (/nf90_fill_int/)), &
669 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
670 'start_index', 1), this%nc_fname)