[ncl-talk] RH timeseries

Muhammad Omer Mughal m.mughal1 at postgrad.curtin.edu.au
Sun Jul 30 23:20:01 MDT 2017


Hi


I am trying to evaluate RH time series at a certain location near surface using the following code. I do get it correct when I am printing it on screen but I fail to get it corrected when I use ascii write. Can any one help quickly please.


load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
a=addfile("wrfout_d05_2016-04-01_00:00:00.nc","r")
loc = wrf_user_ll_to_ij(a, 103.98226667,1.36776667, True)
x = loc(0) - 1
y= loc(1) - 1

times = wrf_user_list_times(a)
ntimes = dimsizes(times)

do it = 0,ntimes-1,1
    RH = wrf_user_getvar(a,"rh",it)

    RH1=RH(2,y,x)
lines = times(it)+" "+sprintf("%.5f",RH1)
;print("Working on time: " + times(it) + " RH="+RH1)
  end do
asciiwrite("RH.csv",lines)
end




Muhammad Omer Mughal
MSc BSc Mechanical Engineering
PhD  Research Scholar
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University

Curtin University
Tel | +61 8 9266 7962
Fax | +61 8 9266 2377
Mobile | 0470 237 525

Email | m.mughal1 at postgrad.curtin.edu.au<mailto:m.lynch at curtin.edu.au>
Web | http://curtin.edu.au<http://curtin.edu.au/>

Curtin University is a trademark of Curtin University of Technology.
CRICOS Provider Code 00301J (WA), 02637B (NSW)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170731/c990b020/attachment.html 


More information about the ncl-talk mailing list