Index: TOOLS/MOSAIX/CreateWeightsMask.bash
===================================================================
--- TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 3966)
+++ TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 4037)
@@ -4,5 +4,5 @@
 #MSUB -e Out_WeightsMask    # Error output
 #MSUB -eo
-#MSUB -n 4                  # Number of processors
+#MSUB -n 8                  # Number of processors
 #MSUB -T 1800               # Time limit (seconds)
 #MSUB -q skylake
@@ -52,12 +52,12 @@
 # Defines models
 # ==============
-OCE=ORCA2.3
+#OCE=ORCA2.3
 #OCE=eORCA1.2
-#OCE=ORCA025
-
-#ATM=ICO30
+OCE=ORCA025
+
+ATM=ICO30
 #ATM=ICO40
 #ATM=ICO450
-ATM=LMD9695
+#ATM=LMD9695
 #ATM=LMD144X142
 
@@ -67,5 +67,5 @@
 ListOCEGRID="T U V"
 ListOrder="1st" # 2nd"
-ListNormalize="false true"
+ListNormalize="false" # true"
 
 ## ===========================================================================
@@ -143,4 +143,5 @@
     ( ORCA2.3*         ) OcePerio=4 ;;
     ( ORCA1* | eORCA1* ) OcePerio=6 ;;
+    ( ORCA025*         ) OcePerio=6 ;;
 esac
 #
@@ -164,25 +165,26 @@
 # --------------------------------------------------------------------------------------------------------
 cat <<EOF >add_c_grid.nco
-nav_lon_grid_C    = nav_lon_grid_T    ;
-nav_lat_grid_C    = nav_lat_grid_T    ;
-bounds_lon_grid_C = bounds_lon_grid_T ;
-bounds_lat_grid_C = bounds_lat_grid_T ;
-mask_C            = maskutil_T        ; 
-area_grid_C       = area_grid_T       ;
+defdim("x_grid_C", \$x_grid_T.size) ;
+defdim("y_grid_C", \$y_grid_T.size) ;
+defdim("nvertex_grid_C",  4)         ;
+nav_lon_grid_C[y_grid_C,x_grid_C]    = nav_lon_grid_T(:,:)    ;
+nav_lat_grid_C[y_grid_C,x_grid_C]    = nav_lat_grid_T(:,:)    ;
+bounds_lon_grid_C[y_grid_C,x_grid_C,nvertex_grid_C] = bounds_lon_grid_T(:,:,:) ;
+bounds_lat_grid_C[y_grid_C,x_grid_C,nvertex_grid_C] = bounds_lat_grid_T(:,:,:) ;
+mask_C[y_grid_C,x_grid_C]            = maskutil_T(:,:)        ; 
+area_grid_C[y_grid_C,x_grid_C]       = area_grid_T(:,:)       ;
 EOF
 
 ncap2 --overwrite --history --script-file add_c_grid.nco ${OCE}_coordinates_mask.nc tmp_${OCE}_coordinates_mask.nc
-ncks --overwrite --variable nav_lon_grid_C,nav_lat_grid_C       tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc
-ncks --append    --variable bounds_lon_grid_C,bounds_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc
-#ncks --append    --variable mask_C                  tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 
-ncks --append    --variable area_grid_C             tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 
-
-ncrename --dimension x_grid_T,x_grid_C                C_${OCE}_coordinates_mask.nc
-ncrename --dimension y_grid_T,y_grid_C                C_${OCE}_coordinates_mask.nc
-ncrename --dimension nvertex_grid_T,nvertex_grid_C    C_${OCE}_coordinates_mask.nc
-ncks --append C_${OCE}_coordinates_mask.nc            ${OCE}_coordinates_mask.nc
+ncatted --history --attribute bounds,nav_lon_grid_C,m,c,"bounds_lon_grid_C" tmp_${OCE}_coordinates_mask.nc
+ncatted --history --attribute bounds,nav_lat_grid_C,m,c,"bounds_lat_grid_C" tmp_${OCE}_coordinates_mask.nc
+ncks --history --overwrite --variable nav_lon_grid_C,nav_lat_grid_C       tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc
+ncks --history --append    --variable bounds_lon_grid_C,bounds_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc
+ncks --history --append    --variable area_grid_C             tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 
+
+ncks --history --append C_${OCE}_coordinates_mask.nc            ${OCE}_coordinates_mask.nc
 rm C_${OCE}_coordinates_mask.nc
 
-ncks --overwrite --fl_fmt=${FMT_OASIS} --history ${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask_${FMT_OASIS}.nc
+ncks --history --overwrite --fl_fmt=${FMT_OASIS} ${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask_${FMT_OASIS}.nc
 
 ls -al
@@ -432,5 +434,5 @@
             ${ATM}_grid_maskFrom_${OCE}.nc
 fi
-ncks --alphabetize --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
+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
 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc
 
@@ -528,5 +530,5 @@
 ## Add missing variables in rmp files
 ## ===========================================================================
-for rmpFile in rmp_tlmd_to_[tuv]orc_*order_*.nc rmp_[tuv]orc_to_tlmd_*order_*.nc* ; do
+for rmpFile in rmp_?${atm}_to_[tuv]${oce}_*order_*.nc rmp_[tuv]${oce}_to_t${atm}_*order_*.nc* ; do
     echo ${rmpFile}
     a_to_o=false ; o_to_a=false
@@ -663,4 +665,5 @@
 for File in dia_*.nc rmp_*.nc
 do
+    ncatted --history --attribute history_of_appended_files,global,d,c,"" ${File}
     NewFile=$(echo ${File} | sed -e "s/${atm}/${ATM}/" -e "s/${oce}/${OCE}/" )
     cp ${File} ${SUBMIT_DIR}/${NewFile}
