342 class(Mesh2dModelType),
intent(inout) :: this
345 call nf_verify(nf90_def_var(this%ncid, this%mesh_name, nf90_int, &
346 this%var_ids%mesh), this%nc_fname)
349 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'cf_role', &
350 'mesh_topology'), this%nc_fname)
351 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'long_name', &
352 '2D mesh topology'), this%nc_fname)
353 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
354 'topology_dimension', 2), this%nc_fname)
355 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh,
'face_dimension', &
356 'nmesh_face'), this%nc_fname)
357 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
358 'node_coordinates',
'mesh_node_x mesh_node_y'), &
360 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
361 'face_coordinates',
'mesh_face_x mesh_face_y'), &
363 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh, &
364 'face_node_connectivity',
'mesh_face_nodes'), &
368 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_x', nf90_double, &
369 (/this%dim_ids%nmesh_node/), &
370 this%var_ids%mesh_node_x), this%nc_fname)
373 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
374 'units',
'm'), this%nc_fname)
375 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
376 'standard_name',
'projection_x_coordinate'), &
378 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
379 'long_name',
'Easting'), this%nc_fname)
381 if (this%ogc_wkt /=
'')
then
383 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_x, &
384 'grid_mapping', this%gridmap_name), &
389 call nf_verify(nf90_def_var(this%ncid,
'mesh_node_y', nf90_double, &
390 (/this%dim_ids%nmesh_node/), &
391 this%var_ids%mesh_node_y), this%nc_fname)
394 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
395 'units',
'm'), this%nc_fname)
396 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
397 'standard_name',
'projection_y_coordinate'), &
399 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
400 'long_name',
'Northing'), this%nc_fname)
402 if (this%ogc_wkt /=
'')
then
404 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_node_y, &
405 'grid_mapping', this%gridmap_name), &
410 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_x', nf90_double, &
411 (/this%dim_ids%nmesh_face/), &
412 this%var_ids%mesh_face_x), this%nc_fname)
415 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
416 'units',
'm'), this%nc_fname)
417 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
418 'standard_name',
'projection_x_coordinate'), &
420 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
421 'long_name',
'Easting'), this%nc_fname)
422 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x,
'bounds', &
423 'mesh_face_xbnds'), this%nc_fname)
424 if (this%ogc_wkt /=
'')
then
426 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_x, &
427 'grid_mapping', this%gridmap_name), &
432 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_xbnds', nf90_double, &
433 (/this%dim_ids%max_nmesh_face_nodes, &
434 this%dim_ids%nmesh_face/), &
435 this%var_ids%mesh_face_xbnds), &
439 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_y', nf90_double, &
440 (/this%dim_ids%nmesh_face/), &
441 this%var_ids%mesh_face_y), this%nc_fname)
444 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
445 'units',
'm'), this%nc_fname)
446 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
447 'standard_name',
'projection_y_coordinate'), &
449 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
450 'long_name',
'Northing'), this%nc_fname)
451 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y,
'bounds', &
452 'mesh_face_ybnds'), this%nc_fname)
454 if (this%ogc_wkt /=
'')
then
456 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_y, &
457 'grid_mapping', this%gridmap_name), &
462 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_ybnds', nf90_double, &
463 (/this%dim_ids%max_nmesh_face_nodes, &
464 this%dim_ids%nmesh_face/), &
465 this%var_ids%mesh_face_ybnds), &
469 call nf_verify(nf90_def_var(this%ncid,
'mesh_face_nodes', nf90_int, &
470 (/this%dim_ids%max_nmesh_face_nodes, &
471 this%dim_ids%nmesh_face/), &
472 this%var_ids%mesh_face_nodes), &
476 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
477 'cf_role',
'face_node_connectivity'), &
479 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
481 'Vertices bounding cell (counterclockwise)'), &
483 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
484 '_FillValue', (/nf90_fill_int/)), &
486 call nf_verify(nf90_put_att(this%ncid, this%var_ids%mesh_face_nodes, &
487 'start_index', 1), this%nc_fname)