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

Ignore:
Timestamp:
2017-04-13T12:07:16+02:00 (7 years ago)
Author:
jcastill
Message:

Series of small bug fixes and stetic changes:

-Fix possible bug in the calculation of Stokes-Coriolis
-Move all the wave control variables to namelist namsbc_wave
-Use one namelist variable instead of two to set Stokes drift velocity coupling
-Cap the values of the Craig and Banner constant as calculated from wave input fields to take into account small values of the friction velocity
-Add new Phillips parametrization for Stokes drift vertical velocity, using the inverse depth scale as in Breivik 2015, instead of the peak wave number as calculated from wave input fields
-Better control of the wave fields that are read from file depending on the wave parameters

File:
1 edited

Legend:

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

    r7878 r7905  
    8888      NAMELIST/namsbc/ nn_fsbc   , ln_ana    , ln_flx, ln_blk_clio, ln_blk_core, ln_mixcpl,   & 
    8989         &             ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc   , ln_rnf   ,   & 
    90          &             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  ,   & 
    92          &             ln_phioc  , ln_wavcpl , nn_drag, nn_sdrift 
     90         &             ln_ssr    , nn_isf    , nn_fwb, ln_wave    , nn_lsm     , nn_limflx,   & 
     91                       nn_components, ln_cpl , ln_wavcpl 
    9392      INTEGER  ::   ios 
    9493      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
     
    134133         WRITE(numout,*) '              forced-coupled wav mixed formulation       ln_wavcpl   = ', ln_wavcpl 
    135134         WRITE(numout,*) '              wave physics                               ln_wave     = ', ln_wave  
    136          WRITE(numout,*) '                 Stokes drift corr. to vert. velocity    ln_sdw      = ', ln_sdw  
    137          WRITE(numout,*) '                 wave modified ocean stress              ln_tauoc    = ', ln_tauoc  
    138          WRITE(numout,*) '                 wave to ocean energy - wave breaking    ln_phioc    = ', ln_phioc 
    139          WRITE(numout,*) '                 Stokes coriolis term                    ln_stcor    = ', ln_stcor  
    140          WRITE(numout,*) '                 neutral drag coefficient                ln_cdgw     = ', ln_cdgw 
    141135         WRITE(numout,*) '              OASIS coupling (with atm or sas)           lk_oasis    = ', lk_oasis 
    142136         WRITE(numout,*) '              components of your executable              nn_components = ', nn_components 
     
    153147         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea   = ', nn_closea 
    154148         WRITE(numout,*) '              n. of iterations if land-sea-mask applied  nn_lsm      = ', nn_lsm 
    155          WRITE(numout,*) '              momentum formulation                       nn_drag     = ', nn_drag 
    156149      ENDIF 
    157150 
     
    222215      IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) .AND. nn_components /= jp_iam_opa )   & 
    223216         &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' ) 
    224        
    225       IF ( ln_wave ) THEN 
    226          !Activated wave module but neither drag nor stokes drift activated  
    227          IF ( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor .OR. ln_phioc) )   THEN   
    228              CALL ctl_warn( 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauoc=F, ln_stcor=F, ln_phioc=F')  
    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') 
    231          ENDIF 
    232          IF ( ln_cdgw .AND. .NOT.(nn_drag==jp_ukmo .OR. nn_drag==jp_std .OR. nn_drag==jp_const .OR. nn_drag==jp_mcore) ) &  
    233              CALL ctl_stop( 'The chosen nn_drag for momentum calculation must be 0, 1, 2, or 3') 
    234          IF ( ln_cdgw .AND. ln_blk_core .AND. nn_drag==0 ) & 
    235              CALL ctl_stop( 'The chosen nn_drag for momentum calculation in core forcing must be 1, 2, or 3') 
    236          IF ( ln_cdgw .AND. ln_flx .AND. nn_drag==3 ) & 
    237              CALL ctl_stop( 'The chosen nn_drag for momentum calculation in direct forcing must be 0, 1, or 2') 
    238          IF ( ln_sdw .AND. .NOT.(nn_sdrift==jp_breivik .OR. nn_sdrift==jp_phillips) ) & 
    239              CALL ctl_stop( 'The chosen nn_sdrift for vertical Stokes drift must be 0, or 1') 
    240       ELSE 
    241          IF ( ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor .OR. ln_phioc ) &   
    242             &   CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ',    &  
    243             &                  'with drag coefficient (ln_cdgw =T) '  ,                        &  
    244             &                  'or Stokes Drift (ln_sdw=T) ' ,                                 &  
    245             &                  'or ocean stress modification due to waves (ln_tauoc=T) ',      &  
    246             &                  'or wave to ocean energy modification (ln_phioc=T) ',           &  
    247             &                  'or Stokes-Coriolis term (ln_stcor=T)'  ) 
    248       ENDIF  
    249217      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    250218      ll_purecpl = ln_cpl .AND. .NOT. ln_mixcpl .AND. .NOT. ln_wavcpl 
     
    414382            SELECT CASE( nsbc )  
    415383            CASE(  0,1,2,3,5,-1 )  ;  
    416                 IF(lwp .AND. kt == nit000 ) WRITE(numout,*) 'WARNING: You are subtracting the wave stress to the ocean. &  
    417                         & If not requested select ln_tauoc=.false'  
     384                IF(lwp .AND. kt == nit000 ) THEN 
     385                   write(numout,*) 
     386                   WRITE(numout,*) 'WARNING: You are subtracting the wave stress to the ocean. &  
     387                                                      & If not requested select ln_tauoc=.false'  
     388                   write(numout,*) 
     389                END IF 
    418390            END SELECT  
    419391      !  
Note: See TracChangeset for help on using the changeset viewer.