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
In clean_up, when we convert a 360_day to a standard calendar with the default xscen parameters, we create temperature inversions.
In xscen, the default align_on is set to random if the input ds is a 360_day calendar. However, it looks like the random dates that are choosen to expand the calendar to standard are not the same for all the variables in the dataset. Eg. xclim.convert_calendar might insert a nan on January 23rd for tasmin, but insert a nan on January 31st for tasmax.
Next, xscen will interpolate on those nan. This has the effect of shifting the timeseries. In some occasions, shifting tasmax but not tasmin with create a temperature inversion (tasmin>tasmax).
The top lines are tasmax, the bottom lines are tasmin.
Potential solutions:
Set default align_on year. The down side is that the the same date will always be interpolated.
Change xclim to make random the same for tasmax et tasmin ?
The text was updated successfully, but these errors were encountered:
Your solution 1 doesn't seem so bad to me, that's what we were doing previously and there aren't many 360_day datasets, anyway, no?
Also, I see three ways for number 2:
In xscen, pass the dataset instead of iterating on the variables.
In xclim, have a fancy year-based seed, so that a given year will always generate the same 5 or 6 days to skip. There could also be a "seed" argument to the function so that we can have variability between runs.
In xclim, return the list of added days and pass the list to subsequent calls of convert_calendar.
solution 1: yes, there is only 1/8 model for info-crue that have 360_day calendar.
solution 2:
I think this is this the way to do it. I have modified the code so that all variables that use "interpolate" in missing_by_var will be converted at the same time. Variables that have a different missing (like [0] for pr) are converted separately, but I don't think this will cause problems.
Generic Issue
In
clean_up
, when we convert a 360_day to a standard calendar with the default xscen parameters, we create temperature inversions.In xscen, the default
align_on
is set torandom
if the input ds is a 360_day calendar. However, it looks like the random dates that are choosen to expand the calendar to standard are not the same for all the variables in the dataset. Eg.xclim.convert_calendar
might insert a nan on January 23rd for tasmin, but insert a nan on January 31st for tasmax.Next, xscen will interpolate on those nan. This has the effect of shifting the timeseries. In some occasions, shifting tasmax but not tasmin with create a temperature inversion (tasmin>tasmax).
The top lines are tasmax, the bottom lines are tasmin.
Potential solutions:
The text was updated successfully, but these errors were encountered: