Re: problem with pres-hgt plot

From: Debasish PaiMazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Mon, 17 Aug 2009 14:02:01 -0400

Dear Marziye,

Please check the web page http://www.ncl.ucar.edu/Document/Graphics/
Interfaces/gsn_csm_pres_hgt.shtml
It is Clearly mentioned in the web page that the leftmost dimension
of the variable must contain a one-dimensional coordinate array of
pressure values with correct units ("hpa", "hPa", "Pa", "pa", "mb",
"millibars", etc). But the leftmost dimension of your variable (p=a-
>pp(0,:,23,:)) is sigma level instead of pressure level.

Please check the function "pres_sigma" to calculate pressure at
specified sigma level in web page http://www.ncl.ucar.edu/Document/
Functions/Built-in/pres_sigma.shtml
Also check the example vert_2.ncl in web page http://www.ncl.ucar.edu/
Applications/vert_interp.shtml to convert sigma to pressure.

Good luck

Debasish

On 09-08-17, at 13:11, marziyeh dadizadeh wrote:

>
> Dear Debasish,
>
> Many thanks for your guidance.
> I checked it again but also has problem. By use of i_cross=23, got
> new error :
>
>
> (0) gsn_csm_pres_hgt: Fatal: The coordinate array for the first
> dimension of the input data must be in Pascals, Hecto-pascals, or
> millibars
> (0) and it must contain the attribute 'units' set to one of the
> following strings (depending on your units):
> (0) 'mb' 'Mb' 'MB' 'millibar' 'millibars' 'MILLIBARS'
> 'hybrid_sigma_pressure' 'Pa' 'pa' 'PA' 'Pascals' 'pascals'
> 'PASCALS' 'hpa' 'hPa' 'HPA' 'hecto-pascals' 'HECTO-PASCALS'
> (0) Cannot create plot.
> fatal:Illegal right-hand side type for assignment
> fatal:Execute: Error occurred at or near line 12 in file prs-high
>
>
> here is the summary of p veriable in my file:
>
> Variable: p
> Type: float
> Total Size: 5443200 bytes
> 1360800 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 18] x [sigma_level | 30] x [i_cross
> | 42] x [j_cross | 60]
> Coordinates:
> time: [ 0..3060]
> sigma_level: [0.025..0.9975]
> Number Of Attributes: 2
> long_name : PRESSURE PERTURBATION
> units : Pa
>
>
> i_cross is defined but I don't know why this function doesn't work
> for me.
> Whenever I try to use this function, get problem.
> Do you know where is my mistake? please help me if you have any
> suggestion.
>
> Thanks in advance,
>
> Marziye
>
> --- On Mon, 8/17/09, Debasish PaiMazumder <debasish_at_sca.uqam.ca>
> wrote:
>
> From: Debasish PaiMazumder <debasish_at_sca.uqam.ca>
> Subject: Re: problem with pres-hgt plot
> To: "marziyeh dadizadeh" <marzi_d65_at_yahoo.com>
> Cc: ncl-talk_at_ucar.edu
> Date: Monday, August 17, 2009, 6:48 PM
>
> Dear Marziye,
>
> The error occurs in line where you read pp (p=a->pp(0,:,{23},:)).
> You are trying to read the variable pp @time=0 and @latitude
> (i_cross)=23 but in your file MMOUT_DOMAIN3.nc, I guess that there
> is no defined latitude(i_cross) coordinate variable which is
> associated with pp(i_cross=23). Please check you input netcdf file
> for defined i_cross. If you have defined i_cross, then please check
> for i_cross=23.
>
> Good luck
>
> Debasish
>
> On 09-08-17, at 04:58, marziyeh dadizadeh wrote:
>
>> Dear NCL users,
>>
>> I used a very simple code to run "gsn_csm_pres_hgt" function. But
>> got this error:
>>
>> fatal: Dimention (i_cross) of file (MMOUT_DOMAIN3) does not have
>> an associated coordinate variable
>> fatal: Execute: Error occurred at or near line 6 in file prs-high
>>
>> Can any one tell me please how eliminate it? (I am new in NCL)
>> I work with NCL version 5.0.0 and mm5 output file.
>>
>>
>> thanks,
>> Marziye
>>
>>
>>
>>
>> here is my code:
>> ;--------------------------------------------------------------------
>> -------
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>
>> begin
>> a = addfile("/home/user/output/MMOUT_DOMAIN3.nc","r")
>> p = a->pp(0,:,{23},:) ;pp(time, sigma_level,
>> i_cross, j_cross)
>>
>> wks = gsn_open_wks("X11", "preshgt")
>>
>> res = True
>>
>> plot = gsn_csm_pres_hgt(wks,p,res) ; Call gsn_csm function
>> for
>> ;
>> drawing a pressure/height plot.
>> end
>> ;--------------------------------------------------------------------
>> -------------
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> Debasish PaiMazumder, PhD
> Hydrology & Climate Science
> Postdoctoral Researcher at UQÀM/Ouranos
> 550, Sherbrooke west, 19th floor, west tower,
> Montréal, QC, Canada H3A 1B9
> Tel: (514) 282-6464-343
> (514) 937-0042 (R)
> email: debasish_at_sca.uqam.ca
>
>
>
>
>

Debasish PaiMazumder, PhD
Hydrology & Climate Science
Postdoctoral Researcher at UQÀM/Ouranos
550, Sherbrooke west, 19th floor, west tower,
Montréal, QC, Canada H3A 1B9
Tel: (514) 282-6464-343
      (514) 937-0042 (R)
email: debasish_at_sca.uqam.ca

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 17 2009 - 12:02:01 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 24 2009 - 11:15:23 MDT