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 12497 for NEMO/branches – NEMO

Changeset 12497 for NEMO/branches


Ignore:
Timestamp:
2020-03-02T12:45:12+01:00 (4 years ago)
Author:
dancopsey
Message:

Fix volume and area calculations after melt ponds overflow to the ocean.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_fix_cpl/src/ICE/icethd_pnd.F90

    r12484 r12497  
    245245                dh_ip_over = zpnd_aspect * a_pnd_avail_1d(ji) - h_ip_1d(ji)   ! This will be a negative number 
    246246                dh_ip_over = MAX(dh_ip_over,max_h_diff_ts)                       ! Apply a limit 
    247                 h_ip_1d(ji) = h_ip_1d(ji) + dh_ip_over 
    248                 a_ip_1d(ji) = a_pnd_avail_1d(ji) * a_i_1d(ji) 
     247                h_ip_1d(ji) = MAX(0._wp, h_ip_1d(ji) + dh_ip_over) 
     248                a_ip_frac_1d(ji) = h_ip_1d(ji) / zpnd_aspect 
     249                a_ip_1d(ji) = a_ip_frac_1d(ji) * a_i_1d(ji) 
    249250                v_ip_1d(ji) = h_ip_1d(ji) * a_ip_1d(ji) 
    250                 a_ip_frac_1d(ji) = a_ip_1d(ji) / a_i_1d(ji) 
    251251 
    252252            ENDIF 
     
    257257                dh_ip_over = 0.5_wp * h_i_1d(ji) - h_ip_1d(ji)                ! This will be a negative number 
    258258                dh_ip_over = MAX(dh_ip_over,max_h_diff_ts)                       ! Apply a limit 
    259                 h_ip_1d(ji) = h_ip_1d(ji) + dh_ip_over 
     259                h_ip_1d(ji) = MAX(0._wp, h_ip_1d(ji) + dh_ip_over) 
    260260                a_ip_frac_1d(ji) = h_ip_1d(ji) / zpnd_aspect 
    261261                a_ip_1d(ji) = a_ip_frac_1d(ji) * a_i_1d(ji) 
     
    289289                v_ip_old = v_ip_1d(ji)   ! Save original volume before leak for future use 
    290290                dh_ip_over = MAX(dh_ip_over,max_h_diff_ts)                       ! Apply a limit 
    291                 h_ip_1d(ji) = h_ip_1d(ji) + dh_ip_over 
     291                h_ip_1d(ji) = MAX(0._wp, h_ip_1d(ji) + dh_ip_over) 
    292292                a_ip_frac_1d(ji) = h_ip_1d(ji) / zpnd_aspect 
    293293                a_ip_1d(ji) = a_ip_frac_1d(ji) * a_i_1d(ji) 
     
    314314         ENDIF 
    315315 
    316       END DO 
    317316      END DO 
    318317      ! 
Note: See TracChangeset for help on using the changeset viewer.