Changeset 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/ICE/icethd_dh.F90
- Timestamp:
- 2019-10-29T11:41:36+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/ICE/icethd_dh.F90
r10534 r11822 614 614 DO jk = 1, nlay_s 615 615 DO ji = 1,npti 616 ! mask enthalpy 617 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp, - h_s_1d(ji) ) ) 616 ! where there is no ice or no snow 617 rswitch = ( 1._wp - MAX( 0._wp, SIGN( 1._wp, - h_s_1d(ji) ) ) ) * ( 1._wp - MAX( 0._wp, SIGN(1._wp, - h_i_1d(ji) ) ) ) 618 ! mass & energy loss to the ocean 619 hfx_res_1d(ji) = hfx_res_1d(ji) + ( 1._wp - rswitch ) * & 620 & ( e_s_1d(ji,jk) * h_s_1d(ji) * r1_nlay_s * a_i_1d(ji) * r1_rdtice ) ! heat flux to the ocean [W.m-2], < 0 621 wfx_res_1d(ji) = wfx_res_1d(ji) + ( 1._wp - rswitch ) * & 622 & ( rhos * h_s_1d(ji) * r1_nlay_s * a_i_1d(ji) * r1_rdtice ) ! mass flux 623 ! update energy (mass is updated in the next loop) 618 624 e_s_1d(ji,jk) = rswitch * e_s_1d(ji,jk) 619 625 ! recalculate t_s_1d from e_s_1d … … 622 628 END DO 623 629 624 ! --- ensure that a_i = 0 where h_i = 0 --- 625 WHERE( h_i_1d(1:npti) == 0._wp ) a_i_1d(1:npti) = 0._wp 630 ! --- ensure that a_i = 0 & h_s = 0 where h_i = 0 --- 631 WHERE( h_i_1d(1:npti) == 0._wp ) 632 a_i_1d(1:npti) = 0._wp 633 h_s_1d(1:npti) = 0._wp 634 END WHERE 626 635 ! 627 636 END SUBROUTINE ice_thd_dh
Note: See TracChangeset
for help on using the changeset viewer.