-
Notifications
You must be signed in to change notification settings - Fork 15
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
set_multiple_rc_from_isimip does not compute results for future events/files #74
Comments
It is because the file does not exist at |
These are the exact paths in my input folder:
|
The issue does not seem to be related to the Climada code base. @LucasWouters please make sure the files are present under these exact paths and your Python interpreter/environment can access them. |
@peanutfun , I've downloaded multiple files (historical and future) from the ISIMIP repository, saved them in the same folder and not altered the paths. In all cases, Climada finds the historical files, but not the future files. |
From what I can see To check if there is an issue with reading a single file, please try the following: import xarray as xr
with xr.open_dataset("C:\Shared\ISIMIP_crop\gepic_gfdl-esm2m_ewembi_rcp60_2005soc_co2_yield-mai-firr_aus_annual_2006_2099.nc4") as dset:
print(dset) |
I'm able the read both files manually using xarray, so the problem does not seem to be with the input data itself. The set_multiple_rc_from_isimip function should take the input parameters from the future filenames as well, as both the scenario ("rcp60") as yearrange ("2006_2099") parameters are listed in the ISIMIP input data specific global variables (default). |
Alright, seems like it's related to the code base after all. Thanks for reporting back! I am afraid I cannot help with that issue. The code is several years old and the original author is not around anymore. If you happen to find a solution, a contribution would be most welcome! |
@LucasWouters I helped out in writing this code back in the days. One issue with this module is that many of the functions are hard coded to use the filename to populate objects. I think in your case the problem results due to the variable "file_props" because you changed part of the file name from "global_annual" to "aus_annual", but our code uses the default FN_STR_VAR = "global_annual". Could you test whether it all runs smoothly if you use the original file name? (The cropping of the data shouldn't be the issue, just the naming.) |
Hi @carmensteinmann , thanks for getting back. I noticed this as well, so I tried 2 things:
|
Hi,
I've been running the set_multiple_rc_from_isimip function to calculate the historical means for ISIMIP files according to the tutorial: Crop production risk based on ISIMIP and FAO data tutorial. My goal is to compare baseline and future crop yield values.
It works fine for historical files but does not compute results for future files. It seems to unable to read the files
Input data examples (masked to Australia to reduce run time):
I'm running a recent stable CLIMADA version.
This only returns output for the historical file.
I've been digging into the functions (running calc_fut_haz_isimip separately), but to no avail. There seems to be issues with reading rasters, as Rasterio cannot find the future files:
Is this because of the dependencies or am I missing an important step here?
The text was updated successfully, but these errors were encountered: