source: trunk/MESOSCALE/PLOT/RESERVE/wind_esa_gcm.pro @ 163

Last change on this file since 163 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: 2.4 KB
Line 
1pro wind_esa_gcm
2
3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5filename='gcm_profile'
6filetruc='/d6/vblmd/MERIDIANI_EXOMARS/etude_GCM/wrfinput_d01_2024-03-20_'
7start_time=7.
8landing_site=[353.87-360.,-1.88]
9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11
12
13for i=1,4 do begin
14
15if (start_time lt 10) then yeye='0' else yeye=''
16file = filetruc + yeye + string(start_time,'(I0)') + ':00:00'
17
18;
19; load WRF coordinates
20;
21getcdf, file=file, charvar='XLAT', invar=lat
22getcdf, file=file, charvar='XLONG', invar=lon
23getcdf, file=file, charvar='HGT', invar=elevation
24;
25; find simulated lander grid point
26;
27findxy, $
28        x=lon, $
29        y=lat, $
30        point=landing_site, $
31        ind=indp, $
32        flag=2
33;
34; get field
35;
36getcdf, file=file, charvar='U', invar=u
37getcdf, file=file, charvar='V', invar=v
38  ;;; BEWARE: arrays not the same size... because staggering... u^2+v^2 is wrong and IDL does not complain...
39  ;;; it is actually possible to do better with staggering... use XLAT_V and XLONG_U
40field=sqrt( u(indp[0],indp[1],*)^2 + v(indp[0],indp[1],*)^2 ) & u=0. & v=0.
41what_I_plot=reform(field)
42;
43; get model height
44;
45getcdf, file=file, charvar='PHTOT', invar=ph
46height=reform(ph(indp[0],indp[1],*))
47height=height/1000./3.72
48heightp = height - elevation(indp[0],indp[1]) / 1000.
49
50        ;getcdf, file=file, charvar='PTOT', invar=p
51        ;getcdf, file=file, charvar='PSFC', invar=psfc
52        ;hh = reform(p(0,0,*,0))
53        ;p0=610. & t0=220. & r_cp=1/4.4 & grav=3.72 & R=192.
54        ;getcdf, file=file, charvar='T', invar=tpot
55        ;tpot = tpot + t0
56        ;t = tpot * ( p / p0 ) ^ r_cp
57       ;hh(0) = - R * t(indp[0],indp[1],0) / grav / 1000. * alog(psfc(indp[0],indp[1]) / p(indp[0],indp[1],0))
58        ;for i=1,n_elements(hh)-1 do hh(i)    = hh(i-1) - R * t(indp[0],indp[1],i) / grav / 1000. * alog(p(indp[0],indp[1],i) / p(indp[0],indp[1],i-1))
59        ;;heightp = hh
60        ;print, heightp-hh  ;; PAREIL ! pb de density global au modele
61
62;
63; ASCII table
64;
65tab1 = heightp
66tab2 = what_I_plot
67tab1 = tab1[0:n_elements(tab1)-14]
68tab2 = tab2[0:n_elements(tab2)-14]
69make_ascii, filename+'_LT'+string(start_time,'(I0)'), tab1, tab2
70plot, tab1, tab2
71;
72;
73;
74start_time = start_time+1
75print, start_time
76
77endfor
78
79end
Note: See TracBrowser for help on using the repository browser.