-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support time-series analysis over a subset of the output data #45
Comments
@milenaveneziani and @xylar, we will have some other potential |
To be clear, this would be for the item:
|
@pwolfram, it's not clear to me whether the problem here is that mpas_xarray needs to be updated or just that the calls to mpas_xarray need to be updated. I suspect the latter, in which case this fix is independent of other changes to mpas_xarray. |
So I think most (perhaps all?) of what is needed to address this issue is to change lines like the following: time_start = datetime.datetime(yr_offset+1,1,1)
time_end = datetime.datetime(yr_offset+1,12,31)
ds_yr1 = ds.sel(Time=slice(time_start,time_end)) to look more like the corresponding lines in the climatology computations, e.g.: time_start = datetime.datetime(yr_offset+climo_yr1, 1, 1)
time_end = datetime.datetime(yr_offset+climo_yr2, 12, 31)
ds_tslice = ds.sel(Time=slice(time_start, time_end)) |
This was addressed by #48, right? |
Please reopen if this is a premature closing @xylar. |
Currently, the the code will only work as expected if config option
timeseries_yr1 = 1
andtimeseries_yr2
is set to something beyond the end of the current run (e.g.9999
), which are the default settings. Iftimeseries_yr1 > 1
, the code crashes, likely becausempas_xarray
is expecting the time series to start from year 1 (it isn't currently making use oftimeseries_yr1
). Iftimeseries_yr1 = 1
andtimeseries_yr2
is set to be less than the total duration of the run, the timeseries analysis may be performed beyond the desired end time. This is because we add one file with date stamp beyond the final date to be sure we're not missing any important output.The time axis of the xarray data sets should be sliced to be consistent with these two new config options in each timeseries analysis function.
The text was updated successfully, but these errors were encountered: