Index: TOOLS/MOSAIX/check_conserv.py
===================================================================
--- TOOLS/MOSAIX/check_conserv.py	(revision 4088)
+++ TOOLS/MOSAIX/check_conserv.py	(revision 4089)
@@ -33,14 +33,14 @@
 
 # Adding arguments
-parser.add_argument ( '--file'     , help='Input file, e.g. dia_tICO40_to_teORCA1.2_1storder_false.nc', type=str, default='dia_tico_to_torc_1storder_false.nc' )
-parser.add_argument ( '--grids'    , help='grids file  ', type=str, default='grids.nc' )
-parser.add_argument ( '--areas'    , help='areas file  ', type=str, default='areas.nc' )
-parser.add_argument ( '--masks'    , help='masks file  ', type=str, default='masks.nc' )
-parser.add_argument ( '--fracs'    , help='fracs file  ', type=str, default=None )
-parser.add_argument ( '--guess'    , help='If set, build grids, areas and masks file name from the dia file name', action="store_true", default=False )
-parser.add_argument ( '--src_int'  , help='Source field is integrated'     , action="store_true" )
-parser.add_argument ( '--dst_int'  , help='Destination field is integrated', action="store_true" )
-parser.add_argument ( '--src_nofrac' , help='Do not apply frac on source'     , action="store_true" )
-parser.add_argument ( '--dst_nofrac' , help='Do not apply frac on destination', action="store_true" )
+parser.add_argument ( '--file'      , help='Input file, e.g. dia_tICO40_to_teORCA1.2_1storder_false.nc', type=str, default='dia_tico_to_torc_1storder_false.nc' )
+parser.add_argument ( '--grids'     , help='grids file', type=str, default='grids.nc' )
+parser.add_argument ( '--areas'     , help='areas file', type=str, default='areas.nc' )
+parser.add_argument ( '--masks'     , help='masks file', type=str, default='masks.nc' )
+parser.add_argument ( '--fracs'     , help='fracs file', type=str, default=None )
+parser.add_argument ( '--guess'     , help='If set, build grids, areas and masks file name from the dia file name', action="store_true", default=False )
+parser.add_argument ( '--src_int'   , help='Source field is integrated'      , action="store_true" )
+parser.add_argument ( '--dst_int'   , help='Destination field is integrated' , action="store_true" )
+parser.add_argument ( '--src_nofrac', help='Do not apply frac on source'     , action="store_true" )
+parser.add_argument ( '--dst_nofrac', help='Do not apply frac on destination', action="store_true" )
 
 # Parse command line
@@ -113,14 +113,14 @@
 
 #
-msk_src = np.float64(1.0) - f_masks ( grid_src + name_src + '.msk' )
-lon_src = f_grids ( grid_src + name_src + '.lon' )
-lat_src = f_grids ( grid_src + name_src + '.lat' )
-if myargs.dst_int : srf_src = np.ones ( (msk_src.shape), dtype=np.float64 )
-else              : srf_src = f_areas ( grid_src + name_src + '.srf' )
+msk_src = np.float64(1.0) - f_masks ( grid_src + name_src + '.msk', squeeze=True )
+lon_src = f_grids ( grid_src + name_src + '.lon', squeeze=True )
+lat_src = f_grids ( grid_src + name_src + '.lat', squeeze=True )
+if myargs.src_int : srf_src = np.ones ( (msk_src.shape), dtype=np.float64 )
+else              : srf_src = f_areas ( grid_src + name_src + '.srf', squeeze=True )
 
 #
-msk_dst = np.float64(1.0) - f_masks ( grid_dst + name_dst + '.msk' )
-lon_dst = f_grids ( grid_dst + name_dst + '.lon' )
-lat_dst = f_grids ( grid_dst + name_dst + '.lat' )
+msk_dst = np.float64(1.0) - f_masks ( grid_dst + name_dst + '.msk', squeeze=True )
+lon_dst = f_grids ( grid_dst + name_dst + '.lon', squeeze=True )
+lat_dst = f_grids ( grid_dst + name_dst + '.lat', squeeze=True )
 if myargs.dst_int : srf_dst = np.ones ( (msk_dst.shape), dtype=np.float64)
 else              : srf_dst = f_areas ( grid_dst + name_dst + '.srf' )
@@ -129,14 +129,13 @@
 if name_src in ( 'ico', 'lmd' ) :
     if myargs.src_nofrac : frc_src = np.ones ( (msk_src.shape), dtype=np.float64)
-    else                 : frc_src = f_frac ( 'OceFrac' )
+    else                 : frc_src = f_frac ( 'OceFrac', squeeze=True )
 if name_src == 'orc'     : frc_src = np.ones ( (msk_src.shape), dtype=np.float64)
 if name_dst in ( 'ico', 'lmd' ) :
     if myargs.dst_nofrac : frc_dst = np.ones ( (msk_dst.shape), dtype=np.float64)
-    else                 : frc_dst = f_frac ( 'OceFrac' )
+    else                 : frc_dst = f_frac ( 'OceFrac', squeeze=True )
 if name_dst == 'orc'     : frc_dst = np.ones ( (msk_dst.shape), dtype=np.float64)
 
 # Periodicity
-nperio_src = 0
-nperio_dst = 0
+nperio_src = 0 ; nperio_dst = 0
 
 if Name_src == 'ORCA2.3'  : nperio_src = 4
@@ -151,12 +150,8 @@
 if Name_src in ('ORCA2.3', 'eORCA1.2', 'eORCA025') : msk_src = nemo.lbc_mask ( msk_src, nperio=nperio_src, cd_type=Grid_src )
 if Name_dst in ('ORCA2.3', 'eORCA1.2', 'eORCA025') : msk_dst = nemo.lbc_mask ( msk_dst, nperio=nperio_dst, cd_type=Grid_dst )
-  
-#frc_atm = f_frac ('OceFrac')[0,:] * msk_atm
-#frc_oce = np.float64(msk_oce)
-#srf_atm = f_areas ('tico.srf') * frc_atm
-#srf_oce = f_areas ('torc.srf') * frc_oce
-
-area_src = np.sum (srf_src * msk_src * frc_src)
-area_dst = np.sum (srf_dst * msk_dst * frc_dst)
+    
+# Surfaces
+area_src = np.sum ( srf_src * msk_src * frc_src )
+area_dst = np.sum ( srf_dst * msk_dst * frc_dst )
 
 print ( Name_src )
