Missing yaml package in (NPL) on cheyenne so get_extrn_ics fails


I'm trying to run the develop branch config.community.sh on cheyenne, and the python virtual environment doesn't exactly match up with what is in the develop branch docs. When I continue to running a workflow, get_extrn_ics fails because the yaml package is not included in the (NPL) virtual environment.


Here are the steps I took to get this error:

1. I ran 'module load wflow_cheyenne'

(this tells me to run 'ncar_pylib /glade/p/ral/jntp/UFS_SRW_app/ncar_pylib/regional_workflow'

2. I ran 'ncar_pylib /glade/p/ral/jntp/UFS_SRW_app/ncar_pylib/regional_workflow' as instructed

(this tells me that I'm now using NPL venv at: /glade/p/ral/jntp/UFS_SRW_app/ncar_pylib/regional_workflow)

(NOTE that my prompt says '(NPL)' and not '(regional_workflow)' as it says it should in the docs. I tried to run conda to load regional_workflow, as it says to in the docs when your prompt doesn't say '(regional_workflow)', but conda is not available on cheyenne)

3. 'pip list' shows a long list of python packages for (NPL), including PyYAML 5.1.3

4. './generate_FV3LAM_wflow.sh' from regional_workflow

5. 'cd $EXPTDIR' and './launch_FV3LAM_wflow.sh'
produces the following output:

Please do the following to activate ncar_pylib:
       > ncar_pylib /glade/p/ral/jntp/UFS_SRW_app/ncar_pylib/regional_workflow
/glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/bash_utils/filesys_cmds_vrfy.sh: line 68: BASH_SOURCE[2]: unbound variable

6. log/get_extrn_ics_2019061500.log shows:

python3 -u /glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/retrieve_data.py   --debug   --anl_or_fcst anl   --config /glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/templates/data_locations.yml   --cycle_date 2019061500   --data_stores disk    --external_model FV3GFS   --fcst_hrs 0   --output_path /glade/scratch/paddy/expt_dirs/test_RRFS_CONUS_13km/2019061500/FV3GFS/for_ICS   --summary_file extrn_mdl_var_defns.sh      --file_type grib2   --file_templates gfs.pgrb2.0p25.f000   --input_file_path /glade/p/ral/jntp/UFS_SRW_App/develop/staged_extrn_mdl_files/FV3GFS/'
+ python3 -u /glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/retrieve_data.py --debug --anl_or_fcst anl --config /glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/templates/data_locations.yml --cycle_date 2019061500 --data_stores disk --external_model FV3GFS --fcst_hrs 0 --output_path /glade/scratch/paddy/expt_dirs/test_RRFS_CONUS_13km/2019061500/FV3GFS/for_ICS --summary_file extrn_mdl_var_defns.sh --file_type grib2 --file_templates gfs.pgrb2.0p25.f000 --input_file_path /glade/p/ral/jntp/UFS_SRW_App/develop/staged_extrn_mdl_files/FV3GFS/
Traceback (most recent call last):
  File "/glade/scratch/paddy/ufs-srweather-app-develop/regional_workflow/ush/retrieve_data.py", line 38, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
+ print_err_msg_exit 'Call to retrieve_data.py failed with a non-zero exit status.

I'm wondering if I have failed to load the proper python virtual environment, or if I have the right venv and it is missing yaml for some reason. Has anyone else run across a similar problem?

Thank you very much, 

-Paddy McCarthy.

Hi Paddy,

Sorry for the delay. You're right that this is due to the way Cheyenne has diverged from other platforms on how to load the python environment, so it isn't getting loaded. In regional_workflow's ush/load_modules_run_task.sh there is a section that tries to use "conda activate ${SRW_ENV}". By modifying this section to run "ncar_pylib /glade/p/ral/jntp/UFS_SRW_app/ncar_pylib/regional_workflow" instead, I was able to fix the problem you ran into---please note that I had to place this outside of the if-block, as SRW_ENV as not set in Cheyenne's modulefile. 

We will be working on a fix for this.