[gradsusr] printim particles traj
antonia.dimaio at cnr.it
antonia.dimaio at cnr.it
Thu Nov 14 09:15:58 EST 2013
Hi
I d0n' know whi but the command 'printim' doesn't work. Can be a lib problem?
Anyway, I tried to mofify a script sent to me by Martin to plot track
cyclone and so I could produce a image output.eps.
The question now is that this layout is just the final image of the
tracking while I want produce an image for eache timestep.
Martin open a netcdf file while I have a ctl file (map and dat,
too). How can I modify the following part of the script to read my ctl
file? I don't know how use subline and subwrd functions to find lat
and lon using a ctl file
Thank you very much!!
Antonella
*===========================================================================
* 9) Plotting cyclone tracks
*===========================================================================
dta1=trkNo
dta=0
while(dta1>0)
dta=dta+1
*dtaFile=InFile2Prt%trkFile.dta
dtaFile=datum1.ctl
say 'reading from file 'dtaFile
res=read(dtaFile) ;* skipping first line of cyclone track data file
say 'title line 'res
rows=trk1.dta
res=read (dtaFile);* Reading first lat lon points
anslin2=sublin(res,2)
say 'second row ' res
lonpt1=subwrd (anslin2,1)
latpt1=subwrd (anslin2,2)
'q w2xy 'lonpt1' 'latpt1
*'q w2xy 100 28' will give result as 'X = 6.22321 Y = 8.08214'
* 'x1 = subwrd(result,3)', will take '6.22321', which is in 3rd
position in 'result'
* and save it in 'x1'
x1=subwrd(result,3)
y1=subwrd(result,6)
while(rows>1)
res=read (dtaFile)
anslin2=sublin(res,2)
lonpt2=subwrd (anslin2,1)
latpt2=subwrd (anslin2,2)
'q w2xy 'lonpt2' 'latpt2
x2=subwrd(result,3)
y2=subwrd(result,6)
'set line 'LnClr' 'LnStyl;*set line color# <style> <thickness>
'draw line 'x1' 'y1' 'x2' 'y2
My ctl file is following (I want plot the variabel 'age'):
dset datum1.dat
dtype station
stnmap datum1.map
undef -999.0
title PIW-6
tdef 85 linear 23:57z11jul2013 30mn
vars 3
sta 0 99 State
age 0 99 Age
ort 0 99 Orientation
endvars
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the gradsusr
mailing list