Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/callphys.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/callphys.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/callphys.def	(revision 1445)
@@ -0,0 +1,179 @@
+##General options
+##~~~~~~~~~~~~~~~
+#Run with or without tracer transport ?
+tracer=.true.
+
+#Directory where external input files are:
+datadir=./data_physics/
+
+#Diurnal cycle ?  if diurnal=False, diurnal averaged solar heating
+diurnal=.true.
+
+#Seasonal cycle ? if season=False, Ls stays constant, to value set in "start"
+season = .true.   
+
+#write some more output on the screen ?
+lwrite = .false.    
+
+#Save statistics in file "stats.nc" ?
+callstats =.true.
+callstats =.false.
+
+#Save EOF profiles in file "profiles" for Climate Database?
+calleofdump = .false.
+
+## Dust scenario. Used if the dust is prescribed (i.e. if tracer=F or active=F)
+## ~~~~~~~~~~~~~
+#  =1 Dust opt.deph read in startfi; =2 Viking scenario; =3 MGS scenario,
+#  =4 Mars Year 24 from TES assimilation (old version of MY24; dust_tes.nc file)
+#  =6 "cold" (low dust) scenario ; =7 "warm" (high dust) scenario
+#  =8 "clim" scenario
+#  =24 Mars Year 24  ; =25 Mars Year 25 (year with a global dust storm) ; ...
+#  =30 Mars Year 30 
+iaervar = 29
+# Dust opacity at 610 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.1
+# Dust vertical distribution: 
+# (=0: old distrib. (Pollack90), =1: top set by "topdustref",
+#  =2: Viking scenario; =3 MGS scenario)
+iddist  = 3
+# Dust top altitude (km). (Matters only if iddist=1)
+topdustref = 55.
+
+## Physical Parameterizations :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call radiative transfer ?
+callrad   = .true.
+# call NLTE radiative schemes ?   matters only if callrad=T
+callnlte = .true.
+callnlte = .false.
+# NLTE 15um scheme to use.
+# 0-> Old scheme, static oxygen
+# 1-> Old scheme, dynamic oxygen
+# 2-> New scheme
+nltemodel = 2
+nltemodel = 0
+# call CO2 NIR absorption ?   matters only if callrad=T
+callnirco2 = .true.
+# NIR NLTE correction ? matters only if callnirco2=T
+nircorr=1
+nircorr=0
+# call turbulent vertical diffusion ?
+calldifv  = .true.
+# call convective adjustment ?
+calladj  = .true.
+# Thermals
+calltherm = .true.
+callrichsl = .true.
+# call CO2 condensation ?
+callcond =.true.
+# call thermal conduction in the soil ?
+callsoil = .true.
+# call Lott's gravity wave/subgrid topography scheme ?
+calllott  = .true.
+calllott  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+TESicealbedo = .false.
+## Coefficient for Northern cap albedoes
+TESice_Ncoef=1.6
+## Coefficient for Southern cap albedoes
+TESice_Scoef=1.6
+
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 1
+# Output of the exchange coefficient mattrix ? for diagnostic only
+callg2d  = .false.
+# Rayleigh scattering : (should be .false. for now)
+rayleigh  = .false.
+
+## Tracer (dust water, ice and/or chemical species) options (used if tracer=T):
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# DUST: Transported dust ? (if >0, use 'dustbin' dust bins)
+dustbin    = 2
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .true.
+# DUST: use mass and number mixing ratios to predict dust size ?
+doubleq   = .true.
+# DUST: lifted by GCM surface winds ?
+lifting = .true.
+lifting = .false.
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by H2O/CO2 snowfall ?
+scavenging = .true.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .true.
+#activice   = .false.
+# WATER: Compute water cycle
+water = .true.
+# WATER: Microphysical scheme for water-ice clouds?
+microphys = .true.
+# WATER: microphysics sub-timestep
+imicro = 1
+# WATER: parameter contact
+mteta = 0.95
+# WATER: Effective variance for sedimentation for the log-normal 
+#        distribution of ice particles ?
+nuice_sed=0.1
+# WATER: current permanent caps at both poles. True IS RECOMMENDED
+#        (with .true., North cap is a source of water and South pole
+#         is a cold trap)
+caps  = .true.
+# WATER: Water ice albedo ?
+albedo_h2o_ice = 0.35
+# WATER: Water ice thermal inertia
+inert_h2o_ice = 800
+# WATER: Frost thickness threshold for albedo
+frost_albedo_threshold = 0.005
+# PHOTOCHEMISTRY: include chemical species 
+photochem  = .true.
+photochem  = .false.
+
+# SCATTERERS: set number of scatterers. must be compliant with preceding options.
+naerkind = 2
+
+
+## Thermospheric options (relevant if tracer=T) :
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call thermosphere ?
+callthermos = .true.
+callthermos = .false.
+# WATER: included without cycle (only if water=.false.)
+thermoswater = .false.
+# call thermal conduction ? (only if callthermos=.true.)
+callconduct = .true.
+callconduct = .false.
+# call molecular viscosity ? (only if callthermos=.true.)
+callmolvis = .true.
+callmolvis = .false.
+# call molecular diffusion ? (only if callthermos=.true.)
+callmoldiff = .true.
+callmoldiff = .false.
+# call thermospheric photochemistry ? (only if callthermos=.true.)
+thermochem = .true.
+thermochem = .false.
+# call EUV heating ? (only if callthermos=.true.)
+calleuv=.true.
+calleuv=.false.
+#Method to include solar variability?
+#0-> Old method (fixed EUV input)  1-> Variability with E10.7 as observed
+solvarmod=0
+# date for solar flux calculation: (1985 < date < 2002)
+## (Solar min=1996.4 ave=1993.4 max=1990.6) ; Only used if solvarmod=0
+solarcondate = 1993.4
+#Solar variability as observed for MY? (must bebetween MY23 and MY30)
+# (only matters if solvarmod=1)
+solvaryear=24
+# value for the UV heating efficiency
+##(experimental values between 0.19 and 0.23, lower values may
+## be used to compensate for low 15 um cooling)
+euveff = 0.21       
+
+
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code	(revision 1445)
@@ -0,0 +1,1 @@
+link ../SRC
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code_compiled
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code_compiled	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/code_compiled	(revision 1445)
@@ -0,0 +1,1 @@
+link code/MESOSCALE/LMD_MM_MARS/newphys_mpifort_64
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_gcm
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_gcm	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_gcm	(revision 1445)
@@ -0,0 +1,1 @@
+link /home/spiga/data/2015_GCM_MARS/STARTBASE_MY29/tmpsave
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_physics
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_physics	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_physics	(revision 1445)
@@ -0,0 +1,1 @@
+link /home/millour/data/mars/datadir
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_static
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_static	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/data_static	(revision 1445)
@@ -0,0 +1,1 @@
+link code/MESOSCALE/LMD_MM_MARS/WPS_GEOG
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/examples
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/examples	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/examples	(revision 1445)
@@ -0,0 +1,1 @@
+link code/MESOSCALE/LMD_MM_MARS/SIMU/DEF
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/calendar
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/calendar	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/calendar	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code/MESOSCALE/LMD_MM_MARS/SIMU/calendar
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/callphys.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/callphys.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/callphys.def	(revision 1445)
@@ -0,0 +1,172 @@
+##General options
+##~~~~~~~~~~~~~~~
+#Run with or without tracer transport ?
+tracer=.true.
+
+#Directory where external input files are:
+datadir=./datadir
+
+#Diurnal cycle ?  if diurnal=False, diurnal averaged solar heating
+diurnal=.true.
+
+#Seasonal cycle ? if season=False, Ls stays constant, to value set in "start"
+season = .true.   
+
+#write some more output on the screen ?
+lwrite = .false.    
+
+#Save statistics in file "stats.nc" ?
+callstats =.true.
+
+#Save EOF profiles in file "profiles" for Climate Database?
+calleofdump = .false.
+
+## Dust scenario. Used if the dust is prescribed (i.e. if tracer=F or active=F)
+## ~~~~~~~~~~~~~
+#  =1 Dust opt.deph read in startfi; =2 Viking scenario; =3 MGS scenario,
+#  =4 Mars Year 24 from TES assimilation (old version of MY24; dust_tes.nc file)
+#  =6 "cold" (low dust) scenario ; =7 "warm" (high dust) scenario
+#  =8 "clim" scenario
+#  =24 Mars Year 24  ; =25 Mars Year 25 (year with a global dust storm) ; ...
+#  =30 Mars Year 30 
+iaervar = 29
+# Dust opacity at 610 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.1
+# Dust vertical distribution: 
+# (=0: old distrib. (Pollack90), =1: top set by "topdustref",
+#  =2: Viking scenario; =3 MGS scenario)
+iddist  = 3
+# Dust top altitude (km). (Matters only if iddist=1)
+topdustref = 55.
+
+## Physical Parameterizations :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call radiative transfer ?
+callrad   = .true.
+# call NLTE radiative schemes ?   matters only if callrad=T
+callnlte = .true.
+callnlte = .false.
+# NLTE 15um scheme to use.
+# 0-> Old scheme, static oxygen
+# 1-> Old scheme, dynamic oxygen
+# 2-> New scheme
+nltemodel = 2
+nltemodel = 0
+# call CO2 NIR absorption ?   matters only if callrad=T
+callnirco2 = .true.
+# NIR NLTE correction ? matters only if callnirco2=T
+nircorr=1
+nircorr=0
+# call turbulent vertical diffusion ?
+calldifv  = .true.
+# call convective adjustment ?
+calladj  = .true.
+# Thermals
+calltherm = .true.
+callrichsl = .true.
+# call CO2 condensation ?
+callcond =.true.
+# call thermal conduction in the soil ?
+callsoil = .true.
+# call Lott's gravity wave/subgrid topography scheme ?
+calllott  = .true.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+## Coefficient for Northern cap albedoes
+TESice_Ncoef=1.6
+## Coefficient for Southern cap albedoes
+TESice_Scoef=1.6
+
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 1
+# Output of the exchange coefficient mattrix ? for diagnostic only
+callg2d  = .false.
+# Rayleigh scattering : (should be .false. for now)
+rayleigh  = .false.
+
+## Tracer (dust water, ice and/or chemical species) options (used if tracer=T):
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# DUST: Transported dust ? (if >0, use 'dustbin' dust bins)
+dustbin    = 2
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .true.
+# DUST: use mass and number mixing ratios to predict dust size ?
+doubleq   = .true.
+# DUST: lifted by GCM surface winds ?
+lifting = .true.
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by H2O/CO2 snowfall ?
+scavenging = .true.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .true.
+# WATER: Compute water cycle
+water = .true.
+# WATER: Microphysical scheme for water-ice clouds?
+microphys = .true.
+# WATER: parameter contact
+mteta = 0.95
+# WATER: Effective variance for sedimentation for the log-normal 
+#        distribution of ice particles ?
+nuice_sed=0.1
+# WATER: current permanent caps at both poles. True IS RECOMMENDED
+#        (with .true., North cap is a source of water and South pole
+#         is a cold trap)
+caps  = .true.
+# WATER: Water ice albedo ?
+albedo_h2o_ice = 0.35
+# WATER: Water ice thermal inertia
+inert_h2o_ice = 800
+# WATER: Frost thickness threshold for albedo
+frost_albedo_threshold = 0.005
+# PHOTOCHEMISTRY: include chemical species 
+photochem  = .true.
+photochem  = .false.
+
+# SCATTERERS: set number of scatterers. must be compliant with preceding options.
+naerkind = 2
+
+
+## Thermospheric options (relevant if tracer=T) :
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call thermosphere ?
+callthermos = .true.
+callthermos = .false.
+# WATER: included without cycle (only if water=.false.)
+thermoswater = .false.
+# call thermal conduction ? (only if callthermos=.true.)
+callconduct = .true.
+callconduct = .false.
+# call molecular viscosity ? (only if callthermos=.true.)
+callmolvis = .true.
+callmolvis = .false.
+# call molecular diffusion ? (only if callthermos=.true.)
+callmoldiff = .true.
+callmoldiff = .false.
+# call thermospheric photochemistry ? (only if callthermos=.true.)
+thermochem = .true.
+thermochem = .false.
+# call EUV heating ? (only if callthermos=.true.)
+calleuv=.true.
+calleuv=.false.
+#Method to include solar variability?
+#0-> Old method (fixed EUV input)  1-> Variability with E10.7 as observed
+solvarmod=0
+# date for solar flux calculation: (1985 < date < 2002)
+## (Solar min=1996.4 ave=1993.4 max=1990.6) ; Only used if solvarmod=0
+solarcondate = 1993.4
+#Solar variability as observed for MY? (must bebetween MY23 and MY30)
+# (only matters if solvarmod=1)
+solvaryear=24
+# value for the UV heating efficiency
+##(experimental values between 0.19 and 0.23, lower values may
+## be used to compensate for low 15 um cooling)
+euveff = 0.21       
+
+
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/datadir
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/datadir	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/datadir	(revision 1445)
@@ -0,0 +1,1 @@
+link ../data_physics
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/gcm.e
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/gcm.e	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/gcm.e	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code/LMDZ.COMMON/bin/gcm_64x48x35_phymars_para.e
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/launch_gcm
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/launch_gcm	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/launch_gcm	(revision 1445)
@@ -0,0 +1,80 @@
+#! /bin/bash
+
+###############################
+# use: - launch_gcm           #
+#      - echo 22 | launch_gcm #
+###############################
+
+# Author : A. Spiga - Spring/Winter 2008 
+# added link trick in 2011
+
+        if [[ ! -d startbase ]]
+        then
+          echo "please create in $PWD a symbolic link: startbase"
+          echo "for instance: ln -sf /san/home/spiga/DATAFILE/STARTBASE_64_48_32_t2 $PWD/startbase"
+          echo "(and compile the GCM with the correct dimensions)"
+          exit
+        fi
+##################
+#startbase='../../STARTS/'
+#startbase='/d2/emlmd/run_LMDZ.MARS.BETA.TASI/tau1/'
+#startbase='/tmp7/aslmd/flush/'
+#startbase='/tmp7/aslmd/flush2/'
+#startbase='/d6/vblmd/MERIDIANI_EXOMARS/starts_en_cours/tau05/'
+#startbase='/d5/aslmd/LMD_MM_MARS_DATA/STARTBASE_64_48_25_t2dust_JBM/'
+##################
+
+startbase=./startbase/
+
+#
+# get simulation start day and compute start/startfi required date (simulation day - 1)
+#
+echo '>>>' choose start sol ? ; read daygcm
+  #if [[ "$daygcm" == 0 ]]
+  #then
+  #daygcm=669 
+  #fi
+daygcm=$(expr ${daygcm} - 1)
+
+#
+# find the correct start/startfi files among 3-day startbase
+#
+ls ${startbase}/start${daygcm}.nc > /dev/null 2> /dev/null
+if [[ "$?" == 0 ]]
+then
+    echo found ! ${daygcm}
+else
+    #echo not found ! ${daygcm}	
+    daygcm=$(expr ${daygcm} - 1)
+    ls ${startbase}/start${daygcm}.nc > /dev/null 2> /dev/null
+    if [[ "$?" == 0 ]]     # probably a 'while' loop would be better if more than 3
+    then
+	echo found ! ${daygcm}
+    else
+	#echo not found ! ${daygcm}    
+	daygcm=$(expr ${daygcm} - 1)
+        ls ${startbase}/start${daygcm}.nc > /dev/null 2> /dev/null	
+        echo found ! ${daygcm}
+    fi	
+fi	
+
+#
+# link start/startfi files
+#
+ln -sf ${startbase}/start${daygcm}.nc start.nc
+ln -sf ${startbase}/startfi${daygcm}.nc startfi.nc
+
+#
+# clean the place
+#
+rm -rf restart.nc 2> /dev/null 
+rm -rf restartfi.nc 2> /dev/null
+rm -rf log_gcm 2> /dev/null
+
+#
+# run !
+#
+echo running the GCM - check in ${PWD}/log_gcm 
+#nohup gcm.e > log_gcm
+
+exit
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/namelist.input
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/namelist.input	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/namelist.input	(revision 1445)
@@ -0,0 +1,1 @@
+link ../namelist.input
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/run.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/run.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/run.def	(revision 1445)
@@ -0,0 +1,115 @@
+#
+#----------------------------------------------------------------------- 
+#Parametres de controle du run:                                          
+#------------------------------                                          
+
+# planet type
+   planet_type=mars
+   
+# Nombre de jours d'integration                                         
+     nday=1
+
+# nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+ day_step = 960
+
+# periode pour le pas Matsuno (en pas)                                  
+  iperiod=5
+
+# periode de sortie des variables de controle (en pas)                  
+  iconser=120
+
+# periode d'ecriture du fichier histoire (en jour)                      
+    iecri=200
+
+# periode de stockage fichier histmoy (en jour)                         
+ periodav=60.
+
+# periode de la dissipation (en pas)                                    
+  idissip=1
+
+# choix de l'operateur de dissipation (star ou  non star )              
+ lstardis=.true.
+
+# avec ou sans coordonnee hybrides
+ hybrid=.true.
+
+# nombre d'iterations de l'operateur de dissipation   gradiv            
+nitergdiv=1
+
+# nombre d'iterations de l'operateur de dissipation  nxgradrot          
+nitergrot=2
+
+# nombre d'iterations de l'operateur de dissipation  divgrad            
+   niterh=2
+
+# temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+ tetagdiv=1800.
+
+# temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+ tetagrot=3600.
+
+# temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+ tetatemp=3600.
+
+# coefficient pour gamdissip                                            
+  coefdis=0.
+
+# choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+  purmats=.false.
+
+# avec ou sans physique                                                 
+   physic=.true.
+
+# periode de la physique (en pas)                                       
+  iphysiq=10
+
+# choix d'une grille reguliere                                          
+  grireg=.true.
+
+# frequence (en pas) de l'ecriture du fichier diagfi               
+ ecritphy=40
+
+# longitude en degres du centre du zoom                                 
+   clon=63.
+
+# latitude en degres du centre du zoom                                  
+   clat=0.
+
+# facteur de grossissement du zoom,selon longitude                      
+  grossismx=1.
+
+# facteur de grossissement du zoom ,selon latitude                      
+ grossismy=1.
+
+#  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+  fxyhypb=.false.
+
+# extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+   dzoomx= 0.
+
+# extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+   dzoomy=0.
+
+#  raideur du zoom en  X
+    taux=2.
+
+#  raideur du zoom en  Y
+    tauy=2.
+
+#  Fonction  f(y) avec y = Sin(latit.) si = .TRUE. ,  Sinon  y = latit.
+  ysinus= .false.
+
+# Avec sponge layer
+  callsponge  = .true.
+ 
+# Sponge:  mode0(u=v=0), mode1(u=umoy,v=0), mode2(u=umoy,v=vmoy)
+  mode_sponge= 3
+
+# Sponge:  hauteur de sponge (km)
+  hsponge= 230
+
+# Sponge:  tetasponge (secondes)
+  tetasponge = 30000
+
+# some definitions for the physics, in file 'callphys.def'
+INCLUDEDEF=callphys.def
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/start.nc
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/start.nc	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/start.nc	(revision 1445)
@@ -0,0 +1,1 @@
+link ./startbase//start257.nc
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startbase
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startbase	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startbase	(revision 1445)
@@ -0,0 +1,1 @@
+link ../data_gcm
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startfi.nc
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startfi.nc	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/startfi.nc	(revision 1445)
@@ -0,0 +1,1 @@
+link ./startbase//startfi257.nc
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/traceur.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/traceur.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/traceur.def	(revision 1445)
@@ -0,0 +1,36 @@
+34
+co2
+co
+o
+o1d
+o2
+o3
+h
+h2
+oh
+ho2
+h2o2
+n2
+ar
+h2o_ice
+h2o_vap
+n
+no
+no2
+n2d
+dust_number
+dust_mass
+ccn_number
+ccn_mass
+co2plus
+oplus
+o2plus
+coplus
+cplus
+nplus
+noplus
+n2plus
+hplus
+hco2plus
+elec
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/z2sig.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/z2sig.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/gcm/z2sig.def	(revision 1445)
@@ -0,0 +1,50 @@
+10.00000     H: atmospheric scale height (km) (used as a reference only)
+0.0020736
+0.015735
+0.0600151
+0.163344
+0.36358
+0.708007
+1.25334
+2.06571
+3.2
+4.7
+6.6
+8.9
+11.6
+14.7
+18.2
+22.1
+26.4
+31.1
+36.2
+41.7
+47.6
+53.9
+60.55
+67.5
+74.5
+81.5
+88.5
+95.5
+102.5
+109.5
+116.5
+123.5
+130.5
+137.5
+144.5
+151.5
+158.5
+165.5
+172.5
+179.5
+186.5
+193.5
+200.5
+207.5
+214.5
+221.5
+228.5
+235.5
+242.5
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/GEOGRID.TBL
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/GEOGRID.TBL	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/GEOGRID.TBL	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled/WPS/geogrid/GEOGRID.TBL
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/geogrid.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/geogrid.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/geogrid.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled//WPS/geogrid.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/namelist.wps
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/namelist.wps	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/geogrid/namelist.wps	(revision 1445)
@@ -0,0 +1,1 @@
+link ../namelist.wps
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/launch	(revision 1445)
@@ -0,0 +1,70 @@
+#! /bin/bash
+
+#PBS -S  /bin/bash
+#PBS -j  oe
+#PBS -q  week
+#PBS -N  run
+#PBS -l  nodes=1:ppn=16
+#PBS -l  mem=64gb
+#PBS -l  vmem=64gb
+#PBS -v  step=1
+
+#### NB: "qsub -v step=XX launch" overrides value above
+
+#### PREAMBLE
+ulimit -s unlimited
+
+#### STEP 1
+if [[ ${step} -le 1 ]] ; then
+  cd $PBS_O_WORKDIR/gcm
+  #
+  year=$(more namelist.input | grep start_year | awk '{print $3}' | sed s+','+''+g)
+  month=$(more namelist.input | grep start_month | awk '{print $3}' | sed s+','+''+g)
+  day=$(more namelist.input | grep start_day | awk '{print $3}' | sed s+','+''+g)
+  hour=$(more namelist.input | grep start_hour | awk '{print $3}' | sed s+','+''+g)
+  wrf_date=${year}'-'${month}'-'${day}'_00:00:00'
+  daygcm=$(more calendar | grep ${wrf_date} | awk '{print $2}')
+  echo ${daygcm} | ./launch_gcm
+  #
+  mpirun gcm.e > log_gcm
+  #
+  cd $PBS_O_WORKDIR/prep
+  echo 1 | create_readmeteo.exe
+  readmeteo.exe < readmeteo.def
+fi
+
+##### STEP 2
+if [[ ${step} -le 2 ]] ; then
+  cd $PBS_O_WORKDIR/geogrid
+  \rm geo_em.*
+  geogrid.exe
+  #
+  cd $PBS_O_WORKDIR/metgrid
+  \rm met_em.*
+  metgrid.exe
+fi
+
+##### STEP 3
+if [[ ${step} -le 3 ]] ; then
+  cd $PBS_O_WORKDIR/
+  \rm wrfi* wrfb*
+  real.exe
+fi
+
+##### STEP 4
+if [[ ${step} -le 4 ]] ; then
+  rm -rf $PBS_O_WORKDIR/$PBS_JOBNAME
+  mkdir $PBS_O_WORKDIR/$PBS_JOBNAME
+  mv rsl.error.0000 $PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.error.0000
+  mv rsl.out.0000 $PBS_O_WORKDIR/$PBS_JOBNAME/real_rsl.out.0000
+  cp -rfL  $PBS_O_WORKDIR/callphys.def    $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/run.def         $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/wrf.exe         $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/namelist.input  $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/namelist.wps    $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/wrfi*           $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cp -rfL  $PBS_O_WORKDIR/wrfb*           $PBS_O_WORKDIR/$PBS_JOBNAME/
+  cd $PBS_O_WORKDIR/$PBS_JOBNAME/
+  ln -sf $PBS_O_WORKDIR/data_physics ./
+  mpirun wrf.exe
+fi
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/METGRID.TBL
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/METGRID.TBL	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/METGRID.TBL	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled/WPS/metgrid/METGRID.TBL
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/metgrid.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/metgrid.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/metgrid.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled/WPS/metgrid.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/namelist.wps
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/namelist.wps	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/metgrid/namelist.wps	(revision 1445)
@@ -0,0 +1,1 @@
+link ../namelist.wps
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.input
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.input	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.input	(revision 1445)
@@ -0,0 +1,64 @@
+ &time_control
+ start_year       = 2024,    !! (p1) Start Martian Year (20XX for MY XX)
+ start_month      = 05,      !! (p1) Start Martian Month
+ start_day        = 01,      !! (p1) Start Martian Day
+ start_hour       = 06,      !! (p1) Start Martian Hour (at longitude 0)
+ end_year         = 2024,    !! (p1) End Martian Year (20XX for MY XX)
+ end_month        = 05,      !! (p1) End Martian Month
+ end_day          = 01,      !! (p1) End Martian Day
+ end_hour         = 12,      !! (p1) End Martian Hour (at longitude 0)
+ history_interval    = 37,   !! Frequency of outputs (37 --> 3700s = 1 Martian hour)  
+ frames_per_outfile  = 24,   !! Size of time dimension in files 
+ restart          = .false.  !! (*) Output restart files ?
+ restart_interval = 8880     !! (*) Frequency of output restart files ?
+ io_form_history  = 2        !! (*) Choice of NETCDF for ouputs
+ io_form_restart  = 2        !! (*) Choice of NETCDF for ouputs     
+ io_form_input    = 2        !! (*) Choice of NETCDF for ouputs
+ io_form_boundary = 2        !! (*) Choice of NETCDF for ouputs
+ debug_level      = 0        !! (*) Verbose level
+ auxinput1_inname = "metgrid/met_em.d<domain>.<date>"
+ /
+
+ &domains
+ time_step   = 20            !! Dynamical timestep  
+ dx = 30000,                 !! (p2) Horizontal resolution
+ dy = 30000,                 !! (p2) Horizontal resolution (should be equal to dx)
+ e_we   = 121,               !! (r)(p2) Number of longitude grid points
+ e_sn   = 121,               !! (r)(p2) Number of latitude grid points
+ e_vert = 61,                !! (r)(p2) Number of vertical levels
+ p_top_requested = 5         !! (p3) Chosen value of pressure at the top of the model
+ !!
+ !! OPTIONAL
+ !!
+ num_metgrid_levels = 36     !! (p1) number of vertical levels in GCM inputs (+1)
+ /
+
+ &physics
+ mars = 12  
+ num_soil_layers = 18 !!! NOUVELLE PHYSIQUE
+ /
+
+ &dynamics
+ !!
+ !! OPTIONAL
+ !!
+ !tiso = 100.       !! -- temperature for isotherm level (mesosphere) in init
+ !diff_6th_opt = 0  !! -- swith off correction filter for WRF integrations. normally works when switched on (default).
+ !khdif = 10.,      !! ** a more straightforward diffusion for tests. horizontal diffusion constant (m^2/s)
+ !kvdif = 10.,      !! ** a more straightforward diffusion for tests. vertical diffusion constant (m^2/s)
+ !km_opt = 1,       !! ** a more straightforward diffusion for tests. eddy coefficient option
+ /
+
+ &bdy_control
+ /
+
+ &grib2
+ /
+
+ &fdda
+ /
+
+ &namelist_quilt              !! (*)
+ nio_tasks_per_group = 0,     !! (*)
+ nio_groups = 1,              !! (*)
+ /                            !! (*)
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.wps
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.wps	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/namelist.wps	(revision 1445)
@@ -0,0 +1,41 @@
+&share				      	
+ wrf_core = 'ARW',                    !!   [do not modify: choice of dynamical core]
+ max_dom = 1 !! (r)(n)(p2) Total number of domains
+ start_date = '2024-05-01_06:00:00' !! YYYY-MM-DD_HH:mm:ss start date
+ end_date   = '2024-05-01_12:00:00' !! YYYY-MM-DD_HH:mm:ss end date
+ interval_seconds = 3700 !! (p2) Frequency of large-scale fields update (s)
+ io_form_geogrid = 2,                 !!   [do not modify: choice of NETCDF outputs]	
+ debug_level = 0,                     !! verbose level of the programs 
+ opt_output_from_geogrid_path='../geogrid/'    !! location of the geogrid outputs
+/
+
+
+&geogrid
+ parent_id = 0, !! (n)(p2) Associated parent domain
+ parent_grid_ratio = 1, !! (n)(p2) Ratio of horizontal resolution parent/nest
+ i_parent_start = 0, !! (n)(p2) x-position of the bottom-left nest corner
+ j_parent_start = 0, !! (n)(p2) y-position of the bottom-left nest corner
+  e_we   = 121,                !! (r)(p2) Number of longitude grid points
+  e_sn   = 121,                !! (r)(p2) Number of latitude grid points
+ dx = 30000
+ dy = 30000
+ geog_data_res     = '64ppd_noHRti',       !! choice of static data sources
+                                            !! NB: possible: '64ppd', '32ppd', ...
+                                            !! NB: please glance at geogrid/GEOGRID.TBL
+ map_proj = 'mercator',           !! map projection: 'mercator', 'lambert' or 'polar'
+ ref_lat   =  10.,            !! north latitude of the center of the domain 
+ ref_lon   =  -125.,            !! east longitude of the center of the domain
+ truelat1  =  10.,            !! (lambert or polar) lat position of projection cone
+ truelat2  =  0.0,                !!   [do not modify]
+ stand_lon =  -125.,            !! (lambert or polar) lon position of projection cone
+ geog_data_path = '../data_static/',   !!   [do not modify: symbolic link in the WPS folder]
+ OPT_GEOGRID_TBL_PATH = '../geogrid/'
+/
+
+&metgrid
+ fg_name = '../prep/WPSFEED/LMD'        !!   [do not modify: symbolic link in the WPS folder]
+ io_form_metgrid = 2,             !!   [do not modify: choice of NETCDF outputs]
+ opt_output_from_metgrid_path='../metgrid/'  !!   [do not modify: symbolic link]
+ OPT_METGRID_TBL_PATH = "../metgrid/"
+/
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/create_readmeteo.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/create_readmeteo.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/create_readmeteo.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled/PREP_MARS/create_readmeteo.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/input_diagfi.nc
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/input_diagfi.nc	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/input_diagfi.nc	(revision 1445)
@@ -0,0 +1,1 @@
+link ../gcm/diagfi.nc
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.def	(revision 1445)
@@ -0,0 +1,145 @@
+24
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+2024
+05
+01
+01
+y
+2024
+05
+01
+02
+y
+2024
+05
+01
+03
+y
+2024
+05
+01
+04
+y
+2024
+05
+01
+05
+y
+2024
+05
+01
+06
+y
+2024
+05
+01
+07
+y
+2024
+05
+01
+08
+y
+2024
+05
+01
+09
+y
+2024
+05
+01
+10
+y
+2024
+05
+01
+11
+y
+2024
+05
+01
+12
+y
+2024
+05
+01
+13
+y
+2024
+05
+01
+14
+y
+2024
+05
+01
+15
+y
+2024
+05
+01
+16
+y
+2024
+05
+01
+17
+y
+2024
+05
+01
+18
+y
+2024
+05
+01
+19
+y
+2024
+05
+01
+20
+y
+2024
+05
+01
+21
+y
+2024
+05
+01
+22
+y
+2024
+05
+01
+23
+y
+2024
+05
+02
+00
+y
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/prep/readmeteo.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link ../code_compiled/PREP_MARS/readmeteo.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/readme
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/readme	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/readme	(revision 1445)
@@ -0,0 +1,24 @@
+svn export http://svn.lmd.jussieu.fr/Planeto/trunk/MESOSCALE/LMD_MM_MARS/SIMU/DEF/MESORUN_newphys_THARSISREF
+
+svn co -N http://svn.lmd.jussieu.fr/Planeto/trunk code
+svn update LMDZ.MARS LMDZ.COMMON MESOSCALE
+ 
+cd code/LMDZ.COMMON
+modify arch with links
+./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d 64x48x35 -arch CICLADifort -parallel mpi -p mars gcm
+
+cd code/MESOSCALE/LMD_MM_MARS
+makemeso -p
+
+link compiled folder
+cd compiled
+../SRC/SCRIPTS/prepare_ini
+
+cd PREP_MARS
+compile_ifort
+
+cd WPS
+configure
+compile
+
+rename 2024 2029 LMD*
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/real.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/real.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/real.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link code_compiled/real_x999_y999_z999_d1_t999_p999.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/run.def
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/run.def	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/run.def	(revision 1445)
@@ -0,0 +1,2 @@
+# some definitions for the physics, in file 'callphys.def'
+INCLUDEDEF=callphys.def
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/wrf.exe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/wrf.exe	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN/wrf.exe	(revision 1445)
@@ -0,0 +1,1 @@
+link code_compiled/wrf_x999_y999_z999_d1_t999_p999.exe
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/meso_install.sh
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/meso_install.sh	(revision 1445)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/meso_install.sh	(revision 1445)
@@ -0,0 +1,76 @@
+#! /bin/bash
+
+################################
+# A. Spiga 09/06/2015
+# Install the LMD mesoscale model
+################################
+## name of the folder
+name="MESORUN"
+## machine on which you will compile
+machine="CICLAD"
+## fortran compiler used
+fortcom="ifort"
+## server for sources
+where_is_svn="http://svn.lmd.jussieu.fr/Planeto/trunk/"
+## grid definition for GCM
+dimgcm="64x48x35"
+################################
+
+## -----------------------------
+## import settings and structure
+## -----------------------------
+svn export $where_is_svn"/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN" $name
+refrepo=$PWD/$name
+
+## -----------
+## import code
+## -----------
+\rm $refrepo/code
+svn co -N $where_is_svn $refrepo/code
+cd $refrepo/code
+svn update LMDZ.MARS
+svn update LMDZ.COMMON
+svn update MESOSCALE
+
+## ------------------
+## import static data
+## ------------------
+cd $refrepo/code/MESOSCALE/WPS_GEOG
+wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/albedo_TES.tar.gz
+tar xzvf albedo_TES.tar.gz
+\rm albedo_TES.tar.gz
+wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/mola_topo64.tar.gz
+tar xzvf mola_topo64.tar.gz
+\rm mola_topo64.tar.gz
+wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/thermal_TES.tar.gz
+tar xzvf thermal_TES.tar.gz
+\rm thermal_TES.tar.gz
+
+## --------
+## make gcm
+## --------
+cd $refrepo/code/LMDZ.COMMON
+./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d $dimgcm -arch $machine"_"$fortcom -parallel mpi -p mars gcm
+cd $refrepo/gcm
+\rm gcm.e
+ln -sf $refrepo/code/LMDZ.COMMON/bin/gcm_$dimgcm_phymars_para.e gcm.e
+
+## --------------
+## make mesoscale
+## --------------
+cd $refrepo/code/MESOSCALE/LMD_MM_MARS
+./makemeso -p
+\rm $refrepo/code_compiled
+ln -sf $refrepo/code/MESOSCALE/LMD_MM_MARS/LATEST $refrepo/code_compiled
+
+## -------------------------------
+## make ini&bdy tools in mesoscale
+## -------------------------------
+cd $refrepo/code_compiled
+ln -sf $refrepo/code/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/prepare_ini .
+./prepare_ini
+cd $refrepo/code_compiled/PREP_MARS
+./compile"_"$fortcom
+cd $refrepo/code_compiled/WPS
+./configure
+./compile
Index: trunk/MESOSCALE/LMD_MM_MARS/makemeso
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/makemeso	(revision 1440)
+++ trunk/MESOSCALE/LMD_MM_MARS/makemeso	(revision 1445)
@@ -870,4 +870,11 @@
   svn info ../../ > ../makemeso_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.svn.info
 
+
+
+  # link latest compiled folder as LATEST
+  cd ../../
+  \rm LATEST
+  ln -sf ${conf_wrf} LATEST
+
   # add here specific messages
   if [[ "${dom}" != "1" ]]
