...
Info | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
One can download the auxiliary data by simplying requesting the data through a CDS API request. Using the API request shown on the CDS data download form, it is possible to request one variable at a time
Note that area sub-selection is not currently possible for the auxiliary (or time-invariant) data. Therefore any 'area' included in the CDS API request will be ignored and the data downloaded will cover the full EFAS domain. And then unzip the auxiliary.zip
|
Plot map discharge
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as cf import numpy as np import pandas as pd import xarray as xr var_name = "dis06" ds = xr.open_dataset('./clim_2020111500.nc') cmap = plt.cm.get_cmap('jet').copy() cmap.set_under('white') # set the coordinate reference system for EFAS crs = ccrs.LambertAzimuthalEqualArea(central_longitude=10,central_latitude=52,false_easting=4321000,false_northing=3210000) # define the filter for visualizing only discharge above that value vmin = 20 # selecting a date ds = ds[var_name].isel(time=1) # Plot map discharge > 20 m/s fig, ax = plt.subplots(1,1,subplot_kw={'projection': crs}, figsize=(20,20) ) ax.gridlines(crs=crs, linestyle="-") ax.coastlines() ax.add_feature(cf.BORDERS) sc = ds[var_name].plot(ax=ax,cmap=cmap,vmin=vmin,add_colorbar=False) ax.set_title(f'{ds[var_name].long_name}> {vmin} $m^{3}s^{-1}$') cbar = plt.colorbar(sc, shrink=.5,) cbar.set_label(ds[var_name].GRIB_name) |
...