Re: Another concatenation problem : re-stacking the atmosphere

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Dec 11 2011 - 17:28:13 MST

So, for each time step, there are 14*14=196 levels?
Something like .... ?????

GATE_IDEAL_S_00450_001_to_014.nc
GATE_IDEAL_S_00450_015_to_028.nc
     :
GATE_IDEAL_S_00450_183_to_196.nc

where the "00450" represents a (say) time?

====
A "complete" variable would be (1, 196, 2048, 2048)? If so,
Each variable would be 1*196*2048*2048*4=3288334336 bytes [~3.3GB]

If so, my approach would be to create a netCDF file for
each individual variable at each time. Then, if need be,
merge the individual files.

I wrote the attached while watching the Bronco game. :-)
It probably has some errors but I have nothing to test it with.

Also, likely could be made faster but this is a start.

Good luck
D

On 12/9/11 11:10 PM, John Helly wrote:
> Hi.
>
> I've been looking around various archives for a solution and the ones I've found using NCO (ncrcat, ncecat) don't seem to suit this problem so I'm thinking I'm going to need an NCL solution.
>
> Here's the problem.
>
> I have a time series of netCDF files but each netCDF file represents only 1/14th of the atmosphere vertically over the fixed horizontal domain. So, for any given time t I need to re-stack 14 netCDF files into a single file so I can visualize it as a 3D-volume. This is further complicated by the fact that each of the 14 files is 1.8GB.
>
> Using the NCO approach, I tried switching the record variable and then using ncrcat. That succeeds in putting the right dimensional quantity in the record variable but I can't get it to switch back to being a fixed variable using ncpdq. I don't think ncpdq can do that based on the error message.
>
> So, I'm hoping NCL can do this. Each netCDF file has the following attributes:
>
> ncdump -h GATE_IDEAL_S_00450_001_to_014.nc
> netcdf GATE_IDEAL_S_00450_001_to_014 {
> dimensions:
> x = 2048 ;
> y = 2048 ;
> z = 14 ;
> time = UNLIMITED ; // (1 currently)
> variables:
> float x(x) ;
> x:units = "m" ;
> float y(y) ;
> y:units = "m" ;
> float z(z) ;
> z:units = "m" ;
> z:long_name = "height" ;
> float time(time) ;
> time:units = "d" ;
> time:long_name = "time" ;
> float p(z) ;
> p:units = "mb" ;
> p:long_name = "pressure" ;
> float U(time, z, y, x) ;
> U:long_name = "X Wind Component " ;
> U:units = "m/s " ;
> float V(time, z, y, x) ;
> V:long_name = "Y Wind Component " ;
> V:units = "m/s " ;
> float W(time, z, y, x) ;
> W:long_name = "Z Wind Component " ;
> W:units = "m/s " ;
> float PP(time, z, y, x) ;
> PP:long_name = "Pressure Perturbation " ;
> PP:units = "Pa " ;
> float TABS(time, z, y, x) ;
> TABS:long_name = "Absolute Temperature " ;
> TABS:units = "K " ;
> float QV(time, z, y, x) ;
> QV:long_name = "Water Vapor " ;
> QV:units = "g/kg " ;
> float QN(time, z, y, x) ;
> QN:long_name = "Non-precipitating Condensate (Water+Ice) " ;
> QN:units = "g/kg " ;
> float QP(time, z, y, x) ;
> QP:long_name = "Precipitating Water (Rain+Snow) " ;
> QP:units = "g/kg " ;
> }
>
> So, z should be incremented for each layer by 14 levels (except the last file which is something less but fixed, just don't have one available at the moment to check).
>
> Can you suggest an approach to doing this with NCL or something about NCO I'm overlooking? Thanks.
>
> Cheers.
> --------------
> John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile / stonesteps (Skype) / stonesteps7 (iChat) / http://www.sdsc.edu/~hellyj
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Sun Dec 11 17:28:22 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 16 2011 - 10:27:49 MST