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

Feature 380 phys tend plot actual #382

Merged
merged 37 commits into from
Jun 6, 2024

Commits on Jul 28, 2023

  1. Add panel for actual tendency

    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
    ahijevyc committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    4212a01 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Configuration menu
    Copy the full SHA
    f2fb67d View commit details
    Browse the repository at this point in the history
  2. Apply same upgrades to cross section vertical script.

    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.
    ahijevyc committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    77e5415 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    61b3f9e View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

  1. applied autopep8 formatting

    ahijevyc committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    fa90967 View commit details
    Browse the repository at this point in the history
  2. Widen table columns

    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.
    ahijevyc committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    77509a9 View commit details
    Browse the repository at this point in the history
  3. Update fv3_physics.rst

    equation for residual in description
    ahijevyc authored Aug 3, 2023
    Configuration menu
    Copy the full SHA
    d4c1f77 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. subtract before cleaning times

    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
    ahijevyc committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    ca65c63 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'feature_380_phys_tend_plot_actual' of https://github.co…

    …m/ahijevyc/METplotpy into feature_380_phys_tend_plot_actual
    ahijevyc committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    b125fe7 View commit details
    Browse the repository at this point in the history
  3. Update fv3_physics.rst

    fix link to cross section png
    ahijevyc authored Aug 4, 2023
    Configuration menu
    Copy the full SHA
    c95a932 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7c63bb6 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'feature_380_phys_tend_plot_actual' of https://github.co…

    …m/ahijevyc/METplotpy into feature_380_phys_tend_plot_actual
    ahijevyc committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    d8edfc9 View commit details
    Browse the repository at this point in the history
  6. pep8 formatting

    ahijevyc committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    6e2de69 View commit details
    Browse the repository at this point in the history
  7. use open_mfdataset for dask

    ahijevyc committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    a63b770 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Configuration menu
    Copy the full SHA
    a3ec403 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9df587e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bc1ef28 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    84d9a5c View commit details
    Browse the repository at this point in the history
  5. Remove add_time0 function.

    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 committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    ed0445d View commit details
    Browse the repository at this point in the history
  6. update cross section png

    ahijevyc committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    917cdb2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a94f8ec View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. simplify paredown_history script

    only pull out variables you need
    
    Use fewer times and change cross section example to use new
    time range.
    
    extract ugrd in cross section code block, not tmp.
    ahijevyc committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    e9adb5e View commit details
    Browse the repository at this point in the history
  2. Update fv3_physics.rst

    include --resid option in --subtract example
    ahijevyc authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    f5b38b6 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'develop' of https://github.com/dtcenter/METplotpy into …

    …feature_380_phys_tend_plot_actual
    ahijevyc committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    f32458a View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Jeff Beck (NOAA) file

    ahijevyc committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    8605965 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'feature_380_phys_tend_plot_actual' of https://github.co…

    …m/dtcenter/METplotpy into feature_380_phys_tend_plot_actual
    ahijevyc committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    0636546 View commit details
    Browse the repository at this point in the history
  3. open ifile with dask. supply name to stacked dataarray to avaoid obsc…

    …ure default name like "stack-23412h4234kj"
    ahijevyc committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    4ae4719 View commit details
    Browse the repository at this point in the history
  4. don't drop=True when masking shapefile

    avoids error about Fancy indexing not implemented yet.
    
    remove total area information. you'd have to mask it too, which
    makes the code ugly.
    ahijevyc committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    b03bf90 View commit details
    Browse the repository at this point in the history
  5. Redo figures with colorbar labels that have field name.

    And correct order of nophys and phys.
    
    Dequantify before cross_section to avoid NotImplementedError: Don't yet support
     nd fancy indexing from cross_section(). something to do with dask and units.
    ahijevyc committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    d8eaff0 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. remove standard_parallels=None

    cartopy changed the default params of the LambertConformal class from
    `standard_parallels = None` to `standard_parallels = (33, 45)` between v0.20.2 and v0.22.
    
    I fixed the problem by removing `standard_parallels=None`.
    ahijevyc committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    b63c28f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2d5693 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. revert to open_dataset from open_mfdataset

    to avoid TypeError: The dtype and signature arguments to ufuncs only select the general DType and not details such as the byte order or time unit. You can avoid this error by using the scalar types np.float64 or the dtype string notation.
    
    xarray 2022.3.0 was okay with how I handled xarray DataArrays with units (pint quantities), but xarray 2023.5.0 is not okay.
    ahijevyc committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    97a2c8e View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Merge branch 'develop' of https://github.com/dtcenter/METplotpy into …

    …feature_380_phys_tend_plot_actual
    bikegeek committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    851e100 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Configuration menu
    Copy the full SHA
    f961020 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0d740b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1337683 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1084446 View commit details
    Browse the repository at this point in the history