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

Error trying to concatenate a number of nc files #260

Open
jbensabat opened this issue Dec 27, 2022 · 5 comments
Open

Error trying to concatenate a number of nc files #260

jbensabat opened this issue Dec 27, 2022 · 5 comments

Comments

@jbensabat
Copy link

Hello
I am trying to concatenate a number of files that all have identical structure (See picture).
image

I get error (-57) "start + count exceeds dimension bound" on variable u10
I cant figure out where the error is as these files are generated automatically (via the EU Climate Data Shop ERA5-LAND)
best
jac

@czender
Copy link
Member

czender commented Dec 29, 2022

@jbensabat
Copy link
Author

Hi
thanks for the hint
Assume that I have two netcdf files with a structure that is identical to the one in the picture above.
The only difference is that the times are different.
when I apply ncecat to these two files, ncecat does not merge the variables but adds another dimension

for example if I have ISRAEL_METEO_2010_01_01_04.nc with 96 time steps dimension of u10 for example is 96X40X18
image

and file ISRAEL_METEO_01_01_05_08.nc with 96 other time steps with variable u10 having the dimensions 96X40*18
image

ncecat will create a variable u10 with 4 dimensions instead of fully merging the values in u10

image

this instead of having u10 with dimensions 141X40X18

I guess I am using the wrong function or option. Is there a way to merge files, the variables in the files instead of putting them together ?
thanks
jac

@czender
Copy link
Member

czender commented Dec 31, 2022

It sounds like you need to use ncrcat instead of ncecat. The manual explains the differences here.

@jbensabat
Copy link
Author

Hi
thanks - I figured that out for the docs
the problem is that ncrcat does not seem to be included in the distribution or at least not under this nam e
best
jac

@czender
Copy link
Member

czender commented Dec 31, 2022

If you do not have the ncrcat executable you can run ncra -Y ncrcat ... instead. Or you can copy ncra.exe to ncrcat.exe. It's one executable that behaves differently depending on how it was invoked.

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

2 participants