Re: Re: Expand the the array in NetCDF file

From: Charlie Zender <zender_at_nyahnyahspammersnyahnyah>
Date: Tue, 08 May 2007 11:59:53 -0700

Hi Mary and Xiaoming,

> Does anybody out there know if you can do something like
> this with the netCDF operators?

Yes. Say in.nc has ORO(lat,lon). The NCO solution would be

defdim("new_lat",$lat.size+1);
defdim("new_lon",$lon.size+1);
new_ORO[$new_lat,$new_lon]=0.0f;
new_ORO(0:$lat.size-1,0:$lon.size-1)=ORO;

This would be placed inside a -s 'algebra' command-line algebra
argument or in a -S script argument to ncap2, i.e.,

ncap2 -S grow.nco in.nc out.nc

Best,
Charlie

-- 
Charlie Zender, surname_at_uci.edu, Department of Earth System Science
3228 Croul Hall, UC Irvine, Irvine CA 92697-3100. (949) 824-2987 :)
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 08 2007 - 12:59:53 MDT

This archive was generated by hypermail 2.2.0 : Thu May 10 2007 - 09:24:01 MDT