Ignore:
Timestamp:
2019-01-06T17:17:13+01:00 (22 months ago)
Author:
deazer
Message:

Added option to taper sbc fluxes near very shallow water when using WAD
Corrected some IO bugs in dia25h, diatmb for WAD case.
User has control of the tapering. At what depth to start it, and at what fraction to start
the tanh tapering. At the WAD limit SBC is turned off completely.
Dry cells do not have any communication with the atmosphere
To DO: Documentation update.
Although not all sette tests are passed (AGRIF etc.)
it does no worse than the trunk at the revision the branch is made

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_10448_WAD_SBC_BUGFIX/src/OCE/SBC/sbcmod.F90

    r10425 r10456  
    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.