Re: plot cut grib file data (ERA-interim) in NCL

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 02 2011 - 16:03:14 MST

Mary,
FYI, I already asked Andries to post to ncl-talk rather than ncarg-talk, and he has already uploaded the required files.
Andries, I am pretty sure the issue involves calculating the gaussian latitudes for GRIB. It's a bit tricky for non-global datasets, and NCL probably does not quite understand the way CDO specifies the subset. There have been other problems with this in the past. The NetCDF subsets have no problem because the latitude coordinates are already specified and no calculations are required.
  -dave

On Dec 2, 2011, at 9:14 AM, Mary Haley wrote:

> Dear Andries,
>
> In the future, can you post your NCL questions to ncl-talk instead of ncarg-talk? This email list is more for NCAR Graphics users (and is not a very active list at that).
>
> Can you put this GRIB file on our ftp account? It sounds like there may be a bug in reading it.
>
> ftp ftp.cgd.ucar.edu
> anonymous
> <Use your email address for the password>
> cd incoming
> put ei_an_geopotsurf_gg128_200911.grb
> quit
>
> I'll need to know the exact name of the file in order to retrieve it (I'm not sure about the suffix).
>
> Thanks,
>
> --Mary
>
>
> On Dec 2, 2011, at 7:19 AM, Andries De Vries wrote:
>
>> In addition to the question below, I think its worth mentioning that NCL has no problems with plotting a cut netCDF file. I converted the same grib file to netCDF format, cut it with the same tool and plotted it. Here no problems occur. I suppose the problem happens when NCL read in the cut grib file and somehow can not recognize the latitude coordinates. Converting the whole dataset is not really a solution as it would duplicate the data size. I would be very grateful to hear of a solution.
>>
>> Have a good weekend!
>> Cheers,
>> Andries
>>
>> From: Andries De Vries [mailto:a.devries@cyi.ac.cy]
>> To: ncarg-talk@ucar.edu
>> Sent: Fri, 02 Dec 2011 11:36:33 +0200
>> Subject: plot cut grib file data (ERA-interim) in NCL
>>
>> Dear people,
>>
>> I have a problem with plotting cut files of ERA-Interim data in grib format in NCL. Plotting, using the global file works perfectly. Now I want to make the same plot, but from cut files for a specific region (lon:-60 to 100, lat: -10 to 90). The ERA-Interim data is cut with use of the CDO package of Max Planck Institute, using the command: 'cdo sellonlatbox'. However, when I plot the data, NCL gives the warning below. See also attached text file with warning and the 'printVarSummaries' for original(global) and experiment (cut files) variables.
>>
>> warning:GdsGAGrid: GRIB attributes La1 and/or La2 are incorrectly out of range of the gaussian latitude array (See GRIB Section 2 documentation)
>> warning:GdsGAGrid: Gaussian latitude coordinate array is partially or wholly undefined
>>
>> The plot is flipped and stretched over the latitudes (see plot attached). Inverting the latitudes does not help, the plot is still stretched. Apparently NCL has difficulties dealing with latitude coordinates. I do not know if the problem happens in NCL, or that the problem originates from cutting the files, leading to loss of coordinates or metadata. Using wgrib command, the cut grib file seems okay. I also did some experiments with cutting data for specific index instead of lat-lon coordinates as well as switching coordinates in the cdo command, but it all did not make any difference.
>>
>> I did another experiment, cutting the data for lon:-60 to 100, but with the full latitudes: -90 to 90. In this case, NCL handles the cut file perfectly without any problem, see the second attached plot.
>>
>> Does anyone have any idea about this problem? Suggestions would be most welcome. Thanks a lot!
>>
>> Cheers,
>> Andries
>>
>>
>> _______________________________________________
>> ncarg-talk mailing list
>> ncarg-talk@ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk

_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Fri Dec 2 16:03:29 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 02 2011 - 16:06:09 MST