[Thread Prev][Thread Next][Index]

Re: [ferret_users] Error while merging files using append



Dear Swetha,

I have 16 nc files stored at 16 different directories. I want to merge them all together into a single nc file. Below is code and error faced

use "/file/2001/u/d_2001.nc"
.
.
.
use "/file/2016/u/d_2016.nc"

save/append/file=check.nc U[d=1]
save/append/file=check.nc U[d=2]

There is a better way:

https://ferret.pmel.noaa.gov/Ferret/faq/using-data-that-spans-multiple-files

Namely,

let file_list = SPAWN("ls /file/20*/d_20*.nc")
TSERIES all_times = file_list
save/file=check.nc U

But perhaps you'll have the same problem:

 

**TMAP ERR: error in line definition
             disordered output coordinate value:          25  Axis: TIME
LIST/FORMAT=CDF/append/file=check.nc U[d=2]
Command file, command group, or REPEAT execution aborted
Executed by script: *** GO mergefiles_u.jnl ***

All 16 files have same x and y axis. But t varies for some years.What could possibly be the reason for this error?

"disordered output coordinate value" . . . Does this mean that your time coordinate values are not monotonic?

I recommend looking at the time coordinates of your data files:  On the command terminal

ncdump -c /file/2001/u/d_2001.nc

and look at the definition of the time axis and its coordinate values.

Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement