MSLP: how to mask Tibet

From: Sahidul <sahidul_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 24 2010 - 04:16:41 MDT

Hello NCL users,

I am using following scripts to cal sea level pressure from WRF outputs. WRF
outputs are saved in 1 our interval.
I am able to plot it correctly.
Now I want MASK TIBET area. Could you please help me how to do it.?
(I am having Tibet boundary as latS = 28; latN = 40 ; lonW = 75 ; lonE
= 104)

;;;;;;;;;;;;;; following is the script =============
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin

datadir = "/WRF/output/2010062200/"
FILES = systemfunc ("ls -1 " + datadir + "wrfout_d02*")
numFILES = dimsizes(FILES)

  res = True
  res@InitTime = False
  res@Footer = False
  res@Footer = False
  pltres = True
  mpres = True

        sopts = True
        sopts@cnLineColor = "Magenta4"
        sopts@ContourParameters = (/950.,1050.,2./)
        sopts@cnInfoLabelOn = False
        sopts@cnLineLabelBackgroundColor = -1
        sopts@cnInfoLabelOrthogonalPosF = 0.07 ; offset second
label information
        sopts@gsnContourLineThicknessesScale = 1.5
        mpres@mpGeophysicalLineColor = "Black"
        mpres@mpNationalLineColor = "black"
        mpres@mpOutlineOn = True
        mpres@mpNationalLineThicknessF = 1.8
        mpres@mpGeophysicalLineThicknessF = 1.8

do ifil = 0,numFILES-1
  a = addfile(FILES(ifil)+".nc","r")
times = wrf_user_list_times(a)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
day = systemfunc("echo "+times +"|cut -c9-10")
yr = systemfunc("echo "+times +"|cut -c1-4")
mon = systemfunc("echo "+times +"|cut -c6-7")
hr = systemfunc("echo "+times +"|cut -c12-13")

if(mon .eq. "08")then
mon="AUG"
end if

wks = gsn_open_wks("ps","slp_surf"+"_"+day+mon+yr+"_"+hr+"Z") ;; to save
hourly plots in different names
gsn_define_colormap(wks,"gui_default")

; PLOT for SLP
        slp = wrf_user_getvar(a,"slp",0)
        wrf_smooth_2d( slp,3 )
        contour_slp = wrf_contour(a,wks,slp,sopts)
       plot = wrf_map_overlays(a,wks,contour_slp,pltres,mpres)
  end do
end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Please help me

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 24 04:16:46 2010

This archive was generated by hypermail 2.1.8 : Wed Aug 25 2010 - 11:50:26 MDT