Dennis..,
I'm attaching those plots i'm getting before regridding and after regridding
using area_hi2lores_Wrap. After regridding it looks odd. The code am using
also attaching.
;**************************************************************************
; NCL script to calculate total precipitation from ECHAM-HAM model output
;**************************************************************************
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"
begin
;Open ECHAM output file
ncep_out = addfile("/newhdd/guest/NCL_codes/CMAP/PRECIP/
precip.mon.mean.nc","r")
imd_out = addfile("/newhdd/guest/IMD/rf_2002.nc","r")
;in = addfile("/newhdd/guest/IMD/rf.nc","r")
;Extracting the variables
; NCEP Variables
lat = ncep_out->lat(33:21)
lon = ncep_out->lon(26:39)
nlat = dimsizes(lat)
nlon = dimsizes(lon)
precip = ncep_out->precip(282,33:21,26:39)
precip!0 = "lat"
precip!1 = "lon"
precip&lat = lat
precip&lon = lon
printVarSummary(precip)
; IMD variables
newlat = imd_out->latitude
newlon = imd_out->longitude
printVarSummary(newlat)
printVarSummary(newlon)
mlon = dimsizes(newlon)
mlat = dimsizes(newlat)
gridded_rainfall = imd_out->rf(182:211,0,:,:)
printVarSummary(gridded_rainfall)
rainfall = dim_avg_n(gridded_rainfall,0)
rainfall!0 = "lat"
rainfall!1 = "lon"
rainfall&lat = newlat
rainfall&lon = newlon
printVarSummary(rainfall)
; Open Workstation
wks =
gsn_open_wks("ps","Observational_precipitation_2002_07_india")
plot = new(3, graphic)
; Setting resources
res = True
res@gsnMaximize = True
res@lbOrientation = "Vertical"
res@lbLabelFontHeightF = 0.015
res@lbLabelAutoStride = True
res@mpDataBaseVersion = "Ncarg4_1"
res@mpDataSetName = "Earth..2"
res@mpOutlineBoundarySets = "NoBoundaries"
res@mpNationalLineColor = "black"
res@mpNationalLineThicknessF = 1.8
res@mpGeophysicalLineThicknessF = 1.8
res@mpFillAreaSpecifiers = (/"Land","India","Water"/)
res@mpSpecifiedFillColors = (/"white","transparent","white"/)
res@mpInlandWaterFillColor = 238
res@mpLandFillColor = -1
res@mpOutlineOn = True
res@mpOutlineSpecifiers = (/"Land","India"/)
res@mpMaskOutlineSpecifiers = (/"water"/)
res@cnFillOn = True
res@cnLineLabelsOn = False
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLinesOn = False
res@cnFillDrawOrder = "PreDraw"
res@gsnAddCyclic = False
res@gsnRightString = "(mm/day)"
res@tmXTOn = False
res@tmYROn = False
minlat = lat(0)
maxlat = lat(nlat-1)
minlon = lon(0)
maxlon = lon(nlon-1)
res@mpMinLatF = minlat
res@mpMaxLatF = maxlat
res@mpMinLonF = minlon
res@mpMaxLonF = maxlon
;Total Precipitation calculation for CMAP
res1 = res
res1@tiMainString = "CMAP"
res1@cnLevels = (/2, 4, 6, 8, 10, 15, 14, 16, 18/)
res1@cnFillColors =
(/"green","greenyellow","yellow","goldenrod","tomato","orangered","red","cyan","RoyalBlue","NavyBlue","darkviolet","Purple"
/)
plot(0) = gsn_csm_contour_map_ce(wks,precip,res1)
;Total Precipitation calculation for IMD
pptn =
area_hi2lores_Wrap(newlon,newlat,rainfall,False,1,lon,lat,False)
pptn!0 = "lat"
pptn!1 = "lon"
pptn&lat = lat
pptn&lon = lon
printVarSummary(pptn)
res2 = res
res2@tiMainString = "IMD"
res2@cnLevels = (/2, 4, 6, 8, 10, 12, 14, 16, 18/)
res2@cnFillColors =
(/"green","greenyellow","yellow","goldenrod","tomato","orangered","red","cyan","RoyalBlue","NavyBlue","darkviolet","Purple"
/)
plot(1) = gsn_csm_contour_map_ce(wks,pptn,res2)
; Difference in IMD and CMAP values
diff_cmap_imd = precip - pptn
diff_cmap_imd!0 = "lat"
diff_cmap_imd!1 = "lon"
diff_cmap_imd&lat = lat
diff_cmap_imd&lon = lon
printVarSummary(diff_cmap_imd)
res3 = res
res3@tiMainString = "Difference IMD and CMAP"
res3@cnLevels = (/0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/)
res3@cnFillColors =
(/"white","green","greenyellow","yellow","goldenrod","tomato","orangered","red","cyan","RoyalBlue","NavyBlue","darkviolet","Purple"
/)
plot(2) = gsn_csm_contour_map_ce(wks,diff_cmap_imd,res3)
pres = True
pres@gsnPanelLabelBar = False
pres@gsnMaximize = True
pres@txString = "Observational Precipitation July 2002"
pres@gsnAddCyclic = False
gsn_panel(wks, plot,(/3,1/),pres)
end
*********************************************************************
Thanks,
A.R.Ragi
M.Tech Atmospheric science
Department of Atmospheric science
Cochin University of Science and Technology
Email : ar.ragi@gmail.com
***********************************************************************
"I want to know how God created this world.I am not interested in this or
that phenomenon. I want to know, his thought, the rest are details" .
---Albert Einstein
***********************************************************************
On Mon, Apr 5, 2010 at 19:40, Dennis Shea <shea@ucar.edu> wrote:
> Your question/clarification needs clarification.
> Whta is "the output is not getting proper"
>
>
> On 4/5/10 2:36 AM, A.R Ragi wrote:
>
>>
>> Dear NCL users..,
>> I would like to compare NCEP rainfall data(2.5*2.5 degree) and IMD data
>> ( 1*1 degree) (/India Meteorological Department).
>> For comparing I would like to regrid the IMD data to 2.5*2.5 degrees
>> which NCL function will help in this case?
>> I tried /area_hi2lores_Wrap but the output is not getting proper.
>> Can anyone help me for this?
>> Thanks in advance
>>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed Apr 07 2010 - 07:12:50 MDT