[85] | 1 | pro polar_uv |
---|
| 2 | ; |
---|
| 3 | ; |
---|
| 4 | ; |
---|
| 5 | what_I_plot=0. |
---|
| 6 | overcontour=0. |
---|
| 7 | @polar_inc_uv.pro |
---|
| 8 | SPAWN, '\rm param_plot.idl ; cp polar_inc_uv.pro param_plot.idl ; cp -f polar_inc_uv.pro '+save_ps+'_polar_inc_uv.pro' |
---|
| 9 | if (n_elements(coord2d) eq 0) then coord2d='true' |
---|
| 10 | if (n_elements(model) eq 0) then model='LMD_MMM' |
---|
| 11 | ; |
---|
| 12 | ; |
---|
| 13 | ; |
---|
| 14 | if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1 |
---|
| 15 | getcdf, file=filename, charvar='Um', invar=u |
---|
| 16 | getcdf, file=filename, charvar='Vm', invar=v |
---|
| 17 | case model of |
---|
| 18 | 'LMD_MMM': begin |
---|
| 19 | getcdf, file=filename, charvar='XLONG', invar=longi |
---|
| 20 | getcdf, file=filename, charvar='XLAT', invar=lati |
---|
| 21 | getcdf, file=filename, charvar='HGT', invar=hgt |
---|
| 22 | end |
---|
| 23 | 'MRAMS': begin |
---|
| 24 | getcdf, file=filename, charvar='topo', invar=hgt |
---|
| 25 | getcdf, file=filename, charvar='glat', invar=lati |
---|
| 26 | getcdf, file=filename, charvar='glon', invar=longi |
---|
| 27 | end |
---|
| 28 | endcase |
---|
| 29 | if (n_elements(field2) ne 0) then getcdf, file=filename, charvar=field2, invar=cfield2 |
---|
| 30 | ; |
---|
| 31 | ; |
---|
| 32 | ; |
---|
| 33 | ;sp = 5 ;; relaxation width |
---|
| 34 | ;nx = n_elements(longi(0,*)) |
---|
| 35 | ;ny = n_elements(longi(*,0)) |
---|
| 36 | ;if (n_elements(field1) ne 0) then begin |
---|
| 37 | ; cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
| 38 | ;endif |
---|
| 39 | ;if (n_elements(field2) ne 0) then begin |
---|
| 40 | ; cfield2 = cfield2 (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
| 41 | ;endif |
---|
| 42 | ;u = u (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
| 43 | ;v = v (sp:nx-sp-1,sp:ny-sp-1,*,*) |
---|
| 44 | ;longi = longi (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
| 45 | ;lati = lati (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
| 46 | ;hgt = hgt (sp:nx-sp-1,sp:ny-sp-1,*) |
---|
| 47 | ;nx = n_elements(longi(0,*)) |
---|
| 48 | ;ny = n_elements(longi(*,0)) |
---|
| 49 | ; |
---|
| 50 | ; |
---|
| 51 | ; |
---|
| 52 | ;latmin = -90. & latmax = -50.0 & lonmin = -180. & lonmax = 180. |
---|
| 53 | ;map_set, -90., 0., /isotropic, /azimuthal, /noborder, limit=[latmin,lonmin,latmax,lonmax],title=title_user,/advance |
---|
| 54 | ;latmin = 75. & latmax = 90.0 & lonmin = -180. & lonmax = 180. |
---|
| 55 | ;map_set, 90., 0., /isotropic, /azimuthal, /noborder, limit=[latmin,lonmin,latmax,lonmax],title=title_user,/advance |
---|
| 56 | ; |
---|
| 57 | ; |
---|
| 58 | ; |
---|
| 59 | ;if (n_elements(ntime) eq 0 or ntime eq 99) then begin |
---|
| 60 | if (ntime eq 99) then begin |
---|
| 61 | PRINT, '-- ALL TIME STEPS' |
---|
| 62 | ntstart = 0 |
---|
| 63 | ntend = n_elements(reform(u(0,0,0,*)))-1 & print, ntend |
---|
| 64 | endif else begin |
---|
| 65 | PRINT, '-- ONLY TIME STEP ', string(ntime,'(I0)') |
---|
| 66 | ntstart = ntime |
---|
| 67 | ntend = ntime |
---|
| 68 | endelse |
---|
| 69 | for ntime = ntstart,ntend do begin |
---|
| 70 | |
---|
| 71 | zefile=save_ps+string(100+ntime,'(I0)') |
---|
| 72 | PS_Start, filename=zefile+'.ps' |
---|
| 73 | print, zefile+'.ps' |
---|
| 74 | !P.Charsize = 1.2 |
---|
| 75 | !p.charthick = 2.0 |
---|
| 76 | !p.thick = 2.0 |
---|
| 77 | !x.thick = 2.0 |
---|
| 78 | !y.thick = 2.0 |
---|
| 79 | ; |
---|
| 80 | ; |
---|
| 81 | ; |
---|
| 82 | lon = reform(longi(*,*,ntime)) |
---|
| 83 | lat = reform(lati(*,*,ntime)) |
---|
| 84 | overvector_x = reform(u(*,*,nlevel,ntime)) |
---|
| 85 | overvector_y = reform(v(*,*,nlevel,ntime)) |
---|
| 86 | if (n_elements(field1) eq 0) then begin |
---|
| 87 | print, 'field1: horizontal velocity' |
---|
| 88 | zevel = overvector_x^2 + overvector_y^2 ;; attention il faut que les tableaux soient de la meme taille |
---|
| 89 | what_I_plot = sqrt(zevel) |
---|
| 90 | endif else begin |
---|
| 91 | if (no3d eq 'true') then what_I_plot = reform(cfield1(*,*,ntime)) else what_I_plot = reform(cfield1(*,*,nlevel,ntime)) |
---|
| 92 | endelse |
---|
| 93 | if (n_elements(field2) eq 0) then overcontour = reform(hgt(*,*,ntime)) else overcontour = reform(cfield2(*,*,ntime)) |
---|
| 94 | ; |
---|
| 95 | ; |
---|
| 96 | ; |
---|
| 97 | if (coord2d eq 'false') then begin ;; SI PAS UMET et VMET |
---|
| 98 | ;npoints=n_elements(lon(*,0)) + n_elements(lon(0,*)) |
---|
| 99 | ;what_I_plot = REBIN( what_I_plot, npoints, npoints ) |
---|
| 100 | ;overvector_x = REBIN( overvector_x, npoints, npoints ) |
---|
| 101 | ;overvector_y = REBIN( overvector_y, npoints, npoints ) |
---|
| 102 | ;overcontour = REBIN( overcontour, npoints, npoints ) |
---|
| 103 | ;lon = minlon + (maxlon - minlon)*findgen(npoints)/float(npoints-1) |
---|
| 104 | ;lat = minlat + (maxlat - minlat)*findgen(npoints)/float(npoints-1) |
---|
| 105 | lon = findgen( n_elements(what_I_plot(*,0)) ) |
---|
| 106 | lat = findgen( n_elements(what_I_plot(0,*)) ) |
---|
| 107 | print, 'ATTENTION!!!! NOUS SOMMES BIEN D ACCORD QUE VOUS NE CHARGEZ PAS UMET et VMET ??' |
---|
| 108 | endif |
---|
| 109 | if (coord2d eq 'regular') then begin ;; carte avec mercator |
---|
| 110 | lon = reform(lon(*,0)) |
---|
| 111 | lat = reform(lat(0,*)) |
---|
| 112 | endif |
---|
| 113 | ; |
---|
| 114 | ; |
---|
| 115 | ; |
---|
| 116 | map_latlon, $ |
---|
| 117 | what_I_plot, $ ; 2D field |
---|
| 118 | lon, $ ; 1D latitude |
---|
| 119 | lat, $ ; 1D longitude |
---|
| 120 | minfield=minfield_init, $ ; minimum value of plotted field (=0: calculate) |
---|
| 121 | maxfield=maxfield_init, $ ; maximum value of plotted field (=0: calculate) |
---|
| 122 | overcontour=overcontour, $ ; another 2D field to overplot with contour lines (=0: no) |
---|
| 123 | overvector_x=overvector_x, $ ; wind vector - x component (=0: no) |
---|
| 124 | overvector_y=overvector_y, $ ; wind vector - y component (=0: no) |
---|
| 125 | ct=pal, $ ; color table (33-rainbow is default) |
---|
| 126 | colors=colors, $ ; number of colors/levels (32 is default) |
---|
| 127 | title=title_user, $ ; title of the plot ('' is default) |
---|
| 128 | format=format ; format of colorbar annotations ('(F6.2)' is default) |
---|
| 129 | ;; |
---|
| 130 | ;; |
---|
| 131 | ;; |
---|
| 132 | ;loadct, 0 |
---|
| 133 | ;contour, reform(field3(*,*,ntime)), $ |
---|
| 134 | ; lon,lat, $ |
---|
| 135 | ; /overplot, $ |
---|
| 136 | ; levels=[1,100,200], $ |
---|
| 137 | ; c_labels=[0,0,0], $ |
---|
| 138 | ; c_thick=1.5, $ |
---|
| 139 | ; color=255 |
---|
| 140 | ; |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | PS_End, /PNG |
---|
| 144 | endfor |
---|
| 145 | end |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | ; |
---|
| 150 | ; SI MAP_SET EST REGLE.... |
---|
| 151 | ; |
---|
| 152 | ;; marche pas avec les vecteurs |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | loadct, 0 |
---|
| 156 | MAP_GRID, $ |
---|
| 157 | CHARSIZE = 1., $ |
---|
| 158 | COLOR = 0, $ |
---|
| 159 | ; LABEL = 2, $ ;; /LABEL or LABEL=2 (one label any 2 grid lines) |
---|
| 160 | ; LATDEL = 10., $ ;;5 |
---|
| 161 | ; LONDEL = 30., $ ;;15 |
---|
| 162 | ;lats=-60, $ |
---|
| 163 | ; LONLAB = -70., $ ;(latmin+latmax)/2., $ |
---|
| 164 | ; LATLAB = (lonmin+lonmax)/2., $ |
---|
| 165 | LABEL = 1, $ ;; /LABEL or LABEL=2 (one label any 2 grid lines) |
---|
| 166 | LATDEL = 10., $ ;;5 |
---|
| 167 | LONDEL = 15., $ ;;15 |
---|
| 168 | LONLAB = -0., $ ;(latmin+latmax)/2., $ |
---|
| 169 | LATLAB = -0.001, $ |
---|
| 170 | GLINESTYLE = 2, $ |
---|
| 171 | GLINETHICK = 0.3 |
---|
| 172 | ;LONALIGN = 0., $ |
---|
| 173 | ;LATALIGN = 1. |
---|
| 174 | |
---|
| 175 | ;; |
---|
| 176 | ;; |
---|
| 177 | PS_End, /PNG |
---|
| 178 | end |
---|