[Thread Prev][Thread Next][Index]
Re: write cdf file using a list of selected indices
Hi Billy,
I'm not sure I understand what your data is like, but I was able to
concoct an example where a t-z variable has missing data at some of the
depths at different times, and it's true that the COMPRESSL function
just compresses along the L axis at each depth, so it doesn't preserve
the depth profile at each time. Not the behavior you need.
Would a sequence like this do what you want? I haven't tested what the
append does but I think something like this should do the job.
save/file=outfile.nc lonsi, latsi, julsi
let npts = `ytrack,return=lend`
repeat/range=1:`npts`/name=m \
(if ytrack[L=`m`] then \
save/append/file=outfile.nc temp[L=`m`])
Thanks for the note about the compress*_by functions. We'll work on
adding to the documentation on them.
Ansley
William S Kessler wrote:
I have a large cdf file consisting of a (z,t) temperature grid with
associated (time-index-only) grids of lats, lons and julian dates. I
have defined a subset of these, which are defined by a latitude flag
(ytrack) existing or not:
let tempsi = if ytrack then temp ! only exists at selected ytrack
let lonsi = if ytrack then lon
let latsi = if ytrack then lat
let julsi = if ytrack then jul
I want to write just the selected ones to a new cdf file.
COMPRESSL works fine for the three 1-d variables, but not for the (z,t)
temperature grid, because the temperature profiles are not all of the
same depth range (as a result COMPRESSL pushes all of them to lower
indices at each depth and does not keep profiles intact). How can I SAVE
(ideally all in a single cdf file) just the temp, lon, lat and jul data
that exist?
By the way, the description of COMPRESSI_BY in the documentation does
not give enough information for me to figure out what this does.
Billy K
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement