You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: