Hi
I would like to plot river discharge data from the dataset "River discharge and related historical data from the European Flood Awareness System" in a livemap. Unfortunately the data do not show in the livemap, instead the map shows an error message "One or more layers has not been loaded properly" (although the workflow itself doesn't give an error message).
A bare-bones example would be like this:
import cdstoolbox as ct @ct.application(title='Livemap river flow data') @ct.output.livemap() def plot_application(): data = ct.catalogue.retrieve( 'efas-historical', { 'system_version': 'version_4_0', 'variable': 'river_discharge_in_the_last_6_hours', 'model_levels': 'surface_level', 'hyear': '1991', 'hmonth': 'january', 'hday': '01', #['01','02'], 'time': '12:00', 'format': 'netcdf' } ) print(data) plot = ct.livemap.plot(data) return plot
This successfully loads the data as shown below, however the livemap is just blank apart from the error message mentioned before. Any pointers?
<xarray.DataArray 'rivo' (y: 950, x: 1000)> [950000 values with dtype=float32] Coordinates: * y (y) float32 752500.0 757500.0 ... 5497500.0 * x (x) float32 2502500.0 2507500.0 ... 7497500.0 forecast_reference_time datetime64[ns] ... step timedelta64[ns] ... surface int64 ... time datetime64[ns] ... lat (y, x) float64 ... lon (y, x) float64 ... Attributes: long_name: Mean discharge in the last 6 hours units: m3 s-1 grid_mapping: crs standard_name: outgoing_water_volume_transport_along_river_channel cds_magics_style_name: river-discharge type: real
Many thanks in advance
Rutger