Giter Club home page Giter Club logo

Comments (4)

kwilcox avatar kwilcox commented on September 15, 2024

Good questions. In an ideal world sci-wms wouldn't need to identify the model type, only the grid type. Unfortunately it is used on non CF-UGRID compliant ADCIRC and FVCOM models, so a bunch of model specific checks were added in over time.

I usually check for an R grid first (delta x and delta y are constant in the 2D coordinate variables), then a C grid (data variables are dimensioned by (i, j) and have a "coordinates" attribute which references the 2D coordinate variables which are also dimensioned by (i,j), then a U grid (data variables are dimensioned by a single 2D dimension (node, edge, etc.) and have a "coordinates" attribute pointing to the coordinate variables.

This avoids checking for CF specific things like a global attribute "Conventions", but still uses the CF specific "coordinates" attribute heavily.

So to answer your question: there really isn't a great way to identify a model type. There is no widely used convention for identifying a file as "FVCOM 2.4".

from sci-wms.

rsignell-usgs avatar rsignell-usgs commented on September 15, 2024

Does SCIWMS work with files that actually are CF or UGRID compliant?
I'm guessing not, since that would require a CF or UGRID library. I'd love it if we could add UGRID support to Iris and use Iris for reading both CF and UGRID compliant files.

Folks seem to think that Iris is too big and too hard to build. But now that we have Iris as a conda package, it's pretty easy to install: conda install -c rsignell iris. And the beauty of it is that its got long term support and an established community already using it.

from sci-wms.

brianmckenna avatar brianmckenna commented on September 15, 2024

Rich, Does CF have the concept of

(see GRIB2 specification section 2.2.2 Product Definition Templates)

  • Type of generating process
  • Background generating process identifier (defined by originating centre)
  • Analysis or forecast generating process identifier

In GRIB2, these sit alongside

  • Product Definition Template Number
  • Parameter Category
  • Parameter number

which I know CF abstracts (so no codes are needed)

One of those (or all of those) could be interpreted as "model", and originating centre/center could represent the organization.

At the moment, we're assuming these are unique (for the time being) to COMT which has high interest in who and what ran the dataset. But if they happen to already be in CF conventions, maybe we can use that.

from sci-wms.

rsignell-usgs avatar rsignell-usgs commented on September 15, 2024

The COMT data should all be UGRID or CF compliant. Thus the only thing you should have to look for is the conventions attribute: Conventions: CF-1.X or UGRID-0.9. If they are not CF or UGRID compliant, we likely can make them so via NcML. This is the point of CF and UGRID -- to get away from model-specific code. But the bigger problem is likely that Sci-WMS doesn't know how to handle CF or UGRID if it finds them.

from sci-wms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.