Closed hdrake closed 4 years ago
@mara-freilich, I just altered the file paths to be consistent with my recent changes to master and also fixed up the time selection so it's not just hard coded for 2020. Thanks for the contribution!
The relevant code:
add_days = np.arange(((tmp['End day'] - tmp['Start day'])/datetime.timedelta(days=1)).item())
dates = [tmp['Start day'].item() + datetime.timedelta(days=add_day) for add_day in add_days]
if np.isnan(meansp.sel(time=dates).values.mean()):
localsp = ds['q2m'].sel(latitude=tmp['Latitude'], longitude=tmp['Longitude'], method='nearest')
q2m_li.append(localsp.sel(time=dates).mean().values)
else:
q2m_li.append(meansp.sel(time=dates).mean().values)
Check out this pull request on
You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.