You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SCM case-gen does not currently work with the global workflow output. This proposed enhancement to work with the global workflow will be useful for physics TnE testing in the SCM. Here is what @egrell did to get case-gen working with the workflow.
It seems that the model output from regression tests and from the workflow have a slightly different format. The UFS_forcing_ensemble_generator.py code only works with the RT output. To generate SCM input from the UFS history files, I tried using UFS_case_gen.py, but ran into a couple of issues:
1. Find_loc_indices_UFS_history – searches for files with filename_pattern = 'atmf000.nc', but the history file names are, eg. gfs.t12z.atmf000.nc. So the code should search for filename_pattern = '*atmf000.nc'
2. For the GRID_DIR, I used the “fix” directory: -g /scratch1/NCEPDEV/global/glopara/fix/orog/20231027/C96 (For the model run that I am using, the FIXorog directory is linked to /scratch1/NCEPDEV/global/glopara/fix/orog/20231027). The orographic info is not in the model/atmos/input files from the workflow, so when calling get_UFS_oro_data, I passed in GRID_DIR instead of IN_DIR. However, within the GRID_DIR directory, there are several different resolutions, and when the function get_UFS_oro_data searches for files, it uses filename_pattern = 'oro_data.tile{0}.nc'.format(tile), but the fix directory contains:
I had to pass in a new argument (-mx) to specify the resolution (025, 050, 100 or 500) and change the filename_pattern to filename_pattern = '*.mx{0}_oro_data.tile{1}.nc'.format(mxres,tile)
3. Another issue with the orog data was that two variables:
vegetation_type_pct
soil_type_pct
are in separate files in subdirectory “sfc” under the GRID_DIR.
So for vegtype_frac, I searched for filename_pattern = '*.mx{0}.vegetation_type.tile{1}.nc'.format(mxres,tile)
And for soiltype_frac, filename_pattern = '*.mx{0}.soil_type.tile{1}.nc'.format(mxres,tile)
Both of these searches were done in subdir, where subdir = '{0}/sfc'.format(dir)
The text was updated successfully, but these errors were encountered:
SCM case-gen does not currently work with the global workflow output. This proposed enhancement to work with the global workflow will be useful for physics TnE testing in the SCM. Here is what @egrell did to get case-gen working with the workflow.
It seems that the model output from regression tests and from the workflow have a slightly different format. The UFS_forcing_ensemble_generator.py code only works with the RT output. To generate SCM input from the UFS history files, I tried using UFS_case_gen.py, but ran into a couple of issues:
1. Find_loc_indices_UFS_history – searches for files with filename_pattern = 'atmf000.nc', but the history file names are, eg. gfs.t12z.atmf000.nc. So the code should search for filename_pattern = '*atmf000.nc'
2. For the GRID_DIR, I used the “fix” directory: -g /scratch1/NCEPDEV/global/glopara/fix/orog/20231027/C96 (For the model run that I am using, the FIXorog directory is linked to /scratch1/NCEPDEV/global/glopara/fix/orog/20231027). The orographic info is not in the model/atmos/input files from the workflow, so when calling get_UFS_oro_data, I passed in GRID_DIR instead of IN_DIR. However, within the GRID_DIR directory, there are several different resolutions, and when the function get_UFS_oro_data searches for files, it uses filename_pattern = 'oro_data.tile{0}.nc'.format(tile), but the fix directory contains:
C96.mx025_oro_data.tile5.nc
C96.mx050_oro_data.tile5.nc
C96.mx100_oro_data.tile5.nc
C96.mx500_oro_data.tile5.nc
I had to pass in a new argument (-mx) to specify the resolution (025, 050, 100 or 500) and change the filename_pattern to filename_pattern = '*.mx{0}_oro_data.tile{1}.nc'.format(mxres,tile)
3. Another issue with the orog data was that two variables:
vegetation_type_pct
soil_type_pct
are in separate files in subdirectory “sfc” under the GRID_DIR.
So for vegtype_frac, I searched for filename_pattern = '*.mx{0}.vegetation_type.tile{1}.nc'.format(mxres,tile)
And for soiltype_frac, filename_pattern = '*.mx{0}.soil_type.tile{1}.nc'.format(mxres,tile)
Both of these searches were done in subdir, where subdir = '{0}/sfc'.format(dir)
The text was updated successfully, but these errors were encountered: