NCPP / ocgis

OpenClimateGIS is a set of geoprocessing and calculation tools for CF-compliant climate datasets.
Other
70 stars 21 forks source link

Center coordinates not supported with ESMF Unstructured #493

Closed bekozi closed 5 years ago

bekozi commented 5 years ago

Node coordinates are supported but element center coordinates are not. For example, the centerCoords variable is ignored when the dimension map is created for this file structure:

netcdf ll1280x1280_grid.esmf {
dimensions:
    nodeCount = 1639680 ;
    elementCount = 1638400 ;
    maxNodePElement = 4 ;
    coordDim = 2 ;
variables:
    double nodeCoords(nodeCount, coordDim) ;
        nodeCoords:units = "degrees" ;
    int elementConn(elementCount, maxNodePElement) ;
        elementConn:long_name = "Node indices that define the element connectivity" ;
        elementConn:_FillValue = -1 ;
    byte numElementConn(elementCount) ;
        numElementConn:long_name = "Number of nodes per element" ;
    double centerCoords(elementCount, coordDim) ;
        centerCoords:units = "degrees" ;
    int elementMask(elementCount) ;

// global attributes:
        :gridType = "unstructured mesh" ;
        :version = "0.9" ;
        :inputFile = "/Users/grids/ll_grids/ll1280x1280_grid.nc" ;
        :timeGenerated = "Tu" ;
}

Ping @rokuingh

bekozi commented 5 years ago

Element center coordinates are interpreted and used correctly when doing optimized subsetting.

Merged to master.