1 | pro map_static |
---|
2 | ; |
---|
3 | ; |
---|
4 | ; |
---|
5 | what_I_plot=0. |
---|
6 | overcontour=0. |
---|
7 | @map_static_inc.pro |
---|
8 | SPAWN, '\rm param_plot.idl ; cp map_static_inc.pro param_plot.idl' |
---|
9 | if (n_elements(coord2d) eq 0) then coord2d='false' |
---|
10 | ; |
---|
11 | ; |
---|
12 | ; |
---|
13 | zefile=save_ps |
---|
14 | PS_Start, filename=zefile+'.ps' |
---|
15 | print, zefile+'.ps' |
---|
16 | !P.Charsize = 1.2 |
---|
17 | !p.charthick = 2.0 |
---|
18 | !p.thick = 2.0 |
---|
19 | !x.thick = 2.0 |
---|
20 | !y.thick = 2.0 |
---|
21 | ; |
---|
22 | ; |
---|
23 | ; |
---|
24 | if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1 |
---|
25 | getcdf, file=filename, charvar='XLONG_M', invar=longi |
---|
26 | getcdf, file=filename, charvar='XLAT_M', invar=lati |
---|
27 | getcdf, file=filename, charvar='HGT_M', invar=hgt |
---|
28 | getcdf, file=filename, charvar='SLPX', invar=hxwrf |
---|
29 | getcdf, file=filename, charvar='SLPY', invar=hywrf |
---|
30 | |
---|
31 | hx=hxwrf*1000. & hy=hywrf*1000. |
---|
32 | ;; SLOPE ANGLE vs HORIZONTAL |
---|
33 | theta=atan(sqrt(hx^2+hy^2)) & theta=180.*theta/!pi ;& theta=round(theta) |
---|
34 | ; |
---|
35 | ; |
---|
36 | ; |
---|
37 | hgt = smooth(hgt, [2,2], /EDGE_TRUNCATE) ;;; truc |
---|
38 | ; |
---|
39 | ; |
---|
40 | ; |
---|
41 | sp = 5 ;; relaxation width |
---|
42 | nx = n_elements(longi(0,*)) |
---|
43 | ny = n_elements(longi(*,0)) |
---|
44 | if (n_elements(field1) ne 0) then begin |
---|
45 | cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
46 | endif else begin |
---|
47 | cfield1 = theta (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
48 | endelse |
---|
49 | longi = longi (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
50 | lati = lati (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
51 | hgt = hgt (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
52 | nx = n_elements(longi(0,*)) |
---|
53 | ny = n_elements(longi(*,0)) |
---|
54 | ; |
---|
55 | ; |
---|
56 | ; |
---|
57 | overcontour = reform(hgt(*,*)) |
---|
58 | lon = reform(longi(*,*)) |
---|
59 | lat = reform(lati(*,*)) |
---|
60 | overvector_x = 0 |
---|
61 | overvector_y = 0 |
---|
62 | what_I_plot = reform(cfield1(*,*)) |
---|
63 | help, what_I_plot, lon, lat |
---|
64 | ; |
---|
65 | ; |
---|
66 | ; |
---|
67 | map_latlon, $ |
---|
68 | what_I_plot, $ ; 2D field |
---|
69 | lon, $ ; 1D latitude |
---|
70 | lat, $ ; 1D longitude |
---|
71 | minfield=minfield_init, $ ; minimum value of plotted field (=0: calculate) |
---|
72 | maxfield=maxfield_init, $ ; maximum value of plotted field (=0: calculate) |
---|
73 | overcontour=overcontour, $ ; another 2D field to overplot with contour lines (=0: no) |
---|
74 | overvector_x=overvector_x, $ ; wind vector - x component (=0: no) |
---|
75 | overvector_y=overvector_y, $ ; wind vector - y component (=0: no) |
---|
76 | ct=pal, $ ; color table (33-rainbow is default) |
---|
77 | colors=colors, $ ; number of colors/levels (32 is default) |
---|
78 | title=title_user, $ ; title of the plot ('' is default) |
---|
79 | format=format ; format of colorbar annotations ('(F6.2)' is default) |
---|
80 | ; |
---|
81 | ; |
---|
82 | ; |
---|
83 | PS_End, /PNG |
---|
84 | end |
---|