-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCRGlob model does not like forcings generated with eWatercycle package #4
Comments
The header of generated pr forcing is
It is a bit weird that file contains 2 years, but file name only single year. |
So the problem occured when it reached the second year? |
Problem occurred in first call to model.update() as timestamps and simulated_discharge vars are still empty. |
In the https://github.com/UU-Hydro/PCR-GLOBWB_input_example/blob/master/RhineMeuse30min/forcing/precipitation_2001to2010.nc the var is
This is different from the nc file generated by ESMValTool, maybe the model config needs adjustment or recipe needs help? |
On cartesis netcdf pcrglobwb_OBS6_ERA5_reanaly_1_day_pr_1990-1990_rhine {
dimensions:
time = 730 ;
lat = 49 ;
lon = 55 ;
bnds = 2 ;
variables:
float pr(time, lat, lon) ;
pr:_FillValue = 1.e+20f ;
pr:standard_name = "precipitation_flux" ;
pr:long_name = "Precipitation" ;
pr:units = "m" ;
float time(time) ;
time:axis = "T" ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-1-1 00:00:00" ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:calendar = "gregorian" ;
float time_bnds(time, bnds) ;
float lat(lat) ;
lat:axis = "Y" ;
lat:bounds = "lat_bnds" ;
lat:units = "degrees_north" ;
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
float lat_bnds(lat, bnds) ;
float lon(lon) ;
lon:axis = "X" ;
lon:bounds = "lon_bnds" ;
lon:units = "degrees_east" ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
float lon_bnds(lon, bnds) ;
// global attributes:
:comment = "Contains modified Copernicus Climate Change Service Information 2020" ;
:Conventions = "CF-1.7" ;
:provenance This file can be re-generated using the example notebook generate_forcing.ipynb. Here its info: netcdf pcrglobwb_OBS6_ERA5_reanaly_1_day_pr_1990-1990_rhine_ewater {
dimensions:
time = 730 ;
lat = 23 ;
lon = 31 ;
bnds = 2 ;
variables:
float pr(time, lat, lon) ;
pr:_FillValue = 1.e+20f ;
pr:standard_name = "precipitation_flux" ;
pr:long_name = "Precipitation" ;
pr:units = "m" ;
float time(time) ;
time:axis = "T" ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-1-1 00:00:00" ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:calendar = "gregorian" ;
float time_bnds(time, bnds) ;
float lat(lat) ;
lat:axis = "Y" ;
lat:bounds = "lat_bnds" ;
lat:units = "degrees_north" ;
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
float lat_bnds(lat, bnds) ;
float lon(lon) ;
lon:axis = "X" ;
lon:bounds = "lon_bnds" ;
lon:units = "degrees_east" ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
float lon_bnds(lon, bnds) ;
// global attributes:
:comment = "Contains modified Copernicus Climate Change Service Information 2020" ;
:Conventions = "CF-1.7" ;
:provenance These two files are different only in lat/long dimensions. The reason is our get_extents function. So, I think this issue is related to the pcrglob config file rather than forcing data. |
I compared two pcrglob config files: one from Cartesius, and the other one from
I added these two items to the config file generated by ewatercycle and got a different error: _InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception calling application: Size mismatch: Number of array elements is 713, number of raster cells is 221"
debug_error_string = "{"created":"@1626190527.745444205","description":"Error received from peer ipv4:127.0.0.1:50039","file":"src/core/lib/surface/call.cc","file_line":1067,"grpc_message":"Exception calling application: Size mismatch: Number of array elements is 713, number of raster cells is 221","grpc_status":2}"
> |
While the generated forcing has
Now I used a random shape file, which the extents are derived from. Seems the grid positions of forcing and parameter set need to be the same? I could set the |
pcrglob uses a clone map. In era5-comparison, we make the clone maps for each catchment, please see cell |
So either we
First option would be more in line with our philisophy. Second one would help more for the example case. Maybe we can even support both... We might also want to make the grid resolution configurable. |
So in that notebook, indeed, we derive the entire clonemap. But for generating the forcing, we eventually just pass the extents.
so given the forcing resolution of ERA5 (.25 deg) it seems that setting the bounds to that of the example clonemap should produce compatible forcing data. |
Did that in eWaterCycle/ewatercycle#179.
I tried setting the extents right, but since the data resolution is higher than that of the clonemap, it still doesn't work. We need to add a regrid processor to the ESMValTool recipe, so it's not gonna have to wait for another ESMValTool release for this to work out of the box. Or we'd have to change the 'extract_region' preprocessor to the latest regional regrid from inside the ewatercycle.forcing module. |
Tried that but failed, see ESMValGroup/ESMValCore#1230 |
I was able to run the example case with forcing generated by ESMValTool, using the new regional regrid option with the bugfix branch from ESMValGroup/ESMValCore#1231. Due to ESMValGroup/ESMValCore#1232 I couldn't use the API yet, so instead I edited the recipe obtained with Specifically, I replaced the
I'll push another commit to eWaterCycle/ewatercycle#179 that enables using the regridder once it's available through the API. |
Even though it now doesn't complain anymore, the output doesn't look right though... |
with a new parameterset at higher resolution we need to make it possible to regrid anyway. |
I ran
But on call to
model.update()
it raised following exceptionThe log file showed:
The text was updated successfully, but these errors were encountered: