-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
In the ConfCO2.py, line 212-224:
# Get the model result
mod = m.extractTimeSeries(
emulated_flux,
initial_time=obs.time_bnds[0, 0] - float(Ninf) / 12 * 365 + 29.0,
final_time=obs.time_bnds[-1, 1],
)
# What if I don't have Ninf leadtime?
tf = min(obs.time_bnds[-1, 1], mod.time_bnds[-1, 1])
if tf % 365 > 2:
tf -= tf % 365 # needs to end in integer years
obs.trim(t=[-1e20, tf])
mod.trim(t=[-1e20, tf])
It is used to conform the end of years of model results and observations. But the above codes assumed that the start year of model results (initial_time) are float(Ninf) / 12 * 365 + 29.0 earlier than that of observations. It is not true for some use cases. It will cause the "inconsistent shape error" in the line eflux = np.ma.masked_array(eflux, mask=obs.data.mask)
Metadata
Metadata
Assignees
Labels
No labels