Skip to content

Commit a949b4c

Browse files
author
Guido Cioni
committed
Corrected bugs which was preventing some scripts to run
Implemented parallelization for meteogram plotting Updated get_coordinates function to be more flexible
1 parent 35f6a18 commit a949b4c

16 files changed

+210
-528
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The most important packages to have installed are
3434
- `matplotlib`
3535
- `seaborn`
3636
- `scipy`
37+
- `geopy`
3738

3839
## Inputs to be defined
3940
Most of the inputs needed to run the code are contained at the beginning of the main bash script `copy_data.run`. In particular `MODEL_DATA_FOLDER` where the processing is done (downloading of files and creation of pictures).

plotting/plot_cross_section.ncl

-359
This file was deleted.

plotting/plot_gph_t_500.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ def main():
3232
"""In the main function we basically read the files and prepare the variables to be plotted.
3333
This is not included in utils.py as it can change from case to case."""
3434
dset, time, cum_hour = read_dataset(variables=['T', 'FI'])
35-
36-
temp_500.metpy.convert_units('degC')
35+
3736
temp_500 = dset['t'].metpy.sel(vertical=500 * units.hPa).load()
38-
gph_500 = mpcalc.geopotential_to_height(dset['z'].metpy.sel(vertical=500 * units.hPa))
39-
gph_500 = xr.DataArray(gph_500, coords=temp_500.coords,
37+
temp_500.metpy.convert_units('degC')
38+
z_500 = dset['z'].metpy.sel(vertical=500 * units.hPa).load()
39+
gph_500 = mpcalc.geopotential_to_height(z_500)
40+
gph_500 = xr.DataArray(gph_500, coords=z_500.coords,
4041
attrs={'standard_name': 'geopotential height',
4142
'units': gph_500.units})
4243

44+
del z_500
45+
4346
levels_temp = np.arange(-70., 20., 2.5)
4447
levels_gph = np.arange(4700., 6000., 70.)
4548

0 commit comments

Comments
 (0)