Re: vertical velocity(omega)

From: Ian Harris <i.harris_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 03 2009 - 00:45:55 MST

Hi Kalim

I'm jumping in because we seem to be in similar time zones.

I think you're getting the error:

'fatal:(latitude) is not a dimension name in variable (omega1), could
not determine dimension number'

Because 'latitude' is not a dimension (or variable) in omega.2005.nc!

If you look at the ncdump -h output, the dimensions are lon, lat,
level, time. You should use these exact identifiers when accessing
the data.

So, your call:

    omega = dim_avg_Wrap( omega1(levelist|:,longitude|:,{latitude|
15:20}))

Should be:

    omega = dim_avg_Wrap( omega1(level|:,lon|:,{lat|15:20}))

I think that should do it, please let us know if it doesn't.

Cheers

Harry

On 3 Nov 2009, at 07:12, kalim ullah wrote:

> Dear Mary,
> Please have a look on the fatal error and also the file(omega.
> 2005.nc) is opened given below.
> thanks for your guidance.
> kalim
> ****************
> fatal:(latitude) is not a dimension name in variable (omega1),
> could not determine dimension number
> fatal:Execute: Error occurred at or near line 12 in file reh3.ncl
> ;***************************************
> ncdump -h /data/ncep_data/pressure/omega.2005.nc
> netcdf omega.2005 {
> dimensions:
> lon = 144 ;
> lat = 73 ;
> level = 12 ;
> time = UNLIMITED ; // (365 currently)
> variables:
> float level(level) ;
> level:units = "millibar" ;
> level:actual_range = 1000.f, 100.f ;
> level:long_name = "Level" ;
> level:positive = "down" ;
> level:GRIB_id = 100s ;
> level:GRIB_name = "hPa" ;
> float lat(lat) ;
> lat:units = "degrees_north" ;
> lat:actual_range = 90.f, -90.f ;
> lat:long_name = "Latitude" ;
> float lon(lon) ;
> lon:units = "degrees_east" ;
> lon:long_name = "Longitude" ;
> lon:actual_range = 0.f, 357.5f ;
> double time(time) ;
> time:units = "hours since 1-1-1 00:00:0.0" ;
> time:long_name = "Time" ;
> time:actual_range = 17566752., 17575488. ;
> time:delta_t = "0000-00-01 00:00:00" ;
> time:avg_period = "0000-00-01 00:00:00" ;
> short omega(time, level, lat, lon) ;
> omega:long_name = "mean Daily Omega" ;
> omega:valid_range = -3.f, 7.f ;
> omega:actual_range = -1.010002f, 0.96825f ;
> omega:units = "Pascal/s" ;
> omega:add_offset = 29.765f ;
> omega:scale_factor = 0.001f ;
> omega:missing_value = 32766s ;
> omega:precision = 3s ;
> omega:least_significant_digit = 3s ;
> omega:GRIB_id = 39s ;
> omega:GRIB_name = "VVEL" ;
> omega:var_desc = "Omega (dp/dt)\n",
> "Z" ;
> omega:dataset = "NCEP Reanalysis Daily Averages" ;
> omega:level_desc = "Multiple levels\n",
> "F" ;
> omega:statistic = "Mean\n",
> "M" ;
> omega:parent_stat = "Individual Obs\n",
> "I" ;
>
> // global attributes:
> :Conventions = "COARDS" ;
> :title = "4x daily NMC reanalysis (2005)" ;
> :history = "created 2005/01/03 by Hoop (netCDF2.3)" ;
> :description = "Data is from NMC initialized
> reanalysis\n",
> "(4x/day). It consists of most variables
> interpolated to\n",
> "pressure surfaces from model (sigma)
> surfaces." ;
> :platform = "Model" ;
>
> ;***************************************
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> begin
> a = addfile ("/data/ncep_data/pressure/omega.2005.nc" , "r")
> omega1 = short2flt(a->omega(152,:,:,:))
> ;lev = a ->levelist
> ;lat = a ->latitude
> ;lon = a ->longitude
> omega = dim_avg_Wrap( omega1(levelist|:,longitude|:,{latitude|
> 15:20}))
>
> wks = gsn_open_wks("X11" ,"omega")
> gsn_define_colormap(wks,"BlWhRe")
>
> res=True
> res@gsnDraw = False
> res@gsnFrame = False
> res@cnInfoLabelOn = False
> res@gsnContourZeroLineThicknessF = 2.
> res@gsnContourNegLineDashPattern = 1
> plot = gsn_csm_pres_hgt(wks,omega(:,{70:100}),res)
> draw(plot)
> frame (wks)
> end
>
>
> --- On Mon, 11/2/09, Mary Haley <haley@ucar.edu> wrote:
>
> From: Mary Haley <haley@ucar.edu>
> Subject: Re: vertical velocity(omega)
> To: "kalim ullah" <kalimrid@yahoo.com>
> Cc: huangwei@ucar.edu, ncl-talk@ucar.edu
> Date: Monday, November 2, 2009, 9:19 PM
>
> Dear Kalim,
>
> Can you give more information other than "it is not running"? I
> can guess at a few things: you need to make sure that the
> "levelist" coordinate array of "omega" has units of millibars,
> pascals, or hecto-pascals. It looks like you are doing everything
> properly, so it would help if you could email more information,
> like the error message you're getting or a sample plot.
>
> Thanks,
>
> --Mary
>
>
> On Nov 2, 2009, at 7:26 PM, kalim ullah wrote:
>
>> Dear NCL users,
>> I want to calculate the vertical velocity with the help of NCEP
>> reanalysis data. So in this I have used the programme is given
>> below but it is not running, so please any one could help me in
>> this regard.
>> Thanks in advance
>> kalim
>>
>>
>>
>> _______________________________________________
>> 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

Ian "Harry" Harris
Climatic Research Unit
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ
United Kingdom
Received on Tue Nov 3 00:44:05 2009

This archive was generated by hypermail 2.1.8 : Fri Nov 06 2009 - 09:15:29 MST