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 8985 for branches/2017/dev_METO_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2017-12-12T10:16:18+01:00 (7 years ago)
Author:
timgraham
Message:

Merged Wetting and drying changes into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_METO_2017/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r8924 r8985  
    3737   USE wrk_nemo       ! Memory Allocation 
    3838   USE timing         ! Timing 
     39   USE wet_dry,  ONLY : ll_wd, rn_wdmin1, r_rn_wdmin1 ! Wetting and drying 
    3940 
    4041   IMPLICIT NONE 
     
    125126      DO jj = 2, jpj 
    126127         DO ji = fs_2, fs_jpim1   ! vector opt. 
    127             sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     128            IF ( ll_wd ) THEN     ! If near WAD point limit the flux for now 
     129               IF ( sshn(ji,jj) + ht_0(ji,jj) >  2._wp * rn_wdmin1 ) THEN 
     130                  sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     131               ELSE IF ( sshn(ji,jj) + ht_0(ji,jj) >  rn_wdmin1 ) THEN 
     132                  sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj) * (tanh(5._wp*( ( sshn(ji,jj) + ht_0(ji,jj) -  rn_wdmin1 )*r_rn_wdmin1)) ) 
     133               ELSE 
     134                  sbc_tsc(ji,jj,jp_tem) = 0._wp 
     135               ENDIF 
     136            ELSE  
     137               sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj)   ! non solar heat flux 
     138            ENDIF 
     139 
    128140            sbc_tsc(ji,jj,jp_sal) = r1_rau0     * sfx(ji,jj)   ! salt flux due to freezing/melting 
    129141         END DO 
Note: See TracChangeset for help on using the changeset viewer.