356 class(Mesh2dModelType),
intent(inout) :: this
359 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
360 this%var_ids%mesh), this%nc_fname)
363 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
364 'mesh_topology'), this%nc_fname)
365 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
366 '2D mesh topology'), this%nc_fname)
367 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
368 'topology_dimension', 2), this%nc_fname)
369 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
370 'nmesh_face'), this%nc_fname)
371 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
372 'node_coordinates',
'mesh_node_x mesh_node_y'), &
374 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
375 'face_coordinates',
'mesh_face_x mesh_face_y'), &
377 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
378 'face_node_connectivity',
'mesh_face_nodes'), &
382 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
383 (/this%dim_ids%nmesh_node/), &
384 this%var_ids%mesh_node_x), this%nc_fname)
387 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
388 'units', this%lenunits), this%nc_fname)
389 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
390 'standard_name',
'projection_x_coordinate'), &
392 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
393 'long_name',
'Easting'), this%nc_fname)
395 if (this%wkt /=
'')
then
397 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
398 'grid_mapping', this%gridmap_name), &
403 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
404 (/this%dim_ids%nmesh_node/), &
405 this%var_ids%mesh_node_y), this%nc_fname)
408 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
409 'units', this%lenunits), this%nc_fname)
410 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
411 'standard_name',
'projection_y_coordinate'), &
413 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
414 'long_name',
'Northing'), this%nc_fname)
416 if (this%wkt /=
'')
then
418 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
419 'grid_mapping', this%gridmap_name), &
424 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
425 (/this%dim_ids%nmesh_face/), &
426 this%var_ids%mesh_face_x), this%nc_fname)
429 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
430 'units', this%lenunits), this%nc_fname)
431 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
432 'standard_name',
'projection_x_coordinate'), &
434 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
435 'long_name',
'Easting'), this%nc_fname)
436 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
437 'mesh_face_xbnds'), this%nc_fname)
438 if (this%wkt /=
'')
then
440 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
441 'grid_mapping', this%gridmap_name), &
446 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
447 (/this%dim_ids%max_nmesh_face_nodes, &
448 this%dim_ids%nmesh_face/), &
449 this%var_ids%mesh_face_xbnds), &
453 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
454 (/this%dim_ids%nmesh_face/), &
455 this%var_ids%mesh_face_y), this%nc_fname)
458 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
459 'units', this%lenunits), this%nc_fname)
460 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
461 'standard_name',
'projection_y_coordinate'), &
463 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
464 'long_name',
'Northing'), this%nc_fname)
465 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
466 'mesh_face_ybnds'), this%nc_fname)
468 if (this%wkt /=
'')
then
470 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
471 'grid_mapping', this%gridmap_name), &
476 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
477 (/this%dim_ids%max_nmesh_face_nodes, &
478 this%dim_ids%nmesh_face/), &
479 this%var_ids%mesh_face_ybnds), &
483 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
484 (/this%dim_ids%max_nmesh_face_nodes, &
485 this%dim_ids%nmesh_face/), &
486 this%var_ids%mesh_face_nodes), &
490 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
491 'cf_role',
'face_node_connectivity'), &
493 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
495 'Vertices bounding cell (counterclockwise)'), &
497 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
498 '_FillValue', (/nf90_fill_int/)), &
500 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
501 'start_index', 1), this%nc_fname)