[ncl-talk] Temperature difference
Muhammad Omer Mughal
m.mughal1 at postgrad.curtin.edu.au
Sat Nov 18 02:51:57 MST 2017
Hi
I am trying to use the following script to generate a temperature difference between two files. This script should generate 24 plots instead of just one. When I add "it" in tc2= wrf_user_getvar(a,"T2",it) then I get this error "Subscript out of range, error in subscript #0". This could be because I used NCO to generate these files which stripped out the time dimension since I have averaged them over time. I would appreciate if some one can help me out here. Kindly note that I donot intend to waste someone personal time.
do it=0,23
wrf_file1 = "UTC_" + it + ".nc"
a = addfile(wrf_file1, "r")
wrf_file2 = "../OmerForest/UTC_" + it + ".nc"
b=addfile(wrf_file2,"r")
tc2= wrf_user_getvar(a,"T2",0)
tcf= wrf_user_getvar(b,"T2",0)
diff=tc2-tcf
wks = gsn_open_wks("png","diff")
res=True
plot = gsn_csm_contour(wks,diff,res)
end do
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/20171118/f11c751c/attachment.html>
More information about the ncl-talk
mailing list