[ncl-talk] NCL Help
Arun Kumar Dwivedi
dwivedi.arunkumar at gmail.com
Mon Nov 23 04:58:33 MST 2015
Hello,
I need some help in my ncl script. I want to write some cities name and
their corresponding data in one text file but it is getting replaced every
time. how to do it in correct manner? My script is as follows
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
sta = (/"Mum", "RNC", "CNB"/)
Temp = (/30, 20, 25/)
RH = (/80, 900, 95/)
WS = (/2, 3, 4/)
WD = (/80, 150, 95/)
Time = 201411050800
do k = 0,2,1
write_table("ex.txt", "w", [/Time/], "%i")
write_table("ex.txt", "a", [/"Station","Temp","RH","WS","WD"/], "%s %s
%s %s %s ")
write_table("ex.txt", "a", [/sta(k),Temp(k),RH(k),WS(k),WD(k)/],"%s %f
%f %f %f")
end do
end
Thanks & Regards
Arun Kumar Dwivedi,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151123/092d9187/attachment.html
More information about the ncl-talk
mailing list