Index: trunk/mesoscale/LMD_MM_MARS/SRC/POSTPROC/comp_api
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/POSTPROC/comp_api	(revision 113)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/POSTPROC/comp_api	(revision 114)
@@ -11,5 +11,5 @@
 #g95 api.F90 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include -Wall -Wno=112,141,137,155 -ffree-form -o api
 #pgf90 -mcmodel=medium -Mlarge_arrays api.F90 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include -Mfree -o p_interp
-
+#ifort api.F90 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include -o api
 
 
Index: trunk/mesoscale/NOTES.txt
===================================================================
--- trunk/mesoscale/NOTES.txt	(revision 113)
+++ trunk/mesoscale/NOTES.txt	(revision 114)
@@ -25,4 +25,10 @@
 ncwa -O -v mtot -a longitude -d longitude,-180.0,180.0 concat_LT.nc mawd.nc
 (si trop gros faire ncrcat -v mtot -d Time,,,2 concat_LT.nc yorgl.nc)
+
+resumee
+--> localtime.e tres long
+--> concatnc.e en ls tres court
+--> renomme le fichier
+--> ncwa -O -v mtot,Time -a longitude -d longitude,-180.0,180.0 gcm_LT14_a035.nc mawd_a035.nc 
 
 	A FAIRE:::: mettre des flags precompilo dans les meso_
Index: trunk/mesoscale/PLOT/MINIMAL/fsc/ps_start.pro
===================================================================
--- trunk/mesoscale/PLOT/MINIMAL/fsc/ps_start.pro	(revision 113)
+++ trunk/mesoscale/PLOT/MINIMAL/fsc/ps_start.pro	(revision 114)
@@ -183,5 +183,5 @@
 ;            cmd = 'convert +antialias -density 300 ' + ps_struct.filename + ' -resize 25% ' + outfilename
 ;            cmd = 'convert -density 600 ' + ps_struct.filename + ' -resize 12% ' + outfilename
-cmd = 'ps2epsi '+ps_struct.filename+' 2> /dev/null ; gs -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile='+outfilename+' -dNOPAUSE -dBATCH -dEPSCrop -r400x400 '+basename+'.epsi'
+cmd = 'ps2epsi '+ps_struct.filename+' 2> /dev/null ; gs -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile='+outfilename+' -dNOPAUSE -dBATCH -dEPSCrop -r400x400 '+basename+'.epsi > /dev/null 2> /dev/null'
             SPAWN, cmd
         ENDIF
@@ -224,11 +224,21 @@
    
    ; Change any parameters you feel like changing.
-   !P.Charsize = 1.75
-   !P.Thick = 2
-   !X.Thick = 2
-   !Y.Thick = 2
+;;;;;;; AYMERIC
+;   !P.Charsize = 1.75
+;   !P.Thick = 2
+;   !X.Thick = 2
+;   !Y.Thick = 2
    !Z.Thick = 2
    !P.Symsize = 1.25
    !P.Font = 1
+
+;;;;;;; AYMERIC
+  !P.Charsize = 1.2
+  !p.charthick = 2.0
+  !p.thick = 2.0
+  !x.thick = 2.0
+  !y.thick = 2.0
+
+
    Device, Set_Font='Helvetica', /TT_FONT
 
Index: trunk/mesoscale/PLOT/MINIMAL/map_latlon.pro
===================================================================
--- trunk/mesoscale/PLOT/MINIMAL/map_latlon.pro	(revision 113)
+++ trunk/mesoscale/PLOT/MINIMAL/map_latlon.pro	(revision 114)
@@ -219,5 +219,5 @@
 loadct,pal,/silent
 ;reverse_ct
-;if (pal eq 0) then reverse_ct
+if (pal eq 0) then reverse_ct
 contour, what_I_plot, $
 	lon,lat, $
Index: trunk/mesoscale/PLOT/MINIMAL/profile.pro
===================================================================
--- trunk/mesoscale/PLOT/MINIMAL/profile.pro	(revision 113)
+++ trunk/mesoscale/PLOT/MINIMAL/profile.pro	(revision 114)
@@ -55,5 +55,6 @@
 
 if (n_elements(column) eq 0) then column=findgen(n_elements(what_I_plot))
-if (n_elements(mention) eq 0) then mention='' else mention='('+mention+')'
+if (n_elements(mention) eq 0) then mention='' 
+if (mention ne '') then mention='('+mention+')'
 
 ;------------------
@@ -124,5 +125,5 @@
 	ytitle=ytitle,$
 	title=title_user,$
-;/ylog
+;/ylog, $
 	subtitle=mention 
 
Index: trunk/mesoscale/PLOT/SPEC/GW/gravitwave.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/GW/gravitwave.pro	(revision 113)
+++ 	(revision )
@@ -1,129 +1,0 @@
-pro gravitwave
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-file='../EN_COURS/gw/ok_hires_wrfout_d01_9999-09-09_09:00:00_z'
-file='../EN_COURS/gw/_wrfout_d01_9999-09-09_09:00:00_z'
-file='../OUTILS_CONVERSION/wrfout_d01_9999-09-09_09:00:00_z'
-charvar='W' & charvarc='W'
-charvar='tk' & charvarc='W'
-charvar='tk' & charvarc='W' & cond=1
-;charvar='tpot' & charvarc='tpot'
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-;
-;
-what_I_plot=0. & overcontour=0.
-SPAWN, '\rm param_plot.idl ; cp gravitwave_inc.pro param_plot.idl'
-;
-;
-;
-getcdf, $
-        file=file, $
-        charvar=charvar, $
-        invar=invar
-getcdf, $
-        file=file, $
-        charvar=charvarc, $
-        invar=invarc
-getcdf, $
-        file=file, $
-        charvar='vert', $
-        invar=vert
-getcdf, $
-        file=file, $
-        charvar='PTOT', $
-        invar=columnp
-;
-;
-;
-for nt=1,10 do begin
-zefile='gravitwave_'+charvar+'_'+charvarc+'_'+string(nt+100,'(I0)')
-if (n_elements(cond) ne 0) then zefile = 'cond_' + zefile
-;
-;
-;
-  PS_Start, filename=zefile+'.ps'
-  print, zefile+'.ps'
-  !P.Charsize = 1.2
-  !p.charthick = 2.0
-  !p.thick = 2.0
-  !x.thick = 2.0
-  !y.thick = 2.0
-;
-;
-;
-what_I_plot = reform(invar(*,1,*,nt))
-
-
-   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-   file='../LMD_MM_MARS/TESTGW/input_sounding' & header='' & nlines_header=1 & ncol = 5
-   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-   nlines = FILE_LINES(file)-nlines_header & data=FLTARR(ncol,nlines)
-   OPENR, lun, file, /GET_LUN & READF, lun, header & READF, lun, data & CLOSE, lun & FREE_LUN, lun
-   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-   mcd_tpot        = reform(data(1,*))
-   mcd_column      = reform(data(0,*)) ;& mcd_column = ( mcd_column - mcd_column(0) ) / 1000.
-
-   overplot = reform(what_I_plot(30,*))
-   overplot_column = vert/1000.
-   what_I_plot = mcd_tpot
-   column = mcd_column/1000.
-   mention = ''
-;   minfield_init = 0.0001
-;   maxfield_init = 2000.
-   minfield_init = 100.
-   maxfield_init = 240.
-   alt = [0.,100.]
-   SPAWN, '\rm param_plot.idl'
-   profile, $
-        what_I_plot, $                          ; 1D vertical profile
-        column, $                               ; altitudes     
-        alt=alt, $                              ; altitude range [altmin, altmax]
-        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
-        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
-        inprofile=overplot, $                   ; another vertical profile to overplot
-        incolumn=overplot_column, $             ; altitudes of the other vertical profile (in case /= column)
-;        discrete=discrete, $                    ; show the profile points (= type of points in !psym)
-;        title_plot=title_user, $                ; title of the plot ('Profile' is default)
-;        title_axis=title_axis, $                ; title of the [x,y] axis (['Field','Altitude'] is default)
-        mention=mention                         ; add text precision within the plot window (default is nothing or '')
-
-PS_End, /PNG
-endfor
-end
-
-
-   if (charvar eq 'tk') then what_I_plot = what_I_plot - 20.  ;; -20. because seasonal variability
-   if (n_elements(cond) ne 0) then begin
-     column = columnp
-     @tempcond.inc
-     yeye = reform(overplot(*,1,*,nt))
-     w = where(yeye le 0.) & yeye[w] = 0. 
-     what_I_plot = what_I_plot - yeye 
-   endif
-overcontour = reform(invarc(*,1,*,nt))
-xx = findgen(n_elements(what_I_plot(*,0)))
-zz = vert / 1000.
-;
-;
-;
-map_latlon, $
-        what_I_plot, $                          ; 2D field
-        xx, $                                   ; 1D latitude
-        zz, $                                   ; 1D longitude
-;        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
-;        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
-        overcontour=overcontour, $              ; another 2D field to overplot with contour lines (=0: no)
-;        overvector_x=overvector_x, $            ; wind vector - x component (=0: no)
-;        overvector_y=overvector_y, $            ; wind vector - y component (=0: no)
-;        ct=pal, $                               ; color table (33-rainbow is default)
-;        colors=colors, $                        ; number of colors/levels (32 is default)
-;        title=title_user, $                     ; title of the plot ('' is default)
-        format=format                           ; format of colorbar annotations ('(F6.2)' is default)
-;
-;
-;
-PS_End, /PNG
-endfor
-end
Index: trunk/mesoscale/PLOT/SPEC/GW/gravitwave.pro.obsolete
===================================================================
--- trunk/mesoscale/PLOT/SPEC/GW/gravitwave.pro.obsolete	(revision 114)
+++ trunk/mesoscale/PLOT/SPEC/GW/gravitwave.pro.obsolete	(revision 114)
@@ -0,0 +1,129 @@
+pro gravitwave
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+file='../EN_COURS/gw/ok_hires_wrfout_d01_9999-09-09_09:00:00_z'
+file='../EN_COURS/gw/_wrfout_d01_9999-09-09_09:00:00_z'
+file='../OUTILS_CONVERSION/wrfout_d01_9999-09-09_09:00:00_z'
+charvar='W' & charvarc='W'
+charvar='tk' & charvarc='W'
+charvar='tk' & charvarc='W' & cond=1
+;charvar='tpot' & charvarc='tpot'
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+;
+;
+what_I_plot=0. & overcontour=0.
+SPAWN, '\rm param_plot.idl ; cp gravitwave_inc.pro param_plot.idl'
+;
+;
+;
+getcdf, $
+        file=file, $
+        charvar=charvar, $
+        invar=invar
+getcdf, $
+        file=file, $
+        charvar=charvarc, $
+        invar=invarc
+getcdf, $
+        file=file, $
+        charvar='vert', $
+        invar=vert
+getcdf, $
+        file=file, $
+        charvar='PTOT', $
+        invar=columnp
+;
+;
+;
+for nt=1,10 do begin
+zefile='gravitwave_'+charvar+'_'+charvarc+'_'+string(nt+100,'(I0)')
+if (n_elements(cond) ne 0) then zefile = 'cond_' + zefile
+;
+;
+;
+  PS_Start, filename=zefile+'.ps'
+  print, zefile+'.ps'
+  !P.Charsize = 1.2
+  !p.charthick = 2.0
+  !p.thick = 2.0
+  !x.thick = 2.0
+  !y.thick = 2.0
+;
+;
+;
+what_I_plot = reform(invar(*,1,*,nt))
+
+
+   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+   file='../LMD_MM_MARS/TESTGW/input_sounding' & header='' & nlines_header=1 & ncol = 5
+   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+   nlines = FILE_LINES(file)-nlines_header & data=FLTARR(ncol,nlines)
+   OPENR, lun, file, /GET_LUN & READF, lun, header & READF, lun, data & CLOSE, lun & FREE_LUN, lun
+   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+   mcd_tpot        = reform(data(1,*))
+   mcd_column      = reform(data(0,*)) ;& mcd_column = ( mcd_column - mcd_column(0) ) / 1000.
+
+   overplot = reform(what_I_plot(30,*))
+   overplot_column = vert/1000.
+   what_I_plot = mcd_tpot
+   column = mcd_column/1000.
+   mention = ''
+;   minfield_init = 0.0001
+;   maxfield_init = 2000.
+   minfield_init = 100.
+   maxfield_init = 240.
+   alt = [0.,100.]
+   SPAWN, '\rm param_plot.idl'
+   profile, $
+        what_I_plot, $                          ; 1D vertical profile
+        column, $                               ; altitudes     
+        alt=alt, $                              ; altitude range [altmin, altmax]
+        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
+        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
+        inprofile=overplot, $                   ; another vertical profile to overplot
+        incolumn=overplot_column, $             ; altitudes of the other vertical profile (in case /= column)
+;        discrete=discrete, $                    ; show the profile points (= type of points in !psym)
+;        title_plot=title_user, $                ; title of the plot ('Profile' is default)
+;        title_axis=title_axis, $                ; title of the [x,y] axis (['Field','Altitude'] is default)
+        mention=mention                         ; add text precision within the plot window (default is nothing or '')
+
+PS_End, /PNG
+endfor
+end
+
+
+   if (charvar eq 'tk') then what_I_plot = what_I_plot - 20.  ;; -20. because seasonal variability
+   if (n_elements(cond) ne 0) then begin
+     column = columnp
+     @tempcond.inc
+     yeye = reform(overplot(*,1,*,nt))
+     w = where(yeye le 0.) & yeye[w] = 0. 
+     what_I_plot = what_I_plot - yeye 
+   endif
+overcontour = reform(invarc(*,1,*,nt))
+xx = findgen(n_elements(what_I_plot(*,0)))
+zz = vert / 1000.
+;
+;
+;
+map_latlon, $
+        what_I_plot, $                          ; 2D field
+        xx, $                                   ; 1D latitude
+        zz, $                                   ; 1D longitude
+;        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
+;        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
+        overcontour=overcontour, $              ; another 2D field to overplot with contour lines (=0: no)
+;        overvector_x=overvector_x, $            ; wind vector - x component (=0: no)
+;        overvector_y=overvector_y, $            ; wind vector - y component (=0: no)
+;        ct=pal, $                               ; color table (33-rainbow is default)
+;        colors=colors, $                        ; number of colors/levels (32 is default)
+;        title=title_user, $                     ; title of the plot ('' is default)
+        format=format                           ; format of colorbar annotations ('(F6.2)' is default)
+;
+;
+;
+PS_End, /PNG
+endfor
+end
Index: trunk/mesoscale/PLOT/SPEC/GW/gravitwave2.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/GW/gravitwave2.pro	(revision 113)
+++ trunk/mesoscale/PLOT/SPEC/GW/gravitwave2.pro	(revision 114)
@@ -2,14 +2,21 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-file='../EN_COURS/gw/ok_hires_wrfout_d01_9999-09-09_09:00:00_z'
-file='../EN_COURS/gw/_wrfout_d01_9999-09-09_09:00:00_z'
-file='../LMD_MM_MARS/TESTGW/_wrfout_d01_9999-09-09_09:00:00_z'
-;file='../LMD_MM_MARS/TESTGW/wind15_wrfout_d01_9999-09-09_09:00:00_z'
-file='../TESTGW/wind20c_wrfout_d01_9999-09-09_09:00:00_z'
+	;;;; KEEP REFERENCES of FIRST PLOTS 
+	;file='../EN_COURS/gw/ok_hires_wrfout_d01_9999-09-09_09:00:00_z'
+	;file='../EN_COURS/gw/_wrfout_d01_9999-09-09_09:00:00_z'
+	;file='../LMD_MM_MARS/TESTGW/_wrfout_d01_9999-09-09_09:00:00_z'
+	;;file='../LMD_MM_MARS/TESTGW/wind15_wrfout_d01_9999-09-09_09:00:00_z'
+	;file='../TESTGW/wind20c_wrfout_d01_9999-09-09_09:00:00_z'
+folder='/d5/aslmd/GRAVITWAVE/GW_MARS_highwind_3D.157077/'
+folder='/d5/aslmd/GRAVITWAVE/GW_MARS_highwind_narrowmountain_2D.156878/'
+;folder='/d5/aslmd/GRAVITWAVE/GW_MARS_highwind_narrowmountain_3D.157025/'
+folder='/d5/aslmd/GRAVITWAVE/GW_MARS_highwind_narrowmountain_2D.morepoints.160818/'
+folder='/d5/aslmd/GRAVITWAVE/GW_MARS_highwind_3D_loweropacity_morepoints_LT15.161544/'
+file=folder+'wrfout_d01_9999-09-09_09:00:00_z'
 charvar='W' & charvarc='W'
-;charvar='tk' & charvarc='W'
-charvar='tk' & charvarc='W' & cond=1
+charvar='tk' & charvarc='W'
+;charvar='tk' & charvarc='W' & cond=1
 charvar='tk' & charvarc='tk' & cond=1
-;charvar='tpot' & charvarc='tpot'
+;;charvar='tpot' & charvarc='tpot'
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -41,5 +48,7 @@
 ;
 ;
-for nt=1,15 do begin
+;for nt=4,10 do begin
+;for nt=27,27 do begin
+for nt=1,40 do begin
 zefile='gravitwave_'+charvar+'_'+charvarc+'_'+string(nt+100,'(I0)')
 if (n_elements(cond) ne 0) then zefile = 'cond_' + zefile
@@ -57,27 +66,28 @@
 ;
 ;
-what_I_plot = reform(invar(*,1,*,nt))
-overcontour = reform(invarc(*,1,*,nt))
+s = size(invar) & middle = floor(s[2]/2) & print, 'PLOT at y subs ', middle
+what_I_plot = reform(invar(*,middle,*,nt))
+overcontour = reform(invarc(*,middle,*,nt))
    if (n_elements(cond) ne 0) then begin
      column = columnp
      ;column = reform(columnp(*,1,*,1))
      @tempcond.inc
-     yeye = reform(overplot(*,1,*,nt))
+     yeye = reform(overplot(*,middle,*,nt))
      w = where(yeye le 0.) & yeye[w] = 0. 
      if (charvar eq 'tk') then what_I_plot = what_I_plot - yeye 
-     if (charvarc eq 'tk') then overcontour = overcontour - yeye
+     if (charvarc eq 'tk') then overcontour = overcontour - yeye 
    endif
 xx = findgen(n_elements(what_I_plot(*,0)))
 zz = vert / 1000.
 
-w = where(what_I_plot lt 0.)
-w = where(what_I_plot lt -1.)
-w = where(what_I_plot lt -3.)
-if (w(0) ne -1) then begin
-for i=0,n_elements(w)-1 do begin
- ind = ARRAY_INDICES(what_I_plot, w(i))
- print, 'x '+string(ind(0),'(I0)')+' z '+string(zz(ind(1)),'(I0)')+' t '+string(nt*925./3700.,'(F4.1)'), what_I_plot(ind[0],ind[1])
-endfor
-endif
+	;w = where(what_I_plot lt 0.)
+	w = where(what_I_plot lt -1.)
+	;w = where(what_I_plot lt -3.)
+	if (w(0) ne -1) then begin
+	for i=0,n_elements(w)-1 do begin
+	 ind = ARRAY_INDICES(what_I_plot, w(i))
+	 print, 'x '+string(ind(0),'(I0)')+' z '+string(zz(ind(1)),'(I0)')+' t '+string(nt*925./3700.,'(F4.1)'), what_I_plot(ind[0],ind[1])
+	endfor
+	endif
 ;
 ;
@@ -100,4 +110,5 @@
 ;
 PS_End, /PNG
+SPAWN, 'mv '+zefile+'.png '+folder+' ; \rm '+zefile+'.*ps*'
 endfor
 end
Index: trunk/mesoscale/PLOT/SPEC/GW/gravitwave_inc.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/GW/gravitwave_inc.pro	(revision 113)
+++ trunk/mesoscale/PLOT/SPEC/GW/gravitwave_inc.pro	(revision 114)
@@ -9,12 +9,13 @@
 title_user    = 'Vertical velocity (m s!U-1!N)'
 ;;;;;;;; tk
-;minfield_init =  110.
-;maxfield_init =  210.
-;format        = '(I0)'
-;pal	       = 33
-;title_user    = 'Temperature (K)'
-;;;;;;;; tk - tsat
-minfield_init =  -20.;-4.
-maxfield_init =  -10.
+minfield_init =  110.
+maxfield_init =  210.
+format        = '(I0)'
+pal	       = 33
+title_user    = 'Temperature (K)'
+;;;;;;; tk - tsat
+minfield_init =  -4. ;-8.
+maxfield_init =  4. ;+8.
+ndiv	      =  8	
 format        = '(F4.1)'
 pal           =  0
@@ -31,4 +32,8 @@
 intervalx = 5.
 intervaly = 5.
+windowy = [0.,130.]
+windowx = [10., 110.] 
+intervalx = 10.
+intervaly = 10.
 title_axis = ['horizontal coordinate (x5km)','altitude (km)']
 poscb=0.55
Index: trunk/mesoscale/PLOT/SPEC/GW/gravitwaveprof.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/GW/gravitwaveprof.pro	(revision 113)
+++ trunk/mesoscale/PLOT/SPEC/GW/gravitwaveprof.pro	(revision 114)
@@ -7,21 +7,30 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-path='../TESTGW/'
-path='/tmp7/aslmd/'
-experiment='mcd_lt16_rcpcst'
-;experiment='mcd_lt16'
-;experiment='short_mcd_lt16_rcpcst'
-;experiment='short_mcd_lt16'
-;experiment='short_mcd_lt16_calcprho'
-;experiment='mcd_lt16_calcprho'
-;experiment='short_mcd_lt16_calcprho_tot'
-;experiment='colder_gcm_add_short'
-;experiment='colder_gcm_add'
-experiment=''
-;experiment='wind15'
-;experiment='wind20c'
-;experiment='colder_gcm_add_3.9_fine_rad_mountain'
-experiment='test'
-file=path+experiment+'_wrfout_d01_9999-09-09_09:00:00_z'
+	path='../TESTGW/'
+	path='/tmp7/aslmd/'
+path='/d5/aslmd/GRAVITWAVE/'
+	experiment='mcd_lt16_rcpcst'
+	;experiment='mcd_lt16'
+	;experiment='short_mcd_lt16_rcpcst'
+	;experiment='short_mcd_lt16'
+	;experiment='short_mcd_lt16_calcprho'
+	;experiment='mcd_lt16_calcprho'
+	;experiment='short_mcd_lt16_calcprho_tot'
+	;experiment='colder_gcm_add_short'
+	;experiment='colder_gcm_add'
+	experiment=''
+	;experiment='wind15'
+	;experiment='wind20c'
+	;experiment='colder_gcm_add_3.9_fine_rad_mountain'
+	experiment='test'
+experiment='GW_MARS_highwind_3D.157077'
+experiment='GW_MARS_highwind_3D_lower_opacity.161436'
+experiment='GW_MARS_highwind_3D_loweropacity_lotspoints.161468'
+experiment='GW_MARS_highwind_3D_loweropacity_morepoints.161542'
+experiment='GW_MARS_highwind_3D_loweropacity_morepoints_LT15.161544'
+	file=path+experiment+'_wrfout_d01_9999-09-09_09:00:00_z'
+file=path+experiment+'/wrfout_d01_9999-09-09_09:00:00_z'
+;file=path+experiment+'/wrfout_d01_9999-09-09_10:00:00_z'
+;file=path+experiment+'/wrfout_d01_9999-09-09_11:00:00_z'
 charvar='W' & charvarc='W'
 charvar='tk' & charvarc='W'
@@ -43,4 +52,8 @@
 nts=1  & nte=9    & nxs=59  & nxe=59
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+nts=1  & nte=10  & nxs=50   & nxe=50
+;nts=1  & nte=1  & nxs=6   & nxe=6
+nts=1  & nte=100  & nxs=50   & nxe=50
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;
 ;
@@ -55,8 +68,8 @@
         charvar=charvar, $
         invar=invar
-getcdf, $
-        file=file, $
-        charvar=charvarc, $
-        invar=invarc
+;getcdf, $
+;        file=file, $
+;        charvar=charvarc, $
+;        invar=invarc
 getcdf, $
         file=file, $
@@ -67,7 +80,16 @@
         charvar='PTOT', $
         invar=columnp
-;
-;
-;
+;;
+;; 
+;;
+	s = size(invar) & middle = floor(s[2]/2) & print, 'PLOT at y subs ', middle
+        nte = min(s[4]-1,nte) & print, 'nte ', nte
+        mean_invar = TOTAL(invar(*,*,*,nts:nte),4) / float(nte-nts+1)
+	;mean_columnp = TOTAL(columnp(*,*,*,nts:nte),4) / float(nte-nts+1)
+        anomal_invar = invar & for i=0,s[4]-1 do anomal_invar(*,*,*,i) = anomal_invar(*,*,*,i) - mean_invar
+;
+;
+;
+	;goto, perturb
 for nt=nts,nte do begin
 for nx=nxs,nxe do begin
@@ -87,6 +109,7 @@
 ;
 ;
-;what_I_plot = reform(invar(*,1,*,nt))
-what_I_plot = reform(invar(*,59,*,nt))
+;;what_I_plot = reform(invar(*,1,*,nt))
+;what_I_plot = reform(invar(*,59,*,nt))
+what_I_plot = reform(invar(*,middle,*,nt))
 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -112,5 +135,6 @@
    endif else begin
      what_I_plot = TOTAL(what_I_plot,1) / n_elements(reform(what_I_plot(*,0)))
-   endelse 
+   endelse
+
      ;;;;;;;;;;;
      ;;;;;;;;;;;
@@ -121,22 +145,31 @@
      alt = [40.,100.]
      alt = [40.,80.]
-        ;hache = 8.
-        ;column = -hache*alog(reform(columnp(nx,1,*,nt))/610.)
-        ;overplot_column = -hache*alog(pressure/610.)
-;column = reform(columnp(nx,1,*,nt))
+     alt = [0.,120.]
+     ;;;;;;;;;;;
+     ;;;;;;;;;;;
+     ;mention = ''
+     SPAWN, '\rm param_plot.idl'
+     minfield_init = 85.  ;100.
+     maxfield_init = 185. ;250.
+     title_axis = ['Temperature (K)','Altitude (km)']
+     overplot = mcd_tpot
+     ;;;;;;;;;;;
+     SPAWN, "echo 'intervaly=10.' >> param_plot.idl"
+     SPAWN, "echo 'intervalx=5.' >> param_plot.idl"
+     ;;;;;;;;;;;
+
+	;overplot = reform(mean_invar(nx,middle,*))
+	;overplot_column = column
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;; PLOT PRESSION mettre profile en log
+;column = reform(columnp(nx,middle,*,nt))
 ;overplot_column = pressure
+;	;;overplot = mean_invar
+;	;;overplot_column = mean_columnp
 ;alt = [1.e2,1.e-3]
-;;;; mettre profile en log
-     ;;;;;;;;;;;
-     ;;;;;;;;;;;
-     mention = ''
-     SPAWN, '\rm param_plot.idl'
-     minfield_init = 80.  ;100.
-     maxfield_init = 190. ;250.
-     title_axis = ['Temperature (K)','Altitude (km)']
 ;title_axis = ['Temperature (K)','Pressure (Pa)']
-     overplot = mcd_tpot
-     ;;;;;;;;;;;
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PLOT PRESSION
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; calculer la CAPE ? Tsat - Tenv / Tenv
 
@@ -169,23 +202,60 @@
         mention=mention                         ; add text precision within the plot window (default is nothing or '')
 
-;;; sponge layer
-;w=where(FINITE(overplot) ne 0)
-;oplot, [minfield_init,maxfield_init], [max(overplot_column[w])-50.,max(overplot_column[w])-50.], linestyle=1
-
-;column = columnp
-;@tempcond.inc
-;yeye = reform(overplot(nx,1,*,nt)) 
-;;w = where(yeye le 0.) & yeye[w] = !VALUES.F_NAN
-;;oplot, yeye, vert/1000., linestyle=1
+	;;; sponge layer
+	;w=where(FINITE(overplot) ne 0)
+	;oplot, [minfield_init,maxfield_init], [max(overplot_column[w])-50.,max(overplot_column[w])-50.], linestyle=1
+
+	;column = columnp
+	;@tempcond.inc
+	;yeye = reform(overplot(nx,1,*,nt)) 
+	;;w = where(yeye le 0.) & yeye[w] = !VALUES.F_NAN
+	;;oplot, yeye, vert/1000., linestyle=1
 
 @tempcond.inc
-overplot = reform(overplot(nx,1,*,nt))
+overplot = reform(overplot(nx,middle,*,nt))
 oplot, overplot, overplot_column, linestyle=1
 
-;calc_tk = calc_tpot * (pressure/610.)^(1/4.4)
-;oplot, calc_tk, column, linestyle=3
+	;calc_tk = calc_tpot * (pressure/610.)^(1/4.4)
+	;oplot, calc_tk, column, linestyle=3
 
 PS_End, /PNG
 endfor
 endfor
+
+perturb:
+PS_Start, filename=experiment+'_'+charvar+'_perturb_'+string(nxs+100,'(I0)')+'.ps'
+
+     what_I_plot_loop = reform(anomal_invar(nxs,middle,*,*))
+
+     what_I_plot = reform(what_I_plot_loop(*,nts))
+     column = vert/1000.
+     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+     alt = [0.,120.]
+     minfield_init = -30. 
+     maxfield_init = 30. 
+     title_axis = ['Temperature anomaly (K)','Altitude (km)']
+		;; peut pas changer	
+		;SPAWN, "echo 'intervaly=10.' >> param_plot.idl"
+     		;SPAWN, "echo 'intervalx=5.' >> param_plot.idl"
+     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+     profile, $
+        what_I_plot, $                          ; 1D vertical profile
+        column, $                               ; altitudes     
+        alt=alt, $                              ; altitude range [altmin, altmax]
+        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
+        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
+        inprofile=overplot, $                   ; another vertical profile to overplot
+        incolumn=overplot_column, $             ; altitudes of the other vertical profile (in case /= column)
+;        discrete=discrete, $                    ; show the profile points (= type of points in !psym)
+;        title_plot=title_user, $                ; title of the plot ('Profile' is default)
+        title_axis=title_axis, $                ; title of the [x,y] axis (['Field','Altitude'] is default)
+        mention=mention                         ; add text precision within the plot window (default is nothing or '')
+
+     for iii=nts+1, nte do begin
+        overplot = reform(what_I_plot_loop(*,iii))
+        overplot_column = column
+        oplot, overplot, overplot_column
+     endfor
+PS_End, /PNG
+
 end
Index: trunk/mesoscale/PLOT/SPEC/SERIES/mawd.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/SERIES/mawd.pro	(revision 113)
+++ trunk/mesoscale/PLOT/SPEC/SERIES/mawd.pro	(revision 114)
@@ -2,7 +2,10 @@
 
 ;;;;;;;
-;f_user='/donnees/aslmd/SVN/trunk/mesoscale/TMPDIR/GCMINI/mawd.nc'
-;f_user='/tmp7/aslmd/mawd.nc'
-f_user='/d5/aslmd/mawd.nc'
+experiment='a035'
+;experiment='a040'
+;experiment='a045'
+;;f_user='/donnees/aslmd/SVN/trunk/mesoscale/TMPDIR/GCMINI/mawd.nc'
+;;f_user='/tmp7/aslmd/mawd.nc'
+f_user='/d5/aslmd/WATERCYCLE/mawd_'+experiment+'.nc'
 v_user = 'mtot'
 x_user = 'Time'
@@ -26,10 +29,10 @@
 SPAWN, '\rm param_plot.idl ; cp mawd_inc.pro param_plot.idl'
 
-PS_START, file='mawd.ps'
-  !P.Charsize = 1.2
-  !p.charthick = 2.0
-  !p.thick = 2.0
-  !x.thick = 2.0
-  !y.thick = 2.0
+PS_START, file='mawd_'+experiment+'.ps'
+;  !P.Charsize = 1.2
+;  !p.charthick = 2.0
+;  !p.thick = 2.0
+;  !x.thick = 2.0
+;  !y.thick = 2.0
 
 cdfid = ncdf_open(f_user)
@@ -41,16 +44,14 @@
 ncdf_varget, cdfid, varid, yy
 
+varid=ncdf_varid(cdfid,x_user)
+ncdf_varget, cdfid, varid, xx
+
 if (tes eq 'no') then begin
   ;;; en precip-microns
   champ = champ * 1.e6 / 917.
-  ;;; prendre Time depuis un autre fichier
-  cdfid = ncdf_open('/d5/aslmd/gcm_LT14_a035.nc')
-  varid=ncdf_varid(cdfid,x_user)
-  ncdf_varget, cdfid, varid, xx
   ;;;; entre 0 et 360
   ;xx = xx MOD 360
+  xx = xx - 360.*3.
 endif else begin
-  varid=ncdf_varid(cdfid,x_user)
-  ncdf_varget, cdfid, varid, xx
   xx = xx - 360.*2.
 endelse
@@ -76,4 +77,6 @@
 endif
 
+what_I_plot = smooth(what_I_plot,[10,1])
+
 map_latlon, $
         what_I_plot, $                          ; 2D field
Index: trunk/mesoscale/PLOT/SPEC/SERIES/mawd_inc.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/SERIES/mawd_inc.pro	(revision 113)
+++ trunk/mesoscale/PLOT/SPEC/SERIES/mawd_inc.pro	(revision 114)
@@ -8,10 +8,10 @@
         format          =       '(I0)' 
         colors          =       32
-        pal             =       22;4;33              ;; GOOD: 4, 18, 22, 16, 37, 33, 39, 6, 11
+        pal             =       33;22;4;33              ;; GOOD: 4, 18, 22, 16, 37, 33, 39, 6, 11
 
 ;;;;;*************************************** FILL LIMITS
         minfield_init   =       0.
-        maxfield_init   =       65.
-        ndiv            =       13
+        maxfield_init   =       100. ;120. ;65.
+        ndiv            =       10 ;12 ;13
 
 	;;;;;*************************************** LIMIT TRICKS
@@ -20,5 +20,5 @@
         	lim_max = maxfield_init & w=where((what_I_plot ge lim_max) and (what_I_plot le 1e9)) & if (w[0] ne -1) then what_I_plot[w]=lim_max
         	lim_min = minfield_init & w=where(what_I_plot le lim_min) & if (w[0] ne -1) then what_I_plot[w]=lim_min
-        	;lim_blank = 0.1 & w=where(abs(what_I_plot) le lim_blank) & if (w[0] ne -1) then what_I_plot[w]=missing_value
+        	lim_blank = 1.0 & w=where(abs(what_I_plot) le lim_blank) & if (w[0] ne -1) then what_I_plot[w]=missing_value
 
 ;;;;;*************************************** CONTOUR
@@ -38,7 +38,7 @@
 ;;;;; MULTIYEAR
 	isotropic       =       'false'
-        windowx         =       [1500.,4000.]
-        intervalx       =       500.0
+        windowx         =       [0.,2880.] ;[0.,3600.] ;[1500.,4000.]
+        intervalx       =       360.0
         windowy         =       [-90.,90.]
         intervaly       =       30.0
-        lev		=       [100.]
+        lev		=       [600.] ;[100.]
Index: trunk/mesoscale/PLOT/SPEC/ti_vs_tsurf.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/ti_vs_tsurf.pro	(revision 114)
+++ trunk/mesoscale/PLOT/SPEC/ti_vs_tsurf.pro	(revision 114)
@@ -0,0 +1,42 @@
+pro ti_vs_tsurf
+
+getcdf, $
+        file='/d6/vblmd/MERIDIANI_EXOMARS/saves_simu_LS_244_tau05/wrfout_d01_2024-09-08_00:00:00', $
+        charvar='TSURF', $
+        invar=tsurf
+tsurf = max ( tsurf, DIMENSION=3 )
+
+getcdf, $
+        file='./geo_em.d01.nc', $
+        charvar='THERMAL_INERTIA', $
+        invar=ti
+
+getcdf, $
+        file='./geo_em.d01.nc', $
+        charvar='ALBEDO_GCM', $
+        invar=alb
+
+PS_START, file='ti.ps'
+  !P.Charsize = 1.2
+  !p.charthick = 2.0
+  !p.thick = 2.0
+  !x.thick = 2.0
+  !y.thick = 2.0
+plot, ti, tsurf, psym=3, title='Daily maximum of surface temperature at ExoMars landing season and region', xtitle='Thermal Inertia (tiu)', ytitle='Surface temperature (K)', xrange=[0,500], yrange=[270,320]
+oplot, ti[where(tsurf eq max(tsurf))], tsurf[where(tsurf eq max(tsurf))], psym=4
+xyouts, 380, 310, 'TI = '+string(ti[where(tsurf eq max(tsurf))],'(I0)')+' tiu'
+PS_END, /PNG
+
+PS_START, file='alb.ps'
+  !P.Charsize = 1.2
+  !p.charthick = 2.0
+  !p.thick = 2.0
+  !x.thick = 2.0
+  !y.thick = 2.0
+plot, alb, tsurf, psym=3, title='Daily maximum of surface temperature at ExoMars landing season and region', xtitle='Albedo', ytitle='Surface temperature (K)', xrange=[0.1,0.3], yrange=[270,320]
+oplot, alb[where(tsurf eq max(tsurf))], tsurf[where(tsurf eq max(tsurf))], psym=4
+xyouts, 0.25, 310, 'ALB = '+string(alb[where(tsurf eq max(tsurf))],'(F4.2)')
+PS_END, /PNG
+
+
+end
