You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error when trying to run the latest version of cwatm with future climate data. Please see the output below:
For reference, the time parameters of my run are:
I'm happy to share the full settings file if helpful.
I did not have a problem running this with a previous version of CWatM. I am also able to run the latest CWatM with a similar settings file using W5E5v2.0 data (for a historical period). The climate data I am using is CMIP6 data that has been downscaled by my team. The files are available for the full run period and are without issue. After investigating, I believe the issue is caused by the fact that the timestamp in the CMIP6 files is 12:00:00. The timestamp in the W5E5v2.0 files in contrast is 00:00:00. In the multinetdf() function in data_handling.py, there is rounding applied to some of the date values, which I believe may be contributing to the issue. This rounding was not applied in the previous version of cwatm that I have (and that runs). I don't know the exact best way to fix this, but I've made a couple of observations that might be helpful:
if I start my simulation one day later, the error goes away and the code runs.
if I remove the rounding from the line: datestartint = int(round(nctime[0].data.tolist(),0)) // datediv, the error goes away and my code runs.
the value of datestart reported by data_handling.py is one day later than the start day of my simulation. If I also remove the rounding from this line: datestart = num2date(int((nctime[:][0])), units=nctime.units,calendar=nctime.calendar)
then the datestart value is the same as the start date of my simulation.
From what I can see so far it appears that the timestamps may need to be handled differently in data_handling.py. Alternatively, if there is some mistake I am making or if you would recommend instead modifying the timestamps of my climate data files please let me know.
Thanks to the dev team for all your work on CWatM, it is very useful!
-Abby
The text was updated successfully, but these errors were encountered:
I'm encountering an error when trying to run the latest version of cwatm with future climate data. Please see the output below:
For reference, the time parameters of my run are:
I'm happy to share the full settings file if helpful.
I did not have a problem running this with a previous version of CWatM. I am also able to run the latest CWatM with a similar settings file using W5E5v2.0 data (for a historical period). The climate data I am using is CMIP6 data that has been downscaled by my team. The files are available for the full run period and are without issue. After investigating, I believe the issue is caused by the fact that the timestamp in the CMIP6 files is 12:00:00. The timestamp in the W5E5v2.0 files in contrast is 00:00:00. In the multinetdf() function in data_handling.py, there is rounding applied to some of the date values, which I believe may be contributing to the issue. This rounding was not applied in the previous version of cwatm that I have (and that runs). I don't know the exact best way to fix this, but I've made a couple of observations that might be helpful:
datestartint = int(round(nctime[0].data.tolist(),0)) // datediv
, the error goes away and my code runs.datestart = num2date(int((nctime[:][0])), units=nctime.units,calendar=nctime.calendar)
then the datestart value is the same as the start date of my simulation.
From what I can see so far it appears that the timestamps may need to be handled differently in data_handling.py. Alternatively, if there is some mistake I am making or if you would recommend instead modifying the timestamps of my climate data files please let me know.
Thanks to the dev team for all your work on CWatM, it is very useful!
-Abby
The text was updated successfully, but these errors were encountered: