[Thread Prev][Thread Next][Index]

Re: [ferret_users] appending 2 netcdf files problem



Hi,

|  I have a problem while appending two files of same
| variable.I have a file of variable u with following
| grid specifications. 
[. . .]
|  I believe this error came because one file has z axis
| defined and another file has z axis not defined. But I
| dont know how to solve this problem. Can anybody say
| how to solve this problem? 

To my knowledge, the netCDF format allows a variable
to have only one single grid.  The variable can "grow"
only in the direction of the last dimension (typically
"time"); you can't add an array of a different shape
at the end of the existing variable.  For example,
suppose you have a variable u on a 200x100x50x7 grid
(lon, lat, depth, time):

   u(200, 100, 50, 7)

Then, you can add an array u(200, 100, 50) representing
the next timestep at the end of the existing variable.
After the addition, the variable will have grown to

   u(200, 100, 50, 8)

In addition, not only the sizes (shapes), but also the
gridpoints must agree.

So, I think you have to regrid one or both of your
variables to a common grid before you can concatenate
them in the time direction.

Ryo


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement