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 7350 for branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2016-11-28T13:08:46+01:00 (7 years ago)
Author:
emanuelaclementi
Message:

ticket #1805 step 2: Add in changes from the 2015/dev_r5936_INGV1_WAVE branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5836 r7350  
    8888         &             ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc   , ln_rnf   ,   & 
    8989         &             ln_ssr    , nn_isf    , nn_fwb, ln_cdgw    , ln_wave    , ln_sdw   ,   & 
    90          &             nn_lsm    , nn_limflx , nn_components, ln_cpl 
     90         &             ln_tauoc  , ln_stcor  , nn_lsm, nn_limflx  , nn_components, ln_cpl  
    9191      INTEGER  ::   ios 
    9292      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
     
    131131         WRITE(numout,*) '              ocean-atmosphere coupled formulation       ln_cpl      = ', ln_cpl 
    132132         WRITE(numout,*) '              forced-coupled mixed formulation           ln_mixcpl   = ', ln_mixcpl 
     133         WRITE(numout,*) '              wave physics                               ln_wave     = ', ln_wave 
     134         WRITE(numout,*) '                 Stokes drift corr. to vert. velocity    ln_sdw      = ', ln_sdw 
     135         WRITE(numout,*) '                 wave modified ocean stress              ln_tauoc    = ', ln_tauoc 
     136         WRITE(numout,*) '                 Stokes coriolis term                    ln_stcor    = ', ln_stcor 
     137         WRITE(numout,*) '                 neutral drag coefficient (CORE, MFS)    ln_cdgw     = ', ln_cdgw 
    133138         WRITE(numout,*) '              OASIS coupling (with atm or sas)           lk_oasis    = ', lk_oasis 
    134139         WRITE(numout,*) '              components of your executable            nn_components = ', nn_components 
     
    216221      IF ( ln_wave ) THEN 
    217222      !Activated wave module but neither drag nor stokes drift activated 
    218          IF ( .NOT.(ln_cdgw .OR. ln_sdw) )   THEN 
    219             CALL ctl_warn( 'Ask for wave coupling but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' ) 
     223         IF ( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor ) )   THEN 
     224            CALL ctl_warn( 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauoc=F, ln_stcor=F') 
    220225      !drag coefficient read from wave model definable only with mfs bulk formulae and core  
    221226         ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) )       THEN        
    222227             CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core') 
     228         ELSEIF (ln_stcor .AND. .NOT. ln_sdw)                             THEN 
     229             CALL ctl_stop( 'Stokes-Coriolis term calculated only if activated Stokes Drift ln_sdw=T') 
    223230         ENDIF 
    224231      ELSE 
    225       IF ( ln_cdgw .OR. ln_sdw  )                                                           &  
     232      IF ( ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor )                &  
    226233         &   CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ',    & 
    227          &                  'with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 
     234         &                  'with drag coefficient (ln_cdgw =T) '  ,                        & 
     235         &                  'or Stokes Drift (ln_sdw=T) ' ,                                 & 
     236         &                  'or ocean stress modification due to waves (ln_tauoc=T) ',      &   
     237         &                  'or Stokes-Coriolis term (ln_stcori=T)'  ) 
    228238      ENDIF  
    229239      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
     
    360370                             CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: OPA receiving fields from SAS 
    361371      END SELECT 
    362  
     372      IF ( ln_wave .AND. ln_tauoc) THEN                                 ! Wave stress subctracted 
     373            utau(:,:) = utau(:,:)*tauoc_wave(:,:) 
     374            vtau(:,:) = vtau(:,:)*tauoc_wave(:,:) 
     375            taum(:,:) = taum(:,:)*tauoc_wave(:,:) 
     376      ! 
     377            SELECT CASE( nsbc ) 
     378            CASE(  0,1,2,3,5,-1 )  ; 
     379                IF(lwp) WRITE(numout,*) 'WARNING: You are subtracting the wave stress to the ocean. & 
     380                        & If not requested select ln_tauoc=.false' 
     381            END SELECT 
     382      ! 
     383      END IF 
    363384      IF( ln_mixcpl )        CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
    364385 
Note: See TracChangeset for help on using the changeset viewer.