source: trunk/MESOSCALE/PLOT/SPEC/POLAR/polar_uvt_passur.pro @ 205

Last change on this file since 205 was 85, checked in by aslmd, 14 years ago

LMD_MM_MARS et LMD_LES_MARS: ajout des routines IDL pour tracer les sorties --> voir mesoscale/PLOT

File size: 4.2 KB
Line 
1pro map_uvt
2;
3;
4;
5what_I_plot=0.
6overcontour=0.
7@map_uvt_inc.pro
8SPAWN, '\rm param_plot.idl ; cp map_uvt_inc.pro param_plot.idl'
9if (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;
24if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1
25getcdf, file=filename, charvar='Um', invar=u
26getcdf, file=filename, charvar='Vm', invar=v
27getcdf, file=filename, charvar='XLONG_M', invar=longi
28getcdf, file=filename, charvar='XLAT_M', invar=lati
29getcdf, file=filename, charvar='HGT_M', invar=hgt
30;
31;
32;
33sp = 5 ;; relaxation width
34nx = n_elements(longi(0,*))
35ny = n_elements(longi(*,0))
36if (n_elements(field1) ne 0) then begin
37        cfield1 = cfield1       (sp:nx-sp-1,sp:ny-sp-1,*,*)
38endif
39u               = u             (sp:nx-sp-1,sp:ny-sp-1,*,*)
40v               = v             (sp:nx-sp-1,sp:ny-sp-1,*,*)
41longi           = longi         (sp:nx-sp-1,sp:ny-sp-1,*)
42lati            = lati          (sp:nx-sp-1,sp:ny-sp-1,*)
43hgt             = hgt           (sp:nx-sp-1,sp:ny-sp-1,*)
44nx = n_elements(longi(0,*))
45ny = n_elements(longi(*,0))
46;
47;
48;
49overcontour = reform(hgt(*,*,ntime))
50lon = reform(longi(*,*,ntime))
51lat = reform(lati(*,*,ntime))
52overvector_x = reform(u(*,*,nlevel,ntime))
53overvector_y = reform(v(*,*,nlevel,ntime))
54if (n_elements(field1) eq 0) then begin
55        print, 'field1: horizontal velocity'
56        zevel = overvector_x^2 + overvector_y^2  ;; attention il faut que les tableaux soient de la meme taille
57        what_I_plot = sqrt(zevel)
58endif else begin
59;       what_I_plot = reform(cfield1(*,*,nlevel,ntime))
60what_I_plot = reform(cfield1(*,*))
61endelse
62;
63;
64;
65minlat=min(lat) & maxlat=max(lat) & minlon=min(lon) & maxlon=max(lon)
66if (coord2d eq 'true') then begin
67        npoints=n_elements(lon(*,0)) + n_elements(lon(0,*))  ;; trop de points, mais au moins on ne perd rien
68        TRIANGULATE, lon, lat, tr
69        what_I_plot  = GRIDDATA( lon, lat, what_I_plot,  /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
70        overvector_x = GRIDDATA( lon, lat, overvector_x, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
71        overvector_y = GRIDDATA( lon, lat, overvector_y, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
72        overcontour  = GRIDDATA( lon, lat, overcontour,  /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
73                        ; sale sale sale
74                        if (minlat lt min(lat(*,0))) then overvector_y=-overvector_y
75                        if (minlon lt min(lon(0,*))) then overvector_x=-overvector_x
76        lon =  minlon + (maxlon - minlon)*findgen(npoints)/float(npoints-1)
77        lat =  minlat + (maxlat - minlat)*findgen(npoints)/float(npoints-1)
78endif else begin
79        ;npoints=n_elements(lon(*,0)) + n_elements(lon(0,*))
80        ;what_I_plot = REBIN( what_I_plot, npoints, npoints )
81        ;overvector_x = REBIN( overvector_x, npoints, npoints )
82        ;overvector_y = REBIN( overvector_y, npoints, npoints )
83        ;overcontour = REBIN( overcontour, npoints, npoints )
84        ;lon =  minlon + (maxlon - minlon)*findgen(npoints)/float(npoints-1)
85        ;lat =  minlat + (maxlat - minlat)*findgen(npoints)/float(npoints-1)
86endelse
87
88;lon = reform(lon(*,0))
89;lat = reform(lat(0,*))
90
91help, what_I_plot, lon, lat
92;
93;
94;
95map_latlon, $
96        what_I_plot, $                          ; 2D field
97        lon, $                                  ; 1D latitude
98        lat, $                                  ; 1D longitude
99        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
100        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
101        overcontour=overcontour, $              ; another 2D field to overplot with contour lines (=0: no)
102        overvector_x=overvector_x, $            ; wind vector - x component (=0: no)
103        overvector_y=overvector_y, $            ; wind vector - y component (=0: no)
104        ct=pal, $                               ; color table (33-rainbow is default)
105        colors=colors, $                        ; number of colors/levels (32 is default)
106        title=title_user, $                     ; title of the plot ('' is default)
107        format=format                           ; format of colorbar annotations ('(F6.2)' is default)
108;
109;
110;
111PS_End, /PNG
112end
Note: See TracBrowser for help on using the repository browser.