Re: NCL 5.1.1: Issues with concatenating a subset of an array from multiple files

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 22 2010 - 10:44:16 MDT

v5.1.0 was released in March 2009
v5.1.1 was released in June 2009

http://www.ncl.ucar.edu/prev_releases.shtml#AddfilesBugsFixed5.1.1

=================================
The current version is v5.2.1
It may be downloaded from: http://www.ncl.ucar.edu/Download/

It works correctly on the following simple test.
=================================

I tried v5.2.1 with 2 WRF files. One had 5 time steps;
the other had 6 time steps

===> file 1
netcdf wrf-00-09.sample_t0-4 {
dimensions:
         Time = UNLIMITED ; // (5 currently)
[snip]
variables:
         float PH(Time, bottom_top_stag, south_north, west_east) ;

===> file 2
netcdf wrf-00-09.sample_t5-10 {
dimensions:
         Time = UNLIMITED ; // (6 currently)
[snip]
variables:
         float PH(Time, bottom_top_stag, south_north, west_east) ;
[snip]

+++++++++

fils = systemfunc("ls wrf-00-09*nc")
ph= f[:]->PH
printVarSummary(ph)

Variable: ph
Type: float
Total Size: 90700632 bytes
             22675158 values
Number of Dimensions: 4
Dimensions and sizes: [Time | 11] x [bottom_top_stag | 58] x
[south_north | 99] x [west_east | 359]
Coordinates:
Number Of Attributes: 6
   FieldType : 104
   MemoryOrder : XYZ
   description : perturbation geopotential
   units : m2 s-2
   stagger : Z
   coordinates : XLONG XLAT

On 09/22/2010 09:22 AM, Yongxin Zhang wrote:
> I have two netCDF files that contain only one variable, RAIN. RAIN is
> dimensioned as (time, south_north, west_east) where time=25,
> south_north=765 and west_east=1191. I needed to read out the first 24
> data (i.e., time=0 to 23) at each grid point from each file and then
> concatenate them to become a new variable. I used "systemfunc" and
> "addfiles" but strange thing was that when I used the following statement
>
> obs_rain = rain_fin[:]->RAIN(0:23,:,:)
>
> I would get obs_rain dimensioned as (24, 765, 1191) instead of (48, 765,
> 1191). Same thing happened even though I explicitly set
> ListSetType(rain_fin,"cat"). However, if I used this statement
>
> obs_rain00 = rain_fin[:]->RAIN(:,:,:)
>
> I would get obs_rain00 dimensioned as (50, 765, 1191) which is right. I
> tried this on two different Linux clusters at NCAR using both NCL 5.1.1
> and NCL 5.1.0 and I got the same results. I am not sure if there is a
> bug in NCL 5.1.1 and NCL 5.1.0 or I need to set something else. Please
> advise. Thanks.
>
> Yongxin
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 22 10:44:23 2010

This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 08:55:55 MDT