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 12991 for NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2020-05-29T12:58:31+02:00 (4 years ago)
Author:
emanuelaclementi
Message:

Included wave-current processes following Couvelard et al 2019 and Gurvan code -ticket #2155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcmod.F90

    r12489 r12991  
    1616   !!            4.0  ! 2016-06  (L. Brodeau) new general bulk formulation 
    1717   !!            4.0  ! 2019-03  (F. Lemarié & G. Samson)  add ABL compatibility (ln_abl=TRUE) 
     18   !!            4.2  ! 2020-05  (G. Madec, E. Clementi) modified wave forcing and coipling   
    1819   !!---------------------------------------------------------------------- 
    1920 
     
    5455   USE usrdef_sbc     ! user defined: surface boundary condition 
    5556   USE closea         ! closed sea 
     57   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    5658   ! 
    5759   USE prtctl         ! Print control                    (prt_ctl routine) 
     
    7072 
    7173   INTEGER ::   nsbc   ! type of surface boundary condition (deduced from namsbc informations) 
    72  
     74   !! * Substitutions 
     75#  include "do_loop_substitute.h90" 
    7376   !!---------------------------------------------------------------------- 
    7477   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    99102         &             nn_ice   , ln_ice_embd,                                       & 
    100103         &             ln_traqsr, ln_dm2dc ,                                         & 
    101          &             ln_rnf   , nn_fwb     , ln_ssr   , ln_apr_dyn,              & 
    102          &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor  ,     & 
    103          &             ln_tauw  , nn_lsm, nn_sdrift 
     104         &             ln_rnf   , nn_fwb     , ln_ssr   , ln_apr_dyn,                & 
     105         &             ln_wave  , nn_lsm 
    104106      !!---------------------------------------------------------------------- 
    105107      ! 
     
    140142         WRITE(numout,*) '         bulk         formulation                   ln_blk        = ', ln_blk 
    141143         WRITE(numout,*) '         ABL          formulation                   ln_abl        = ', ln_abl 
     144         WRITE(numout,*) '         Surface wave (forced or coupled)           ln_wave       = ', ln_wave 
    142145         WRITE(numout,*) '      Type of coupling (Ocean/Ice/Atmosphere) : ' 
    143146         WRITE(numout,*) '         ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
     
    157160         WRITE(numout,*) '         runoff / runoff mouths                     ln_rnf        = ', ln_rnf 
    158161         WRITE(numout,*) '         nb of iterations if land-sea-mask applied  nn_lsm        = ', nn_lsm 
    159          WRITE(numout,*) '         surface wave                               ln_wave       = ', ln_wave 
    160          WRITE(numout,*) '               Stokes drift corr. to vert. velocity ln_sdw        = ', ln_sdw 
    161          WRITE(numout,*) '                  vertical parametrization          nn_sdrift     = ', nn_sdrift 
    162          WRITE(numout,*) '               wave modified ocean stress           ln_tauwoc     = ', ln_tauwoc 
    163          WRITE(numout,*) '               wave modified ocean stress component ln_tauw       = ', ln_tauw 
    164          WRITE(numout,*) '               Stokes coriolis term                 ln_stcor      = ', ln_stcor 
    165          WRITE(numout,*) '               neutral drag coefficient (CORE,NCAR) ln_cdgw       = ', ln_cdgw 
    166       ENDIF 
    167       ! 
    168       IF( .NOT.ln_wave ) THEN 
    169          ln_sdw = .false. ; ln_cdgw = .false. ; ln_tauwoc = .false. ; ln_tauw = .false. ; ln_stcor = .false. 
    170       ENDIF  
    171       IF( ln_sdw ) THEN 
    172          IF( .NOT.(nn_sdrift==jp_breivik_2014 .OR. nn_sdrift==jp_li_2017 .OR. nn_sdrift==jp_peakfr) ) & 
    173             CALL ctl_stop( 'The chosen nn_sdrift for Stokes drift vertical velocity must be 0, 1, or 2' ) 
    174       ENDIF 
    175       ll_st_bv2014  = ( nn_sdrift==jp_breivik_2014 ) 
    176       ll_st_li2017  = ( nn_sdrift==jp_li_2017 ) 
    177       ll_st_bv_li   = ( ll_st_bv2014 .OR. ll_st_li2017 ) 
    178       ll_st_peakfr  = ( nn_sdrift==jp_peakfr ) 
    179       IF( ln_tauwoc .AND. ln_tauw ) & 
    180          CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', & 
    181                                   '(ln_tauwoc=.true. and ln_tauw=.true.)' ) 
    182       IF( ln_tauwoc ) & 
    183          CALL ctl_warn( 'You are subtracting the wave stress to the ocean (ln_tauwoc=.true.)' ) 
    184       IF( ln_tauw ) & 
    185          CALL ctl_warn( 'The wave modified ocean stress components are used (ln_tauw=.true.) ', & 
    186                               'This will override any other specification of the ocean stress' ) 
     162      ENDIF 
    187163      ! 
    188164      IF( .NOT.ln_usr ) THEN     ! the model calendar needs some specificities (except in user defined case) 
     
    364340      IF( nn_ice == 3 )   CALL cice_sbc_init( nsbc, Kbb, Kmm )   ! CICE initialization 
    365341      ! 
    366       IF( ln_wave     )   CALL sbc_wave_init                     ! surface wave initialisation 
     342      IF( ln_wave     ) THEN 
     343                          CALL sbc_wave_init                     ! surface wave initialisation 
     344      ELSE 
     345                          IF(lwp) WRITE(numout,*) 
     346                          IF(lwp) WRITE(numout,*) '   No surface waves : all wave related logical set to false' 
     347                          ln_sdw       = .false. 
     348                          ln_stcor     = .false. 
     349                          ln_cdgw      = .false. 
     350                          ln_tauoc     = .false. 
     351                          ln_wave_test = .false. 
     352                          ln_charn     = .false. 
     353                          ln_taw       = .false. 
     354                          ln_phioc     = .false. 
     355                          ln_bern_srfc = .false. 
     356                          ln_breivikFV_2016 = .false. 
     357                          ln_vortex_force = .false. 
     358                          ln_stshear  = .false. 
     359      ENDIF 
    367360      ! 
    368361      IF( lwxios ) THEN 
     
    397390      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    398391      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices 
     392      INTEGER  ::   jj, ji          ! dummy loop argument 
    399393      ! 
    400394      LOGICAL ::   ll_sas, ll_opa   ! local logical 
     
    429423      ! 
    430424      IF( .NOT.ll_sas )   CALL sbc_ssm ( kt, Kbb, Kmm )  ! mean ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 
    431       IF( ln_wave     )   CALL sbc_wave( kt, Kmm )       ! surface waves 
    432  
    433425      ! 
    434426      !                                            !==  sbc formulation  ==! 
    435427      !                                                    
     428      ! 
    436429      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition 
    437430      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx) 
     
    440433      CASE( jp_blk     ) 
    441434         IF( ll_sas    )       CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice, Kbb, Kmm )   ! OPA-SAS coupling: SAS receiving fields from OPA 
     435!!!!!!!!!!! ATTENTION:ln_wave is not only used for oasis coupling !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
     436         IF( ln_wave )   THEN 
     437             IF ( lk_oasis )  CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm )   ! OPA-wave coupling 
     438             CALL sbc_wave ( kt, Kmm ) 
     439         ENDIF 
    442440                               CALL sbc_blk       ( kt )                    ! bulk formulation for the ocean 
    443441                               ! 
     
    453451      IF( ln_mixcpl )          CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice, Kbb, Kmm )  ! forced-coupled mixed formulation after forcing 
    454452      ! 
    455       IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )              ! Wind stress provided by waves  
     453      IF( ln_wave .AND. ln_tauoc )  THEN            ! Wave stress reduction 
     454         DO_2D_00_00 
     455            utau(ji,jj) = utau(ji,jj) * ( tauoc_wave(ji,jj) + tauoc_wave(ji-1,jj) ) * 0.5_wp 
     456            vtau(ji,jj) = vtau(ji,jj) * ( tauoc_wave(ji,jj) + tauoc_wave(ji,jj-1) ) * 0.5_wp 
     457         END_2D 
     458         ! 
     459         CALL lbc_lnk( 'sbcwave', utau, 'U', -1. ) 
     460         CALL lbc_lnk( 'sbcwave', vtau, 'V', -1. ) 
     461         ! 
     462         taum(:,:) = taum(:,:)*tauoc_wave(:,:) 
     463         ! 
     464         IF( kt == nit000 )   CALL ctl_warn( 'sbc: You are subtracting the wave stress to the ocean.',   & 
     465            &                                'If not requested select ln_tauoc=.false.' ) 
     466         ! 
     467      ELSEIF( ln_wave .AND. ln_taw ) THEN                  ! Wave stress reduction 
     468         utau(:,:) = utau(:,:) - tawx(:,:) + twox(:,:) 
     469         vtau(:,:) = vtau(:,:) - tawy(:,:) + twoy(:,:) 
     470         CALL lbc_lnk( 'sbcwave', utau, 'U', -1. ) 
     471         CALL lbc_lnk( 'sbcwave', vtau, 'V', -1. ) 
     472         ! 
     473         DO_2D_00_00 
     474             taum(ji,jj) = sqrt((.5*(utau(ji-1,jj)+utau(ji,jj)))**2 + (.5*(vtau(ji,jj-1)+vtau(ji,jj)))**2) 
     475         END_2D 
     476         ! 
     477         IF( kt == nit000 )   CALL ctl_warn( 'sbc: You are subtracting the wave stress to the ocean.',   & 
     478            &                                'If not requested select ln_taw=.false.' ) 
     479         ! 
     480      ENDIF 
     481      CALL lbc_lnk( 'sbcmod', taum(:,:), 'T', 1. ) 
    456482      ! 
    457483      !                                            !==  Misc. Options  ==! 
Note: See TracChangeset for help on using the changeset viewer.