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 7672 for branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2017-02-13T10:27:46+01:00 (7 years ago)
Author:
jcastill
Message:

Further changes to remove the UM dependency in case of a coupled run, so that ocean can also run in coupled mode with a wave model only: until now, if running in forced/coupled mode (ln_mixcpl), the program expected forcing files and coupling fields from the atmosphere, and they were 'merged' together using a coupling map; if the coupling map was not provided, the coupling fields overwrote the input fields even if they were not actually coupled and did not have any valid information. If we were coupling to a wave model and not an atmosphere model, the forcing fields read from file were being overwritten but the atmosphere coupling fields, which did not contain any valid information.

Now, it is possible to couple in real mixed mode, where the fields can independently be read either from forcing files or from coupling (ocean coupled to an atmosphere model, a wave model, or both), and the coupling mapping is only needed if a field if both provided via coupling and a forcing file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r7620 r7672  
    8989         &             ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc   , ln_rnf   ,   & 
    9090         &             ln_ssr    , nn_isf    , nn_fwb, ln_cdgw    , ln_wave    , ln_sdw   ,   & 
    91          &             ln_tauoc  , ln_stcor  , nn_lsm, nn_limflx , nn_components, ln_cpl 
     91         &             ln_tauoc  , ln_stcor  , nn_lsm, nn_limflx , nn_components, ln_cpl  ,   & 
     92         &             ln_wavcpl 
    9293      INTEGER  ::   ios 
    9394      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
    94       LOGICAL  ::   ll_purecpl 
    9595      !!---------------------------------------------------------------------- 
    9696 
     
    131131         WRITE(numout,*) '              MFS  bulk  formulation                     ln_blk_mfs  = ', ln_blk_mfs 
    132132         WRITE(numout,*) '              ocean-atmosphere coupled formulation       ln_cpl      = ', ln_cpl 
    133          WRITE(numout,*) '              forced-coupled mixed formulation           ln_mixcpl   = ', ln_mixcpl 
     133         WRITE(numout,*) '              forced-coupled atm mixed formulation       ln_mixcpl   = ', ln_mixcpl 
     134         WRITE(numout,*) '              forced-coupled wav mixed formulation       ln_wavcpl   = ', ln_wavcpl 
    134135         WRITE(numout,*) '              wave physics                               ln_wave     = ', ln_wave  
    135136         WRITE(numout,*) '                 Stokes drift corr. to vert. velocity    ln_sdw      = ', ln_sdw  
     
    169170      IF ( nn_components == jp_iam_opa .AND. ln_cpl )   & 
    170171         &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but ln_cpl = T in OPA' ) 
    171       IF ( nn_components == jp_iam_opa .AND. ln_mixcpl )   & 
    172          &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but ln_mixcpl = T in OPA' ) 
     172      IF ( nn_components == jp_iam_opa .AND. ( ln_mixcpl .OR. ln_wavcpl) )   & 
     173         &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but ln_mixcpl or ln_wavcpl = T in OPA' ) 
    173174      IF ( ln_cpl .AND. .NOT. lk_oasis )    & 
    174175         &      CALL ctl_stop( 'STOP', 'sbc_init : OASIS-coupled atmosphere model, but key_oasis3 disabled' ) 
    175       IF( ln_mixcpl .AND. .NOT. lk_oasis )    & 
    176          &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl) requires the cpp key key_oasis3' ) 
    177       IF( ln_mixcpl .AND. .NOT. ln_cpl )    & 
    178          &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl) requires ln_cpl = T' ) 
    179       IF( ln_mixcpl .AND. nn_components /= jp_iam_nemo )    & 
    180          &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl) is not yet working with sas-opa coupling via oasis' ) 
     176      IF( ( ln_mixcpl .OR. ln_wavcpl ) .AND. .NOT. lk_oasis )    & 
     177         &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl or ln_wavcpl) requires the cpp key key_oasis3' ) 
     178      IF( ( ln_mixcpl .OR. ln_wavcpl ) .AND. .NOT. ln_cpl )    & 
     179         &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl or ln_wavcpl) requires ln_cpl = T' ) 
     180      IF( ( ln_mixcpl .OR. ln_wavcpl ) .AND. nn_components /= jp_iam_nemo )    & 
     181         &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl or ln_wavcpl) is not yet working with sas-opa coupling via oasis' ) 
    181182 
    182183      !                              ! allocate sbc arrays 
     
    239240      ENDIF  
    240241      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    241       ll_purecpl = ln_cpl .AND. .NOT. ln_mixcpl 
     242      ll_purecpl = ln_cpl .AND. .NOT. ln_mixcpl .AND. .NOT. ln_wavcpl 
    242243      ! 
    243244      icpt = 0 
     
    271272         IF( nsbc == jp_mfs     )   WRITE(numout,*) '              MFS Bulk formulation' 
    272273         IF( nsbc == jp_none    )   WRITE(numout,*) '              OPA coupled to SAS via oasis' 
    273          IF( ln_mixcpl          )   WRITE(numout,*) '              + forced-coupled mixed formulation' 
     274         IF( ln_mixcpl          )   WRITE(numout,*) '              + forced-coupled mixed atm formulation' 
     275         IF( ln_wavcpl          )   WRITE(numout,*) '              + forced-coupled mixed wav formulation' 
    274276         IF( nn_components/= jp_iam_nemo )  & 
    275277            &                       WRITE(numout,*) '              + OASIS coupled SAS' 
     
    395397      END SELECT 
    396398 
    397       IF( ln_mixcpl )        CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
     399      IF( ln_mixcpl .OR. ln_wavcpl )  CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
    398400 
    399401      IF ( ln_wave .AND. ln_tauoc) THEN                 ! Wave stress subctracted  
Note: See TracChangeset for help on using the changeset viewer.