Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gribberish name in xarray backend is difficult to parse/generate #72

Open
henrymartin1 opened this issue Dec 19, 2024 · 2 comments
Open

Comments

@henrymartin1
Copy link

Hi,
really awesome library! I was working on ingesting a subset of GFS data and gribberish is really quite handy with that. I was very happy about the xarray backend that is capable of ingesting the whole gribfile as array.
However, I think that the given to the variables in xarray is currently difficult to work with. I have two issues at the moment:

  • Variable name changes depending on total dataset ingested:
    If a base variable name exists only once in a grib file, it is named as only the basename (e.g., temp) but if the basename exists multiple times than the same variable becomes basename + hash (e.g., tmp_TMPsigma_fcst. I think it would be easier to work with if the variable name would always be basename + hash no matter what.

  • some parts of the hash have no separator:
    Currently the hash is generated as:
    {variable_name}_{variable_name.upper()}{surface_type}_{statistical_process}{generating_process}
    It therefore has two parts which are not separated by an underscore (i.e., in tcdc_TCDCmcl_avgfcst). In order to split the name in its components, a fairly complex logic is required. Would it be possible to change the naming into
    {variable_name}_{variable_name.upper()}_{surface_type}_{statistical_process}_{generating_process} ?

@mpiannucci
Copy link
Owner

mpiannucci commented Dec 20, 2024

This is great input thank you! I think to solve this, i will split out the var, surface, stat process and the generating process to start, and also add an option to shrink the naming or not based on what has been filtered out.

I am also trying to figure out if the way cfgrib works for this is preferred, where you choose the levels you care about so you dont have these weird names. This is where i am leaning toward if that is useful

@mpiannucci
Copy link
Owner

mpiannucci commented Dec 20, 2024

I am also trying to figure out if the way cfgrib works for this is preferred, where you choose the levels you care about so you dont have these weird names. This is where i am leaning toward if that is useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants