-
Notifications
You must be signed in to change notification settings - Fork 7
Issue449 optimize physics tend config #492
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
Conversation
Moved planview, vert_profile, and cross_section_vert out of main(). Moved optional command line args to config file. try to show requisite yaml mods space after .rst code-block add tab to .rst code-block removed extraneous space adapted cross_section_vert
with shapefile in config file not argument. same with xmin and xmax
No more argparse args to functions. Save image to TMPDIR override config file with kwargs.
in /glade/campaign/mmm/parc/mwong/ufs-mrw They are different from previous history file. vertical pressure levels are split into multiple variables, so they must be combined. Tendencies are accumulated from initialization without resetting to zero along the way. They aren't scaled by how much time has gone by since the most recent reset.
use regex to match FV3-style filename coordinate reference system option in config file for cross_section_vert
zoom in on vertical_profile x-axis in test case figure
in physics_tend.get_fv3ds. Move to else-block in calling function.
will prepage a single dataset with history and grid spec, given the paths to both. Feed it to planview, vert_profile, and cross_section_vert. Remove `subtract` option. It is ugly to do it in the functions, and easy to do beforehand.
moved shp inset to left side to avoid covering up power-of-ten in x-axis tick label
rename `fv3` configuration dictionary -> `config`
rename `time_after_time0` -> `time_after_twindow_start`
document get_fv3ds()
This function handles the fv3 UFS forecasts made by May Wong
in campaign storage
It subtracts tendency values across a time window.
Leaves state variables alone
Stacks in the vertical
Now it matches the older fv3 history files METplotpy was
designed for.
make sure "validtime" and "twindow" are consistent between configuration
dictionary and Dataset .
|
Hi @bikegeek . I refactored the contributed code for fv3 tendency plotting. In addition to moving command-line options to the configuration file, I rewrote a lot of the code. It still works on the older test data and a new input format. I'd like to change the sample data tar file to contain fv3 output for which the physics tendencies properly balance the actual change in temperature, wind, and moisture. |
|
You will also need to update the data for the use case, following the
instructions in the Contributor's Guide:
https://metplus.readthedocs.io/en/latest/Contributors_Guide/add_use_case.html
Refer to section 9.5.1
…On Mon, Mar 3, 2025 at 11:42 AM David Ahijevych ***@***.***> wrote:
Hi @bikegeek <https://github.com/bikegeek> . I refactored the contributed
code for fv3 tendency plotting. In addition to moving command-line options
to the configuration file, I rewrote a lot of the code. It still works on
the older test data and a new input format. I'd like to change the sample
data tar file to contain fv3 output for which the physics tendencies
properly balance the actual change in temperature, wind, and moisture.
The usual tests started once I submitted this PR, but the SonarQube test
is failing, and I don't think it is getting to the tests for fv3 tendency.
I'll look through the contributor's guide to look for hints.
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UJHVYIF2BQ5BSZHFYMZ32SSPABAVCNFSM6AAAAABYHUC65SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJVGI2TAOBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: ahijevyc]*ahijevyc* left a comment (dtcenter/METplotpy#492)
<#492 (comment)>
Hi @bikegeek <https://github.com/bikegeek> . I refactored the contributed
code for fv3 tendency plotting. In addition to moving command-line options
to the configuration file, I rewrote a lot of the code. It still works on
the older test data and a new input format. I'd like to change the sample
data tar file to contain fv3 output for which the physics tendencies
properly balance the actual change in temperature, wind, and moisture.
The usual tests started once I submitted this PR, but the SonarQube test
is failing, and I don't think it is getting to the tests for fv3 tendency.
I'll look through the contributor's guide to look for hints.
—
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UJHVYIF2BQ5BSZHFYMZ32SSPABAVCNFSM6AAAAABYHUC65SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJVGI2TAOBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I attached new use case data here based on discussion 954 To be used with configuration file use_case.yaml |
…b.com/dtcenter/METplotpy into issue449_optimize_physics_tend_config
added installation of cartopy to support the physics tendency plots
skip these tests for CI, the data is too large
include cartopy for the physics tendency plots
remove pip installation of cartopy. Uncommented the cartopy entry in the requirements.txt and py310_requirements.txt instead
This pull request optimizes the physics tendency code in the fv3_physics_tend module.
/glade/campaign/mmm/parc/ahijevyc/METplotpy/DavidA_fv3_history_etc_files. These data have tendencies that balance the actual change in state variables (i.e. the residual is close to zero).tendencies_were_zeroed_and_averaged_after_every_outputmust be set toTrueand the functionphysics_tend.get_fv3dsis used to stack DataArrays for the same state variable (t, u, v, or q) but different pressure levels in the vertical.Describe testing already performed for these changes:
/glade/campaign/mmm/parc/mwong/ufs-mrw/2020040812.F024.C768/fv3_history2d.tile3.nc/glade/campaign/mmm/parc/ahijevyc/METplotpy/DavidA_fv3_history_etc_files.