Re: Bug in wrf_user_getvar in 6.1.0-Beta?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 25 2012 - 09:56:28 MDT

Hi Robert,

Thanks for the further detail on this problem. We would love to get a hold of one of these NetCDF-4 files to see if there's an issue with filevardimsizes.

I couldn't reproduce this problem using V6.0.0 or V6.1.0-beta on our machine, but maybe there's something else going on.

One file should be enough, and you can use the same FTP information I gave below.

Thanks,

--Mary

On Jun 25, 2012, at 2:43 AM, Robert Schuster wrote:

> Hello Mary,
>
> I found out, that the problem occurs only with netcdf-4 files. I create the files with nccopy:
> nccopy -k 3 -d 5 -m 1g infile.nc outfile.nc4
>
> The files created in that way work fine with NCL 6.0.0, but not with NCL 6.1.0-Beta. I guess that the wrf_user_getvar function is not the only place where this problem occurs.
>
> The function filevardimsizes seems to have a problem with the netcdf-4 files:
> the following code gives different results for the netcdf-4 and the netcdf-3 files:
> infile = addfile("wrfout_d02_2006-07-03_19:00:00.nc", "r")
> dims = filevardimsizes(infile, "XLAT")
> print(dims)
>
> output for netcdf-4:
> Variable: dims
> Type: integer
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -2147483647
> (0) -2147483647
>
> output for netcdf-3:
> Variable: dims
> Type: integer
> Total Size: 12 bytes
> 3 values
> Number of Dimensions: 1
> Dimensions and sizes: [3]
> Coordinates:
> (0) 1
> (1) 225
> (2) 780
>
> The output of ncdump is in both cases:
> float XLAT(Time, south_north, west_east) ;
> XLAT:FieldType = 104 ;
> XLAT:MemoryOrder = "XY " ;
> XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;
> XLAT:units = "degree_north" ;
> XLAT:stagger = "" ;
>
> The both files are quite large (together 2.1G), but I can upload them, if you can not reproduce the problem.
>
> Thanks!
> Robert
>
> Am 22.06.2012 um 19:36 schrieb Mary Haley:
>
>> Hi Robert,
>>
>> I looked at the WRFUserARW.ncl code, and I really can't see what the problem might be.
>> The code is pretty straight-forward, so I'm stymied!
>>
>> Would you be able to provide your WRF file on our ftp site?
>>
>> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
>>
>> Thanks,
>>
>> --Mary
>>
>>
>>
>> On Jun 22, 2012, at 7:25 AM, Robert Schuster wrote:
>>
>>> NCL 6.0.0:
>>> Variable: xlat
>>> Type: float
>>> Total Size: 702000 bytes
>>> 175500 values
>>> Number of Dimensions: 3
>>> Dimensions and sizes: [Time | 1] x [south_north | 225] x [west_east | 780]
>>> Coordinates:
>>> Number Of Attributes: 5
>>> FieldType : 104
>>> MemoryOrder : XY
>>> description : LATITUDE, SOUTH IS NEGATIVE
>>> units : degree_north
>>> stagger :
>>>
>>> NCL 6.1.0-Beta:
>>> Variable: xlat
>>> Type: float
>>> Total Size: 702000 bytes
>>> 175500 values
>>> Number of Dimensions: 3
>>> Dimensions and sizes: [Time | 1] x [south_north | 225] x [west_east | 780]
>>> Coordinates:
>>> Number Of Attributes: 5
>>> FieldType : 104
>>> MemoryOrder : XY
>>> description : LATITUDE, SOUTH IS NEGATIVE
>>> units : degree_north
>>> stagger :
>>>
>>> The output in both cases is identical.
>>>
>>> Am 22.06.2012 um 14:59 schrieb Dennis Shea:
>>>
>>>> Can you please send to ncl-talk and wrfhelp@ucar.edu the output from:
>>>>
>>>> if (isfilevar(infile,"XLAT")) then
>>>> xlat = infile->XLAT
>>>> printVarSummary(xlat)
>>>> end if
>>>> if (isfilevar(infile,"XLAT_M")) then
>>>> xlatm = infile->XLAT_M
>>>> printVarSummary(xlatm)
>>>> end if
>>>>
>>>>
>>>> On 6/22/12 5:49 AM, Robert Schuster wrote:
>>>>> Hello,
>>>>>
>>>>> this script works fine in NCL 6.0.0:
>>>>>
>>>>> 1load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>>>> 2load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>>>>> 3 infile =addfile("wrfout_d02_2006-07-03_19:00:00.nc","r")
>>>>> 4 lat =wrf_user_getvar(infile,"lat", 0)
>>>>> 5printVarSummary(lat)
>>>>> 6
>>>>>
>>>>> It opens a WRF output file and reads the latitudes. The WRF output file
>>>>> was created with WRF 3.3.1.
>>>>>
>>>>> When I run the same script with NCL 6.1.0-Beta, I get the following error:
>>>>> fatal:Number of subscripts do not match number of dimensions of
>>>>> variable, (1) subscripts used, (3) subscripts expected
>>>>> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 1978 in
>>>>> file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>>>>> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 5 in
>>>>> file wrf_test.ncl
>>>>>
>>>>> That seems to be a bug in the new NCL version.
>>>>>
>>>>> Robert
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>
>
> _______________________________________________
> 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 Mon Jun 25 09:56:34 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT