Index: trunk/mesoscale/LMD_MM_MARS/SRC/WPS/wps_mars/metgrid/METGRID.TBL.ARW_MarsBase_newphys
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WPS/wps_mars/metgrid/METGRID.TBL.ARW_MarsBase_newphys	(revision 31)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WPS/wps_mars/metgrid/METGRID.TBL.ARW_MarsBase_newphys	(revision 31)
@@ -0,0 +1,562 @@
+========================================
+name=ST
+	z_dim_name=num_st_levels
+        derived=yes
+# IF
+        fill_lev = 1 : ST000010(200100)
+        fill_lev = 2 : ST010040(200100)
+        fill_lev = 3 : ST040100(200100)
+        fill_lev = 4 : ST100200(200100)
+# ELSE IF
+        fill_lev = 1 : ST000010(200100)
+        fill_lev = 2 : ST010200(200100)
+# ELSE
+        fill_lev = 1 : ST000007(200100)
+        fill_lev = 2 : ST007028(200100)
+        fill_lev = 3 : ST028100(200100)
+        fill_lev = 4 : ST100255(200100)
+========================================
+name=SM
+        z_dim_name=num_sm_levels
+        derived=yes
+# IF
+        fill_lev = 1 : SM000010(200100)
+        fill_lev = 2 : SM010040(200100)
+        fill_lev = 3 : SM040100(200100)
+        fill_lev = 4 : SM100200(200100)
+# ELSE IF
+        fill_lev = 1 : SM000010(200100)
+        fill_lev = 2 : SM010200(200100)
+# ELSE
+        fill_lev = 1 : SM000007(200100)
+        fill_lev = 2 : SM007028(200100)
+        fill_lev = 3 : SM028100(200100)
+        fill_lev = 4 : SM100255(200100)
+========================================
+name=SW
+        z_dim_name=num_sw_levels
+        derived=yes
+# IF
+        fill_lev = 1 : SW000010(200100)
+        fill_lev = 2 : SW010040(200100)
+        fill_lev = 3 : SW040100(200100)
+        fill_lev = 4 : SW100200(200100)
+# ELSE IF
+        fill_lev = 1 : SW000010(200100)
+        fill_lev = 2 : SW010200(200100)
+========================================
+name=SOILM
+        z_dim_name=num_soilm_levels
+        derived=yes
+        fill_lev = 1 : SOILM000(200100)      
+        fill_lev = 2 : SOILM005(200100)      
+        fill_lev = 3 : SOILM020(200100)      
+        fill_lev = 4 : SOILM040(200100)      
+        fill_lev = 5 : SOILM160(200100)      
+	fill_lev = 6 : SOILM300(200100)      
+========================================
+name=SOILT
+        z_dim_name=num_soilt_levels
+        derived=yes
+        fill_lev = 1 : SOILT000(200100)      
+        fill_lev = 2 : SOILT005(200100)      
+        fill_lev = 3 : SOILT020(200100)      
+        fill_lev = 4 : SOILT040(200100)      
+        fill_lev = 5 : SOILT160(200100)      
+        fill_lev = 6 : SOILT300(200100)      
+========================================
+name=PRES
+        z_dim_name=num_metgrid_levels
+        derived=yes
+        mandatory=yes    # MUST HAVE THIS FIELD
+        fill_lev=all:PRESSURE
+        fill_lev=200100:PSFC(200100)
+        fill_lev=all:vertical_index; level_template=TT
+========================================
+name=LANDSEA 
+        interp_option=nearest_neighbor
+        fill_missing=-1.
+        fill_lev=200100:LANDMASK(1)
+========================================
+name=SEAICE 
+        interp_option=four_pt+average_4pt
+        interp_mask=LANDSEA(1) 
+        masked=land
+        fill_missing=0.
+========================================
+name=H0ML 
+        interp_option=four_pt+average_4pt
+        interp_mask=LANDSEA(1) 
+        masked=land
+        fill_missing=0.
+========================================
+name=SNOW
+        interp_option=four_pt+average_4pt
+        masked=water 
+        fill_missing=0.
+========================================
+name=SKINTEMP
+#        interp_option=sixteen_pt+four_pt+wt_average_4pt+wt_average_16pt+search
+#        interp_option=four_pt
+#        mandatory=yes    # MUST HAVE THIS FIELD
+## commenter les trois prochaines lignes ?
+#        masked=both
+#        interp_land_mask  = LANDSEA(1)
+#        interp_water_mask = LANDSEA(0)
+#        fill_missing=0.
+        mandatory=yes    # MUST HAVE THIS FIELD
+        interp_option=four_pt+average_4pt
+        #careful: inputs from the GCMs are in a "polygonal" world !
+        #        interp_option=sixteen_pt+four_pt+average_4pt
+        interp_option=sixteen_pt+four_pt
+        fill_missing=-1.0e+30
+        missing_value=-9.99e+33
+========================================
+name=PSFC
+#        interp_option=four_pt+average_4pt
+#        interp_option=sixteen_pt+average_16pt
+#careful: inputs from the GCMs are in a "polygonal" world !
+        interp_option=sixteen_pt+four_pt+average_4pt
+        fill_lev=200100:const(200100.)
+        flag_in_output=FLAG_PSFC
+========================================
+name=VEGCAT
+        interp_option=nearest_neighbor
+        fill_missing=0.
+========================================
+name=CANWAT
+        interp_option=four_pt
+        fill_missing=0.
+========================================
+name=SOIL_CAT
+        interp_option=nearest_neighbor
+        fill_missing=0.
+========================================
+name=SW000010
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SW000010
+========================================
+name=SW010040
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SW010040
+========================================
+name=SW040100
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SW040100
+========================================
+name=SW100200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SW100200
+========================================
+name=SW010200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SW010200
+========================================
+name=SM000010
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM000010
+========================================
+name=SM010040
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM010040
+========================================
+name=SM040100
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM040100
+========================================
+name=SM100200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM100200
+========================================
+name=SM010200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM010200
+========================================
+# EMISSIVITY
+name=ST000010
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=sixteen_pt+four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=0.
+        flag_in_output=FLAG_ST000010
+========================================
+# CO2 ICE
+name=ST010040
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+#        interp_option=sixteen_pt+four_pt
+        interp_option=four_pt
+###ATTENTION sixteen_pt donne des valeurs negatives
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=0.
+        flag_in_output=FLAG_ST010040
+========================================
+name=ST040100
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST040100
+========================================
+name=ST100200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST100200
+========================================
+name=ST010200
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+#        masked=water
+#        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST010200
+========================================
+name=SM000007
+#        interp_option=sixteen_pt+four_pt+average_4pt+search
+        interp_option=four_pt
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM000007
+========================================
+name=SM007028
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM007028
+========================================
+name=SM028100
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM028100
+========================================
+name=SM100255
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SM100255
+========================================
+name=ST000007
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST000007
+========================================
+name=ST007028
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST007028
+========================================
+name=ST028100
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST028100
+========================================
+name=ST100255
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_ST100255
+========================================
+name=SOILM000
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM000
+========================================
+name=SOILM005
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM005
+========================================
+name=SOILM020
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM020
+========================================
+name=SOILM040
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM040
+========================================
+name=SOILM160
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM160
+========================================
+name=SOILM300
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=1.
+        flag_in_output=FLAG_SOILM300
+========================================
+name=SOILT000
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT000
+========================================
+name=SOILT005
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT005
+========================================
+name=SOILT020
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT020
+========================================
+name=SOILT040
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT040
+========================================
+name=SOILT160
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT160
+========================================
+name=SOILT300
+        interp_option=sixteen_pt+four_pt+average_4pt+search
+        masked=water
+        interp_mask=LANDSEA(0)
+        fill_missing=285.
+        flag_in_output=FLAG_SOILT300
+========================================
+name=PMSL
+        interp_option=sixteen_pt+four_pt+average_4pt
+========================================
+name=RH
+        interp_option=sixteen_pt+four_pt+average_4pt
+        fill_missing=100.
+        fill_lev=200100:const(0.)        
+========================================
+name=TAVGSFC
+        interp_option=four_pt
+        fill_missing=0.
+        fill_lev=200100:TT(200100)
+        flag_in_output=FLAG_TAVGSFC
+========================================
+name=T ; output_name=TT  # If we get T, use entry from TT and
+                         #   write the field out as TT
+========================================
+#average_4pt, average_16pt, wt_average_4pt, wt_average_16pt, 
+#nearest_neighbor, four_pt, sixteen_pt, search, average_gcell(r)
+#
+#wt_average: bof
+#average_gcell: bof aussi
+name=TT
+        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=four_pt+average_4pt
+#careful: inputs from the GCMs are in a "polygonal" world !
+        interp_option=sixteen_pt+four_pt+average_4pt
+#        interp_option=sixteen_pt+four_pt
+        fill_missing=-1.0e+30
+        missing_value=-9.99e+33
+========================================
+name=U ; output_name=UU  # If we get U, use entry from UU and
+                         #   write the field out as UU
+========================================
+name=UU
+        mandatory=yes    # MUST HAVE THIS FIELD
+        interp_option=sixteen_pt+four_pt+average_4pt
+#        interp_option=sixteen_pt+four_pt
+        is_u_field=yes
+        output_stagger=U
+        fill_missing=-1.0e+30
+	missing_value=-9.99e+33
+========================================
+name=V ; output_name=VV  # If we get V, use entry from VV and
+                         #   write the field out as VV
+========================================
+name=VV
+        mandatory=yes    # MUST HAVE THIS FIELD
+        interp_option=sixteen_pt+four_pt+average_4pt
+#        interp_option=sixteen_pt+four_pt
+        is_v_field=yes
+        output_stagger=V
+        fill_missing=-1.0e+30
+        missing_value=-9.99e+33
+========================================
+name=SST
+        interp_option=sixteen_pt+four_pt
+        fill_missing=0. 
+        flag_in_output=FLAG_SST
+========================================
+name=QV
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+        flag_in_output=FLAG_QV
+========================================
+name=QR
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+        flag_in_output=FLAG_QR
+========================================
+name=QC
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+        flag_in_output=FLAG_QC
+========================================
+name=QI
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+        flag_in_output=FLAG_QI
+========================================
+name=QS
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+========================================
+name=QG
+        interp_option=four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+        flag_in_output=FLAG_QG
+========================================
+name=VPTMP
+        interp_option=sixteen_pt+four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:const(0.)
+========================================
+name=PRESSURE
+        interp_option=sixteen_pt+four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:PSFC(200100)
+========================================
+name=GHT
+        interp_option=sixteen_pt+four_pt+average_4pt
+        fill_missing=0.
+        fill_lev=200100:SOILHGT(200100)
+        fill_lev=200100:HGT_M(1)
+========================================
+name=HGTT
+        output=no
+        interp_option=nearest_neighbor
+========================================
+name=WEASD
+        interp_option=four_pt+average_4pt
+        masked=water 
+        fill_missing=0.
+========================================
+name=SOILHGT
+#        interp_option=four_pt+average_4pt
+#careful: inputs from the GCMs are in a "polygonal" world !
+        interp_option=sixteen_pt+four_pt+average_4pt
+        flag_in_output=FLAG_SOILHGT
+========================================
+name=HV 
+#        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=sixteen_pt+four_pt+average_4pt
+#        interp_option=sixteen_pt+four_pt
+        interp_option=four_pt
+#        fill_lev=200100:const(0.)
+        fill_missing=-1.0e+30
+	missing_value=-9.99e+33
+========================================
+name=HI 
+#        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=sixteen_pt+four_pt+average_4pt
+#        interp_option=sixteen_pt+four_pt
+        interp_option=four_pt        
+#        fill_lev=200100:const(0.)
+        fill_missing=-1.0e+30
+	missing_value=-9.99e+33
+========================================
+name=TSOIL
+#        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=sixteen_pt+four_pt+average_4pt
+         interp_option=sixteen_pt+four_pt
+#        fill_lev=200100:const(0.)
+         fill_missing=-1.0e+30
+         missing_value=-9.99e+33
+========================================
+name=DSOIL
+#        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=sixteen_pt+four_pt+average_4pt
+         interp_option=sixteen_pt+four_pt
+#        fill_lev=200100:const(0.)
+         fill_missing=-1.0e+30
+         missing_value=-9.99e+33
+========================================
+name=ISOIL
+#        mandatory=yes    # MUST HAVE THIS FIELD
+#        interp_option=sixteen_pt+four_pt+average_4pt
+         interp_option=sixteen_pt+four_pt
+#        fill_lev=200100:const(0.)
+         fill_missing=-1.0e+30
+         missing_value=-9.99e+33
+========================================
