Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance SCM case-gen to work with global workflow #535

Open
hertneky opened this issue Oct 22, 2024 · 0 comments
Open

Enhance SCM case-gen to work with global workflow #535

hertneky opened this issue Oct 22, 2024 · 0 comments

Comments

@hertneky
Copy link
Collaborator

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)

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

No branches or pull requests

2 participants