Finally, I found the problem. Thanks again.
Cheers
joueky
________________________________
From: juki juki <juky_emc2_at_yahoo.com>
To: NCL Talk <ncl-talk_at_ucar.edu>
Sent: Monday, March 18, 2013 1:46 PM
Subject: Fw: gsn_csm_pres_hgt
Sorry, I forward this message again.
Best regards;
joueky
----- Forwarded Message -----
From: juki juki <juky_emc2_at_yahoo.com>
To: NCL Talk <ncl-talk_at_ucar.edu>
Sent: Monday, March 18, 2013 1:32 PM
Subject: gsn_csm_pres_hgt
Hi all ncl users,
Again, I would like to share my problem. I want to make a Pressure-Height plot for my relative humidity. The plot was success, but the result is strange when I compare with the result of simple plot of Matlab. I send the result of ncl and matlab in this email along
with the data being used. Thanks for help
Joueky
-------------
The code is:
;----------------------------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;************************************************
begin
ncols = 17 ;
nrows = 144 ;
lon = asciiread ("lon.dat", (/17,144/), "float")
lon1 =lon(0,:);
lon1!0 = "lon"
lon1_at_units = "degrees_east"
printVarSummary (lon1)
pres = asciiread ("pres.dat", (/17,144/), "float")
pres1=pres(:,0);
pres1!0 = "pres"
pres1_at_units = "mb"
printVarSummary (pres1)
data_rhanom = asciiread ("rha.dat", (/ncols,nrows/), "float")
data_rhanom!0 = "pres"
data_rhanom!1 = "lon"
data_rhanom&lon = lon1
data_rhanom&pres = pres1
printVarSummary (data_rhanom)
; ===========================
; color plot
; ===========================
wks = gsn_open_wks ("png", "test1_ncl" ) ; open workstation
gsn_define_colormap(wks,"BlWhRe") ; choose colormap
res = True ; plot mods desired
res_at_tiMainString = "test" ; title
res_at_cnLevelSelectionMode = "ManualLevels" ; manual contour levels
res_at_cnLevelSpacingF = 1.0 ; contour interval
res_at_cnMinLevelValF = -10. ; min level
res_at_cnMaxLevelValF = 10. ; max level
res_at_cnLineLabelsOn = False ; turn on line labels
res_at_cnFillOn = True ; turn on color fill
res_at_cnLinesOn = False ; turn of contour lines
;---This resource not needed in V6.1.0
res_at_gsnSpreadColors = True ; use full range of colors
;---This resource defaults to True in NCL V6.1.0
res_at_lbLabelAutoStride = True ; optimal labels
plot = gsn_csm_pres_hgt(wks,data_rhanom,res)
end
_______________________________________________
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 Mar 18 08:18:31 2013
This archive was generated by hypermail 2.1.8 : Tue Mar 19 2013 - 16:31:18 MDT