1 | ;;--------------------------------------- |
---|
2 | ; TRACE |
---|
3 | ; |
---|
4 | ; **** DO NOT MODIFY **** |
---|
5 | ; |
---|
6 | ; set parameters in plot.def then type: |
---|
7 | ; |
---|
8 | ; @trace.idl |
---|
9 | ; |
---|
10 | ;;--------------------------------------- |
---|
11 | |
---|
12 | field1='' & field2='' & winds='' |
---|
13 | backup_data='no' & already_data='no' |
---|
14 | datafolder='./' & plotfolder='./' |
---|
15 | extract='no' |
---|
16 | |
---|
17 | SPAWN, '\rm user.idl' |
---|
18 | SPAWN, 'grep -v grep plot.def > user.idl' |
---|
19 | |
---|
20 | ;; to avoid dumb and useless warnings from IDL |
---|
21 | space=0. & altitude=0. & lon=0. & lat=0. |
---|
22 | what_I_plot=0. & title_user='' & missing_value=0. |
---|
23 | |
---|
24 | @user.idl |
---|
25 | if (nam5 eq " interp_method = 0 ") then coord='model_level' |
---|
26 | if ((nam5 eq " interp_method = 1 ") and (tabnam(0) lt tabnam(1))) then coord='height' |
---|
27 | |
---|
28 | .compile call_arwpost |
---|
29 | if (extract eq 'yes') then call_arwpost, nam1, nam2, nam3, nam4, nam5, tabnam |
---|
30 | |
---|
31 | denom=plot+'_'+coord+'_'+field1 |
---|
32 | if ((field2 ne '') and (topo eq 0)) then denom=denom+'_'+field2 |
---|
33 | if (topo eq 1) then denom=denom+'_HGT' |
---|
34 | if (winds(0) ne '') then denom=denom+'_'+winds(0)+winds(1) |
---|
35 | |
---|
36 | if (already_data eq 'yes') then SPAWN, 'ln -sf '+datafolder+'/'+coord+'.input.ctl input.ctl' |
---|
37 | if (already_data eq 'yes') then SPAWN, 'ln -sf '+datafolder+'/'+coord+'.input.dat input.dat' |
---|
38 | |
---|
39 | SPAWN, '\rm param_plot.idl' |
---|
40 | SPAWN, 'grep grepALL plot.def > param_plot.idl' |
---|
41 | if ((plot eq 'meridional') or (plot eq 'zonal')) then SPAWN, 'grep grepSEC plot.def >> param_plot.idl' |
---|
42 | if (plot eq 'map') then SPAWN, 'grep grepMAP plot.def >> param_plot.idl' |
---|
43 | .compile map_latlon |
---|
44 | .compile section |
---|
45 | |
---|
46 | |
---|
47 | set_plot, 'x' |
---|
48 | !P.MULTI = [0, 2, 3] |
---|
49 | window, 0, xsize=600, ysize=900 |
---|
50 | |
---|
51 | !p.charthick = 2.0 |
---|
52 | !p.thick = 3.0 |
---|
53 | !x.thick = 2.0 |
---|
54 | !y.thick = 2.0 |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | for i=1,num do $ |
---|
59 | out_wrf, $ |
---|
60 | plot=plot, $ |
---|
61 | field1=field1, $ |
---|
62 | field2=field2, $ |
---|
63 | when=i, $ |
---|
64 | winds=winds, $ |
---|
65 | level=level,$ |
---|
66 | save_data=yeah,$ ;; data is loaded only once |
---|
67 | topo=topo,$ |
---|
68 | ; range=range,$ |
---|
69 | colors=colors, $ |
---|
70 | nlon=nlon, $ |
---|
71 | nlat=nlat |
---|
72 | |
---|
73 | if (backup_data eq 'yes') then SPAWN, 'cp -f namelist.ARWpost '+datafolder+'/'+coord+'.namelist.ARWpost' |
---|
74 | if (backup_data eq 'yes') then SPAWN, 'cp -f input.ctl '+datafolder+'/'+coord+'.input.ctl' |
---|
75 | if (backup_data eq 'yes') then SPAWN, 'cp -f input.dat '+datafolder+'/'+coord+'.input.dat' |
---|
76 | SPAWN, 'cp -f plot.def '+plotfolder+'/'+denom+'.def' |
---|