516 class(Mesh2dModelType),
intent(inout) :: this
519 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
520 this%var_ids%mesh), this%nc_fname)
523 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
524 'mesh_topology'), this%nc_fname)
525 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
526 '2D mesh topology'), this%nc_fname)
527 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
528 'topology_dimension', 2), this%nc_fname)
529 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
530 'nmesh_face'), this%nc_fname)
531 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
532 'node_coordinates',
'mesh_node_x mesh_node_y'), &
534 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
535 'face_coordinates',
'mesh_face_x mesh_face_y'), &
537 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
538 'face_node_connectivity',
'mesh_face_nodes'), &
542 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
543 (/this%dim_ids%nmesh_node/), &
544 this%var_ids%mesh_node_x), this%nc_fname)
547 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
548 'units', this%lenunits), this%nc_fname)
549 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
550 'standard_name',
'projection_x_coordinate'), &
552 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
553 'long_name',
'Easting'), this%nc_fname)
555 if (this%wkt /=
'')
then
557 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
558 'grid_mapping', this%gridmap_name), &
563 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
564 (/this%dim_ids%nmesh_node/), &
565 this%var_ids%mesh_node_y), this%nc_fname)
568 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
569 'units', this%lenunits), this%nc_fname)
570 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
571 'standard_name',
'projection_y_coordinate'), &
573 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
574 'long_name',
'Northing'), this%nc_fname)
576 if (this%wkt /=
'')
then
578 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
579 'grid_mapping', this%gridmap_name), &
584 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
585 (/this%dim_ids%nmesh_face/), &
586 this%var_ids%mesh_face_x), this%nc_fname)
589 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
590 'units', this%lenunits), this%nc_fname)
591 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
592 'standard_name',
'projection_x_coordinate'), &
594 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
595 'long_name',
'Easting'), this%nc_fname)
596 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
597 'mesh_face_xbnds'), this%nc_fname)
598 if (this%wkt /=
'')
then
600 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
601 'grid_mapping', this%gridmap_name), &
606 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
607 (/this%dim_ids%max_nmesh_face_nodes, &
608 this%dim_ids%nmesh_face/), &
609 this%var_ids%mesh_face_xbnds), &
613 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
614 (/this%dim_ids%nmesh_face/), &
615 this%var_ids%mesh_face_y), this%nc_fname)
618 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
619 'units', this%lenunits), this%nc_fname)
620 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
621 'standard_name',
'projection_y_coordinate'), &
623 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
624 'long_name',
'Northing'), this%nc_fname)
625 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
626 'mesh_face_ybnds'), this%nc_fname)
628 if (this%wkt /=
'')
then
630 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
631 'grid_mapping', this%gridmap_name), &
636 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
637 (/this%dim_ids%max_nmesh_face_nodes, &
638 this%dim_ids%nmesh_face/), &
639 this%var_ids%mesh_face_ybnds), &
643 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
644 (/this%dim_ids%max_nmesh_face_nodes, &
645 this%dim_ids%nmesh_face/), &
646 this%var_ids%mesh_face_nodes), &
650 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
651 'cf_role',
'face_node_connectivity'), &
653 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
655 'Vertices bounding cell (counterclockwise)'), &
657 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
658 '_FillValue', (/nf90_fill_int/)), &
660 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
661 'start_index', 1), this%nc_fname)