GRIPS-code / pyLBL

Python line-by-line radiative transfer model
GNU Lesser General Public License v2.1
10 stars 4 forks source link

Input/Output data model #4

Open menzel-gfdl opened 3 years ago

menzel-gfdl commented 3 years ago

This tool will strongly benefit from a well defined set of conventions regarding how input/output data is discovered and formatted. Pangeo guidelines strongly encourage using xarray Dataset and DataArray objects, which are based on community established CF Conventions. The atmospheric input variables required by this tool are pressure, temperature, and gas abundances. We should define a specific set of rules that the tool will follow when attempting to access this data from an input Dataset. For example,

Once we establish these rules, the simple tests can updated to use them and provide an example to users.

RobertPincus commented 3 years ago

To amplify a little bit, we will have

  1. two sets of pressures (at layer centers and layer edges)
  2. temperature at layer centers
  3. an unknown number of gas abundances.

Some questions:

  1. Is it sufficient to specify gas abundances as molar fractions of total pressure? In earth's atmosphere these are usually specified as fractions of dry pressure (water vapor removed)
  2. Is it sensible to identify gas abundances via standard name attributes (@menzel-gfdl's third suggestion above) i.e. mole_fraction_of_XX_in_air? If so, some molecules are specified by name (water vapor) and some by formula (CCl4); how will we homogenize?
  3. Is it sensible to identify gas abundances via dataset names?
  4. However we proceed we probably do want the ability to override the dataset names/standard name attributes via a dictionary.