The best way to get this package working is to first install miniconda.
Then, install a python environment with conda-forge and geopandas as follows:
conda create -n grl22 -c conda-forge python=3.8 geopandas
then
conda activate grl22
conda install -c conda-forge dask netCDF4 xarray cartopy scipy numpy matplotlib jupyter notebook nb_conda_kernels
The biggest headache is getting geopandas to play nice with the other packages. This approach has been tested in a Windows machine. YMMV.
Next, install this package
cd [location/of/base/GRL2022/package]
conda activate grl22 (if needed!)
pip install .
Once this is complete, you should run jupyter notebook and select the grl22 kernel.
This will save the data in the existing data directory in the base package directory
import tarfile
import urllib.request as urllib2
tgz = urllib2.urlopen("https://svrimg.niu.edu/grl_data/grl_data_22.tar.gz")
data = tarfile.open(fileobj=tgz, mode='r:gz')
data.extractall(path="../data")
1. *_historical_*.csv (HIST)
2. *_future_4p5_*.csv (FUTR 4.5)
3. *_future_8p5_*.csv (FUTR 8.5)
1. *_40dbz_*.csv (>= 40 dBZ)
2. *_50dbz_*.csv (>= 50 dBZ)
3. *_60dbz_*.csv (>= 60 dBZ)
1. econus_*.csv (Eastern CONUS)
2. ama_*.csv (Amarillo)
3. mnp_*.csv (Minneapolis)
4. mph_*.csv (Memphis)
import pandas as pd
df = pd.read_csv("../data/boxplot/econus_historical_40dbz_days.csv", index_col=0, parse_dates=True)
df
1. *_40_cumu_dbz_*.csv (>= 40 dBZ)
2. *_50_cumu_dbz_*.csv (>= 50 dBZ)
3. *_60_cumu_dbz_*.csv (>= 60 dBZ)
import pandas as pd
df = pd.read_csv("../data/cumul/econus_historical_40_cumu_dbz_days.csv", index_col=0, parse_dates=True)
df
1. HIST_*.nc (HIST)
2. FUTR45_*.csv (FUTR 4.5)
3. FUTR85_*.csv (FUTR 8.5)
1. '40_dbz_count' (>= 40 dBZ)
2. '50_dbz_count' (>= 50 dBZ)
3. '60_dbz_count' (>= 60 dBZ)
import xarray as xr
ds = xr.open_dataset("../data/days/HIST_2000_JJA_grid_days.nc")
ds
ds = xr.open_mfdataset("../data/days/HIST_*_*_grid_days.nc", combine='by_coords')
ds
dseason = ds.groupby('time.season').mean('time')
dseason
import xarray as xr
ds = xr.open_dataset("../data/geog/geog_sim.nc")
ds
1. HIST_*.nc (HIST)
2. FUTR45_*.nc (FUTR 4.5)
3. FUTR85_*.nc (FUTR 8.5)
1. 'AFWA_CAPE_MU' (MU CAPE)
2. 'AFWA_CIN_MU' (MU CIN)
ds = xr.open_dataset("../data/thermo/HIST_seasonal_MUCAPE_MUCIN.nc")
ds