| 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 | topo=0 |
|---|
| 16 | extract='no' |
|---|
| 17 | |
|---|
| 18 | SPAWN, '\rm user.idl' |
|---|
| 19 | SPAWN, 'grep -v grep plot.def > user.idl' |
|---|
| 20 | |
|---|
| 21 | ;; to avoid dumb and useless warnings from IDL |
|---|
| 22 | space=0. & altitude=0. & lon=0. & lat=0. |
|---|
| 23 | what_I_plot=0. & title_user='' & missing_value=0. |
|---|
| 24 | |
|---|
| 25 | @user.idl |
|---|
| 26 | if (nam5 eq " interp_method = 0 ") then coord='model_level' |
|---|
| 27 | if ((nam5 eq " interp_method = 1 ") and (tabnam(0) lt tabnam(1))) then coord='height' |
|---|
| 28 | |
|---|
| 29 | .compile call_arwpost |
|---|
| 30 | if (extract eq 'yes') then call_arwpost, nam1, nam2, nam3, nam4, nam5, tabnam |
|---|
| 31 | |
|---|
| 32 | denom=plot+'_'+coord+'_'+field1 |
|---|
| 33 | if ((field2 ne '') and (topo eq 0)) then denom=denom+'_'+field2 |
|---|
| 34 | if (topo eq 1) then denom=denom+'_HGT' |
|---|
| 35 | if (winds(0) ne '') then denom=denom+'_'+winds(0)+winds(1) |
|---|
| 36 | |
|---|
| 37 | if (already_data eq 'yes') then SPAWN, 'ln -sf '+datafolder+'/'+coord+'.input.ctl input.ctl' |
|---|
| 38 | if (already_data eq 'yes') then SPAWN, 'ln -sf '+datafolder+'/'+coord+'.input.dat input.dat' |
|---|
| 39 | |
|---|
| 40 | SPAWN, '\rm param_plot.idl' |
|---|
| 41 | SPAWN, 'grep grepALL plot.def > param_plot.idl' |
|---|
| 42 | if ((plot eq 'meridional') or (plot eq 'zonal')) then SPAWN, 'grep grepSEC plot.def >> param_plot.idl' |
|---|
| 43 | if (plot eq 'map') then SPAWN, 'grep grepMAP plot.def >> param_plot.idl' |
|---|
| 44 | .compile map_latlon |
|---|
| 45 | .compile section |
|---|
| 46 | |
|---|
| 47 | !p.charthick = 2.0 |
|---|
| 48 | !p.thick = 3.0 |
|---|
| 49 | !x.thick = 2.0 |
|---|
| 50 | !y.thick = 2.0 |
|---|
| 51 | |
|---|
| 52 | out_wrf, $ |
|---|
| 53 | plot=plot, $ |
|---|
| 54 | field1=field1, $ |
|---|
| 55 | field2=field2, $ |
|---|
| 56 | when=1, $ |
|---|
| 57 | winds=winds, $ |
|---|
| 58 | level=level,$ |
|---|
| 59 | save_data=yeah,$ ;; data is loaded only once |
|---|
| 60 | topo=topo,$ |
|---|
| 61 | ; range=range,$ |
|---|
| 62 | colors=colors, $ |
|---|
| 63 | nlon=nlon, $ |
|---|
| 64 | nlat=nlat, $ |
|---|
| 65 | save_ps=denom+string(1001,'(I0)') |
|---|
| 66 | ; |
|---|
| 67 | ; display the first one as a sample |
|---|
| 68 | ; |
|---|
| 69 | SPAWN, 'display ./'+denom+'1001.ps &' |
|---|
| 70 | |
|---|
| 71 | if (num ge 2) then for i=2,num do $ |
|---|
| 72 | out_wrf, $ |
|---|
| 73 | plot=plot, $ |
|---|
| 74 | field1=field1, $ |
|---|
| 75 | field2=field2, $ |
|---|
| 76 | when=i, $ |
|---|
| 77 | winds=winds, $ |
|---|
| 78 | level=level,$ |
|---|
| 79 | save_data=yeah,$ ;; data is loaded only once |
|---|
| 80 | topo=topo,$ |
|---|
| 81 | range=range,$ |
|---|
| 82 | colors=colors, $ |
|---|
| 83 | nlon=nlon, $ |
|---|
| 84 | nlat=nlat, $ |
|---|
| 85 | save_ps=denom+string(1000+i,'(I0)') |
|---|
| 86 | |
|---|
| 87 | SPAWN, 'mv -f ./'+denom+'????.ps '+plotfolder+'/' |
|---|
| 88 | if (backup_data eq 'yes') then SPAWN, 'cp -f namelist.ARWpost '+datafolder+'/'+coord+'.namelist.ARWpost' |
|---|
| 89 | if (backup_data eq 'yes') then SPAWN, 'cp -f input.ctl '+datafolder+'/'+coord+'.input.ctl' |
|---|
| 90 | if (backup_data eq 'yes') then SPAWN, 'cp -f input.dat '+datafolder+'/'+coord+'.input.dat' |
|---|
| 91 | |
|---|
| 92 | SPAWN, 'cp -f plot.def '+plotfolder+'/'+denom+'.def' |
|---|
| 93 | |
|---|