-
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 #382
Conversation
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.
|
…ure default name like "stack-23412h4234kj"
avoids error about Fancy indexing not implemented yet. remove total area information. you'd have to mask it too, which makes the code ugly.
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.
I am following the instructions in the updated User's Guide, and using the updated fv3_history.nc (584M) and grid_spec.nc (481K), when attempting the following: python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/grid_spec.nc tmp pbl Error message: I noticed there were some additional commits, so I made sure I had the latest changes in the branch I cloned and used for testing. Can you reproduce these errors? |
I'll take a look.
…On Mon, Aug 21, 2023 at 5:08 PM bikegeek ***@***.***> wrote:
I am following the instructions in the updated User's Guide, and using the
updated fv3_history.nc (584M) and grid_spec.nc (481K), when attempting
the following:
python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/
grid_spec.nc tmp pbl
-p 500 -t 1 -v 20190615T20 --nofineprint? -p 500 -t 1 -v 20190615T20
--nofineprint
Error message:
Traceback (most recent call last):
File
"/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
line 340, in
main()
File
"/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
line 282, in main
"projection": cartopy.crs.LambertConformal(
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/cartopy/crs.py",
line 1738, in *init*
n_parallels = len(standard_parallels)
TypeError: object of type 'NoneType' has no len()
I noticed there were some additional commits, so I made sure I had the
latest changes in the branch I cloned and used for testing. Can you
reproduce these errors?
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIPI2H3FEY6RQJAK4ZJW23XWPS75ANCNFSM6AAAAAA3HSZJNI>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
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`.
Hi Minna,
Thanks for trying all my new commits.
I found the culprit. cartopy changed the default params of the
LambertConformal class from `standard_parallels = None` to
`standard_parallels = (33, 45)` between 0.20.2 and 0.22.0.
I replicated the problem by updating cartopy to 0.22.0, but I fixed the
problem by removing `standard_parallels=None`.
I looked at the plot before and after the change to see if the projection
changed, and they were identical.
I committed and pushed the fixes to branch
feature_380_phys_tend_plot_actual just now.
…On Tue, Aug 22, 2023 at 8:25 AM David Ahijevych ***@***.***> wrote:
I'll take a look.
On Mon, Aug 21, 2023 at 5:08 PM bikegeek ***@***.***> wrote:
> I am following the instructions in the updated User's Guide, and using
> the updated fv3_history.nc (584M) and grid_spec.nc (481K), when
> attempting the following:
>
> python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/
> grid_spec.nc tmp pbl
> -p 500 -t 1 -v 20190615T20 --nofineprint? -p 500 -t 1 -v 20190615T20
> --nofineprint
>
> Error message:
> Traceback (most recent call last):
> File
> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
> line 340, in
> main()
> File
> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
> line 282, in main
> "projection": cartopy.crs.LambertConformal(
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/cartopy/crs.py",
> line 1738, in *init*
> n_parallels = len(standard_parallels)
> TypeError: object of type 'NoneType' has no len()
>
> I noticed there were some additional commits, so I made sure I had the
> latest changes in the branch I cloned and used for testing. Can you
> reproduce these errors?
>
> —
> Reply to this email directly, view it on GitHub
> <#382 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEIPI2H3FEY6RQJAK4ZJW23XWPS75ANCNFSM6AAAAAA3HSZJNI>
> .
> You are receiving this because you were assigned.Message ID:
> ***@***.***>
>
|
I re-ran that same command: and now I see this error: Do you have the version numbers of the Python packages you are using? Here is a list of the Python packages and versions: |
I'll clone that conda environment and try it out on my end.
…On Tue, Aug 22, 2023 at 12:00 PM bikegeek ***@***.***> wrote:
I re-ran that same command:
python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/
grid_spec.nc tmp pbl -p 500 -t 1 -v 20190615T20 --nofineprint
and now I see this error:
Traceback (most recent call last):
File
"/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
line 339, in
main()
File
"/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
line 288, in main
pcm = da2plot.plot.pcolormesh(x="lont", y="latt", col=col, col_wrap=ncols,
robust=robust,
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/accessor.py",
line 802, in pcolormesh
return dataarray_plot.pcolormesh(self._da,
*args, **kwargs) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/dataarray_plot.py",
line 1495, in newplotfunc return _easy_facetgrid(darray, kind="dataarray",
**allargs) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
line 1059, in easy_facetgrid return g.map_dataarray(plotfunc, x, y,
**kwargs) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
line 341, in map_dataarray func, self.data.to_numpy(), **kwargs File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/dataarray.py",
line 749, in to_numpy return self.variable.to_numpy() File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/variable.py",
line 1298, in to_numpy data, * = chunkmanager.compute(data) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/daskmanager.py",
line 70, in compute return compute(data, **kwargs) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/base.py",
line 599, in compute results = schedule(dsk, keys, **kwargs) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/threaded.py",
line 89, in get results = get_async( File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
line 511, in get_async raise_exception(exc, tb) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
line 319, in reraise raise exc File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
line 224, in execute_task result = _execute_task(task, data) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 119, in _execute_task return func((_execute_task(a, cache) for a in
args)) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 119, in return func(*(_execute_task(a, cache) for a in args))
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 113, in _execute_task
return [_execute_task(a, cache) for a in arg]
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 113, in
return [_execute_task(a, cache) for a in arg]
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 119, in _execute_task
return func(
*(_execute_task(a, cache) for a in args)) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/optimization.py",
line 990, in call return core.get(self.dsk, self.outkey,
dict(zip(self.inkeys, args))) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 149, in get result = _execute_task(task, cache) File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
line 119, in _execute_task return func(*(_execute_task(a, cache) for a in
args))
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/utils.py",
line 73, in apply
return func(*args, **kwargs)
File "<*array_function* internals>", line 200, in sum
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
line 2324, in sum
return _wrapreduction(a, np.add, 'sum', axis, dtype, out,
keepdims=keepdims,
File
"/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
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.
Do you have the version numbers of the Python packages you are using? Here
is a list of the Python packages and versions:
current.yaml.txt
<https://github.com/dtcenter/METplotpy/files/12411509/current.yaml.txt>
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIPI2B7CXTOFLOPRLDXXMLXWTXVDANCNFSM6AAAAAA3HSZJNI>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
I replicated the error.
I fixed it by using xarray.open_dataset instead of xarray.open_mfdataset,
but I don't like that solution because open_dataset doesn't use dask.
xarray.open_mfdataset handled the 2TB files from the NOAA folks without
running out of memory.
So I'll look for a better fix.
xarray 2022.3.0 was okay with how I handled xarray DataArrays with units
(pint quantities), but xarray 2023.5.0 is not okay.
Dave
…On Tue, Aug 22, 2023 at 4:11 PM David Ahijevych ***@***.***> wrote:
I'll clone that conda environment and try it out on my end.
On Tue, Aug 22, 2023 at 12:00 PM bikegeek ***@***.***>
wrote:
> I re-ran that same command:
> python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/
> grid_spec.nc tmp pbl -p 500 -t 1 -v 20190615T20 --nofineprint
>
> and now I see this error:
> Traceback (most recent call last):
> File
> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
> line 339, in
> main()
> File
> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
> line 288, in main
> pcm = da2plot.plot.pcolormesh(x="lont", y="latt", col=col,
> col_wrap=ncols, robust=robust,
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/accessor.py",
> line 802, in pcolormesh
> return dataarray_plot.pcolormesh(self._da,
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *args, **kwargs) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/dataarray_plot.py",
> line 1495, in newplotfunc return _easy_facetgrid(darray, kind="dataarray",
> **allargs) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
> line 1059, in easy_facetgrid return g.map_dataarray(plotfunc, x, y,
> **kwargs) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
> line 341, in map_dataarray func, self.data.to_numpy(), **kwargs File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/dataarray.py",
> line 749, in to_numpy return self.variable.to_numpy() File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/variable.py",
> line 1298, in to_numpy data, * = chunkmanager.compute(data) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/daskmanager.py",
> line 70, in compute return compute(data, **kwargs) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/base.py",
> line 599, in compute results = schedule(dsk, keys, **kwargs) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/threaded.py",
> line 89, in get results = get_async( File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
> line 511, in get_async raise_exception(exc, tb) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
> line 319, in reraise raise exc File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
> line 224, in execute_task result = _execute_task(task, data) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 119, in _execute_task return func((_execute_task(a, cache) for a in
> args)) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 119, in return func(*(_execute_task(a, cache) for a in args))
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 113, in _execute_task
> return [_execute_task(a, cache) for a in arg]
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 113, in
> return [_execute_task(a, cache) for a in arg]
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 119, in _execute_task
> return func(
>
>
>
>
>
> *(_execute_task(a, cache) for a in args)) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/optimization.py",
> line 990, in call return core.get(self.dsk, self.outkey,
> dict(zip(self.inkeys, args))) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 149, in get result = _execute_task(task, cache) File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
> line 119, in _execute_task return func(*(_execute_task(a, cache) for a
> in args))
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/utils.py",
> line 73, in apply
> return func(*args, **kwargs)
> File "<*array_function* internals>", line 200, in sum
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
> line 2324, in sum
> return _wrapreduction(a, np.add, 'sum', axis, dtype, out,
> keepdims=keepdims,
> File
> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
> line 86, in _wrapreduction
> return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
> 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.
>
> Do you have the version numbers of the Python packages you are using?
> Here is a list of the Python packages and versions:
> current.yaml.txt
> <https://github.com/dtcenter/METplotpy/files/12411509/current.yaml.txt>
>
> —
> Reply to this email directly, view it on GitHub
> <#382 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEIPI2B7CXTOFLOPRLDXXMLXWTXVDANCNFSM6AAAAAA3HSZJNI>
> .
> You are receiving this because you were assigned.Message ID:
> ***@***.***>
>
|
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.
I couldn't fix the error, so I reverted to open_dataset from open_mfdataset
just to keep things rolling. I pushed the new code to my branch on
dtcenter/METplotpy.
Could you continue testing with this version?
…On Tue, Aug 22, 2023 at 5:19 PM David Ahijevych ***@***.***> wrote:
I replicated the error.
I fixed it by using xarray.open_dataset instead of xarray.open_mfdataset,
but I don't like that solution because open_dataset doesn't use dask.
xarray.open_mfdataset handled the 2TB files from the NOAA folks without
running out of memory.
So I'll look for a better fix.
xarray 2022.3.0 was okay with how I handled xarray DataArrays with units
(pint quantities), but xarray 2023.5.0 is not okay.
Dave
On Tue, Aug 22, 2023 at 4:11 PM David Ahijevych ***@***.***> wrote:
> I'll clone that conda environment and try it out on my end.
>
> On Tue, Aug 22, 2023 at 12:00 PM bikegeek ***@***.***>
> wrote:
>
>> I re-ran that same command:
>> python planview_fv3.py $CONFIG $WORKING_DIR/fv3_history.nc $WORKING_DIR/
>> grid_spec.nc tmp pbl -p 500 -t 1 -v 20190615T20 --nofineprint
>>
>> and now I see this error:
>> Traceback (most recent call last):
>> File
>> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
>> line 339, in
>> main()
>> File
>> "/Volumes/d1/minnawin/feature_380_physics_tendency/METplotpy/metplotpy/contributed/fv3_physics_tend/planview_fv3.py",
>> line 288, in main
>> pcm = da2plot.plot.pcolormesh(x="lont", y="latt", col=col,
>> col_wrap=ncols, robust=robust,
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/accessor.py",
>> line 802, in pcolormesh
>> return dataarray_plot.pcolormesh(self._da,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *args, **kwargs) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/dataarray_plot.py",
>> line 1495, in newplotfunc return _easy_facetgrid(darray, kind="dataarray",
>> **allargs) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
>> line 1059, in easy_facetgrid return g.map_dataarray(plotfunc, x, y,
>> **kwargs) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/plot/facetgrid.py",
>> line 341, in map_dataarray func, self.data.to_numpy(), **kwargs File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/dataarray.py",
>> line 749, in to_numpy return self.variable.to_numpy() File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/variable.py",
>> line 1298, in to_numpy data, * = chunkmanager.compute(data) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/xarray/core/daskmanager.py",
>> line 70, in compute return compute(data, **kwargs) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/base.py",
>> line 599, in compute results = schedule(dsk, keys, **kwargs) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/threaded.py",
>> line 89, in get results = get_async( File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
>> line 511, in get_async raise_exception(exc, tb) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
>> line 319, in reraise raise exc File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/local.py",
>> line 224, in execute_task result = _execute_task(task, data) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 119, in _execute_task return func((_execute_task(a, cache) for a in
>> args)) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 119, in return func(*(_execute_task(a, cache) for a in args))
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 113, in _execute_task
>> return [_execute_task(a, cache) for a in arg]
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 113, in
>> return [_execute_task(a, cache) for a in arg]
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 119, in _execute_task
>> return func(
>>
>>
>>
>>
>>
>> *(_execute_task(a, cache) for a in args)) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/optimization.py",
>> line 990, in call return core.get(self.dsk, self.outkey,
>> dict(zip(self.inkeys, args))) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 149, in get result = _execute_task(task, cache) File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/core.py",
>> line 119, in _execute_task return func(*(_execute_task(a, cache) for a
>> in args))
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/dask/utils.py",
>> line 73, in apply
>> return func(*args, **kwargs)
>> File "<*array_function* internals>", line 200, in sum
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
>> line 2324, in sum
>> return _wrapreduction(a, np.add, 'sum', axis, dtype, out,
>> keepdims=keepdims,
>> File
>> "/Volumes/d1/minnawin/miniconda3/envs/metplus_analysis_env/lib/python3.10/site-packages/numpy/core/fromnumeric.py",
>> line 86, in _wrapreduction
>> return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
>> 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.
>>
>> Do you have the version numbers of the Python packages you are using?
>> Here is a list of the Python packages and versions:
>> current.yaml.txt
>> <https://github.com/dtcenter/METplotpy/files/12411509/current.yaml.txt>
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#382 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AEIPI2B7CXTOFLOPRLDXXMLXWTXVDANCNFSM6AAAAAA3HSZJNI>
>> .
>> You are receiving this because you were assigned.Message ID:
>> ***@***.***>
>>
>
|
…feature_380_phys_tend_plot_actual
The planview and vert_profile_fv3 scripts work but it looks like there is something wrong with the cross_section_vert.py: produces this assertion error (line 144): When no valid time is specified, the same error is generated. This is puzzling, since the fv3_history.nc file has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are assertion errors for the cross_section_vert.py (see comment)
I will look at cross_section_vert.py today |
The cross_section_vert.py test command should be I fixed a few matplotlib.pyplot depreciation errors in this script and two other scripts:
working on pushing the changes... |
I pushed my changes to |
Thanks, I'll update the documentation and the use case data before I merge
into develop.
…On Thu, Jun 6, 2024 at 9:53 AM David Ahijevych ***@***.***> wrote:
I pushed my changes to feature_380_phys_tend_plot_actual branch
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UJHUWQ3EI2IVDDFVYORDZGCAWHAVCNFSM6AAAAAA3HSZJNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSHA3DSNBUGU>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Thanks.
The feature_380_phys_tend_plot_actual branch,
docs/Users_Guide/fv3_physics.rst documentation already has the test
commands with the "-t 1" time window. I don't think the documentation needs
to be changed.
…On Thu, Jun 6, 2024 at 10:19 AM bikegeek ***@***.***> wrote:
Thanks, I'll update the documentation and the use case data before I merge
into develop.
On Thu, Jun 6, 2024 at 9:53 AM David Ahijevych ***@***.***>
wrote:
> I pushed my changes to feature_380_phys_tend_plot_actual branch
>
> —
> Reply to this email directly, view it on GitHub
> <#382 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AA4UJHUWQ3EI2IVDDFVYORDZGCAWHAVCNFSM6AAAAAA3HSZJNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSHA3DSNBUGU>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIPI2BPGWNI62TVLRWB6W3ZGCD2TAVCNFSM6AAAAAA3HSZJNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSHEZDEMBTGY>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated tests with new data pass (all tests are being skipped due to large dataset).
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