Index: /NEMO/trunk/tests/STATION_ASF/EXPREF/launch_sasf.sh
===================================================================
--- /NEMO/trunk/tests/STATION_ASF/EXPREF/launch_sasf.sh	(revision 13263)
+++ /NEMO/trunk/tests/STATION_ASF/EXPREF/launch_sasf.sh	(revision 13264)
@@ -1,37 +1,22 @@
 #!/bin/bash
 
-# NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup:
-NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"`
+################################################################
+#
+# Script to launch a set of STATION_ASF simulations
+#
+# L. Brodeau, 2020
+#
+################################################################
 
-echo "Using NEMO_DIR=${NEMO_DIR}"
-
-# what directory inside "tests" actually contains the compiled test-case?
+# What directory inside "tests" actually contains the compiled "nemo.exe" for STATION_ASF ?
 TC_DIR="STATION_ASF2"
 
-# => so the executable to use is:
-NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe"
+expdir=`basename ${PWD}`; # we expect "EXPREF" or "EXP00" normally...
 
-# Directory where to run the simulation:
-WORK_DIR="${HOME}/tmp/STATION_ASF"
+# NEMOGCM root directory:
+NEMO_ROOT_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"`
 
-# DATA_IN_DIR => Directory containing sea-surface + atmospheric forcings
-#             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/):
-if [ `hostname` = "merlat"        ]; then
-    DATA_IN_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018"
-elif [ `hostname` = "luitel"        ]; then
-    DATA_IN_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018"
-elif [ `hostname` = "ige-meom-cal1" ]; then
-    DATA_IN_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018"
-elif [ `hostname` = "salvelinus" ]; then
-    DATA_IN_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018"
-else
-    echo "Oops! We don't know `hostname` yet! Define 'DATA_IN_DIR' in the script!"; exit 
-fi
-
-
-if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi
-
-# NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe + setup:
-NEMO_WRK_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"`
+# NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe:
+SASF_WRK_DIR="${NEMO_ROOT_DIR}/tests/${TC_DIR}"
 
 # Directory where to run the simulation:
@@ -43,6 +28,16 @@
 #================================================================================
 
+SASF_REF_DIR="${NEMO_ROOT_DIR}/tests/STATION_ASF"
+if [ ! -d ${SASF_REF_DIR} ]; then echo " Mhhh, no EXPREF directory ${SASF_REF_DIR} !"; exit; fi
+
 # NEMO executable to use is:
-NEMO_EXE="${NEMO_WRK_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe"
+NEMO_EXE="${SASF_WRK_DIR}/BLD/bin/nemo.exe"
+if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi
+
+DATA_IN_DIR="${SASF_REF_DIR}/input_data" ; # Directory containing sea-surface + atmospheric input data
+if [ ! -d ${DATA_IN_DIR} ]; then echo "PROBLEM!!! => did not find directory 'input_data' with input forcing..."; exit; fi
+
+SASF_EXPREF=${SASF_REF_DIR}/${expdir}  ; # STATION_ASF EXPREF directory from which to use namelists and XIOS xml files...
+if [ ! -d ${SASF_EXPREF} ]; then echo " Mhhh, no ${expdir} directory ${SASF_EXPREF} !"; exit; fi
 
 
@@ -51,28 +46,21 @@
 echo "###########################################################"
 echo
-echo " We shall work in here: ${STATION_ASF_DIR}/"
-echo " NEMOGCM   work    depository is: ${NEMO_WRK_DIR}/"
-echo "   ==> NEMO EXE to use: ${NEMO_EXE}"
-echo " Input forcing data into: ${DATA_IN_DIR}/"
-echo " Production will be done into: ${PROD_DIR}/"
+echo "  * NEMO reference root directory is: ${NEMO_ROOT_DIR}"
+echo "  * STATION_ASF work directory is: ${SASF_WRK_DIR}"
+echo "       ==> NEMO EXE to use: ${NEMO_EXE}"
+echo
+echo "  * Input forcing data into: ${DATA_IN_DIR}"
+echo "  * Production will be done into: ${PROD_DIR}"
+echo "  * Directory in which namelists and xml files are fetched:"
+echo "       ==> ${SASF_EXPREF}"
 echo
 
 mkdir -p ${PROD_DIR}
 
-if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi
-
-echo
-echo " *** Using the following NEMO executable:"
-echo "  ${NEMO_EXE} "
-echo
-
-NEMO_EXPREF="${NEMO_WRK_DIR}/tests/STATION_ASF/EXPREF"
-if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi
-
 rsync -avP ${NEMO_EXE}          ${PROD_DIR}/
 
 for ff in "context_nemo.xml" "domain_def_nemo.xml" "field_def_nemo-oce.xml" "file_def_nemo-oce.xml" "grid_def_nemo.xml" "iodef.xml" "namelist_ref"; do
-    if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi
-    rsync -avPL ${NEMO_EXPREF}/${ff} ${PROD_DIR}/
+    if [ ! -f ${SASF_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${SASF_EXPREF} !"; exit; fi
+    rsync -avPL ${SASF_EXPREF}/${ff} ${PROD_DIR}/
 done
 
@@ -91,5 +79,5 @@
 
     rm -f ${PROD_DIR}/namelist_cfg
-    rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg
+    rsync -avPL ${SASF_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg
 
     cd ${PROD_DIR}/
Index: /NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py
===================================================================
--- /NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py	(revision 13263)
+++ /NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py	(revision 13264)
@@ -26,10 +26,6 @@
 sys.setdefaultencoding('utf8')
 
-cy1     = '2016' ; # First year
+cy1     = '2018' ; # First year
 cy2     = '2018' ; # Last year
-
-jt0 = 0
-jt0 = 17519
-
 
 dir_figs='.'
@@ -104,5 +100,5 @@
 # Getting time array from the first file:
 id_in = Dataset(cf_in[0])
-vt = id_in.variables['time_counter'][jt0:]
+vt = id_in.variables['time_counter'][:]
 cunit_t = id_in.variables['time_counter'].units ; print(' "time_counter" is in "'+cunit_t+'"')
 id_in.close()
@@ -138,5 +134,5 @@
             if ctest == 'skin':   id_in = Dataset(cf_in[ja])
             if ctest == 'noskin': id_in = Dataset(cf_in_ns[ja])
-            xF[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain!
+            xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain!
             if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name
             id_in.close()
@@ -211,10 +207,10 @@
     for ja in range(nb_algos-1):
         id_in = Dataset(cf_in[ja])
-        xF[:,ja]   = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain!
+        xF[:,ja]   = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain!
         if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name
         id_in.close()
         #
         id_in = Dataset(cf_in_ns[ja])
-        xFns[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain!
+        xFns[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain!
         if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name
         id_in.close()
Index: /NEMO/trunk/tests/STATION_ASF/README.md
===================================================================
--- /NEMO/trunk/tests/STATION_ASF/README.md	(revision 13263)
+++ /NEMO/trunk/tests/STATION_ASF/README.md	(revision 13264)
@@ -1,10 +1,8 @@
+# *Station Air-Sea Fluxes* demonstration case
 
-## WARNING: TOTALLY-ALPHA-STUFF / DOCUMENT IN THE PROCESS OF BEING WRITEN!
+Last sucessful test done with NEMOGCM trunk: `r13263`
 
 NOTE: if working with the trunk of NEMO, you are strongly advised to use the same test-case but on the `NEMO-examples` GitHub depo:
 https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF
-
-
-# *Station Air-Sea Fluxes* demonstration case
 
 ## Objectives
@@ -18,5 +16,5 @@
 As input ```STATION_ASF``` will require the traditional *bulk* sea surface parameters:
 
-- sea surface temperature (SST) at $z_{SST}$ meters below the surface
+- Bulk sea surface temperature (SST) at _z<sub>SST</sub>_ meters below the surface
 - Surface current vector
 - Sea surface salinity
@@ -24,18 +22,29 @@
 as well as the usual surface atmospheric state:
 
-- air temperature at $z_t$ meters above the surface
-- air humidity  at $z_t$ meters above the surface (specific humidity or relative humidity or dew-point temperature)
-- wind speed vector at $z_u$ meters above the surface
+- air temperature at _z<sub>t</sub>_ meters above the surface
+- air humidity  at _z<sub>t</sub>_ meters above the surface (specific humidity or relative humidity or dew-point temperature)
+- wind speed vector at _z<sub>u</sub>_ meters above the surface
 - Sea level atmospheric pressure (SLP)
 - Downwelling solar radiation
 - Downwelling longwave radiation
 
+### Example of diagnostics from `STATION_ASF`
+
+(Generated with script `./EXPREF/plot_station_asf_simple.py`)
+
+![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/01_temperatures_ECMWF.svg)
+
+![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd.svg)
+
+![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/dT_skin.svg)
+
+![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Qlat.svg)
 
 
 ## Physical description
 
-### Important namelist parameters speficic to STATION_ASF
+### Important namelist parameters specific to STATION_ASF
 
-* ```rn_dept1@namusr_def:``` depth (m) at which the prescribed SST is taken (i.e. depth of first T-point); important due to impact on warm-layer estimate, the deeper, the more pronounced!
+* ```rn_dept1@namusr_def:``` depth (m) at which the prescribed SST is taken (*i.e.* depth of first T-point); important due to impact on warm-layer estimate, the deeper, the more pronounced!
 
 * ```rn_lat1d,rn_lon1d@namc1d:``` fixed coordinates of the location of the station (buoy, platform, etc).
@@ -49,20 +58,21 @@
 ## Input files to test STATION ASF
 
-Three full years of processed hourly data from the PAPA station (buoy) can be downloaded here:
-https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/
+One full year (2018) of processed hourly data from the PAPA station (buoy) is found into the `input_data` directory.
+These three files are everything you need to play with the set of *namelists* provided for this test-case.
 
-These three files are everything you need to play with the set of namelists provided for this test-case.
-
-- ```Station_PAPA_50N-145W_atm_hourly.nc```  → contains hourly surface atmospheric state
-- ```Station_PAPA_50N-145W_precip_daily.nc``` → contains daily precipitation
-- ```Station_PAPA_50N-145W_oce_hourly.nc``` → contains hourly sea surface state
+- ```Station_PAPA_50N-145W_atm_hourly_y2018.nc```  → contains hourly surface atmospheric state
+- ```Station_PAPA_50N-145W_precip_daily_y2018.nc``` → contains daily precipitation
+- ```Station_PAPA_50N-145W_oce_hourly_y2018.nc``` → contains hourly sea surface state
 
 For station PAPA (50.1 N, 144.9 W), air temperature and humidity are measured at 2.5 m, the wind speed at 4 m, and the SST at 1 m below the surface, hence the following namelist parameters are given:
 
-- ```rn_dept1 =    1.  ``` (&namusr_def)
-- ```rn_lat1d =  50.1 ``` (&namc1d)
-- ```rn_lon1d = 215.1``` (&namc1d)
-- ```rn_zqt   =   2.5``` (&namsbc_blk)
-- ```rn_zu    =    4.``` (&namsbc_blk)
+- `&namusr_def`
+  - ```rn_dept1 =    1.  ```
+- `&namc1d`
+  - ```rn_lat1d =  50.1 ```
+  - ```rn_lon1d = 215.1```
+- `&namsbc_blk`
+  - ```rn_zqt   =   2.5```
+  - ```rn_zu    =    4.```
 
 
@@ -72,12 +82,28 @@
 First compile the test-case as follows (compile with xios-2.5 support → check your ARCH file):
 
-```./makenemo -m <your_arch> -n STATION_ASF -j 4 -a STATION_ASF```
+```./makenemo -a STATION_ASF -m <your_arch> -n STATION_ASF2 -j 4```
 
 Then you can use the script ``launch_sasf.sh`` found in  ```EXPREF/``` to launch 3 simulations (one for each bulk parameterization available). You need to adapt the following variable to your environment in the script:
 
-- ```NEMO_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_DIR}/tests/STATION_ASF```)
+- ```NEMO_ROOT_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_ROOT_DIR}/tests/STATION_ASF```)
 
-- ```WORK_DIR``` :  Directory where to run the simulation
+- ```PROD_DIR``` :  Directory where to run the simulation
 
-- ```FORC_DIR```  Directory containing sea-surface + atmospheric forcings (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/)
+- ```DATA_IN_DIR``` : Directory containing sea-surface + atmospheric forcings (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/)
 
+If everything goes according to plan, ``launch_sasf.sh`` should have generated the 3 following sets of output files into `${PROD_DIR}/output`:
+
+    STATION_ASF-COARE3p6_1h_20180101_20181231_gridT.nc
+    STATION_ASF-COARE3p6_1h_20180101_20181231_gridU.nc 
+    STATION_ASF-COARE3p6_1h_20180101_20181231_gridV.nc 
+    STATION_ASF-ECMWF_1h_20180101_20181231_gridT.nc 
+    STATION_ASF-ECMWF_1h_20180101_20181231_gridU.nc 
+    STATION_ASF-ECMWF_1h_20180101_20181231_gridV.nc 
+    STATION_ASF-NCAR_1h_20180101_20181231_gridT.nc 
+    STATION_ASF-NCAR_1h_20180101_20181231_gridU.nc 
+    STATION_ASF-NCAR_1h_20180101_20181231_gridV.nc
+
+---
+
+*/Laurent Brodeau, July 2020.*
+
