Index: TOOLS/MOSAIX/CreateWeightsMask.bash
===================================================================
--- TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 4051)
+++ TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 4081)
@@ -53,9 +53,9 @@
 # ==============
 #OCE=ORCA2.3
-#OCE=eORCA1.2
-OCE=ORCA025
-
-ATM=ICO30
-#ATM=ICO40
+OCE=eORCA1.2
+#OCE=ORCA025
+
+#ATM=ICO30
+ATM=ICO40
 #ATM=ICO450
 #ATM=LMD9695
@@ -66,6 +66,6 @@
 # ===========================
 ListOCEGRID="T U V"
-ListOrder="1st" # 2nd"
-ListNormalize="false" # true"
+ListOrder="1st 2nd"
+ListNormalize="false true"
 
 ## ===========================================================================
@@ -217,5 +217,4 @@
 
 time /usr/bin/time ${MPIRUN} ./interpol.exe --mask_src=yes --mask_dst=no
-
 ##
 ## Correct spurious values (extremes)
@@ -237,6 +236,4 @@
 cp dia_t${oce}_to_t${atm}_1storder_false.nc  dia_t${oce}_to_t${atm}_1storder_false_mask.nc
 ncks --alphabetize --history --overwrite --variable OceFrac dia_t${oce}_to_t${atm}_1storder_false_mask.nc  ${ATM}_grid_maskFrom_${OCE}.nc
-ncks --alphabetize --history --append    --variable aire    atm_grid.nc                                    ${ATM}_grid_maskFrom_${OCE}.nc
-[[ ${atm} = *ico* ]] && ncks --alphabetize --history --append --variable bounds_lon,bounds_lat atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc
 
 cat <<EOF > creation_masque.nco
@@ -244,9 +241,37 @@
 where (OceFrac <= 0.0 )  OceFrac=0 ;
 EOF
+
 ncap2 --history --overwrite --script-file creation_masque.nco dia_t${oce}_to_t${atm}_1storder_false_mask.nc tmp_dia_t${oce}_to_t${atm}_1storder_false_mask.nc ; mv tmp_dia_t${oce}_to_t${atm}_1storder_false_mask.nc dia_t${oce}_to_t${atm}_1storder_false_mask.nc
 ncrename --history --variable OceFrac,OceMask dia_t${oce}_to_t${atm}_1storder_false_mask.nc
 
-ncks --alphabetize --history --append --variable OceMask dia_t${oce}_to_t${atm}_1storder_false_mask.nc   ${ATM}_grid_maskFrom_${OCE}.nc
+ncks --overwrite --history --variable OceMask dia_t${oce}_to_t${atm}_1storder_false_mask.nc tmp_OceMask.nc
+ncks --history --append tmp_OceMask.nc ${ATM}_grid_maskFrom_${OCE}.nc
 rm dia_t${oce}_to_t${atm}_1storder_false_mask.nc
+
+# Change dimension names, and some attributes accordingly
+if [[ $(ncdump -h ${ATM}_grid_maskFrom_${OCE}.nc | grep domain_dst | wc -l) -gt 0 ]] ; then
+    case ${atm} in
+	( *ico* ) 
+	ncrename --history --dimension cell_domain_dst,cell       ${ATM}_grid_maskFrom_${OCE}.nc
+	;;
+	( *lmd* ) 
+	ncrename --history --dimension x_domain_dst,x             ${ATM}_grid_maskFrom_${OCE}.nc
+	ncrename --history --dimension y_domain_dst,y             ${ATM}_grid_maskFrom_${OCE}.nc
+	;;
+    esac
+    ncrename --history --dimension nvertex_domain_dst,nvertex        ${ATM}_grid_maskFrom_${OCE}.nc
+    ncrename --history --variable lat_domain_dst,lat                 ${ATM}_grid_maskFrom_${OCE}.nc
+    ncrename --history --variable lon_domain_dst,lon                 ${ATM}_grid_maskFrom_${OCE}.nc
+    ncrename --history --variable bounds_lat_domain_dst,bounds_lat   ${ATM}_grid_maskFrom_${OCE}.nc
+    ncrename --history --variable bounds_lon_domain_dst,bounds_lon   ${ATM}_grid_maskFrom_${OCE}.nc
+    ncatted  --history --attribute bounds,lat,m,c,"bounds_lat"       ${ATM}_grid_maskFrom_${OCE}.nc
+    ncatted  --history --attribute bounds,lon,m,c,"bounds_lon"       ${ATM}_grid_maskFrom_${OCE}.nc
+    ncatted  --history --attribute coordinates,OceFrac,m,c,"lat lon" ${ATM}_grid_maskFrom_${OCE}.nc
+    ncatted  --history --attribute coordinates,OceMask,m,c,"lat lon" ${ATM}_grid_maskFrom_${OCE}.nc
+fi
+
+ncks --history --alphabetize  --append    --variable aire    atm_grid.nc                                   ${ATM}_grid_maskFrom_${OCE}.nc
+[[ ${atm} = *ico* ]] && ncks --alphabetize --history --append --variable bounds_lon,bounds_lat atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc
+
 
 ##
@@ -347,7 +372,11 @@
 EOF
 ncap2 --history --overwrite --script-file coastal.nco ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_coastal_maskFrom_${OCE}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n07.nc
 ncks --history --append --variable AtmCoastal ${ATM}_coastal_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n08.nc
 rm ${ATM}_coastal_maskFrom_${OCE}.nc
 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n09.nc
+
 ##
 ## ATM towards NEMO points - runoff
@@ -396,8 +425,7 @@
 #ncatted --history -a coordinates,aire,m,c,"lat lon" ${ATM}_grid_maskFrom_${OCE}.nc
 ncap2 --overwrite --history --script 'defdim("time_counter",1) ;' ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
-ncdump -h ${ATM}_grid_maskFrom_${OCE}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n10.nc
 
 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
-ncdump -h ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
 
 if [[ ${atm} = ico ]] ; then
@@ -408,10 +436,12 @@
 EOF
     ncap2 --overwrite --history --script-file add_time.nco ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
+    cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n11.nc
     ncatted --history \
-	    -a coordinates,OceFrac,c,c,"time_counter cell"    \
-            -a coordinates,OceMask,c,c,"time_counter cell"    \
-            -a coordinates,AtmCoastal,c,c,"time_counter cell" \
-	    -a coordinates,aire,c,c,"cell" \
+	    -a coordinates,OceFrac,m,c,"time_counter lat lon"    \
+            -a coordinates,OceMask,m,c,"time_counter lat lon"    \
+            -a coordinates,AtmCoastal,m,c,"time_counter lat lon" \
+	    -a coordinates,aire,c,c,"lat lon" \
             ${ATM}_grid_maskFrom_${OCE}.nc
+    cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n12.nc
 fi
 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
@@ -426,4 +456,5 @@
     ncdump -h tmp_${ATM}_grid_maskFrom_${OCE}.nc
     mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
+    cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n13.nc
     
     ncatted --history \
@@ -433,7 +464,10 @@
             -a coordinates,aire,m,c,"lat lon" \
             ${ATM}_grid_maskFrom_${OCE}.nc
+    cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n14.nc
 fi
 ncks --alphabetize --history --overwrite --mk_rec time_counter   ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n15.nc
 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n16.nc
 
 ##
@@ -480,6 +514,5 @@
 	    ${InFile}
 done
-
-
+cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_n20.nc
 ##
 ## Update and complete weights file to fit OASIS requested format
Index: TOOLS/MOSAIX/iodef_atm_to_oce.xml
===================================================================
--- TOOLS/MOSAIX/iodef_atm_to_oce.xml	(revision 4051)
+++ TOOLS/MOSAIX/iodef_atm_to_oce.xml	(revision 4081)
@@ -82,4 +82,11 @@
 	<variable name="SVN_Id"        type="string">$Id$</variable>
 	<variable name="SVN_HeadURL"   type="string">$HeadURL$</variable>
+
+	<field field_ref="field01_src" operation="once" prec="8" />
+	<field field_ref="field02_src" operation="once" prec="8" />
+	<field field_ref="field03_src" operation="once" prec="8" />
+	<field field_ref="field04_src" operation="once" prec="8" />
+	<field field_ref="field05_src" operation="once" prec="8" />
+	<field field_ref="field06_src" operation="once" prec="8" />
 	
 	<field name="field01_dst" field_ref="field01_src" domain_ref="domain_dst" operation="once" prec="8" />
Index: TOOLS/MOSAIX/iodef_oce_to_atm.xml
===================================================================
--- TOOLS/MOSAIX/iodef_oce_to_atm.xml	(revision 4051)
+++ TOOLS/MOSAIX/iodef_oce_to_atm.xml	(revision 4081)
@@ -82,4 +82,12 @@
 	<variable name="SVN_Id"        type="string">$Id$</variable>
 	<variable name="SVN_HeadURL"   type="string">$HeadURL$</variable>
+
+	<field field_ref="mask_src"     operation="once" prec="8" />
+	<field field_ref="field01_src"  operation="once" prec="8" />
+	<field field_ref="field02_src"  operation="once" prec="8" />
+	<field field_ref="field03_src"  operation="once" prec="8" />
+	<field field_ref="field04_src"  operation="once" prec="8" />
+	<field field_ref="field05_src"  operation="once" prec="8" />
+	<field field_ref="field06_src"  operation="once" prec="8" />
 	
 	<field name="OceFrac"     field_ref="mask_src"    domain_ref="domain_dst" operation="once" prec="8" />
