Index: /TOOLS/MOSAIX/CreateWeightsMask.bash
===================================================================
--- /TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 3965)
+++ /TOOLS/MOSAIX/CreateWeightsMask.bash	(revision 3966)
@@ -4,9 +4,10 @@
 #MSUB -e Out_WeightsMask    # Error output
 #MSUB -eo
-#MSUB -n 4              # Number of processors
-#MSUB -T 1800           # Time limit (seconds)
-#MSUB -q standard
+#MSUB -n 4                  # Number of processors
+#MSUB -T 1800               # Time limit (seconds)
+#MSUB -q skylake
 #MSUB -Q test
-#MSUB -p devcmip6
+#MSUB -p gen2212
+#MSUB -m work
 
 ### ===========================================================================
@@ -85,9 +86,10 @@
 
 case ${arch} in
-    ( curie | irene )
+    ( curie )
     set +vx
     module purge
     source /ccc/cont003/home/dsm/p86ipsl/.env_intel17.0.2_curie;
     source /ccc/cont003/home/dsm/p86ipsl/.env_netcdf4.3.3.1_curie
+    module load datadir/igcmg
     R_IN=$(ccc_home -u igcmg --cccwork)/IGCM
     TMPDIR=${SCRATCHDIR}/TMP
@@ -95,4 +97,17 @@
     PROGRAM=${BRIDGE_MSUB_REQNAME}
     MPIRUN=ccc_mprun
+    ;;
+    ( irene )
+    set +vx
+    module purge
+    source $(ccc_home -u igcmg)/MachineEnvironment/irene/env_irene
+    module load python/2.7.8
+    module load datadir/igcmg
+    R_IN=$(ccc_home -u igcmg --cccwork)/IGCM
+    TMPDIR=${CCCWORKDIR}/TMP
+    SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}}
+    PROGRAM=${BRIDGE_MSUB_REQNAME}
+    MPIRUN=ccc_mprun
+    module list
     ;;
     ( spip )
@@ -232,6 +247,4 @@
 ncks --alphabetize --history --append --variable OceMask dia_t${oce}_to_t${atm}_1storder_false_mask.nc   ${ATM}_grid_maskFrom_${OCE}.nc
 rm dia_t${oce}_to_t${atm}_1storder_false_mask.nc
-
-
 
 ##
@@ -381,11 +394,14 @@
 #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
+
 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
     cat <<EOF > add_time.nco
-OceFrac    [time_counter,cell] = OceFrac    (:) ;
-OceMask    [time_counter,cell] = OceMask    (:) ;
-AtmCoastal [time_counter,cell] = AtmCoastal (:) ;
+OceFrac    [time_counter,cell] = OceFrac    [cell] ;
+OceMask    [time_counter,cell] = OceMask    [cell] ;
+AtmCoastal [time_counter,cell] = AtmCoastal [cell] ;
 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
@@ -401,14 +417,17 @@
 if [[ ${atm} = lmd ]] ; then
     cat <<EOF > add_time.nco
-OceFrac    [time_counter,lat,lon] = OceFrac    (:,:) ;
-OceMask    [time_counter,lat,lon] = OceMask    (:,:) ;
-AtmCoastal [time_counter,lat,lon] = AtmCoastal (:,:) ;
-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
+OceFrac    [time_counter,lat,lon] = OceFrac    [lat,lon] ;
+OceMask    [time_counter,lat,lon] = OceMask    [lat,lon]  ;
+AtmCoastal [time_counter,lat,lon] = AtmCoastal [lat,lon]  ;
+EOF
+    ncap2 --overwrite --history --script-file add_time.nco ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc
+    ncdump -h tmp_${ATM}_grid_maskFrom_${OCE}.nc
+    mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc
+    
     ncatted --history \
-	    -a coordinates,OceFrac,c,c,"time_counter lat lon"    \
-            -a coordinates,OceMask,c,c,"time_counter lat lon"    \
-            -a coordinates,AtmCoastal,c,c,"time_counter lat lon" \
-            -a coordinates,aire,c,c,"lat lon" \
+	    -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,m,c,"lat lon" \
             ${ATM}_grid_maskFrom_${OCE}.nc
 fi
@@ -579,4 +598,5 @@
 dst_grid_imask.int() ;
 dst_grid_area  (:) = aire(:) ;
+dst_grid_frac  (:) = OceFrac(0,:) ;
 EOF
 	if [[ ${o_to_a} = true ]] ; then
@@ -593,4 +613,5 @@
 	fi
     fi
+    
     if [[ ${atm} = lmd ]] ; then
 	cat <<EOF >add_varatm.nco
