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 13658 for NEMO/branches/UKMO/NEMO_4.0.2_IODRAG/src/OCE/ZDF/zdfdrg.F90 – NEMO

Ignore:
Timestamp:
2020-10-21T17:14:23+02:00 (3 years ago)
Author:
cguiavarch
Message:

Implicit sea ice drag: merge from NEMO/branches/MOI/NEMO_4.03_IODRAG [12947:12964]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.2_IODRAG/src/OCE/ZDF/zdfdrg.F90

    r12658 r13658  
    3232   USE lib_mpp        ! distributed memory computing 
    3333   USE prtctl         ! Print control 
     34   USE sbc_oce, ONLY: nn_ice  
    3435 
    3536   IMPLICIT NONE 
     
    4647   LOGICAL          ::   ln_loglayer  ! logarithmic drag: Cd = vkarmn/log(z/z0) 
    4748   LOGICAL , PUBLIC ::   ln_drgimp    ! implicit top/bottom friction flag 
    48  
     49   LOGICAL , PUBLIC ::   ln_drgice_imp ! implicit ice-ocean drag  
    4950   !                                 !!* Namelist namdrg_top & _bot: TOP or BOTTOM coefficient namelist * 
    5051   REAL(wp)         ::   rn_Cd0       !: drag coefficient                                           [ - ] 
     
    231232      INTEGER   ::   ios, ioptio   ! local integers 
    232233      !! 
    233       NAMELIST/namdrg/ ln_OFF, ln_lin, ln_non_lin, ln_loglayer, ln_drgimp 
     234      NAMELIST/namdrg/ ln_OFF, ln_lin, ln_non_lin, ln_loglayer, ln_drgimp, ln_drgice_imp 
    234235      !!---------------------------------------------------------------------- 
    235236      ! 
     
    254255         WRITE(numout,*) '      logarithmic drag: Cd = vkarmn/log(z/z0)   ln_loglayer = ', ln_loglayer 
    255256         WRITE(numout,*) '      implicit friction                         ln_drgimp   = ', ln_drgimp 
     257         WRITE(numout,*) '      implicit ice-ocean drag                   ln_drgice_imp  =', ln_drgice_imp 
    256258      ENDIF 
    257259      ! 
     
    264266      IF( ioptio /= 1 )   CALL ctl_stop( 'zdf_drg_init: Choose ONE type of drag coef in namdrg' ) 
    265267      ! 
     268      IF ( ln_drgice_imp.AND.(.NOT.ln_drgimp) ) &  
     269         &                CALL ctl_stop( 'zdf_drg_init: ln_drgice_imp=T requires ln_drgimp=T' ) 
     270      ! 
     271      IF ( ln_drgice_imp.AND.( nn_ice /=2 ) ) & 
     272         &  CALL ctl_stop( 'zdf_drg_init: ln_drgice_imp=T requires si3' ) 
    266273      ! 
    267274      !                     !==  BOTTOM drag setting  ==!   (applied at seafloor) 
     
    274281      !                     !==  TOP drag setting  ==!   (applied at the top of ocean cavities) 
    275282      ! 
    276       IF( ln_isfcav ) THEN              ! Ocean cavities: top friction setting 
    277          ALLOCATE( rCd0_top(jpi,jpj), rCdU_top(jpi,jpj) ) 
     283      IF( ln_isfcav.OR.ln_drgice_imp ) THEN              ! Ocean cavities: top friction setting 
     284         ALLOCATE( rCdU_top(jpi,jpj) ) 
     285      ENDIF 
     286      ! 
     287      IF( ln_isfcav ) THEN 
     288         ALLOCATE( rCd0_top(jpi,jpj)) 
    278289         CALL drg_init( 'TOP   '   , mikt       ,                                         &   ! <== in 
    279290            &           r_Cdmin_top, r_Cdmax_top, r_z0_top, r_ke0_top, rCd0_top, rCdU_top )   ! ==> out 
Note: See TracChangeset for help on using the changeset viewer.