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 12394 for NEMO/branches/UKMO/NEMO_4.0_add_pond_lids_prints/src/ICE/icethd_pnd.F90 – NEMO

Ignore:
Timestamp:
2020-02-18T10:44:02+01:00 (4 years ago)
Author:
dancopsey
Message:

Fix compile and XIOS errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0_add_pond_lids_prints/src/ICE/icethd_pnd.F90

    r12382 r12394  
    151151 
    152152      ! Define time-independent field for use in refreezing 
    153       omega_dt = 2.0_wp * rcnd_i * rdtice / (rLfus * rhow) 
     153      omega_dt = 2.0_wp * rcnd_i * rdt_ice / (rLfus * rhow) 
    154154 
    155155      DO ji = 1, npti 
     
    167167            h_ip_1d(ji)      = 0._wp 
    168168            lh_ip_1d(ji)     = 0._wp 
     169 
     170            actual_mlt = 0._wp 
     171            actual_frz = 0._wp 
    169172            !                                                     !--------------------------------! 
    170173         ELSE                                                     ! Case ice thickness >= rn_himin ! 
     
    190193                
    191194               ! The following equation is a rearranged form of: 
    192                ! lid_thickness_end - lid_thickness_start = rcnd_i * t_grad * rdtice / (0.5*(lid_thickness_end + lid_thickness_start) * rLfus * rhow) 
     195               ! lid_thickness_end - lid_thickness_start = rcnd_i * t_grad * rdt_ice / (0.5*(lid_thickness_end + lid_thickness_start) * rLfus * rhow) 
    193196               ! where: lid_thickness_start = lh_ip_1d(ji) 
    194197               !        lid_thickness_end = lh_ip_end 
     
    209212            END IF 
    210213 
    211             ! melt pond mass flux diagnostic (melt only) 
    212             zfac = actual_mlt * a_i_1d(ji * rhow * r1_rdtice 
    213             wfx_pnd_1d(ji) = wfx_pnd_1d(ji) - zfac 
    214             ! 
    215             ! adjust ice/snow melting flux to balance melt pond flux (>0) 
    216             zdum = zfac / ( wfx_snw_sum_1d(ji) + wfx_sum_1d(ji) ) 
    217             wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) * (1._wp + zdum) 
    218             wfx_sum_1d(ji)     = wfx_sum_1d(ji)     * (1._wp + zdum) 
     214            ! melt pond mass flux (<0) 
     215            IF( zdv_mlt > 0._wp ) THEN 
     216               zfac = actual_mlt * a_i_1d(ji) * rhow * r1_rdtice 
     217               wfx_pnd_1d(ji) = wfx_pnd_1d(ji) - zfac 
     218               ! 
     219               ! adjust ice/snow melting flux to balance melt pond flux (>0) 
     220               zdum = zfac / ( wfx_snw_sum_1d(ji) + wfx_sum_1d(ji) ) 
     221               wfx_snw_sum_1d(ji) = wfx_snw_sum_1d(ji) * (1._wp + zdum) 
     222               wfx_sum_1d(ji)     = wfx_sum_1d(ji)     * (1._wp + zdum) 
     223            ENDIF 
    219224            ! 
    220225            ! Make sure pond volume or lid thickness has not gone negative 
     
    243248            write(numout,*)'icethd_pnd: a_i_1d(ji), v_ip_1d(ji), t_su_1d(ji), zfr_mlt, zdv_mlt = ',a_i_1d(ji), ' ', v_ip_1d(ji), ' ', t_su_1d(ji), ' ', zfr_mlt, ' ', zdv_mlt 
    244249            write(numout,*)'icethd_pnd: meltt = ', -( dh_i_sum(ji)*rhoi + dh_s_mlt(ji)*rhos ) / rhoi 
     250            write(numout,*)'icethd_pnd: lh_ip_1d(ji), actual_mlt, actual_frz, t_su_1d(ji) = ',lh_ip_1d(ji), ' ', actual_mlt, ' ', actual_frz, ' ', t_su_1d(ji) 
    245251         END IF 
    246252 
Note: See TracChangeset for help on using the changeset viewer.