hydromt icon indicating copy to clipboard operation
hydromt copied to clipboard

Missing nodata value in DataCatalog for worldclim

Open couasnonanais opened this issue 3 years ago • 2 comments

The function precip() from forcing.py gave an error when using the worldclim data because the nodata value was not set. This could be added by modifying the argument for no data in the current yml file of the data catalog

---- code piece that didn't work ---- #Testing with clim argument cat = DataCatalog() p_precip = cat.get_rasterdataset("era5", variables="precip") #era horuly

#We create a more refined grid p_transform = p_precip.raster.transform
p_shape = (21,18) grid = full_from_transform(transform = p_transform, shape = p_shape, crs = 4326)

p_clim = cat.get_rasterdataset("worldclim") p_clim.raster.set_nodata(-999.0) #without this line, ti does not work

pout_clim = precip(p_precip, grid, clim=p_clim)

couasnonanais avatar Sep 26 '22 10:09 couasnonanais

@couasnonanais For clarity, this is with the "artifact_data" data catalog right?

DirkEilander avatar Oct 06 '22 09:10 DirkEilander

Both the deltares_data and artifact_data catalogs need updating

DirkEilander avatar Oct 10 '22 07:10 DirkEilander