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 10499 for NEMO/trunk/src/OCE/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2019-01-10T16:12:24+01:00 (5 years ago)
Author:
deazer
Message:

Fix ticket #2154

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/SBC/sbcmod.F90

    r10425 r10499  
    5858   USE lib_mpp        ! MPP library 
    5959   USE timing         ! Timing 
     60   USE wet_dry 
    6061   USE diurnal_bulk, ONLY:   ln_diurnal_only   ! diurnal SST diagnostic 
    6162 
     
    377378      ! 
    378379      LOGICAL ::   ll_sas, ll_opa   ! local logical 
     380      ! 
     381      REAL(wp) ::     zthscl        ! wd  tanh scale 
     382      REAL(wp), DIMENSION(jpi,jpj) ::  zwdht, zwght  ! wd dep over wd limit, wgt   
     383 
    379384      !!--------------------------------------------------------------------- 
    380385      ! 
     
    461466!!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why. 
    462467!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) 
     468      IF ( ll_wd ) THEN     ! If near WAD point limit the flux for now 
     469         zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999  
     470         zwdht(:,:) = sshn(:,:) + ht_0(:,:) - rn_wdmin1   ! do this calc of water 
     471                                                     ! depth above wd limit once 
     472         WHERE( zwdht(:,:) <= 0.0 ) 
     473            taum(:,:) = 0.0 
     474            utau(:,:) = 0.0 
     475            vtau(:,:) = 0.0 
     476            qns (:,:) = 0.0 
     477            qsr (:,:) = 0.0 
     478            emp (:,:) = min(emp(:,:),0.0) !can allow puddles to grow but not shrink 
     479            sfx (:,:) = 0.0 
     480         END WHERE 
     481         zwght(:,:) = tanh(zthscl*zwdht(:,:)) 
     482         WHERE( zwdht(:,:) > 0.0  .and. zwdht(:,:) < rn_wd_sbcdep ) !  5 m hard limit here is arbitrary 
     483            qsr  (:,:) =  qsr(:,:)  * zwght(:,:) 
     484            qns  (:,:) =  qns(:,:)  * zwght(:,:) 
     485            taum (:,:) =  taum(:,:) * zwght(:,:) 
     486            utau (:,:) =  utau(:,:) * zwght(:,:) 
     487            vtau (:,:) =  vtau(:,:) * zwght(:,:) 
     488            sfx  (:,:) =  sfx(:,:)  * zwght(:,:) 
     489            emp  (:,:) =  emp(:,:)  * zwght(:,:) 
     490         END WHERE 
     491      ENDIF 
    463492      ! 
    464493      IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    ! 
Note: See TracChangeset for help on using the changeset viewer.