[ncl-talk] Temperature difference

Muhammad Omer Mughal m.mughal1 at postgrad.curtin.edu.au
Sat Nov 18 09:28:36 MST 2017


Hi


Can I assign map resources to diff ?



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)


________________________________
From: Dennis Shea <shea at ucar.edu>
Sent: Saturday, 18 November 2017 11:04:59 PM
To: Muhammad Omer Mughal
Cc: ncl-talk at ucar.edu
Subject: Re: Temperature difference

I speculate you are overwriting the generated png file with each iteration.

---
[1] Move the following before the 'do' loop

wks = gsn_open_wks("png","diff")

or

[2] Keep it where it is but make the line

wks = gsn_open_wks("png","diff_"+sprinti("%0.2i", it) )

On Sat, Nov 18, 2017 at 2:51 AM, Muhammad Omer Mughal <m.mughal1 at postgrad.curtin.edu.au<mailto:m.mughal1 at postgrad.curtin.edu.au>> wrote:

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/d4241b4c/attachment.html>


More information about the ncl-talk mailing list