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

Ignore:
Timestamp:
2019-01-08T18:02:36+01:00 (5 years ago)
Author:
jcastill
Message:

Merged branch UKMO/r6232_INGV1_WAVE-coupling@7620

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE_package_collate_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r10394 r10473  
    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          &             nn_lsm    , nn_limflx , nn_components, ln_cpl 
     91         &             ln_tauoc  , ln_stcor  , nn_lsm, nn_limflx , nn_components, ln_cpl 
    9292      INTEGER  ::   ios 
    9393      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
     
    132132         WRITE(numout,*) '              ocean-atmosphere coupled formulation       ln_cpl      = ', ln_cpl 
    133133         WRITE(numout,*) '              forced-coupled mixed formulation           ln_mixcpl   = ', ln_mixcpl 
     134         WRITE(numout,*) '              wave physics                               ln_wave     = ', ln_wave   
     135         WRITE(numout,*) '                 Stokes drift corr. to vert. velocity    ln_sdw      = ', ln_sdw   
     136         WRITE(numout,*) '                 wave modified ocean stress              ln_tauoc    = ', ln_tauoc   
     137         WRITE(numout,*) '                 Stokes coriolis term                    ln_stcor    = ', ln_stcor   
     138         WRITE(numout,*) '                 neutral drag coefficient (CORE, MFS)    ln_cdgw     = ', ln_cdgw 
    134139         WRITE(numout,*) '              OASIS coupling (with atm or sas)           lk_oasis    = ', lk_oasis 
    135140         WRITE(numout,*) '              components of your executable              nn_components = ', nn_components 
     
    216221       
    217222      IF ( ln_wave ) THEN 
    218       !Activated wave module but neither drag nor stokes drift activated 
    219          IF ( .NOT.(ln_cdgw .OR. ln_sdw) )   THEN 
    220             CALL ctl_warn( 'Ask for wave coupling but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' ) 
    221       !drag coefficient read from wave model definable only with mfs bulk formulae and core  
     223         !Activated wave module but neither drag nor stokes drift activated   
     224         IF ( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor ) )   THEN    
     225             CALL ctl_warn( 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauoc=F, ln_stcor=F')   
     226         !drag coefficient read from wave model definable only with mfs bulk formulae and core 
    222227         ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) )       THEN        
    223228             CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core') 
     229         ELSEIF (ln_stcor .AND. .NOT. ln_sdw) THEN    
     230             CALL ctl_stop( 'Stokes-Coriolis term calculated only if activated Stokes Drift ln_sdw=T') 
    224231         ENDIF 
    225232      ELSE 
    226       IF ( ln_cdgw .OR. ln_sdw  )                                         &  
    227          &   CALL ctl_stop('Not Activated Wave Module (ln_wave=F) but     & 
    228          & asked coupling with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 
     233         IF ( ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor ) &    
     234            &   CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ',    &   
     235            &                  'with drag coefficient (ln_cdgw =T) '  ,                        &   
     236            &                  'or Stokes Drift (ln_sdw=T) ' ,                                 &   
     237            &                  'or ocean stress modification due to waves (ln_tauoc=T) ',      &   
     238            &                  'or Stokes-Coriolis term (ln_stcori=T)'  ) 
    229239      ENDIF  
    230240      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
     
    307317 
    308318      IF( nn_ice == 4      )   CALL cice_sbc_init( nsbc )      ! CICE initialisation 
     319      !   
     320      IF( ln_wave          )   CALL sbc_wave_init              ! surface wave initialisation   
     321      ! 
    309322       
    310323   END SUBROUTINE sbc_init 
     
    386399      IF( ln_mixcpl )        CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
    387400 
     401      IF ( ln_wave .AND. ln_tauoc) THEN                 ! Wave stress subctracted   
     402            utau(:,:) = utau(:,:)*tauoc_wave(:,:)   
     403            vtau(:,:) = vtau(:,:)*tauoc_wave(:,:)   
     404            taum(:,:) = taum(:,:)*tauoc_wave(:,:)   
     405      !   
     406            SELECT CASE( nsbc )   
     407            CASE(  0,1,2,3,5,-1 )  ;   
     408                IF(lwp .AND. kt == nit000 ) WRITE(numout,*) 'WARNING: You are subtracting the wave stress to the ocean. &   
     409                        & If not requested select ln_tauoc=.false'   
     410            END SELECT   
     411      !   
     412      END IF 
    388413 
    389414      !                                            !==  Misc. Options  ==! 
Note: See TracChangeset for help on using the changeset viewer.