NOAA-OWP / ngen-cal

Tools for calibrating and configuring NextGen
https://github.com/NOAA-OWP/ngen-cal/wiki
Other
8 stars 15 forks source link

Variable_names_map can change depending on previous model #24

Open lcunha0118 opened 1 year ago

lcunha0118 commented 1 year ago

https://github.com/NOAA-OWP/ngen-cal/blob/804c200a052395a92a7f7494d33f562faaa0e2cc/python/ngen_conf/src/ngen/config/cfe.py#L28

This is problematic because it depends on which model is run before CFE. If we are running Noah-OWP: _variable_names_map = {
"water_potential_evaporation_flux": "EVAPOTRANS", "atmosphere_water__liquid_equivalent_precipitation_rate": "QINSUR" }

If running PET we dont need to define anything, since the variables are named appropriately. Or for completeness:

                     "variables_names_map": {
                                "atmosphere_water__liquid_equivalent_precipitation_rate": "atmosphere_water__liquid_equivalent_precipitation_rate",
                                "water_potential_evaporation_flux": "water_potential_evaporation_flux"
                            }

Not sure why that needs to change in the realization file. Can we just keep those variables the same as provided by the user?

hellkite500 commented 1 year ago

So this is the definition of a standalone CFE formulation with no additional context (e.g. no other models). So the default name map is just there as convienence. It can definitely be overwritten:

#can set some default name map entries...will be overridden at construction
#if a name_map with the same key is passed in, otherwise the name_map
#will also include these mappings
mattw-nws commented 1 year ago

I imagine we probably want to remove that default in this case, since it's specific to a case where another model preceeds CFE... since it effectively defaults to the CSDMS name, I would say that's a reasonable enough default.