Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@dustinswales @scrasmussen @hertneky @ligiabernardet
This is a PR to add a new, simplified version of UFS_IC_generator.py. Rather than modify the existing UFS_IC_generator.py, I've just created a new script named UFS_case_gen.py. We can change this if necessary.
The script pulls both the initial condition profiles and forcing from UFS history files. The only reliance on the "true" initial conditions is for the surface and oro variables. This means a couple of things:
The forcing section is technically split by "method". I have placeholder logic for calculating forcing using the original "gold standard" method and the existing method, that I call the "total time tendency" method. Right now, the new forcing method is the only one implemented in the script to show us how much simpler it can be.
The advective forcing is calculated using centered differences in the horizontal (using either 1 or 2 halo points (i.e. a 3x3 or 5x5 grid with the column of interest in the center). The vertical differences are calculated using upstream differences, using a moving-averaged smoothed vertical velocity. Right now, the script is still outputting the "total" advective tendencies like the old UFS forcing, but it should be possible to output the horizontal advective tendencies and the smoothed vertical velocity profile for forcing, which is a preferable way to force SCMs.
I've tested this script using the same (global) data that was staged for testing the old script. I'm sure that more testing needs to be done, especially with output from a regional configuration, but I've chosen many random points and run the SCM for 24h cases. I only ran it for 24h because the UFS data that was used only has 12-hourly data for 1 day. Comparing only mean profiles of the state variables, the agreement is reasonably good. This is encouraging since we only have 12-hourly data! This method should be more accurate with better time resolution of the UFS data.
Known problems:
The forcing method is not supported very close to the poles.