Skip to content

GeoCarb priors code requires update to support different CO sources #9

@joshua-laughner

Description

@joshua-laughner

Describe the bug
Since the update to ginput to handle GEOS FP-IT or GEOS IT data, the geocarb sub-command will crash. This is because it currently cannot get information about which model provided the CO in the met resampler file.

To Reproduce
Assuming all the input files are in the current directory, and the resampler file is the standard testing one with data between 00:33Z and 01:23Z on 1 Jul 2015:

run_ginput.py geocarb \
  GEOS.fpit.asm.inst3_3d_asm_Nv.GEOS5124.20150701_0000.V01.nc4,GEOS.fpit.asm.inst3_3d_asm_Nv.GEOS5124.20150701_0300.V01.nc4 \
  ./geocarb_mock_resampler.h5 \
  ./geocarb-priors.h5 \
  --nprocs 12 \
  --no-truncate-mlo-smo \
  --fo2-file o2_dmf_data.dat \
  -vv

Error message

Traceback (most recent call last):
  File "/home/jlaugh/Notebooks/TCCON-research-notebooks/ginput-development/src/ginput/ginput/priors/acos_interface.py", line 430, in _prior_helper
    priors_dict, priors_units, priors_constants = tccon_priors.generate_single_tccon_prior(
  File "/home/jlaugh/Notebooks/TCCON-research-notebooks/ginput-development/src/ginput/ginput/priors/tccon_priors.py", line 2992, in generate_single_tccon_prior
    _, ancillary_trop = concentration_record.add_trop_prior(gas_prof, obs_utc_date, obs_lat, mod_file_data,
  File "/home/jlaugh/Notebooks/TCCON-research-notebooks/ginput-development/src/ginput/ginput/priors/tccon_priors.py", line 2110, in add_trop_prior
    prof_gas[:] = co * self.compute_co_scale(prof_pres=pres, prof_theta=theta,
  File "/home/jlaugh/Notebooks/TCCON-research-notebooks/ginput-development/src/ginput/ginput/priors/tccon_priors.py", line 2061, in compute_co_scale
    raise ValueError(f'Unknown CO source: {co_source}')
ValueError: Unknown CO source: GeosSource.UNKNOWN

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredIssue won't be addressed until there is a need for it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions