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

specific depth variables we look for in our netCDF files (from Jay) #14

Open
kthyng opened this issue Apr 12, 2022 · 1 comment
Open

Comments

@kthyng
Copy link
Collaborator

kthyng commented Apr 12, 2022

Below are the specific depth variables we look for in our netCDF files. For Sigma-leveled data:

default_names = {'Cs_r': ['Cs_r'],
                 'Cs_w': ['Cs_w'],
                 's_rho': ['s_rho'],
                 's_w':['s_w'],
                 'hc': ['hc'],
                 'bathymetry': ['h'],
                 'zeta': ['zeta']
                 }
cf_names = {'Cs_r': ['S-coordinate stretching curves at RHO-points'],
            'Cs_w': ['S-coordinate stretching curves at W-points'],
            's_rho': ['S-coordinate at RHO-points'],
            's_w':['S-coordinate at W-points'],
            'hc': ['S-coordinate parameter, critical depth'],
            'bathymetry': ['bathymetry at RHO-points'],
            'zeta': ['free-surface']
            }

For Level-depth data:

default_names = {'depth': ['depth','depth_levels']}
cf_names = {'depth': 'depth'}

If a particular model has names that are different from the ones above, I think it is preferable to NOT try and alter the name when writing to output files. If gridded runs into difficulty we can add names and cf names as necessary.

@kthyng
Copy link
Collaborator Author

kthyng commented Apr 12, 2022

I wanted to move this here so everyone can see it. Also here are my thoughts at the moment:

  • These variables are brought along with a Dataset if extract_model function filter is used to narrow from the full Dataset to a smaller number of variables (using for example a list of the standard_names of variables you want to save). These variables that are used to calculate the vertical coordinates are meant to be brought along WITHOUT the user saying anything, but it has mostly been tested for ROMS. Still, that is the function to focus on to improve behavior, from my perspective.
  • The reason you don't need to know the names of the variables for calculating vertical coordinates ahead of time is that the variables e.g. in ROMS s_rho and s_w each have an attribute which maps the variables needed for the calculation to the variable name in the model file.
  • If the depths already exist e.g. when the model has fixed depth levels or has already been interpolated to fixed depth levels, that should be reflected in the model catalog entry, identifying the "Z" axis as the depth level.

For anything that doesn't work as it exists currently, my preference would be to add information to the catalog model entry ("orig" version which is version controlled) as a first choice, or if it is general to the type of model, have it dealt with in extract_model utils preprocessing functions, which are specific to the type of model it is.

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

1 participant