-
Notifications
You must be signed in to change notification settings - Fork 32
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
cutout
fails with Arctic face
#425
Comments
Hey @ThomasHaine thanks for the detailed error. I gave it a very quick glance. It is possible that the error is because there is so little data (perhaps 1 grid point) that is being retained from the arctic face, or face 2, and that sometime causes errors in cutout... Another is to manually increase the your domain of interest by more that 1 or 2 degrees. I tried it and it worked fine. This is what I did: ## case 1 ) same domain w/o buffer layer
cutout_kwargs1 = {
'varList': ['U','V', 'T'],
'timeRange': ["1992-01-16T12:00:00.000000000"],
'XRange': [np.min(lons), np.max(lons)],
'YRange': [np.min(lats), np.max(lats)],
}
## case 2) Manually increase domain in north direction
cutout_kwargs2 = {
'varList': ['U','V', 'T'],
'timeRange': ["1992-01-16T12:00:00.000000000"],
'XRange': [np.min(lons), np.max(lons)],
'YRange': [np.min(lats), np.max(lats)+6],
}
cut_od1 = ECCOod.subsample.cutout(**cutout_kwargs1)
cut_od2 = ECCOod.subsample.cutout(**cutout_kwargs2)
# on a separate cell:
fig, axes = plt.subplots(1, 2, figsize=(14, 4))
cut_od1._ds['T'].isel(time=0, Z=0).plot(ax=axes[0])
cut_od2._ds['T'].isel(time=0, Z=0).plot(ax=axes[1]) Runs fine... the plots are: NoteIn |
Thanks @Mikejmnez ! I agree with your analysis. It's interesting. Can we trap the condition in |
Sure! |
The new
cutout
code (see #408) fails when an Arctic face is included, but works OK without an Arctic face.Run the following code on SciServer with/without the Arctic face (Gulf Stream cutout/Labrador Sea cutout). OceanSpy must be updated to the most recent version.
The error traceback for the Labrador Sea cutout is:
The text was updated successfully, but these errors were encountered: