Skip to content

Strip nested directories when writing ${EXTRN_MDL_VAR_DEFNS_FN}.sh #1292

Description

@benkozi

Expected behavior

${EXTRN_MDL_VAR_DEFNS_FN}.sh should not use the nested path definition that can be provided via EXTRN_MDL_FILES_ICS/LBCS.

Current behavior

An external model filename definition can use a nested directory structure. The nested structure causes problems in make_ics/lbcs. Only the filename is needed not the nested structure. retrieve_data.py writes the nested path to ${EXTRN_MDL_VAR_DEFNS_FN}.sh via exregional_get_extrn_mdl_files.sh.

Example nested definition:

task_get_extrn_ics:
  envvars:
...
    EXTRN_MDL_FILES_ICS:
      - "gfs.{yyyymmdd}/{hh}/atmos/gfs.t{hh}z.atmf{fcst_hr:03d}.nc"

Cannot overwrite the behavior via:

task_make_ics:
  envvars:
    EXTRN_MDL_FNS:
      - "gfs.t{hh}z.atmf{fcst_hr:03d}.nc"

Machines affected

all

Detailed Description of Fix (optional)

A couple options:

  • Patch retrieve_data.py to only use the filename when writing ${EXTRN_MDL_VAR_DEFNS_FN}.sh. There is still unexpected behavior since EXTRN_MDL_FNS cannot be overridden.
  • Patch make_ics/lbcs scripts to respect EXTRN_MDL_FNS.

I don't think there would be cascading issues if both patch approaches were implemented.

Output (optional)

From chgres:

 - OPEN AND READ:
 /gpfs/f6/bil-fire8/scratch/Benjamin.Koziol/sandbox/srw/benkozi/use-cases/expt_dirs/aqm_AQMNA13km_SpringAQ/2023040112/FV3GFS/for_LBCS//gfs.20230401/12/atmos/gfs.t12z.atmf006.nc
...
FATAL ERROR: opening file: No such file or directory

Note: /gpfs/f6/bil-fire8/scratch/Benjamin.Koziol/sandbox/srw/benkozi/use-cases/expt_dirs/aqm_AQMNA13km_SpringAQ/2023040112/FV3GFS/for_LBCS/gfs.t12z.atmf006.nc exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions