NOAA-EMC / GDASApp

Global Data Assimilation System Application
GNU Lesser General Public License v2.1
15 stars 31 forks source link

Handling of missing files in OBS_YAML #1038

Closed AndrewEichmann-NOAA closed 5 months ago

AndrewEichmann-NOAA commented 5 months ago

Currently when loading OBS_YAML with wxflow.YAMLFile, if a line in OBS_YAML such as

- !INC ${OBS_YAML_DIR}/insitu_profile_bathy.yaml

points to a non-existant file, the script fails with the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/scratch1/NCEPDEV/da/Andrew.Eichmann/fv3gfs/insitu/global-workflow/sorc/gdas.cd/parm/soca/obs/config/insitu_profile_bathy.yaml

This could be caught, but it is unclear how to handle the exception while using the rest of the possibly existing files in OBS_YAML.

guillaumevernieres commented 5 months ago

@AndrewEichmann-NOAA , what we have now is the correct behavior. It should fail if we're trying to assimilate an obs type that we don't know yet how to assimilate (indicated by the absence of a yaml file).