Difference between revisions of "New UGRID netcdf format v0.9"

From ccrmwiki
Jump to: navigation, search
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found  
+
An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v1.0 as found  
 
[https://github.com/ugrid-conventions/ugrid-conventions here].
 
[https://github.com/ugrid-conventions/ugrid-conventions here].
  
A few SELFE user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):
+
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):
  
 
<UL>
 
<UL>
   <LI> CAL-DWR (Eli Ateljevich et al): have built a VisIT plug-in for the native binary and v0.9 format
+
   <LI> CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;
   <LI> MetOcean, NZ (Brett Beamsley): have made attempt to output
+
   <LI> MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;
   <LI> Haihua Xu (Nat. Univ Singapore): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT) based on some older UGRID netcdf standard, for ELCIRC and SELFE;
+
   <LI> Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;
   <LI> Joseph Zhang (OHSU & VIMS): the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed >8 years ago;
+
   <LI> OHSU & VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed >8 years ago;
 
</UL>
 
</UL>
 +
 +
 +
Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs.
 +
 +
Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names.
 +
 +
<nowiki>
 +
netcdf example_compressed {
 +
dimensions:
 +
    nSCHISM_hgrid_node          = 144773 ;
 +
    nSCHISM_hgrid_face          = 238116 ;
 +
    nSCHISM_hgrid_edge          = 400000 ;
 +
    nMaxSCHISM_hgrid_face_nodes = 4 ;
 +
    SCHISM_vgrid_layers        = 51;
 +
    two                  = 2 ;
 +
    time = UNLIMITED ;
 +
variables:
 +
float time(time) ;
 +
time:long_name = "Time" ;
 +
 +
time:units = "seconds since 2013-28-08  00:00:00 PST" ;
 +
time:base_date = "08/28/2013 00:00:00 PST                        " ;
 +
time:standard_name = "time" ;
 +
   
 +
    int SCHISM_hgrid ;
 +
SCHISM_hgrid:cf_role = "mesh_topology" ;
 +
SCHISM_hgrid:long_name = "Topology data of 2d unstructured mesh" ;
 +
SCHISM_hgrid:topology_dimension = 2 ;
 +
SCHISM_hgrid:node_coordinates = "SCHISM_hgrid_node_x SCHISM_hgrid_node_y" ;
 +
SCHISM_hgrid:face_node_connectivity = "SCHISM_hgrid_face_nodes" ;
 +
        SCHISM_hgrid:edge_coordinates  = "SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y" ;
 +
        SCHISM_hgrid:face_coordinates  = "SCHISM_hgrid_face_x SCHISM_hgrid_face_y" ;
 +
        SCHISM_hgrid:edge_node_connectivity = "SCHISM_hgrid_edge_nodes";
 +
       
 +
    int Mesh3D;
 +
        Mesh3D:cf_role = "mesh_topology" ;
 +
Mesh3D:long_name = "Topology data of 3d unstructured mesh" ;
 +
Mesh3D:topology_dimension = 3 ;
 +
       
 +
    int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;
 +
        SCHISM_hgrid_face_nodes:long_name = "Horizontal Triangular Element Table" ;
 +
        SCHISM_hgrid_face_nodes:units = "non-dimensional" ;
 +
SCHISM_hgrid_face_nodes:cf_role = "face_node_connectivity" ;
 +
SCHISM_hgrid_face_nodes:start_index = 1 ;
 +
        SCHISM_hgrid_face_nodes:_FillValue = -999999;
 +
       
 +
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);
 +
        SCHISM_hgrid_edge_nodes:cf_role ="edge_node_connectivity";
 +
        SCHISM_hgrid_edge_nodes:long_name ="Map every edge to the two nodes that it connects";
 +
        SCHISM_hgrid_edge_nodes:start_index =1; 
 +
       
 +
    float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;
 +
        SCHISM_hgrid_node_x:long_name = "x_coordinates" ;
 +
SCHISM_hgrid_node_x:units = "meters" ;      # alternatively, degrees lat/lon
 +
SCHISM_hgrid_node_x:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_node_x:location = "node" ;
 +
       
 +
    float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;
 +
SCHISM_hgrid_node_y:long_name = "y_coordinates" ;
 +
SCHISM_hgrid_node_y:units = "meters" ;      # alternatively, degrees lat/lon
 +
SCHISM_hgrid_node_y:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_node_y:location = "node";
 +
       
 +
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;
 +
SCHISM_hgrid_face_x:long_name = "x_coordinates of 2D mesh face" ;
 +
SCHISM_hgrid_face_x:units = "meters" ;
 +
SCHISM_hgrid_face_x:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_face_x:location = "face" ;   
 +
   
 +
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;
 +
SCHISM_hgrid_face_y:long_name = "y_coordinates of 2D mesh face" ;
 +
SCHISM_hgrid_face_y:units = "meters" ;
 +
SCHISM_hgrid_face_y:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_face_y:location = "face" ;
 +
 +
 +
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;
 +
SCHISM_hgrid_edge_x:long_name = "x_coordinates of 2D mesh edge" ;
 +
SCHISM_hgrid_edge_x:units = "meters" ;
 +
SCHISM_hgrid_edge_x:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_edge_x:location = "edge" ; 
 +
 +
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;
 +
SCHISM_hgrid_edge_y:long_name = "y_coordinates of 2D mesh edge" ;
 +
SCHISM_hgrid_edge_y:units = "meters" ;
 +
SCHISM_hgrid_edge_y:mesh = "SCHISM_hgrid" ;
 +
SCHISM_hgrid_edge_y:location = "edge" ;         
 +
     
 +
       
 +
    float depth(nSCHISM_hgrid_node) ;
 +
depth:long_name = "Bathymetry" ;
 +
depth:units = "meters" ;
 +
depth:positive = "down" ;
 +
depth:mesh = "SCHISM_hgrid" ;
 +
depth:location = "node" ;
 +
 +
 +
       
 +
       
 +
// type 61 elev.61
 +
 +
    float elev(time,nSCHISM_hgrid_node);
 +
    elev:long_name ="water surface height above reference datum";
 +
    elev:missing_value = "-999999.0";
 +
    elev:mesh ="SCHISM_hgrid";
 +
    elev:location="node";
 +
   
 +
// type 62 wind.62
 +
 +
    float u(time, nSCHISM_hgrid_node) ;
 +
    u:long_name = "Eastward Wind Velocity" ;
 +
    u:missing_value = "-999999." ;
 +
    u:mesh = "SCHISM_hgrid" ;
 +
    u:location = "node" ;
 +
   
 +
    float v(time, nv, node) ;
 +
    v:long_name = "Northward Wind Velocity" ;
 +
    v:missing_value = "-999999." ;
 +
    v:mesh = "SCHISM_hgrid" ;
 +
    v:location = "node" ;
 +
       
 +
       
 +
// type 63, salt.63 temp.63
 +
 +
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);
 +
    salt:long_name ="water practical salinity";
 +
    salt:missing_value ="-9999999.0";
 +
    salt:mesh = "SCHISM_hgrid";
 +
    salt:location ="node";
 +
   
 +
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);
 +
    temp:long_name ="water temperature";
 +
    temp:missing_value ="-9999999.0";
 +
    temp:mesh = "SCHISM_hgrid";
 +
    temp:location ="node";
 +
   
 +
   
 +
// type 64, hvel.64
 +
 +
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;
 +
    u:long_name = "Eastward Water Velocity" ;
 +
    u:missing_value = "-999999." ;
 +
    u:missing_value = "-999999." ;
 +
    u:mesh = "SCHISM_hgrid" ;
 +
    u:location = "node" ;
 +
   
 +
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;
 +
    v:long_name = "Northward Water Velocity" ;
 +
    v:missing_value = "-999999." ;
 +
    v:mesh = "SCHISM_hgrid" ;
 +
    v:location = "node" ;
 +
   
 +
   
 +
// type 65 omit
 +
 +
 +
// type 66 dtbe.66
 +
 +
    float dtbe(time,nSCHISM_hgrid_face);
 +
    dtbe:long_name ="minimal time step allowed at each element";
 +
    dtbe:missing_value ="-999999.";
 +
    dtbe:mesh ="SCHISM_hgrid";
 +
    dtbe:location="node"; <--edge?
 +
   
 +
// type 67 vector at 3d mesh edge center
 +
 +
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;
 +
    u:long_name = "Eastward Water Velocity" ;
 +
    u:missing_value = "-999999." ;
 +
    u:mesh = "SCHISM_hgrid" ;
 +
    u:location = "edge" ;
 +
   
 +
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;
 +
    v:long_name = "Northward Water Velocity" ;
 +
    v:missing_value = "-999999." ;
 +
    v:mesh = "SCHISM_hgrid" ;
 +
    v:location = "edge" ;
 +
   
 +
   
 +
//type 68 omit
 +
 +
 +
//type 69 vert.69
 +
 +
  float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
 +
  w:long_name="vertical velocity at face center at all levels";
 +
  w:missing_value ="-999999.0";
 +
  w:mesh ="SCHISM_hgrid";
 +
  w:location ="face";
 +
 
 +
 
 +
//type 70 temp.70 salt.70
 +
 
 +
  float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
 +
  salt:long_name ="water practical salinity";
 +
  salt:missing_value ="-9999999.0";
 +
  salt:mesh = "SCHISM_hgrid";
 +
  salt:location ="volume";
 +
 +
  float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
 +
  temp:long_name ="water temperature";
 +
  temp:missing_value ="-9999999.0";
 +
  temp:mesh = "SCHISM_hgrid";
 +
  temp:location ="volume";
 +
 +
 +
   
 +
 +
 +
// global attributes:
 +
    :Conventions = "CF-1.0" ;
 +
data:
 +
 +
time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000,
 +
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000,
 +
    75600, 79200, 82800, 86400 ;
 +
 +
 +
}

Latest revision as of 15:48, 9 February 2017

An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v1.0 as found here.

A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):

  • CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;
  • MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;
  • Nat. Univ Singapore (Haihua Xu): have built a package (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;
  • OHSU & VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed >8 years ago;


Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs.

Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names.

<nowiki>

netcdf example_compressed { dimensions:

   nSCHISM_hgrid_node          = 144773 ;
   nSCHISM_hgrid_face          = 238116 ;
   nSCHISM_hgrid_edge          = 400000 ;
   nMaxSCHISM_hgrid_face_nodes = 4 ;
   SCHISM_vgrid_layers         = 51;
   two                  = 2 ;
   time = UNLIMITED ; 

variables: float time(time) ; time:long_name = "Time" ;

time:units = "seconds since 2013-28-08 00:00:00 PST" ; time:base_date = "08/28/2013 00:00:00 PST " ; time:standard_name = "time" ;

   int SCHISM_hgrid ;

SCHISM_hgrid:cf_role = "mesh_topology" ; SCHISM_hgrid:long_name = "Topology data of 2d unstructured mesh" ; SCHISM_hgrid:topology_dimension = 2 ; SCHISM_hgrid:node_coordinates = "SCHISM_hgrid_node_x SCHISM_hgrid_node_y" ; SCHISM_hgrid:face_node_connectivity = "SCHISM_hgrid_face_nodes" ;

       SCHISM_hgrid:edge_coordinates  = "SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y" ;
       SCHISM_hgrid:face_coordinates  = "SCHISM_hgrid_face_x SCHISM_hgrid_face_y" ;
       SCHISM_hgrid:edge_node_connectivity = "SCHISM_hgrid_edge_nodes";
       
   int Mesh3D;
       Mesh3D:cf_role = "mesh_topology" ;

Mesh3D:long_name = "Topology data of 3d unstructured mesh" ; Mesh3D:topology_dimension = 3 ;

   int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;
       SCHISM_hgrid_face_nodes:long_name = "Horizontal Triangular Element Table" ;
       SCHISM_hgrid_face_nodes:units = "non-dimensional" ;

SCHISM_hgrid_face_nodes:cf_role = "face_node_connectivity" ; SCHISM_hgrid_face_nodes:start_index = 1 ;

       SCHISM_hgrid_face_nodes:_FillValue = -999999;
       
   int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);
       SCHISM_hgrid_edge_nodes:cf_role ="edge_node_connectivity";
       SCHISM_hgrid_edge_nodes:long_name ="Map every edge to the two nodes that it connects";
       SCHISM_hgrid_edge_nodes:start_index =1;  
       
   float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;
       SCHISM_hgrid_node_x:long_name = "x_coordinates" ;

SCHISM_hgrid_node_x:units = "meters" ; # alternatively, degrees lat/lon SCHISM_hgrid_node_x:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_node_x:location = "node" ;

   float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;

SCHISM_hgrid_node_y:long_name = "y_coordinates" ; SCHISM_hgrid_node_y:units = "meters" ; # alternatively, degrees lat/lon SCHISM_hgrid_node_y:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_node_y:location = "node";

   float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;

SCHISM_hgrid_face_x:long_name = "x_coordinates of 2D mesh face" ; SCHISM_hgrid_face_x:units = "meters" ; SCHISM_hgrid_face_x:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_face_x:location = "face" ;

   float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;

SCHISM_hgrid_face_y:long_name = "y_coordinates of 2D mesh face" ; SCHISM_hgrid_face_y:units = "meters" ; SCHISM_hgrid_face_y:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_face_y:location = "face" ;


   float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;

SCHISM_hgrid_edge_x:long_name = "x_coordinates of 2D mesh edge" ; SCHISM_hgrid_edge_x:units = "meters" ; SCHISM_hgrid_edge_x:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_edge_x:location = "edge" ;

   float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;

SCHISM_hgrid_edge_y:long_name = "y_coordinates of 2D mesh edge" ; SCHISM_hgrid_edge_y:units = "meters" ; SCHISM_hgrid_edge_y:mesh = "SCHISM_hgrid" ; SCHISM_hgrid_edge_y:location = "edge" ;


   float depth(nSCHISM_hgrid_node) ;

depth:long_name = "Bathymetry" ; depth:units = "meters" ; depth:positive = "down" ; depth:mesh = "SCHISM_hgrid" ; depth:location = "node" ;



// type 61 elev.61

   float elev(time,nSCHISM_hgrid_node);
   elev:long_name ="water surface height above reference datum";
   elev:missing_value = "-999999.0";
   elev:mesh ="SCHISM_hgrid";
   elev:location="node";
   
// type 62 wind.62

   float u(time, nSCHISM_hgrid_node) ;
   u:long_name = "Eastward Wind Velocity" ;
   u:missing_value = "-999999." ;
   u:mesh = "SCHISM_hgrid" ;
   u:location = "node" ;
   
   float v(time, nv, node) ;
   v:long_name = "Northward Wind Velocity" ;
   v:missing_value = "-999999." ;
   v:mesh = "SCHISM_hgrid" ;
   v:location = "node" ;
       
       
// type 63, salt.63 temp.63

   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);
   salt:long_name ="water practical salinity";
   salt:missing_value ="-9999999.0";
   salt:mesh = "SCHISM_hgrid";
   salt:location ="node";
   
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);
   temp:long_name ="water temperature";
   temp:missing_value ="-9999999.0";
   temp:mesh = "SCHISM_hgrid";
   temp:location ="node";
   
   
// type 64, hvel.64
   float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;
   u:long_name = "Eastward Water Velocity" ;
   u:missing_value = "-999999." ;
   u:missing_value = "-999999." ;
   u:mesh = "SCHISM_hgrid" ;
   u:location = "node" ;
   
   float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;
   v:long_name = "Northward Water Velocity" ;
   v:missing_value = "-999999." ;
   v:mesh = "SCHISM_hgrid" ;
   v:location = "node" ;
   
   
// type 65 omit


// type 66 dtbe.66

   float dtbe(time,nSCHISM_hgrid_face);
   dtbe:long_name ="minimal time step allowed at each element";
   dtbe:missing_value ="-999999.";
   dtbe:mesh ="SCHISM_hgrid";
   dtbe:location="node"; <--edge?
   
// type 67 vector at 3d mesh edge center

   float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;
   u:long_name = "Eastward Water Velocity" ;
   u:missing_value = "-999999." ;
   u:mesh = "SCHISM_hgrid" ;
   u:location = "edge" ;
   
   float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;
   v:long_name = "Northward Water Velocity" ;
   v:missing_value = "-999999." ;
   v:mesh = "SCHISM_hgrid" ;
   v:location = "edge" ;
   
   
//type 68 omit


//type 69 vert.69 

  float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
  w:long_name="vertical velocity at face center at all levels";
  w:missing_value ="-999999.0";
  w:mesh ="SCHISM_hgrid";
  w:location ="face";
  
  
//type 70 temp.70 salt.70
  
  float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
  salt:long_name ="water practical salinity";
  salt:missing_value ="-9999999.0";
  salt:mesh = "SCHISM_hgrid";
  salt:location ="volume";
  float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);
  temp:long_name ="water temperature";
  temp:missing_value ="-9999999.0";
  temp:mesh = "SCHISM_hgrid";
  temp:location ="volume";


   


// global attributes:

   :Conventions = "CF-1.0" ;

data:

time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, 
   39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, 
   75600, 79200, 82800, 86400 ;


}