Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate2
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate2	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate2	(revision 691)
@@ -6,7 +6,7 @@
 \rm bibio/d2_*
 \rm phymars/d2_*
+\rm phymars/meso_inc/d2_*
 \rm grid/d2_*
 \rm dyn3d/d2_*
-
 
 cd aeronomars
@@ -28,4 +28,10 @@
 cd ..
 
+cd phymars/meso_inc/
+cp ../generate2 .
+find * -exec generate2 {} \;
+\rm *generate2
+cd ../../.
+
 cd grid
 cp ../generate2 .
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate3
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate3	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate3	(revision 691)
@@ -8,4 +8,5 @@
 \rm bibio/d3_*
 \rm phymars/d3_*
+\rm phymars/meso_inc/d3_*
 \rm grid/d3_*
 \rm dyn3d/d3_*
@@ -30,4 +31,11 @@
 cd ..
 
+
+cd phymars/meso_inc/
+cp ../generate3 .
+find * -exec generate3 {} \;
+\rm *generate3
+cd ../../.
+
 cd grid
 cp ../generate3 .
@@ -46,4 +54,5 @@
 \rm bibio/d3_d2*
 \rm phymars/d3_d2*
+\rm phymars/meso_inc/d3_d2*
 \rm grid/d3_d2*
 \rm dyn3d/d3_d2*
@@ -52,4 +61,5 @@
 \rm bibio/d2_d3*
 \rm phymars/d2_d3*
+\rm phymars/meso_inc/d2_d3*
 \rm grid/d2_d3*
 \rm dyn3d/d2_d3*
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate4
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate4	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/duplicate4	(revision 691)
@@ -8,4 +8,5 @@
 \rm bibio/d4_*
 \rm phymars/d4_*
+\rm phymars/meso_inc/d4_*
 \rm grid/d4_*
 \rm dyn3d/d4_*
@@ -30,4 +31,11 @@
 cd ..
 
+
+cd phymars/meso_inc/
+cp ../generate4 .
+find * -exec generate4 {} \;
+\rm *generate4
+cd ../../.
+
 cd grid
 cp ../generate4 .
@@ -46,4 +54,5 @@
 \rm bibio/d4_d3*
 \rm phymars/d4_d3*
+\rm phymars/meso_inc/d4_d3*
 \rm grid/d4_d3*
 \rm dyn3d/d4_d3*
@@ -52,4 +61,5 @@
 \rm bibio/d3_d4*
 \rm phymars/d3_d4*
+\rm phymars/meso_inc/d3_d4*
 \rm grid/d3_d4*
 \rm dyn3d/d3_d4*
@@ -58,4 +68,5 @@
 \rm bibio/d4_d2*
 \rm phymars/d4_d2*
+\rm phymars/meso_inc/d4_d2*
 \rm grid/d4_d2*
 \rm dyn3d/d4_d2*
@@ -64,6 +75,7 @@
 \rm bibio/d2_d4*
 \rm phymars/d2_d4*
+\rm phymars/meso_inc/d2_d4*
 \rm grid/d2_d4*
 \rm dyn3d/d2_d4*
 
-  
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate2
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate2	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate2	(revision 691)
@@ -3,5 +3,18 @@
 # change number sed -e s/d2/d3/g generate2 > generate3
 
-sed -e s/'[cC][aA][lL][lL] '/'call d2_'/g ${1} | sed -e s/'call d2_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d2_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d2_'/'firstcall '/g | sed -e s/'lastcall d2_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d2_'/g | sed -e s/'callphys.def'/'callphysd2_.def '/g | sed -e s/'diagfi.nc'/'diagfid2_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d2_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd2_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d2_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d2_"+g | sed -e s+"d2_netcdf.inc"+"netcdf.inc"+g > d2_${1} 
+sed -e s/'[cC][aA][lL][lL] '/'call d2_'/g ${1} | sed -e s/'call d2_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d2_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d2_'/'firstcall '/g | sed -e s/'lastcall d2_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d2_'/g | sed -e s/'callphys.def'/'callphysd2_.def '/g | sed -e s/'diagfi.nc'/'diagfid2_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d2_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd2_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d2_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d2_"+g | sed -e s+"d2_netcdf.inc"+"netcdf.inc"+g > d2_${1}_temp
 
+# Specifcic cases for newphys compilation:
 
+sed -e s/'meso_inc_'/'d2_meso_inc_'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/'d2_meso_inc/'/'meso_inc/'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/'PUBLIC :: getin, getin_dump'/'PUBLIC :: d2_getin, d2_getin_dump'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/' getinrs, getinr1d, getinr2d,'/' d2_getinrs, d2_getinr1d, d2_getinr2d,'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/' getinis, getini1d, getini2d,'/' d2_getinis, d2_getini1d, d2_getini2d,'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/' getincs, getinc1d, getinc2d,'/' d2_getincs, d2_getinc1d, d2_getinc2d,'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/' getinls, getinl1d, getinl2d,'/' d2_getinls, d2_getinl1d, d2_getinl2d,'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+sed -e s/'PUBLIC :: ipslnlf, ipslerr, ipslerr_act, ipslerr_inq, histerr, ipsldbg'/'PUBLIC :: d2_ipslnlf, d2_ipslerr, d2_ipslerr_act, d2_ipslerr_inq, d2_histerr, d2_ipsldbg'/g d2_${1}_temp > d2_${1}_temp2 ; \mv d2_${1}_temp2 d2_${1}_temp
+
+# Cleanup
+
+\mv d2_${1}_temp d2_${1}
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate3
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate3	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate3	(revision 691)
@@ -3,5 +3,18 @@
 # change number sed -e s/d3/d3/g generate_d3 > generated3
 
-sed -e s/'[cC][aA][lL][lL] '/'call d3_'/g ${1} | sed -e s/'call d3_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d3_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d3_'/'firstcall '/g | sed -e s/'lastcall d3_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d3_'/g | sed -e s/'callphys.def'/'callphysd3_.def '/g | sed -e s/'diagfi.nc'/'diagfid3_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d3_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd3_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d3_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d3_"+g | sed -e s+"d3_netcdf.inc"+"netcdf.inc"+g > d3_${1} 
+sed -e s/'[cC][aA][lL][lL] '/'call d3_'/g ${1} | sed -e s/'call d3_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d3_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d3_'/'firstcall '/g | sed -e s/'lastcall d3_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d3_'/g | sed -e s/'callphys.def'/'callphysd3_.def '/g | sed -e s/'diagfi.nc'/'diagfid3_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d3_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd3_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d3_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d3_"+g | sed -e s+"d3_netcdf.inc"+"netcdf.inc"+g > d3_${1}_temp
 
+# Specifcic cases for newphys compilation:
 
+sed -e s/'meso_inc_'/'d3_meso_inc_'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/'d3_meso_inc/'/'meso_inc/'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/'PUBLIC :: getin, getin_dump'/'PUBLIC :: d3_getin, d3_getin_dump'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/' getinrs, getinr1d, getinr2d,'/' d3_getinrs, d3_getinr1d, d3_getinr2d,'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/' getinis, getini1d, getini2d,'/' d3_getinis, d3_getini1d, d3_getini2d,'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/' getincs, getinc1d, getinc2d,'/' d3_getincs, d3_getinc1d, d3_getinc2d,'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/' getinls, getinl1d, getinl2d,'/' d3_getinls, d3_getinl1d, d3_getinl2d,'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+sed -e s/'PUBLIC :: ipslnlf, ipslerr, ipslerr_act, ipslerr_inq, histerr, ipsldbg'/'PUBLIC :: d3_ipslnlf, d3_ipslerr, d3_ipslerr_act, d3_ipslerr_inq, d3_histerr, d3_ipsldbg'/g d3_${1}_temp > d3_${1}_temp2 ; \mv d3_${1}_temp2 d3_${1}_temp
+
+# Cleanup
+
+\mv d3_${1}_temp d3_${1} 
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate4
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate4	(revision 690)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/libf/generate4	(revision 691)
@@ -3,5 +3,18 @@
 # change number sed -e s/d4/d4/g generate_d4 > generated4
 
-sed -e s/'[cC][aA][lL][lL] '/'call d4_'/g ${1} | sed -e s/'call d4_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d4_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d4_'/'firstcall '/g | sed -e s/'lastcall d4_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d4_'/g | sed -e s/'callphys.def'/'callphysd4_.def '/g | sed -e s/'diagfi.nc'/'diagfid4_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d4_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd4_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d4_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d4_"+g | sed -e s+"d4_netcdf.inc"+"netcdf.inc"+g > d4_${1} 
+sed -e s/'[cC][aA][lL][lL] '/'call d4_'/g ${1} | sed -e s/'call d4_[aA][bB][oO][rR][tT]'/'call ABORT'/g | sed -e s/'call d4_[eE][xX][iI][tT]'/'call EXIT'/g | sed -e s/'firstcall d4_'/'firstcall '/g | sed -e s/'lastcall d4_'/'lastcall '/g | sed -e s/'[sS][uU][bB][rR][oO][uU][tT][iI][nN][eE] '/'subroutine d4_'/g | sed -e s/'callphys.def'/'callphysd4_.def '/g | sed -e s/'diagfi.nc'/'diagfid4_.nc'/g | sed -e s/'[iI][nN][cC][lL][uU][dD][eE] "'/'include "d4_'/g | sed -e s/"[iI][nN][cC][lL][uU][dD][eE] '"/"include 'd4_"/g | sed -e s+"[cC][oO][mM][mM][oO][nN]/"+"common/d4_"+g | sed -e s+"[cC][oO][mM][mM][oO][nN] /"+"common /d4_"+g | sed -e s+"d4_netcdf.inc"+"netcdf.inc"+g > d4_${1}_temp
 
+# Specifcic cases for newphys compilation:
 
+sed -e s/'meso_inc_'/'d4_meso_inc_'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/'d4_meso_inc/'/'meso_inc/'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/'PUBLIC :: getin, getin_dump'/'PUBLIC :: d4_getin, d4_getin_dump'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/' getinrs, getinr1d, getinr2d,'/' d4_getinrs, d4_getinr1d, d4_getinr2d,'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/' getinis, getini1d, getini2d,'/' d4_getinis, d4_getini1d, d4_getini2d,'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/' getincs, getinc1d, getinc2d,'/' d4_getincs, d4_getinc1d, d4_getinc2d,'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/' getinls, getinl1d, getinl2d,'/' d4_getinls, d4_getinl1d, d4_getinl2d,'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+sed -e s/'PUBLIC :: ipslnlf, ipslerr, ipslerr_act, ipslerr_inq, histerr, ipsldbg'/'PUBLIC :: d4_ipslnlf, d4_ipslerr, d4_ipslerr_act, d4_ipslerr_inq, d4_histerr, d4_ipsldbg'/g d4_${1}_temp > d4_${1}_temp2 ; \mv d4_${1}_temp2 d4_${1}_temp
+
+# Cleanup
+
+\mv d4_${1}_temp d4_${1} 
