Changeset 6225 for branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
- Timestamp:
- 2016-01-08T10:35:19+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
r4688 r6225 25 25 USE sbc_oce ! Surface boundary condition: ocean fields 26 26 USE ice ! LIM variables 27 USE par_ice ! LIM parameters28 27 USE thd_ice ! LIM thermodynamics 29 28 USE limvar ! LIM variables … … 37 36 38 37 PUBLIC lim_thd_ent ! called by limthd and limthd_lac 39 40 REAL(wp) :: epsi20 = 1.e-20 ! constant values41 REAL(wp) :: epsi10 = 1.e-10 ! constant values42 38 43 39 !!---------------------------------------------------------------------- … … 79 75 INTEGER :: ji ! dummy loop indices 80 76 INTEGER :: jk0, jk1 ! old/new layer indices 81 REAL(wp) :: zswitch82 77 ! 83 78 REAL(wp), POINTER, DIMENSION(:,:) :: zqh_cum0, zh_cum0 ! old cumulative enthlapies and layers interfaces … … 91 86 92 87 !-------------------------------------------------------------------------- 93 ! 1) Cumulative integral of old enthalpy * thic nkess and layers interfaces88 ! 1) Cumulative integral of old enthalpy * thickness and layers interfaces 94 89 !-------------------------------------------------------------------------- 95 90 zqh_cum0(:,0:nlay_i+2) = 0._wp … … 107 102 ! new layer thickesses 108 103 DO ji = kideb, kiut 109 zhnew(ji) = SUM( h_i_old(ji,0:nlay_i+1) ) / REAL( nlay_i )104 zhnew(ji) = SUM( h_i_old(ji,0:nlay_i+1) ) * r1_nlay_i 110 105 ENDDO 111 106 … … 137 132 DO jk1 = 1, nlay_i 138 133 DO ji = kideb, kiut 139 zswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - zhnew(ji) + epsi10 ) )140 qnew(ji,jk1) = zswitch * ( zqh_cum1(ji,jk1) - zqh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi10 )134 rswitch = MAX( 0._wp , SIGN( 1._wp , zhnew(ji) - epsi20 ) ) 135 qnew(ji,jk1) = rswitch * ( zqh_cum1(ji,jk1) - zqh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi20 ) 141 136 ENDDO 142 137 ENDDO … … 146 141 ! then we should not (* a_i) again but not important since this is just to check that remap error is ~0 147 142 DO ji = kideb, kiut 148 hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_ b(ji) * r1_rdtice * &143 hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_1d(ji) * r1_rdtice * & 149 144 & ( SUM( qnew(ji,1:nlay_i) ) * zhnew(ji) - SUM( qh_i_old(ji,0:nlay_i+1) ) ) 150 145 END DO
Note: See TracChangeset
for help on using the changeset viewer.