Skip to content
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

Unable to download depth-continuous data with llcreader #299

Open
kaka22acmilan opened this issue Mar 7, 2022 · 0 comments
Open

Unable to download depth-continuous data with llcreader #299

kaka22acmilan opened this issue Mar 7, 2022 · 0 comments

Comments

@kaka22acmilan
Copy link

Hello,
I'm a beginner of Python and xmitgcm,and I want to download deep-continuous data by llcreader,but if only set k_levels in model.get_dataset just like
model = llcreader.ECCOPortalLLC4320Model() ds = model.get_dataset(varnames=['U','V','W','Eta','Theta','Salt'], k_levels=[0, 1, 2, 3],iter_start=10368, iter_stop=10513, iter_step=144)# k is vertical level filePath = dirPath + '/klevel_3.nc' region_slice = {'i_g':slice(900,2250),'j':slice(3600,4320),\ 'i':slice(900,2250),'j_g':slice(3600,4320),\ 'face':slice(4,5)} region = ds.isel(**region_slice) region.to_netcdf(filePath, mode='w')
it will raise ValueError: Seek before start of file.
sometimes I changed my code as
region_slice = {'i_g':slice(900,2250),'j':slice(3600,4320),\ 'i':slice(900,2250),'j_g':slice(3600,4320),\ 'face':slice(4,5),'k':slice(0,4)}
another error is displayed.However, when I set discontinuous k_levels such as ds = model.get_dataset(varnames=['U','V','W','Eta','Theta','Salt'], k_levels=[1, 10, 40],iter_start=10368, iter_stop=10513, iter_step=144),it is no problem.I can't figure out the relationship between z and z_u or z_p1.
Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant