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 13669 for NEMO/branches/UKMO/NEMO_4.0.1_implicit_ice_drag/src/OCE/ZDF/zdfdrg.F90 – NEMO

Ignore:
Timestamp:
2020-10-23T19:23:00+02:00 (4 years ago)
Author:
dancopsey
Message:

Merge in implicit sea ice drag code from NEMO/branches/UKMO/NEMO_4.0.1_FKOSM_m11715

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_implicit_ice_drag/src/OCE/ZDF/zdfdrg.F90

    r11715 r13669  
    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 
     49   LOGICAL , PUBLIC ::   ln_drgice_imp ! implicit ice-ocean drag  
    4850 
    4951   !                                 !!* Namelist namdrg_top & _bot: TOP or BOTTOM coefficient namelist * 
     
    231233      INTEGER   ::   ios, ioptio   ! local integers 
    232234      !! 
    233       NAMELIST/namdrg/ ln_OFF, ln_lin, ln_non_lin, ln_loglayer, ln_drgimp 
     235      NAMELIST/namdrg/ ln_OFF, ln_lin, ln_non_lin, ln_loglayer, ln_drgimp, ln_drgice_imp 
    234236      !!---------------------------------------------------------------------- 
    235237      ! 
     
    254256         WRITE(numout,*) '      logarithmic drag: Cd = vkarmn/log(z/z0)   ln_loglayer = ', ln_loglayer 
    255257         WRITE(numout,*) '      implicit friction                         ln_drgimp   = ', ln_drgimp 
     258         WRITE(numout,*) '      implicit ice-ocean drag                   ln_drgice_imp  =', ln_drgice_imp 
    256259      ENDIF 
    257260      ! 
     
    264267      IF( ioptio /= 1 )   CALL ctl_stop( 'zdf_drg_init: Choose ONE type of drag coef in namdrg' ) 
    265268      ! 
     269      IF ( ln_drgice_imp.AND.(.NOT.ln_drgimp) ) &  
     270         &                CALL ctl_stop( 'zdf_drg_init: ln_drgice_imp=T requires ln_drgimp=T' ) 
     271      ! 
     272      IF ( ln_drgice_imp.AND.( nn_ice /=2 ) ) & 
     273         &  CALL ctl_stop( 'zdf_drg_init: ln_drgice_imp=T requires si3' ) 
    266274      ! 
    267275      !                     !==  BOTTOM drag setting  ==!   (applied at seafloor) 
     
    274282      !                     !==  TOP drag setting  ==!   (applied at the top of ocean cavities) 
    275283      ! 
    276       IF( ln_isfcav ) THEN              ! Ocean cavities: top friction setting 
    277          ALLOCATE( rCd0_top(jpi,jpj), rCdU_top(jpi,jpj) ) 
     284      IF( ln_isfcav.OR.ln_drgice_imp ) THEN              ! Ocean cavities: top friction setting 
     285         ALLOCATE( rCdU_top(jpi,jpj) ) 
     286      ENDIF 
     287      ! 
     288      IF( ln_isfcav ) THEN 
     289         ALLOCATE( rCd0_top(jpi,jpj) ) 
    278290         CALL drg_init( 'TOP   '   , mikt       ,                                         &   ! <== in 
    279291            &           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.