Re: ECMWF operational analysis

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 24 Mar 2006 08:19:30 -0700 (MST)

Hello,

Technically, I am on vacation ... :-)

However, I did not want this to go unanswered.

I asked Andrea to send me a sample file.
ECMWF operational data are generally given
as spherical harmonic coefficients. I suspected
that was the problem.

*Always* look at a data file before processing.
Using ncl_filedump [a033] ....

             ncl_filedump ana_yest.grb
reveals

------------------------
NCAR Command Language Version 4.2.0.a033
Variable: f (file variable)

filename: ana_yest
path: ana_yest.grb
    file global attributes:
    dimensions:
       lv_ISBL0 = 4
       real_imaginary = 2 <====== Note
       g50_lat_2 = 800
       g50_lon_3 = 800
       g4_lat_4 = 800
       g4_lon_5 = 1600
    variables:
[snip]
       float T_GDS50_ISBL ( lv_ISBL0, real_imaginary, g50_lat_2, g50_lon_3 )
                                      ^^^^^^^^^^^^^^
          center : European Center for Medium-Range Weather Forecasts - Reading
          long_name : Temperature
          units : K
          _FillValue : -999
          level_indicator : 100
          gds_grid_type : 50
          parameter_table_version : 128
          parameter_number : 130
          forecast_time : 0
          initial_time : 03/19/2006 (12:00)
[snip]
       float Q_GDS4_ISBL ( lv_ISBL0, g4_lat_4, g4_lon_5 )
          center : European Center for Medium-Range Weather Forecasts - Reading
          long_name : Specific humidity
          units : kg kg**-1
          _FillValue : -999
          level_indicator : 100
          gds_grid_type : 4
          parameter_table_version : 128
          parameter_number : 133
          forecast_time : 0
          initial_time : 03/19/2006 (12:00)
[snip]
--------------------------------------------
Q_GDS4_ISBL are 'regular' data

   in = addfile(myfile,"r")
   lev = in->lv_ISBL0
   klev = dimsizes(lev)

   wks = gsn_open_wks("ncgm", myfile) ; open a ps file
   gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap
   res = True ; plot mods desired
   res_at_cnFillOn = True ; turn on color fill
   res_at_cnLinesOn = False ; turn off contour lines
   res_at_gsnSpreadColors = True ; use full range of color map

;************************************************
; loop over levels
; plot Q directly ... it is not in complex form
; these arrays are big ... just do one at a time
;************************************************

   do kl=0,klev-1
      Q = in->Q_GDS4_ISBL(kl,:,:)
      res_at_tiMainString = Q_at_initial_time
      res_at_gsnCenterString = "lev="+lev(kl)
      plot = gsn_csm_contour_map_ce(wks,Q,res)
   end do

-----------------
T_GDS50_ISBL [also (not shown), Z, U, V] are spherical harmonic coef

The must be synthesized before they can be used.

NCL's shsgc should handle this.

I will look at this next week.

Regards
D

On Fri, 24 Mar 2006, Andrea Storto wrote:

> Hi,
> Of course there's a problem of definition of lat and long coordinates,
> **********************
> Variable: T
> Type: float
> Total Size: 2560000 bytes
> 640000 values
> Number of Dimensions: 2
> Dimensions and sizes: [g50_lat_2 | 800] x [g50_lon_3 | 800]
> Coordinates:
> Number Of Attributes: 10
> lv_ISBL0 : 500
> center : European Center for Medium-Range Weather Forecasts - Reading
> long_name : Temperature
> units : K
> _FillValue : -999
> level_indicator : 100
> grid_number : 255
> parameter_number : 130
> forecast_time : 0
> initial_time : 03/19/2006 (12:00)
> **********************
>
> anyway, further to this, I used a new wxMaximumSize , and I get the same
> message:
>
> ************
> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size
> 33554432
> fatal:ContourPlotDraw: draw error
> ************
> or
> ************
> fatal:ContourPlotDraw: ARSCAM - MCS TOO SMALL
> fatal:ContourPlotDraw: draw error
> ************
> if I increase again the wsMaximumSize.
>
> Thanks,
> Andrea
>
>
> Saji Njarackalazhikam Hameed mi ha detto il 03/23/2006 11:47 PM:
>
>> Andrea,
>>
>> 1. It will be helpful to print out a summary of the variable you
>> are plotting, PrintVarSummary(T), so that one knows how
>> (well) the variable T is defined.
>>
>> 2. Try plotting with
>> plot = gsn_contour(wks,T(:,:),res)
>> If this works, the co-ordinate axes of T are not properly
>> described. For instance, longitude should have units of degrees_east
>> longitude_at_units="degrees_east"
>>
>> gsn_csm_contour_map?? expects the variable to be properly described
>> see:
>>
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml
>>
>> I guess the following code snippet may make the plotting with
>> gsn_csm_contour_map work
>> T!0="latitude"
>> T!1="longitude"
>> T&longitude=g4_lon_5 T&longitude_at_units="degrees_east"
>> I don't know the name of the latitude co-ordinate
>> variable, but follow the above example
>>
>> 3. To reallocate workspace, get a sample .hluresfile from the
>> following link and modify the last entry appropriately:
>> http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
>>
>> For instance:
>> *wsMaximumSize: 32556688
>>
>> Hope these hints help,
>>
>> saji
>> ....
>>
>> * Andrea Storto <andrea.storto_at_uniroma1.it> [2006-03-23 13:15:26 +0100]:
>>
>>
>>> Hi all,
>>>
>>
>>
>>
>>> maybe it's an old topic, but I couldn't find anything to solve my
>>> problems, anyway,
>>> I got an ECMWF operational analysis via the MARS archive,
>>> (only Z,U,V,Q-rel.hum.-,T for 4 press levels),
>>> In my ncl script I print out the variables and the isobaric levels:
>>>
>>
>>
>>
>>> *********************
>>> Variable: names
>>> Type: string
>>> Total Size: 32 bytes
>>> 8 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [8]
>>> Coordinates:
>>> (0) lv_ISBL0
>>> (1) g4_lon_5
>>> (2) g4_lat_4
>>> (3) Q_GDS4_ISBL
>>> (4) V_GDS50_ISBL
>>> (5) U_GDS50_ISBL
>>> (6) T_GDS50_ISBL
>>> (7) Z_GDS50_ISBL
>>> Variable: lv_ISBL0 (file variable)
>>> Type: integer
>>> Total Size: 16 bytes
>>> 4 values
>>> Number of Dimensions: 1
>>> Dimensions and sizes: [lv_ISBL0 | 4]
>>> Coordinates:
>>> lv_ISBL0: [500..1000]
>>> Number Of Attributes: 2
>>> long_name : isobaric level
>>> units : hPa
>>> (0) 500
>>> (1) 700
>>> (2) 850
>>> (3) 1000
>>> ***********************
>>>
>>
>>
>>
>>> When I try to store a variable and plot it through the functions:
>>>
>>
>>
>>
>>> T = in->T_GDS50_ISBL(0,0,:,:)
>>> or
>>> T = in->T_GDS50_ISBL
>>>
>>
>>
>>
>>> and (after very simple definition of "res" attributes)
>>>
>>
>>
>>
>>> plot = gsn_csm_contour_map_ce(wks,T(:,:),res)
>>> or
>>> plot = gsn_csm_contour_map_ce(wks,T(:,:,:,:),res)
>>>
>>
>>
>>
>>> I found two problems:
>>>
>>
>>
>>
>>> 1 - Definition of long and lat:
>>>
>>
>>
>>
>>> *************
>>> (0) check_for_y_lat_coord: Warning: Data either does not contain a
>>> valid latitude coordinate array or doesn't contain one at all.
>>> (0) A valid latitude coordinate array should have a 'units' attribute
>>> equal to one of the following values:
>>> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
>>> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN'
>>> (0) check_for_lon_coord: Warning: Data either does not contain a valid
>>> longitude coordinate array or doesn't contain one at all.
>>> (0) A valid longitude coordinate array should have a 'units' attribute
>>> equal to one of the following values:
>>> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
>>> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE'
>>> *************
>>>
>>
>>
>>
>>> ...Perhaps... if I print the longitude variable (g4_lon_5) it's ranging
>>> from 0 to 360 (all positives)!
>>> Something strange or not?
>>>
>>
>>
>>
>>> 2 - Reallocation:
>>>
>>
>>
>>
>>> ****************
>>> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size
>>> 16777216
>>> fatal:ContourPlotDraw: draw error
>>> warning:WorkstationDeactivate: workstation not active or not opened
>>> ****************
>>>
>>
>>
>>
>>> I don't know how to solve it!
>>>
>>
>>
>>
>>> Thanks in advance, if the problem was already dealt with, please link
>>> the topic!
>>>
>>
>>
>>
>>
>>
>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 24 2006 - 08:19:30 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 29 2006 - 11:53:04 MST