Ignore:
Timestamp:
2020-07-01T09:18:17+02:00 (7 months ago)
Author:
smasson
Message:

Extra_Halo: merge with trunk@13136, see #2366

Location:
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/CANAL/MY_SRC/stpctl.F90

    r13124 r13186  
    119119      !                                   !==            test of local extrema           ==! 
    120120      !                                   !==  done by all processes at every time step  ==! 
     121      ! 
     122      ! define zmax default value. needed for land processors 
     123      IF( ll_colruns ) THEN    ! default value: must not be kept when calling mpp_max -> must be as small as possible 
     124         zmax(:) = -HUGE(1._wp) 
     125      ELSE                     ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 
     126         zmax(:) =  0._wp 
     127         zmax(3) = -1._wp      ! avoid salinity minimum at 0. 
     128      ENDIF 
     129      ! 
    121130      llmsk(:,:,1) = ssmask(:,:) == 1._wp 
    122       IF( ll_wd ) THEN 
    123          zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
    124       ELSE 
    125          zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
    126       ENDIF 
    127       llmsk(:,:,:) = umask(:,:,:) == 1._wp 
    128       zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) ), mask = llmsk )                     ! velocity max (zonal only) 
     131      IF( COUNT( llmsk(:,:,1) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
     132         IF( ll_wd ) THEN 
     133            zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
     134         ELSE 
     135            zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
     136         ENDIF 
     137      ENDIF 
     138      zmax(2) = MAXVAL( ABS( uu(:,:,:,Kmm) ) )                                       ! velocity max (zonal only) 
    129139      llmsk(:,:,:) = tmask(:,:,:) == 1._wp 
    130       zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
    131       zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !      salinity max 
    132       IF( ll_colruns .OR. jpnij == 1 ) THEN     ! following variables are used only in the netcdf file 
    133          zmax(5) = MAXVAL( -ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  ! minus temperature max 
    134          zmax(6) = MAXVAL(  ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  !      temperature max 
    135          IF( ln_zad_Aimp ) THEN 
    136             zmax(7) = MAXVAL(   Cu_adv(:,:,:)   , mask = llmsk )                  ! partitioning coeff. max 
    137             llmsk(:,:,:) = wmask(:,:,:) == 1._wp 
    138             zmax(8) = MAXVAL(  ABS( wi(:,:,:) ) , mask = llmsk )                  ! implicit vertical vel. max 
    139          ELSE 
    140             zmax(7:8) = 0._wp 
    141          ENDIF 
    142       ELSE 
    143          zmax(5:8) = 0._wp 
     140      IF( COUNT( llmsk(:,:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
     141         zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
     142         zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !       salinity max 
     143         IF( ll_colruns .OR. jpnij == 1 ) THEN     ! following variables are used only in the netcdf file 
     144            zmax(5) = MAXVAL( -ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  ! minus temperature max 
     145            zmax(6) = MAXVAL(  ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  !       temperature max 
     146            IF( ln_zad_Aimp ) THEN 
     147               zmax(7) = MAXVAL(   Cu_adv(:,:,:)   , mask = llmsk )                  ! partitioning coeff. max 
     148               llmsk(:,:,:) = wmask(:,:,:) == 1._wp 
     149               IF( COUNT( llmsk(:,:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
     150                  zmax(8) = MAXVAL(ABS( wi(:,:,:) ), mask = llmsk )                  ! implicit vertical vel. max 
     151               ENDIF 
     152            ENDIF 
     153         ENDIF 
    144154      ENDIF 
    145155      zmax(9) = REAL( nstop, wp )                                              ! stop indicator 
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/file_def_nemo-oce.xml

    r13124 r13186  
    3434      <field field_ref="Ce_oce"       name="Ce_oce" /> 
    3535      <field field_ref="Ch_oce"       name="Ch_oce" /> 
     36      <field field_ref="theta_zt"     name="theta_zt" /> 
     37      <field field_ref="q_zt"         name="q_zt" /> 
     38      <field field_ref="theta_zu"     name="theta_zu" /> 
     39      <field field_ref="q_zu"         name="q_zu" /> 
     40      <field field_ref="ssq"          name="ssq" /> 
     41      <field field_ref="wspd_blk"     name="wspd_blk" />       
    3642    </file> 
    3743 
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/EXPREF/launch_sasf.sh

    r13124 r13186  
    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" 
     14# DATA_IN_DIR => Directory containing sea-surface + atmospheric forcings 
     15#             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/): 
     16if [ `hostname` = "merlat"        ]; then 
     17    DATA_IN_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
     18elif [ `hostname` = "luitel"        ]; then 
     19    DATA_IN_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018" 
     20elif [ `hostname` = "ige-meom-cal1" ]; then 
     21    DATA_IN_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018" 
     22elif [ `hostname` = "salvelinus" ]; then 
     23    DATA_IN_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
     24else 
     25    echo "Oops! We don't know `hostname` yet! Define 'DATA_IN_DIR' in the script!"; exit  
     26fi 
     27 
     28expdir=`basename ${PWD}`; # we expect "EXPREF" or "EXP00" normally... 
     29 
     30# NEMOGCM root directory where to fetch compiled STATION_ASF nemo.exe + setup: 
     31NEMO_WRK_DIR=`pwd | sed -e "s|/tests/STATION_ASF/${expdir}||g"` 
    1332 
    1433# Directory where to run the simulation: 
    15 WORK_DIR="${HOME}/tmp/STATION_ASF" 
     34PROD_DIR="${HOME}/tmp/STATION_ASF" 
    1635 
    1736 
    18 # FORC_DIR => Directory containing sea-surface + atmospheric forcings 
    19 #             (get it there https://drive.google.com/file/d/1MxNvjhRHmMrL54y6RX7WIaM9-LGl--ZP/): 
    20 if [ `hostname` = "merlat"        ]; then 
    21     FORC_DIR="/MEDIA/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    22 elif [ `hostname` = "luitel"        ]; then 
    23     FORC_DIR="/data/gcm_setup/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    24 elif [ `hostname` = "ige-meom-cal1" ]; then 
    25     FORC_DIR="/mnt/meom/workdir/brodeau/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    26 elif [ `hostname` = "salvelinus" ]; then 
    27     FORC_DIR="/opt/data/STATION_ASF/input_data_STATION_ASF_2016-2018" 
    28 else 
    29     echo "Boo!"; exit 
    30 fi 
    31 #====================== 
    32 mkdir -p ${WORK_DIR} 
     37####### End of normal user configurable section ####### 
    3338 
     39#================================================================================ 
     40 
     41# NEMO executable to use is: 
     42NEMO_EXE="${NEMO_WRK_DIR}/tests/${TC_DIR}/BLD/bin/nemo.exe" 
     43 
     44 
     45echo "###########################################################" 
     46echo "#        S T A T I O N   A i r  -  S e a   F l u x        #" 
     47echo "###########################################################" 
     48echo 
     49echo " We shall work in here: ${STATION_ASF_DIR}/" 
     50echo " NEMOGCM   work    depository is: ${NEMO_WRK_DIR}/" 
     51echo "   ==> NEMO EXE to use: ${NEMO_EXE}" 
     52echo " Input forcing data into: ${DATA_IN_DIR}/" 
     53echo " Production will be done into: ${PROD_DIR}/" 
     54echo 
     55 
     56mkdir -p ${PROD_DIR} 
    3457 
    3558if [ ! -f ${NEMO_EXE} ]; then echo " Mhhh, no compiled 'nemo.exe' found into `dirname ${NEMO_EXE}` !"; exit; fi 
     
    4063echo 
    4164 
    42  
    43 NEMO_EXPREF="${NEMO_DIR}/tests/STATION_ASF/EXPREF" 
     65NEMO_EXPREF="${NEMO_WRK_DIR}/tests/STATION_ASF/EXPREF" 
    4466if [ ! -d ${NEMO_EXPREF} ]; then echo " Mhhh, no EXPREF directory ${NEMO_EXPREF} !"; exit; fi 
    4567 
    46 rsync -avP ${NEMO_EXE}          ${WORK_DIR}/ 
     68rsync -avP ${NEMO_EXE}          ${PROD_DIR}/ 
    4769 
    4870for 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 
    4971    if [ ! -f ${NEMO_EXPREF}/${ff} ]; then echo " Mhhh, ${ff} not found into ${NEMO_EXPREF} !"; exit; fi 
    50     rsync -avPL ${NEMO_EXPREF}/${ff} ${WORK_DIR}/ 
     72    rsync -avPL ${NEMO_EXPREF}/${ff} ${PROD_DIR}/ 
    5173done 
    5274 
    5375# Copy forcing to work directory: 
    54 rsync -avP ${FORC_DIR}/Station_PAPA_50N-145W*.nc ${WORK_DIR}/ 
     76rsync -avP ${DATA_IN_DIR}/Station_PAPA_50N-145W*.nc ${PROD_DIR}/ 
    5577 
    5678for CASE in "ECMWF" "COARE3p6" "NCAR" "ECMWF-noskin" "COARE3p6-noskin"; do 
     
    6486    scase=`echo "${CASE}" | tr '[:upper:]' '[:lower:]'` 
    6587 
    66     rm -f ${WORK_DIR}/namelist_cfg 
    67     rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${WORK_DIR}/namelist_cfg 
     88    rm -f ${PROD_DIR}/namelist_cfg 
     89    rsync -avPL ${NEMO_EXPREF}/namelist_${scase}_cfg ${PROD_DIR}/namelist_cfg 
    6890 
    69     cd ${WORK_DIR}/ 
     91    cd ${PROD_DIR}/ 
    7092    echo 
    7193    echo "Launching NEMO !" 
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/MY_SRC/stpctl.F90

    r13124 r13186  
    111111      !                                   !==  done by all processes at every time step  ==! 
    112112      llmsk(:,:) = tmask(:,:,1) == 1._wp 
    113       zmax(1) = MAXVAL(     taum(:,:)   , mask = llmsk )   ! max wind stress module 
    114       zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk )   ! max non-solar heat flux 
    115       zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk )   ! max E-P 
     113      IF( COUNT( llmsk(:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
     114         zmax(1) = MAXVAL(     taum(:,:)   , mask = llmsk )   ! max wind stress module 
     115         zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk )   ! max non-solar heat flux 
     116         zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk )   ! max E-P 
     117      ELSE 
     118         IF( ll_colruns ) THEN    ! default value: must not be kept when calling mpp_max -> must be as small as possible 
     119            zmax(1:3) = -HUGE(1._wp) 
     120         ELSE                     ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 
     121            zmax(1:3) = 0._wp 
     122         ENDIF 
     123      ENDIF 
    116124      zmax(4) = REAL( nstop, wp )                                     ! stop indicator 
    117125      !                                   !==               get global extrema             ==! 
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/tests/STATION_ASF/README.md

    r12031 r13186  
    11 
    22## WARNING: TOTALLY-ALPHA-STUFF / DOCUMENT IN THE PROCESS OF BEING WRITEN! 
     3 
     4NOTE: if working with the trunk of NEMO, you are strongly advised to use the same test-case but on the `NEMO-examples` GitHub depo: 
     5https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF 
     6 
    37 
    48# *Station Air-Sea Fluxes* demonstration case 
Note: See TracChangeset for help on using the changeset viewer.