New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13264 – NEMO

Changeset 13264


Ignore:
Timestamp:
2020-07-08T12:47:03+02:00 (4 years ago)
Author:
laurent
Message:

Slight improvements in STATION_ASF test-case

Location:
NEMO/trunk/tests/STATION_ASF
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/STATION_ASF/EXPREF/launch_sasf.sh

    r13226 r13264  
    11#!/bin/bash 
    22 
    3 # NEMO directory where to fetch compiled STATION_ASF nemo.exe + setup: 
    4 NEMO_DIR=`pwd | sed -e "s|/tests/STATION_ASF/EXPREF||g"` 
     3################################################################ 
     4# 
     5# Script to launch a set of STATION_ASF simulations 
     6# 
     7# L. Brodeau, 2020 
     8# 
     9################################################################ 
    510 
    6 echo "Using NEMO_DIR=${NEMO_DIR}" 
    7  
    8 # what directory inside "tests" actually contains the compiled test-case? 
     11# What directory inside "tests" actually contains the compiled "nemo.exe" for STATION_ASF ? 
    912TC_DIR="STATION_ASF2" 
    1013 
    11 # => so the executable to use is: 
    12 NEMO_EXE="${NEMO_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 
     14expdir=`basename ${PWD}`; # we expect "EXPREF" or "EXP00" normally... 
    1315 
    14 # Directory where to run the simulation: 
    15 WORK_DIR="${HOME}/tmp/STATION_ASF" 
     16# NEMOGCM root directory: 
     17NEMO_ROOT_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 
    1618 
    17 # DATA_IN_DIR => Directory containing sea-surface + atmospheric forcings 
    18 #             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/): 
    19 if [ `hostname` = "merlat"        ]; then 
    20     DATA_IN_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    21 elif [ `hostname` = "luitel"        ]; then 
    22     DATA_IN_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    23 elif [ `hostname` = "ige-meom-cal1" ]; then 
    24     DATA_IN_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    25 elif [ `hostname` = "salvelinus" ]; then 
    26     DATA_IN_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    27 else 
    28     echo "Oops! We don't know `hostname` yet! Define 'DATA_IN_DIR' in the script!"; exit  
    29 fi 
    30  
    31  
    32 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled nemo.exe found into ${NEMO_DIR}/tests/STATION_ASF/BLD/bin !"; exit; fi 
    33  
    34 # NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe + setup: 
    35 NEMO_WRK_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 
     19# NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe: 
     20SASF_WRK_DIR="${NEMO_ROOT_DIR}/tests/${TC_DIR}" 
    3621 
    3722# Directory where to run the simulation: 
     
    4328#================================================================================ 
    4429 
     30SASF_REF_DIR="${NEMO_ROOT_DIR}/tests/STATION_ASF" 
     31if [ ! -d ${SASF_REF_DIR} ]; then echo " Mhhh, no EXPREF directory ${SASF_REF_DIR} !"; exit; fi 
     32 
    4533# NEMO executable to use is: 
    46 NEMO_EXE="${NEMO_WRK_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 
     34NEMO_EXE="${SASF_WRK_DIR}/BLD/bin/nemo.exe" 
     35if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 
     36 
     37DATA_IN_DIR="${SASF_REF_DIR}/input_data" ; # Directory containing sea-surface + atmospheric input data 
     38if [ ! -d ${DATA_IN_DIR} ]; then echo "PROBLEM!!! => did not find directory 'input_data' with input forcing..."; exit; fi 
     39 
     40SASF_EXPREF=${SASF_REF_DIR}/${expdir}  ; # STATION_ASF EXPREF directory from which to use namelists and XIOS xml files... 
     41if [ ! -d ${SASF_EXPREF} ]; then echo " Mhhh, no ${expdir} directory ${SASF_EXPREF} !"; exit; fi 
    4742 
    4843 
     
    5146echo "###########################################################" 
    5247echo 
    53 echo " We shall work in here: ${STATION_ASF_DIR}/" 
    54 echo " NEMOGCM   work    depository is: ${NEMO_WRK_DIR}/" 
    55 echo "   ==> NEMO EXE to use: ${NEMO_EXE}" 
    56 echo " Input forcing data into: ${DATA_IN_DIR}/" 
    57 echo " Production will be done into: ${PROD_DIR}/" 
     48echo "  * NEMO reference root directory is: ${NEMO_ROOT_DIR}" 
     49echo "  * STATION_ASF work directory is: ${SASF_WRK_DIR}" 
     50echo "       ==> NEMO EXE to use: ${NEMO_EXE}" 
     51echo 
     52echo "  * Input forcing data into: ${DATA_IN_DIR}" 
     53echo "  * Production will be done into: ${PROD_DIR}" 
     54echo "  * Directory in which namelists and xml files are fetched:" 
     55echo "       ==> ${SASF_EXPREF}" 
    5856echo 
    5957 
    6058mkdir -p ${PROD_DIR} 
    6159 
    62 if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 
    63  
    64 echo 
    65 echo " *** Using the following NEMO executable:" 
    66 echo "  ${NEMO_EXE} " 
    67 echo 
    68  
    69 NEMO_EXPREF="${NEMO_WRK_DIR}/tests/STATION_ASF/EXPREF" 
    70 if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi 
    71  
    7260rsync -avP ${NEMO_EXE}          ${PROD_DIR}/ 
    7361 
    7462for 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 
    75     if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi 
    76     rsync -avPL ${NEMO_EXPREF}/${ff} ${PROD_DIR}/ 
     63    if [ ! -f ${SASF_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${SASF_EXPREF} !"; exit; fi 
     64    rsync -avPL ${SASF_EXPREF}/${ff} ${PROD_DIR}/ 
    7765done 
    7866 
     
    9179 
    9280    rm -f ${PROD_DIR}/namelist_cfg 
    93     rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 
     81    rsync -avPL ${SASF_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 
    9482 
    9583    cd ${PROD_DIR}/ 
  • NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py

    r12629 r13264  
    2626sys.setdefaultencoding('utf8') 
    2727 
    28 cy1     = '2016' ; # First year 
     28cy1     = '2018' ; # First year 
    2929cy2     = '2018' ; # Last year 
    30  
    31 jt0 = 0 
    32 jt0 = 17519 
    33  
    3430 
    3531dir_figs='.' 
     
    104100# Getting time array from the first file: 
    105101id_in = Dataset(cf_in[0]) 
    106 vt = id_in.variables['time_counter'][jt0:] 
     102vt = id_in.variables['time_counter'][:] 
    107103cunit_t = id_in.variables['time_counter'].units ; print(' "time_counter" is in "'+cunit_t+'"') 
    108104id_in.close() 
     
    138134            if ctest == 'skin':   id_in = Dataset(cf_in[ja]) 
    139135            if ctest == 'noskin': id_in = Dataset(cf_in_ns[ja]) 
    140             xF[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     136            xF[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    141137            if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    142138            id_in.close() 
     
    211207    for ja in range(nb_algos-1): 
    212208        id_in = Dataset(cf_in[ja]) 
    213         xF[:,ja]   = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     209        xF[:,ja]   = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    214210        if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    215211        id_in.close() 
    216212        # 
    217213        id_in = Dataset(cf_in_ns[ja]) 
    218         xFns[:,ja] = id_in.variables[L_VNEM[jv]][jt0:,1,1] # only the center point of the 3x3 spatial domain! 
     214        xFns[:,ja] = id_in.variables[L_VNEM[jv]][:,1,1] # only the center point of the 3x3 spatial domain! 
    219215        if ja == 0: cvar_lnm = id_in.variables[L_VNEM[jv]].long_name 
    220216        id_in.close() 
  • NEMO/trunk/tests/STATION_ASF/README.md

    r13132 r13264  
     1# *Station Air-Sea Fluxes* demonstration case 
    12 
    2 ## WARNING: TOTALLY-ALPHA-STUFF / DOCUMENT IN THE PROCESS OF BEING WRITEN! 
     3Last sucessful test done with NEMOGCM trunk: `r13263` 
    34 
    45NOTE: if working with the trunk of NEMO, you are strongly advised to use the same test-case but on the `NEMO-examples` GitHub depo: 
    56https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF 
    6  
    7  
    8 # *Station Air-Sea Fluxes* demonstration case 
    97 
    108## Objectives 
     
    1816As input ```STATION_ASF``` will require the traditional *bulk* sea surface parameters: 
    1917 
    20 - sea surface temperature (SST) at $z_{SST}$ meters below the surface 
     18- Bulk sea surface temperature (SST) at _z<sub>SST</sub>_ meters below the surface 
    2119- Surface current vector 
    2220- Sea surface salinity 
     
    2422as well as the usual surface atmospheric state: 
    2523 
    26 - air temperature at $z_t$ meters above the surface 
    27 - air humidity  at $z_t$ meters above the surface (specific humidity or relative humidity or dew-point temperature) 
    28 - wind speed vector at $z_u$ meters above the surface 
     24- air temperature at _z<sub>t</sub>_ meters above the surface 
     25- air humidity  at _z<sub>t</sub>_ meters above the surface (specific humidity or relative humidity or dew-point temperature) 
     26- wind speed vector at _z<sub>u</sub>_ meters above the surface 
    2927- Sea level atmospheric pressure (SLP) 
    3028- Downwelling solar radiation 
    3129- Downwelling longwave radiation 
    3230 
     31### Example of diagnostics from `STATION_ASF` 
     32 
     33(Generated with script `./EXPREF/plot_station_asf_simple.py`) 
     34 
     35![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/01_temperatures_ECMWF.svg) 
     36 
     37![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd.svg) 
     38 
     39![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/dT_skin.svg) 
     40 
     41![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Qlat.svg) 
    3342 
    3443 
    3544## Physical description 
    3645 
    37 ### Important namelist parameters speficic to STATION_ASF 
     46### Important namelist parameters specific to STATION_ASF 
    3847 
    39 * ```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! 
     48* ```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! 
    4049 
    4150* ```rn_lat1d,rn_lon1d@namc1d:``` fixed coordinates of the location of the station (buoy, platform, etc). 
     
    4958## Input files to test STATION ASF 
    5059 
    51 Three full years of processed hourly data from the PAPA station (buoy) can be downloaded here: 
    52 https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/ 
     60One full year (2018) of processed hourly data from the PAPA station (buoy) is found into the `input_data` directory. 
     61These three files are everything you need to play with the set of *namelists* provided for this test-case. 
    5362 
    54 These three files are everything you need to play with the set of namelists provided for this test-case. 
    55  
    56 - ```Station_PAPA_50N-145W_atm_hourly.nc```  → contains hourly surface atmospheric state 
    57 - ```Station_PAPA_50N-145W_precip_daily.nc``` → contains daily precipitation 
    58 - ```Station_PAPA_50N-145W_oce_hourly.nc``` → contains hourly sea surface state 
     63- ```Station_PAPA_50N-145W_atm_hourly_y2018.nc```  → contains hourly surface atmospheric state 
     64- ```Station_PAPA_50N-145W_precip_daily_y2018.nc``` → contains daily precipitation 
     65- ```Station_PAPA_50N-145W_oce_hourly_y2018.nc``` → contains hourly sea surface state 
    5966 
    6067For 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: 
    6168 
    62 - ```rn_dept1 =    1.  ``` (&namusr_def) 
    63 - ```rn_lat1d =  50.1 ``` (&namc1d) 
    64 - ```rn_lon1d = 215.1``` (&namc1d) 
    65 - ```rn_zqt   =   2.5``` (&namsbc_blk) 
    66 - ```rn_zu    =    4.``` (&namsbc_blk) 
     69- `&namusr_def` 
     70  - ```rn_dept1 =    1.  ``` 
     71- `&namc1d` 
     72  - ```rn_lat1d =  50.1 ``` 
     73  - ```rn_lon1d = 215.1``` 
     74- `&namsbc_blk` 
     75  - ```rn_zqt   =   2.5``` 
     76  - ```rn_zu    =    4.``` 
    6777 
    6878 
     
    7282First compile the test-case as follows (compile with xios-2.5 support → check your ARCH file): 
    7383 
    74 ```./makenemo -m <your_arch> -n STATION_ASF -j 4 -a STATION_ASF``` 
     84```./makenemo -a STATION_ASF -m <your_arch> -n STATION_ASF2 -j 4``` 
    7585 
    7686Then 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: 
    7787 
    78 - ```NEMO_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_DIR}/tests/STATION_ASF```) 
     88- ```NEMO_ROOT_DIR``` : NEMO root directory where to fetch compiled STATION_ASF ```nemo.exe``` + setup (such as ```${NEMO_ROOT_DIR}/tests/STATION_ASF```) 
    7989 
    80 - ```WORK_DIR``` :  Directory where to run the simulation 
     90- ```PROD_DIR``` :  Directory where to run the simulation 
    8191 
    82 - ```FORC_DIR``` Directory containing sea-surface + atmospheric forcings (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/) 
     92- ```DATA_IN_DIR``` : Directory containing sea-surface + atmospheric forcings (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/) 
    8393 
     94If everything goes according to plan, ``launch_sasf.sh`` should have generated the 3 following sets of output files into `${PROD_DIR}/output`: 
     95 
     96    STATION_ASF-COARE3p6_1h_20180101_20181231_gridT.nc 
     97    STATION_ASF-COARE3p6_1h_20180101_20181231_gridU.nc  
     98    STATION_ASF-COARE3p6_1h_20180101_20181231_gridV.nc  
     99    STATION_ASF-ECMWF_1h_20180101_20181231_gridT.nc  
     100    STATION_ASF-ECMWF_1h_20180101_20181231_gridU.nc  
     101    STATION_ASF-ECMWF_1h_20180101_20181231_gridV.nc  
     102    STATION_ASF-NCAR_1h_20180101_20181231_gridT.nc  
     103    STATION_ASF-NCAR_1h_20180101_20181231_gridU.nc  
     104    STATION_ASF-NCAR_1h_20180101_20181231_gridV.nc 
     105 
     106--- 
     107 
     108*/Laurent Brodeau, July 2020.* 
     109 
Note: See TracChangeset for help on using the changeset viewer.