Hi Paul, I forgot to specify a range in the save command. That's why it failed. The problem with the ncdump reporting that it wasn't a netcdf file is probably due to you having a version of ncdump that is old and/or doesn't handle netcdf4 correctly. Here's something that worked on a ssh file that I use. use ocean_eta_t_2012_01.nc let p=t[gt=eta_t,l=1:31] let q=eta_t[l=1:31] set grid q go regresst let ssh_detrended=eta_t-qhat def sym XC 40 def sym YC 40 def sym TC 10 def sym filepath reg.nc def sym chunking "XCHUNK=($XC)/YCHUNK=($YC)/TCHUNK=($TC)" def sym savecom "save/($chunking)/NCFORMAT=4/deflate=1/shuffle/file=($filepath)" ! Initial save for all time at i=1,j=1. For some reason can't just save first time point. ($savecom)/i=1/j=1/clob/ilimits=1:3600/jlimits=1:1500 ssh_detrended ! Specifying a range helps a bit... repeat/range=1:1500:($YC)/name=jb ( repeat/range=1:3600:($XC)/name=ib ($savecom)/app/i=`ib`:`ib+($XC)-1`/j=`jb`:`jb+($YC)-1` ssh_detrended) - Also, are you sure you want "eta_t-qhat"? This also eliminates the mean SSH. At worst I thinks you should be saving "qave" as well so that you have the correct offset. Chunking may or may not be worth it. It really depends on how you intend to access the file and whether you can exploit the access patterns efficiently. For instance, if you do a global shade plot of a time slice of ssh_detrended generated by the script above you'll notice a significant slowdown due to the increased number of read operations. On the otherhand a Y-T shade plot may be much quicker. Compression will probably halve the size of files like this. Cheers, Russ On 23/04/17 06:31, Paul Goddard wrote:
|