- Timestamp:
- 2014-06-17T17:06:59+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
r4649 r4672 36 36 PRIVATE 37 37 38 PUBLIC lim_thd_ent ! called by lim _thd38 PUBLIC lim_thd_ent ! called by limthd and limthd_lac 39 39 40 40 REAL(wp) :: epsi20 = 1.e-20 ! constant values … … 48 48 CONTAINS 49 49 50 SUBROUTINE lim_thd_ent( kideb, kiut, jl,qnew )50 SUBROUTINE lim_thd_ent( kideb, kiut, qnew ) 51 51 !!------------------------------------------------------------------- 52 52 !! *** ROUTINE lim_thd_ent *** … … 74 74 !!------------------------------------------------------------------- 75 75 INTEGER , INTENT(in) :: kideb, kiut ! Start/End point on which the the computation is applied 76 INTEGER , INTENT(in) :: jl ! Thickness cateogry number77 76 78 REAL(wp), INTENT(inout), DIMENSION(:,:) :: qnew ! new enthlapies ( remapped)77 REAL(wp), INTENT(inout), DIMENSION(:,:) :: qnew ! new enthlapies (J.m-3, remapped) 79 78 80 INTEGER :: ji ,ii,ij! dummy loop indices79 INTEGER :: ji ! dummy loop indices 81 80 INTEGER :: jk0, jk1 ! old/new layer indices 82 REAL(wp) :: ztmelts ! temperature of melting 83 REAL(wp) :: zswitch, zaaa, zbbb, zccc, zdiscrim ! converting enthalpy to temperature 81 REAL(wp) :: zswitch 84 82 ! 85 83 REAL(wp), POINTER, DIMENSION(:,:) :: zqh_cum0, zh_cum0 ! old cumulative enthlapies and layers interfaces … … 139 137 DO jk1 = 1, nlay_i 140 138 DO ji = kideb, kiut 141 zswitch = 139 zswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - zhnew(ji) + epsi10 ) ) 142 140 qnew(ji,jk1) = zswitch * ( zqh_cum1(ji,jk1) - zqh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi10 ) 143 141 ENDDO 144 142 ENDDO 143 144 ! --- diag error on heat remapping --- ! 145 ! comment: if input h_i_old and qh_i_old are already multiplied by a_i (as in limthd_lac), 146 ! then we should not (* a_i) again but not important since this is just to check that remap error is ~0 147 DO ji = kideb, kiut 148 hfx_err_rem_1d(ji) = hfx_err_rem_1d(ji) + a_i_b(ji) * r1_rdtice * & 149 & ( SUM( qnew(ji,1:nlay_i) ) * zhnew(ji) - SUM( qh_i_old(ji,0:nlay_i+1) ) ) 150 END DO 151 145 152 ! 146 153 CALL wrk_dealloc( jpij, nlay_i+3, zqh_cum0, zh_cum0, kjstart = 0 )
Note: See TracChangeset
for help on using the changeset viewer.