348 class(Mesh2dModelType),
intent(inout) :: this
351 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
352 this%var_ids%mesh), this%nc_fname)
355 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
356 'mesh_topology'), this%nc_fname)
357 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
358 '2D mesh topology'), this%nc_fname)
359 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
360 'topology_dimension', 2), this%nc_fname)
361 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
362 'nmesh_face'), this%nc_fname)
363 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
364 'node_coordinates',
'mesh_node_x mesh_node_y'), &
366 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
367 'face_coordinates',
'mesh_face_x mesh_face_y'), &
369 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
370 'face_node_connectivity',
'mesh_face_nodes'), &
374 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
375 (/this%dim_ids%nmesh_node/), &
376 this%var_ids%mesh_node_x), this%nc_fname)
379 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
380 'units',
'm'), this%nc_fname)
381 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
382 'standard_name',
'projection_x_coordinate'), &
384 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
385 'long_name',
'Easting'), this%nc_fname)
387 if (this%ogc_wkt /=
'')
then
389 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
390 'grid_mapping', this%gridmap_name), &
395 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
396 (/this%dim_ids%nmesh_node/), &
397 this%var_ids%mesh_node_y), this%nc_fname)
400 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
401 'units',
'm'), this%nc_fname)
402 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
403 'standard_name',
'projection_y_coordinate'), &
405 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
406 'long_name',
'Northing'), this%nc_fname)
408 if (this%ogc_wkt /=
'')
then
410 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
411 'grid_mapping', this%gridmap_name), &
416 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
417 (/this%dim_ids%nmesh_face/), &
418 this%var_ids%mesh_face_x), this%nc_fname)
421 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
422 'units',
'm'), this%nc_fname)
423 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
424 'standard_name',
'projection_x_coordinate'), &
426 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
427 'long_name',
'Easting'), this%nc_fname)
428 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
429 'mesh_face_xbnds'), this%nc_fname)
430 if (this%ogc_wkt /=
'')
then
432 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
433 'grid_mapping', this%gridmap_name), &
438 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
439 (/this%dim_ids%max_nmesh_face_nodes, &
440 this%dim_ids%nmesh_face/), &
441 this%var_ids%mesh_face_xbnds), &
445 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
446 (/this%dim_ids%nmesh_face/), &
447 this%var_ids%mesh_face_y), this%nc_fname)
450 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
451 'units',
'm'), this%nc_fname)
452 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
453 'standard_name',
'projection_y_coordinate'), &
455 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
456 'long_name',
'Northing'), this%nc_fname)
457 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
458 'mesh_face_ybnds'), this%nc_fname)
460 if (this%ogc_wkt /=
'')
then
462 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
463 'grid_mapping', this%gridmap_name), &
468 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
469 (/this%dim_ids%max_nmesh_face_nodes, &
470 this%dim_ids%nmesh_face/), &
471 this%var_ids%mesh_face_ybnds), &
475 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
476 (/this%dim_ids%max_nmesh_face_nodes, &
477 this%dim_ids%nmesh_face/), &
478 this%var_ids%mesh_face_nodes), &
482 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
483 'cf_role',
'face_node_connectivity'), &
485 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
487 'Vertices bounding cell (counterclockwise)'), &
489 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
490 '_FillValue', (/nf90_fill_int/)), &
492 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
493 'start_index', 1), this%nc_fname)