-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature 380 phys tend plot actual #381
Closed
ahijevyc
wants to merge
21
commits into
dtcenter:develop
from
ahijevyc:feature_380_phys_tend_plot_actual
Closed
Feature 380 phys tend plot actual #381
ahijevyc
wants to merge
21
commits into
dtcenter:develop
from
ahijevyc:feature_380_phys_tend_plot_actual
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only apply add_time0 function if time0 if needed. Round times to nearest millisecond. This fixes times like 2019-06-15 18:03:0.000003, which is supposed to be 2019-06-15 18:03 but has imprecise floating-point value. Allow metpy.quantify() to protect units This eliminates the need to restore units after applying .mean to DataArray. Round times to nearest millisecond. Model output times are sometimes imprecise due to floating point error. Let argparse assume arguments are strings unless specified otherwise. Allow time window to be a float, not just an int. Refer to sum of all tendencies as "all_tendencies" instead of "total". "dstate_variable" -> "actual_tendency" Don't treat nophys tendency differently. UFS output changed. Removed bug where final units are assumed to be temperature tendency "K/hour". Keep the tendencies in their native units of "[something] per second" instead of converting to "[something] per hour". Define time slice starting with time-after-time0 and ending with validtime. We use the time *after* time0 because the time range of the tendency field is the period immediately prior to the tendency timestamp. That way, slice(time_after_time0, validtime) has a time range of [time0,validtime]. Compute the time-weighted mean tendencies for time index slice. Be clear about "all" tendencies. It is the sum of all tendencies, physics and non-physics. It does not include the physics tendency variable, which may be part of the history file and included in the tendency_vars list. That would be double-counting. Subtract physics tendency variable if it was in tendency_vars. Command line changes: Read file-type command line args as strings, not argparse.FileType('r'). For simpler code. --norobust flag (to use data extremes for colormap range, not 99th and 2nd percentiles.) logging info about renaming variables. Keep characters after final underscore. The first part is redundant. For example dtend_u_pbl -> pbl actual_change -> actual_tendency Test for shp is not None, not shp. (Accept shp=something evaluated as False, like 0) Print entire arg Namespace as fineprint, not just select variables. Use plt.figtext instead of plt.annotate. Makes for cleaner code. Reduce xarray time selection tolerance from 1 sec to 1 millisecond. pep8 changes reorder load modules module and function documentation shorten lines lazy logging messages (no f-string) specify encoding on open
Fix names of tendency variables in config file. The state variables are not the same as the tendency variable prefixes. For example spfh vs. qv.
new variable names add table for derived tendencies note about time window starting at initialization time and dealing with it by appending state variables at time0.
equation for residual in description
new date for new history file in Users Guide new figures for Users Guide fill -> tendencytype simplify construction of da2plot in planview_fv3.py don't allow user to plot state variable at validtime or time0. it makes code so much uglier for such a simple request. No explicit debug option for physics_tend.pts_in_shp Restore statevariable in default output filename in planview_fv3.py. 100 dpi default instead of 150
…m/ahijevyc/METplotpy into feature_380_phys_tend_plot_actual
fix link to cross section png
…m/ahijevyc/METplotpy into feature_380_phys_tend_plot_actual
Remove time_varname from yaml config file. Assert time0 exists, and if not, help the user by listing the nearest time available. Make longitude the xaxis of cross section instead of 'index'. Dequantify *after* cross section to preserve units. Specify lat lon order of endpoints in cross_section_vert.py. Remove dindex argument. xarray does a good job of choosing the major axis interval. Note vertical interpolation method in planview_fv3.py and reveal actual pressure level in title instead of requested level.
ahijevyc
added
type: enhancement
Improve something that it is currently doing
priority: medium
Medium Priority
requestor: NOAA/GSL
NOAA Global Systems Laboratory
requestor: NCAR
National Center for Atmospheric Research
METplotpy: Plots
labels
Aug 7, 2023
33 tasks
retrying pull request with dtcenter/METplotpy.git instead of ahijevyc/METplotpy.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
METplotpy: Plots
priority: medium
Medium Priority
requestor: NCAR
National Center for Atmospheric Research
requestor: NOAA/GSL
NOAA Global Systems Laboratory
type: enhancement
Improve something that it is currently doing
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.
Pull Request Testing
Describe testing already performed for these changes:
plot all 4 state variables (tmp, spfh, ugrd, vgrd) in all 3 scripts (planview, cross section, and vertical profile) with 1-hour time window and 2-hour time window, starting at or after initialization time.
planview with and without vmin vmax, with all 3 types of vertical interpolation
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Not sure how to import physics_tend.py. Is it
import physics_tend
? orfrom . import physics_tend
? pylint recommendsfrom .
, but this doesn't work when I test it. it has to be simplerimport physics_tend
upload new fv3_history.nc and grid_spec.nc
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes or No]
Do these changes include sufficient testing updates? [Yes or No]
Will this PR result in changes to the test suite? [Yes or No]
If yes, describe the new output and/or changes to the existing output:
Please complete this pull request review by [Fill in date].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes