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 11518 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyice.F90 – NEMO

Ignore:
Timestamp:
2019-09-09T19:57:45+02:00 (5 years ago)
Author:
clem
Message:

add the final touch to the famous gaston's branch. More precisely, add the possibility to have melt ponds as input file when using bdy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyice.F90

    r11514 r11518  
    161161            t_su(ji,jj,  jl) = ( t_su(ji,jj,  jl) * zwgt1 + dta%tsu(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Surf temperature 
    162162            s_i (ji,jj,  jl) = ( s_i (ji,jj,  jl) * zwgt1 + dta%s_i(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  salinity 
    163             sz_i(ji,jj,:,jl) =   s_i (ji,jj,  jl) 
     163            a_ip(ji,jj,  jl) = ( a_ip(ji,jj,  jl) * zwgt1 + dta%aip(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  pond concentration 
     164            h_ip(ji,jj,  jl) = ( h_ip(ji,jj,  jl) * zwgt1 + dta%hip(i_bdy,jl) * zwgt ) * tmask(ji,jj,1)  ! Ice  pond depth 
     165            ! 
     166            sz_i(ji,jj,:,jl) = s_i(ji,jj,jl) 
     167            ! 
     168            ! make sure ponds = 0 if no ponds scheme 
     169            IF( .NOT.ln_pnd ) THEN 
     170               a_ip(ji,jj,jl) = 0._wp 
     171               h_ip(ji,jj,jl) = 0._wp 
     172            ENDIF 
    164173            ! 
    165174            ! ----------------- 
     
    177186            h_i(ji,jj,jl) = MIN( hi_max(jl), h_i(ji,jj,jl) + zdh ) 
    178187            h_s(ji,jj,jl) = MAX( 0._wp, h_s(ji,jj,jl) - zdh * rhoi / rhos )  
    179  
     188            ! 
    180189         ENDDO 
    181190      ENDDO 
     
    220229               t_su(ji,jj,  jl) = t_su(ib,jb,  jl) 
    221230               s_i (ji,jj,  jl) = s_i (ib,jb,  jl) 
     231               a_ip(ji,jj,  jl) = a_ip(ib,jb,  jl) 
     232               h_ip(ji,jj,  jl) = h_ip(ib,jb,  jl) 
     233               ! 
    222234               sz_i(ji,jj,:,jl) = sz_i(ib,jb,:,jl) 
    223235               ! 
    224                ! ice age and ponds 
    225                IF( jpbound == 0 ) THEN  ! velocity is inward 
     236               ! ice age 
     237               IF    ( jpbound == 0 ) THEN  ! velocity is inward 
    226238                  oa_i(ji,jj,jl) = rice_age(jbdy) * a_i(ji,jj,jl) 
    227                   IF( ln_pnd_CST .OR. ln_pnd_H12 ) THEN 
    228                      a_ip_frac(ji,jj,jl) = rice_apnd(jbdy) 
    229                      a_ip     (ji,jj,jl) = rice_apnd(jbdy) * a_i (ji,jj,jl) 
    230                      v_ip     (ji,jj,jl) = rice_hpnd(jbdy) * a_ip(ji,jj,jl) 
    231                   ENDIF 
    232239               ELSEIF( jpbound == 1 ) THEN  ! velocity is outward 
    233240                  oa_i(ji,jj,jl) = oa_i(ib,jb,jl) 
    234                   IF( ln_pnd_CST .OR. ln_pnd_H12 ) THEN 
    235                      a_ip_frac(ji,jj,jl) = a_ip_frac(ib,jb,jl) 
    236                      a_ip     (ji,jj,jl) = a_ip     (ib,jb,jl) 
    237                      v_ip     (ji,jj,jl) = v_ip     (ib,jb,jl) 
    238                   ENDIF 
    239241               ENDIF 
    240242               ! 
     
    261263                  e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) * r1_nlay_i                            ! enthalpy in J/m2 
    262264               END DO 
     265               ! 
     266               ! melt ponds 
     267               IF( a_i(ji,jj,jl) > epsi10 ) THEN 
     268                  a_ip_frac(ji,jj,jl) = a_ip(ji,jj,jl) / a_i (ji,jj,jl) 
     269               ELSE 
     270                  a_ip_frac(ji,jj,jl) = 0._wp 
     271               ENDIF 
     272               v_ip(ji,jj,jl) = h_ip(ji,jj,jl) * a_ip(ji,jj,jl) 
    263273               ! 
    264274            ELSE   ! no ice at the boundary 
Note: See TracChangeset for help on using the changeset viewer.