source: trunk/mesoscale/PLOT/SPEC/MAP/map_uvt.pro @ 86

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

*
mars + LMD_MM_MARS
* Precompilation flag MESOSCALE for better transparency

* in shared phymars between GCM and mesoscale model

*

M 85 mars/libf/phymars/meso_physiq.F
M 85 mars/libf/phymars/meso_inifis.F
Added a pre-compilation flag MESOSCALE so that the LMDZ.MARS GCM
will compile without stating errors because of mesoscale routines.

M 85 mars/libf/phymars/newcondens.F
M 85 mars/libf/phymars/testphys1d.F
M 85 mars/libf/phymars/dustlift.F
D 85 mars/libf/phymars/meso_testphys1d.F
D 85 mars/libf/phymars/meso_dustlift.F
D 85 mars/libf/phymars/meso_newcondens.F
Now, this MESOSCALE precompilation flag can be used to lower
the number of meso_* routines when adaptations for mesoscale
applications are not very extended.
--> Three meso_* routines were deleted and changes are
now impacted under the MESOSCALE flag in the original GCM routines
--> Completely transparent for GCM compilation since it is devoid
of the -DMESOSCALE option
--> Very good for syncing because changes in dustlift, newcondens
will be directly available in the mesoscale model

M 84 mesoscale/LMD_MM_MARS/makemeso
Changed meso_testphys1d in testphys1d

M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_pgf
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpifort
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_ifort
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_g95
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpi
Added the option -DMESOSCALE in these scripts

*
LMD_MM_MARS
* Various minor changes related to water cycle and plotting routines

* Also included the GW test case

*

A 0 mesoscale/LMDZ.MARS.new/myGCM/DEFS_JB/callphys.def.orig
M 84 mesoscale/NOTES.txt
D 84 mesoscale/LMD_MM_MARS/SRC/ARWpost/idl
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
M 84 mesoscale/LMD_MM_MARS/SIMU/gnome_launch.meso
M 85 mesoscale/PLOT/MINIMAL/map_latlon.pro
D 85 mesoscale/PLOT/SPEC/LES/getget.pro
M 85 mesoscale/PLOT/SPEC/MAP/map_uvt.pro
A + - mesoscale/PLOT/SPEC/getget.pro
A 0 mesoscale/PLOT/RESERVE/obsolete
A 0 mesoscale/TESTS/TESTGW.tar.gz
M 84 000-USERS

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