517 class(Mesh2dModelType),
intent(inout) :: this
520 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
521 this%var_ids%mesh), this%nc_fname)
524 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
525 'mesh_topology'), this%nc_fname)
526 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
527 '2D mesh topology'), this%nc_fname)
528 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
529 'topology_dimension', 2), this%nc_fname)
530 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
531 'nmesh_face'), this%nc_fname)
532 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
533 'node_coordinates',
'mesh_node_x mesh_node_y'), &
535 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
536 'face_coordinates',
'mesh_face_x mesh_face_y'), &
538 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
539 'face_node_connectivity',
'mesh_face_nodes'), &
543 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
544 (/this%dim_ids%nmesh_node/), &
545 this%var_ids%mesh_node_x), this%nc_fname)
548 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
549 'units', this%lenunits), this%nc_fname)
550 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
551 'standard_name',
'projection_x_coordinate'), &
553 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
554 'long_name',
'Easting'), this%nc_fname)
556 if (this%wkt /=
'')
then
558 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
559 'grid_mapping', this%gridmap_name), &
564 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
565 (/this%dim_ids%nmesh_node/), &
566 this%var_ids%mesh_node_y), this%nc_fname)
569 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
570 'units', this%lenunits), this%nc_fname)
571 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
572 'standard_name',
'projection_y_coordinate'), &
574 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
575 'long_name',
'Northing'), this%nc_fname)
577 if (this%wkt /=
'')
then
579 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
580 'grid_mapping', this%gridmap_name), &
585 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
586 (/this%dim_ids%nmesh_face/), &
587 this%var_ids%mesh_face_x), this%nc_fname)
590 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
591 'units', this%lenunits), this%nc_fname)
592 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
593 'standard_name',
'projection_x_coordinate'), &
595 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
596 'long_name',
'Easting'), this%nc_fname)
597 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
598 'mesh_face_xbnds'), this%nc_fname)
599 if (this%wkt /=
'')
then
601 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
602 'grid_mapping', this%gridmap_name), &
607 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
608 (/this%dim_ids%max_nmesh_face_nodes, &
609 this%dim_ids%nmesh_face/), &
610 this%var_ids%mesh_face_xbnds), &
614 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
615 (/this%dim_ids%nmesh_face/), &
616 this%var_ids%mesh_face_y), this%nc_fname)
619 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
620 'units', this%lenunits), this%nc_fname)
621 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
622 'standard_name',
'projection_y_coordinate'), &
624 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
625 'long_name',
'Northing'), this%nc_fname)
626 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
627 'mesh_face_ybnds'), this%nc_fname)
629 if (this%wkt /=
'')
then
631 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
632 'grid_mapping', this%gridmap_name), &
637 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
638 (/this%dim_ids%max_nmesh_face_nodes, &
639 this%dim_ids%nmesh_face/), &
640 this%var_ids%mesh_face_ybnds), &
644 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
645 (/this%dim_ids%max_nmesh_face_nodes, &
646 this%dim_ids%nmesh_face/), &
647 this%var_ids%mesh_face_nodes), &
651 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
652 'cf_role',
'face_node_connectivity'), &
654 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
656 'Vertices bounding cell (counterclockwise)'), &
658 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
659 '_FillValue', (/nf90_fill_int/)), &
661 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
662 'start_index', 1), this%nc_fname)