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 11494 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90 – NEMO

Ignore:
Timestamp:
2019-09-03T12:46:35+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF: switch on isf param in WED025 and fix bugs in isf param code + cosmetic changes (ticket #2142)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90

    r11488 r11494  
    4242      !!---------------------------------------------------------------------- 
    4343      !! 
    44       !! ** Purpose    : compute ice shelf fwf/heqt fluxes  
     44      !! ** Purpose    : compute or read ice shelf fwf/heat fluxes in the ice shelf cavity 
    4545      !! 
    4646      !!--------------------------------------------------------------------- 
     
    189189            ! 
    190190            ! compute coeficient to solve the 2nd order equation 
    191             zeps1 = rau0_rcp*pgt(ji,jj) 
    192             zeps2 = rLfusisf*rau0*pgs(ji,jj) 
    193             zeps3 = rhoisf*rcpisf*rkappa/MAX(risfdep(ji,jj),zeps) 
    194             zeps4 = risf_lamb2+risf_lamb3*risfdep(ji,jj) 
    195             zeps6 = zeps4-pttbl(ji,jj) 
    196             zeps7 = zeps4-rtsurf 
     191            zeps1 = rau0_rcp * pgt(ji,jj) 
     192            zeps2 = rLfusisf * rau0 * pgs(ji,jj) 
     193            zeps3 = rhoisf * rcpisf * rkappa / MAX(risfdep(ji,jj),zeps) 
     194            zeps4 = risf_lamb2 + risf_lamb3 * risfdep(ji,jj) 
     195            zeps6 = zeps4 - pttbl(ji,jj) 
     196            zeps7 = zeps4 - rtsurf 
    197197            ! 
    198198            ! solve the 2nd order equation to find zsfrz 
    199199            zaqe  = risf_lamb1 * (zeps1 + zeps3) 
    200             zaqer = 0.5_wp/MIN(zaqe,-zeps) 
    201             zbqe  = zeps1*zeps6+zeps3*zeps7-zeps2 
    202             zcqe  = zeps2*pstbl(ji,jj) 
    203             zdis  = zbqe*zbqe-4.0_wp*zaqe*zcqe                
     200            zaqer = 0.5_wp / MIN(zaqe,-zeps) 
     201            zbqe  = zeps1 * zeps6 + zeps3 * zeps7 - zeps2 
     202            zcqe  = zeps2 * pstbl(ji,jj) 
     203            zdis  = zbqe * zbqe - 4.0_wp * zaqe * zcqe                
    204204            ! 
    205205            ! Presumably zdis can never be negative because gammas is very small compared to gammat 
    206             zsfrz=(-zbqe-SQRT(zdis))*zaqer 
    207             IF ( zsfrz < 0.0_wp ) zsfrz=(-zbqe+SQRT(zdis))*zaqer  ! check this if this if is needed 
     206            zsfrz=(-zbqe - SQRT(zdis)) * zaqer 
     207            IF ( zsfrz < 0.0_wp ) zsfrz=(-zbqe + SQRT(zdis)) * zaqer  ! check this if this if is needed 
    208208            ! 
    209209            ! compute t freeze (eq. 25) 
Note: See TracChangeset for help on using the changeset viewer.