Re: fatal error: reading multi dimension data with one dimension fixed

From: Michael Notaro <mnotaro_at_nyahnyahspammersnyahnyah>
Date: Thu May 08 2014 - 13:38:29 MDT

I looked at it with Guangshan and definitely something is wrong
in the newer versions of NCL. I included the ncdump from the file.
If you try to retrieve U(:,2,:,:) or U(:,:,2,:) or U(:,:,:,2), it will give an error,
but U(2,:,:,:) works ok.

[yslogin2]409%: ncdump -h isotag_t85_115.0k.cam2.h0.cel.plev.delta.611-650-ANN.nc
netcdf isotag_t85_115.0k.cam2.h0.cel.plev.delta.611-650-ANN {
dimensions:
        time = UNLIMITED ; // (40 currently)
        lat = 128 ;
        lon = 256 ;
        lev = 4 ;
variables:
        float CLDHGH(time, lat, lon) ;
                CLDHGH:time_rep = "Estimated from monthly modern calendar data" ;
                CLDHGH:lon = 358.59375 ;
                CLDHGH:lat = 88.9277353522959 ;
                CLDHGH:units = "fraction" ;
                CLDHGH:long_name = "Vertically-integrated high cloud" ;
                CLDHGH:cell_method = "time: mean" ;
                CLDHGH:_FillValue = 9.96921e+36f ;
        float U(time, lev, lat, lon) ;
                U:time_rep = "Estimated from monthly modern calendar data" ;
                U:missing_value = 9.96921e+36f ;
                U:lon = 49.21875 ;
                U:lat = 48.3263610181882 ;
                U:lev = 1000.f ;
                U:cell_method = "time: mean" ;
                U:long_name = "Zonal wind" ;
                U:units = "m/s" ;
                U:_FillValue = 9.96921e+36f ;

On May 8, 2014, at 1:57 PM, Guangshan Chen wrote:

> Dear NCL developers,
>
> I just notice that there is an error message popped out when I read multi dimension data with one dimension fixed.
>
> I could not remember it was shown in the old-version NCL.
>
> Here is what I did:
>
> Opening a file containing zonal wind and read zonal wind
> uwind = file_in->U(:,2,:,:)
>
> The following error will come out:
> Copyright (C) 1995-2014 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.2.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:Subscript out of range, error in subscript #0
>
> But if you read the wind as this: uwind = file_in->U(:,:,:,:), there will be no error message.
>
> However, even with the error message, it seems I still can get the wind at the level I want.
>
>
> Any idea why this happens?
>
> Thanks.
>
> - Guangshan
>
>
>
>
>
>
> _______________________________________________
> 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 Thu May 8 13:38:43 2014

This archive was generated by hypermail 2.1.8 : Fri May 09 2014 - 15:23:17 MDT