Index: TOOLS/MOSAIX/CalvingWeights.py
===================================================================
--- TOOLS/MOSAIX/CalvingWeights.py	(revision 6066)
+++ TOOLS/MOSAIX/CalvingWeights.py	(revision 6090)
@@ -413,8 +413,9 @@
 if myargs.type in ['iceberg', 'iceshelf' ]: f_calving.attrs['originalFiles'] = myargs.repartition_file
 f_calving.attrs['associatedFiles'] = grids + " " + areas + " " + masks
-f_calving.attrs['directory']       = os.getcwd ()
+
 f_calving.attrs['description']     = "Generated with XIOS http://forge.ipsl.jussieu.fr/ioserver and MOSAIX https://forge.ipsl.jussieu.fr/igcmg/browser/TOOLS/MOSAIX"
 f_calving.attrs['title']           = calving
-f_calving.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + str(sys.argv[1:])
+f_calving.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:]) 
+
 f_calving.attrs['repartitionType'] = myargs.type
 if myargs.type in [ 'iceberg', 'iceshelf' ] :
@@ -425,10 +426,18 @@
 f_calving.attrs['masksFile']       = masks
 f_calving.attrs['timeStamp']       = time.asctime()
-f_calving.attrs['HOSTNAME']        = platform.node()
-f_calving.attrs['LOGNAME']         = os.getlogin()
-f_calving.attrs['Python']          = "Python version " +  platform.python_version()
-f_calving.attrs['OS']              = platform.system()
-f_calving.attrs['release']         = platform.release()
-f_calving.attrs['hardware']        = platform.machine()
+try    : f_calving.attrs['directory'] = os.getcwd ()
+except : pass
+try    : f_runoff.attrs['HOSTNAME'] = platform.node ()
+except : pass
+try    : f_runoff.attrs['LOGNAME']  = os.getlogin ()
+except : pass
+try    : f_runoff.attrs['Python']   = "Python version " +  platform.python_version ()
+except : pass
+try    : f_runoff.attrs['OS']       = platform.system ()
+except : pass
+try    : f_runoff.attrs['release']  = platform.release ()
+except : pass
+try    : f_runoff.attrs['hardware'] = platform.machine ()
+except : pass
 f_calving.attrs['conventions']     = "SCRIP"
 if src_name == 'lmd' : f_calving.attrs['source_grid'] = "curvilinear"
Index: TOOLS/MOSAIX/CreateWeightsMask.bash
===================================================================
--- TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 6066)
+++ TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 6090)
@@ -68,7 +68,7 @@
 echo ${Titre}"Defines model"${Norm}
 # =================================
-#CplModel=ORCA2.3xLMD9695
+CplModel=ORCA2.3xLMD9695
 #CplModel=ORCA2.3xICO30
-CplModel=ORCA2.3xICO40
+#CplModel=ORCA2.3xICO40
 #CplModel=eORCA1.2xLMD144142
 #CplModel=eORCA1.2xLMD256256
@@ -340,22 +340,22 @@
 cp iodef_oce_to_atm.xml   iodef.xml
 
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="mask_src"]'   -k name  -v maskutil_T
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="area_src"]'   -k name  -v area_grid_T
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_src"]'                   -k type  -v ${srcDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_dst"]'                   -k type  -v ${dstDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k order -v 1
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k quantity    -v false
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k renormalize -v false
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k use_area -v false
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="mask_source"]' -k name  -v maskutil_T
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="area_source"]' -k name  -v area_grid_T
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]'                               -k name  -v dia_${OutFileName}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="title"]'       -t "${SRC} mask interpolated to ${DST}"
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="source_grid"]' -t ${srcDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]'   -t ${dstDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="order"]'       -t 1
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_src"]'                    -k type  -v ${srcDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]'                    -k type  -v ${dstDomainType}
-python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k weight_filename -v rmp_${OutFileName}.nc
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="mask_src"]'     -k name  -v maskutil_T
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="area_src"]'     -k name  -v area_grid_T
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_src"]'                     -k type  -v ${srcDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_dst"]'                     -k type  -v ${dstDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k order -v 1
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k quantity    -v false
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k renormalize -v false
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k use_area -v false
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="mask_source"]'   -k name  -v maskutil_T
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="area_source"]'   -k name  -v area_grid_T
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]'                                 -k name  -v dia_${OutFileName}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="title"]'         -t "${SRC} mask interpolated to ${DST}"
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="source_grid"]'   -t ${srcDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]'     -t ${dstDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="order"]'         -t 1
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_src"]'                      -k type  -v ${srcDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]'                      -k type  -v ${dstDomainType}
+python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k weight_filename -v rmp_${OutFileName}.nc
 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k order -v 1
 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="normalization"]' -t false
@@ -832,5 +832,5 @@
 		 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \
 	         --o2a=${ATM}_grid_maskFrom_${OCE}.nc
-	${PyRun} python3 -u CalvingWeights.py --output=rmp_t${atm}_to_t${oce}_calving_iceshelf.nc --fmt=${FMT_XIOS }\
+	${PyRun} python3 -u CalvingWeights.py --output=rmp_t${atm}_to_t${oce}_calving_iceshelf.nc --fmt=${FMT_XIOS} \
 		 --oce=${OCE} --atm=${ATM} --type=iceshelf --repartition_file=runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc --repartition_var=sornfisf \
 		 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \
Index: TOOLS/MOSAIX/RunoffWeights.py
===================================================================
--- TOOLS/MOSAIX/RunoffWeights.py	(revision 6066)
+++ TOOLS/MOSAIX/RunoffWeights.py	(revision 6090)
@@ -369,4 +369,5 @@
 
 f_runoff = xr.Dataset ( {
+    'remap_matrix'            : remap_matrix,
 	'src_address'         : src_address,
 	'dst_address'         : dst_address,
@@ -409,10 +410,7 @@
 f_runoff.attrs['Atmosphere']      = atm_Name + " http://lmdz.lmd.jussieu.fr"
 f_runoff.attrs['associatedFiles'] = grids + " " + areas + " " + masks
-f_runoff.attrs['directory']       = os.getcwd ()
 f_runoff.attrs['description']     = "Generated with RunoffWeights.py"
 f_runoff.attrs['title']           = runoff
-args = ''
-for i in np.arange(1,len(sys.argv[1:])) : args += sys.argv[i] + ' '
-f_runoff.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + args
+f_runoff.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:]) 
 f_runoff.attrs['atmCoastWidth']   = "{:d} grid points".format(atmCoastWidth)
 f_runoff.attrs['oceCoastWidth']   = "{:d} grid points".format(oceCoastWidth)
@@ -424,11 +422,19 @@
 f_runoff.attrs['masksFile']       = masks
 f_runoff.attrs['o2aFile']         = o2a
-f_runoff.attrs['timeStamp']       = time.asctime()
-f_runoff.attrs['HOSTNAME']        = platform.node()
-f_runoff.attrs['LOGNAME']         = os.getlogin()
-f_runoff.attrs['Python']          = "Python version " +  platform.python_version()
-f_runoff.attrs['OS']              = platform.system()
-f_runoff.attrs['release']         = platform.release()
-f_runoff.attrs['hardware']        = platform.machine()
+f_runoff.attrs['timeStamp']       = time.asctime ()
+try    : f_calving.attrs['directory'] = os.getcwd ()
+except : pass
+try    : f_runoff.attrs['HOSTNAME'] = platform.node ()
+except : pass
+try    : f_runoff.attrs['LOGNAME']  = os.getlogin ()
+except : pass
+try    : f_runoff.attrs['Python']   = "Python version " +  platform.python_version ()
+except : pass
+try    : f_runoff.attrs['OS']       = platform.system ()
+except : pass
+try    : f_runoff.attrs['release']  = platform.release ()
+except : pass
+try    : f_runoff.attrs['hardware'] = platform.machine ()
+except : pass
 f_runoff.attrs['conventions']     = "SCRIP"
 f_runoff.attrs['source_grid']     = "curvilinear"
