Changeset 5079
- Timestamp:
- 2015-02-11T16:32:03+01:00 (10 years ago)
- Location:
- branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limctl.F90
r5070 r5079 222 222 DO jj = 1, jpj 223 223 DO ji = 1, jpi 224 ztmelts = -tmut * s_i(ji,jj,jk,jl) + rt t224 ztmelts = -tmut * s_i(ji,jj,jk,jl) + rt0 225 225 IF( t_i(ji,jj,jk,jl) >= ztmelts .AND. v_i(ji,jj,jl) > 1.e-10 & 226 226 & .AND. a_i(ji,jj,jl) > 0._wp ) THEN -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90
r5070 r5079 81 81 zbg_are = glob_sum( at_i(:,:) * e12t(:,:) * tmask(:,:,1) ) ! area 82 82 zbg_sal = glob_sum( SUM( smv_i(:,:,:), dim=3 ) * e12t(:,:) * tmask(:,:,1) ) ! mean salt content 83 zbg_tem = glob_sum( ( tm_i(:,:) - rt t) * vt_i(:,:) * e12t(:,:) * tmask(:,:,1) ) ! mean temp content83 zbg_tem = glob_sum( ( tm_i(:,:) - rt0 ) * vt_i(:,:) * e12t(:,:) * tmask(:,:,1) ) ! mean temp content 84 84 85 85 !zbg_ihc = glob_sum( et_i(:,:) * e12t(:,:) * tmask(:,:,1) ) / MAX( zbg_ivo,epsi06 ) ! ice heat content -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r5078 r5079 112 112 ! surface temperature 113 113 DO jl = 1, jpl ! loop over categories 114 t_su (:,:,jl) = rt t* tmask(:,:,1)115 tn_ice(:,:,jl) = rt t* tmask(:,:,1)114 t_su (:,:,jl) = rt0 * tmask(:,:,1) 115 tn_ice(:,:,jl) = rt0 * tmask(:,:,1) 116 116 END DO 117 117 … … 318 318 sm_i(ji,jj,jl) = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) !+ ( 1._wp - zswitch(ji,jj) ) * rn_simin ! salinity 319 319 o_i(ji,jj,jl) = zswitch(ji,jj) * 1._wp + ( 1._wp - zswitch(ji,jj) ) ! age 320 t_su(ji,jj,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt t! surf temp320 t_su(ji,jj,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt0 ! surf temp 321 321 322 322 ! This case below should not be used if (ht_s/ht_i) is ok in namelist … … 342 342 DO jj = 1, jpj 343 343 DO ji = 1, jpi 344 t_s(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt t344 t_s(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt0 345 345 ! Snow energy of melting 346 e_s(ji,jj,jk,jl) = zswitch(ji,jj) * rhosn * ( cpic * ( rt t- t_s(ji,jj,jk,jl) ) + lfus )346 e_s(ji,jj,jk,jl) = zswitch(ji,jj) * rhosn * ( cpic * ( rt0 - t_s(ji,jj,jk,jl) ) + lfus ) 347 347 348 348 ! Mutliply by volume, and divide by number of layers to get heat content in J/m2 … … 358 358 DO jj = 1, jpj 359 359 DO ji = 1, jpi 360 t_i(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt t360 t_i(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rt0 361 361 s_i(ji,jj,jk,jl) = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) !+ ( 1._wp - zswitch(ji,jj) ) * rn_simin 362 ztmelts = - tmut * s_i(ji,jj,jk,jl) + rt t!Melting temperature in K362 ztmelts = - tmut * s_i(ji,jj,jk,jl) + rt0 !Melting temperature in K 363 363 364 364 ! heat content per unit volume 365 365 e_i(ji,jj,jk,jl) = zswitch(ji,jj) * rhoic * ( cpic * ( ztmelts - t_i(ji,jj,jk,jl) ) & 366 + lfus * ( 1._wp - (ztmelts-rt t) / MIN((t_i(ji,jj,jk,jl)-rtt),-epsi20) ) &367 - rcp * ( ztmelts - rt t) )366 + lfus * ( 1._wp - (ztmelts-rt0) / MIN((t_i(ji,jj,jk,jl)-rt0),-epsi20) ) & 367 - rcp * ( ztmelts - rt0 ) ) 368 368 369 369 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 … … 393 393 DO jl = 1, jpl 394 394 DO jk = 1, nlay_i 395 t_i(:,:,jk,jl) = rt t* tmask(:,:,1)395 t_i(:,:,jk,jl) = rt0 * tmask(:,:,1) 396 396 END DO 397 397 DO jk = 1, nlay_s 398 t_s(:,:,jk,jl) = rt t* tmask(:,:,1)398 t_s(:,:,jk,jl) = rt0 * tmask(:,:,1) 399 399 END DO 400 400 END DO -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90
r5070 r5079 713 713 ELSE 714 714 ht_i(ji,jj,jl) = 0._wp 715 t_su(ji,jj,jl) = rt t715 t_su(ji,jj,jl) = rt0 716 716 ENDIF 717 717 END DO -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
r5078 r5079 174 174 & ( zqsr(ji,jj) * fraqsr_1lev(ji,jj) + zqns(ji,jj) & ! pfrld already included in coupled mode 175 175 & + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) * & ! heat content of precip 176 & ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt t) - lfus ) &177 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt t) )176 & ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus ) & 177 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) ) 178 178 ELSE 179 179 zqld = tmask(ji,jj,1) * rdt_ice * & 180 180 & ( pfrld(ji,jj) * ( zqsr(ji,jj) * fraqsr_1lev(ji,jj) + zqns(ji,jj) ) & 181 181 & + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) * & ! heat content of precip 182 & ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt t) - lfus ) &183 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt t) )182 & ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus ) & 183 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) ) 184 184 ENDIF 185 185 … … 216 216 & + pfrld(ji,jj) * ( zqns(ji,jj) + zqsr(ji,jj) ) & 217 217 ! latent heat of precip (note that precip is included in qns but not in qns_ice) 218 & + ( 1._wp - pfrld(ji,jj) ) * sprecip(ji,jj) * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt t) - lfus ) &219 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt t)218 & + ( 1._wp - pfrld(ji,jj) ) * sprecip(ji,jj) * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus ) & 219 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) 220 220 221 221 ! ----------------------------------------------------------------------------- … … 230 230 ! latent heat of precip (note that precip is included in qns but not in qns_ice) 231 231 & + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) & 232 & * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt t) - lfus ) &233 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt t) &232 & * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus ) & 233 & + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) & 234 234 ! heat flux taken from the ocean where there is open water ice formation 235 235 & - qlead(ji,jj) * r1_rdtice & … … 476 476 DO jk = 1, nlay_i 477 477 DO ji = kideb, kiut 478 ztmelts = -tmut * s_i_1d(ji,jk) + rt t478 ztmelts = -tmut * s_i_1d(ji,jk) + rt0 479 479 ! Conversion q(S,T) -> T (second order equation) 480 480 zaaa = cpic 481 zbbb = ( rcp - cpic ) * ( ztmelts - rt t) + q_i_1d(ji,jk) * r1_rhoic - lfus482 zccc = lfus * ( ztmelts - rt t)481 zbbb = ( rcp - cpic ) * ( ztmelts - rt0 ) + q_i_1d(ji,jk) * r1_rhoic - lfus 482 zccc = lfus * ( ztmelts - rt0 ) 483 483 zdiscrim = SQRT( MAX( zbbb * zbbb - 4._wp * zaaa * zccc, 0._wp ) ) 484 t_i_1d(ji,jk) = rt t- ( zbbb + zdiscrim ) / ( 2._wp * zaaa )484 t_i_1d(ji,jk) = rt0 - ( zbbb + zdiscrim ) / ( 2._wp * zaaa ) 485 485 486 486 ! mask temperature 487 487 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - ht_i_1d(ji) ) ) 488 t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt t488 t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt0 489 489 END DO 490 490 END DO -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
r5078 r5079 156 156 DO ji = kideb, kiut 157 157 rswitch = 1._wp - MAX( 0._wp , SIGN( 1._wp , - ht_s_1d(ji) ) ) 158 ztmelts = rswitch * rt t + ( 1._wp - rswitch ) * rtt158 ztmelts = rswitch * rt0 + ( 1._wp - rswitch ) * rt0 159 159 160 160 zfdum = qns_ice_1d(ji) + ( 1._wp - i0(ji) ) * qsr_ice_1d(ji) - fc_su(ji) … … 171 171 !------------------------------------------------------------------------------! 172 172 DO ji = kideb, kiut 173 IF( t_s_1d(ji,1) > rt t) THEN !!! Internal melting173 IF( t_s_1d(ji,1) > rt0 ) THEN !!! Internal melting 174 174 ! Contribution to heat flux to the ocean [W.m-2], < 0 175 175 hfx_res_1d(ji) = hfx_res_1d(ji) + q_s_1d(ji,1) * ht_s_1d(ji) * a_i_1d(ji) * r1_rdtice … … 179 179 ht_s_1d(ji) = 0._wp 180 180 q_s_1d (ji,1) = 0._wp 181 t_s_1d (ji,1) = rt t181 t_s_1d (ji,1) = rt0 182 182 END IF 183 183 END DO … … 230 230 zdh_s_pre(ji) = zcoeff * sprecip_1d(ji) * rdt_ice * r1_rhosn 231 231 ! enthalpy of the precip (>0, J.m-3) (tatm_ice is now in K) 232 zqprec (ji) = rhosn * ( cpic * ( rt t- MIN( tatm_ice_1d(ji), rt0_snow) ) + lfus )232 zqprec (ji) = rhosn * ( cpic * ( rt0 - MIN( tatm_ice_1d(ji), rt0_snow) ) + lfus ) 233 233 IF( sprecip_1d(ji) == 0._wp ) zqprec(ji) = 0._wp 234 234 ! heat flux from snow precip (>0, W.m-2) … … 324 324 q_s_1d(ji,jk) = ( 1._wp - rswitch ) / MAX( ht_s_1d(ji), epsi20 ) * & 325 325 & ( ( MAX( 0._wp, dh_s_tot(ji) ) ) * zqprec(ji) + & 326 & ( - MAX( 0._wp, dh_s_tot(ji) ) + ht_s_1d(ji) ) * rhosn * ( cpic * ( rt t- t_s_1d(ji,jk) ) + lfus ) )326 & ( - MAX( 0._wp, dh_s_tot(ji) ) + ht_s_1d(ji) ) * rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) ) 327 327 zq_s(ji) = zq_s(ji) + q_s_1d(ji,jk) 328 328 END DO … … 337 337 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of layer k [J/kg, <0] 338 338 339 ztmelts = - tmut * s_i_1d(ji,jk) + rt t! Melting point of layer k [K]339 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 ! Melting point of layer k [K] 340 340 341 341 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of resulting meltwater [J/kg, <0] … … 437 437 + ( 1. - zswitch_sal ) * sm_i_1d(ji) 438 438 ! New ice growth 439 ztmelts = - tmut * s_i_new(ji) + rt t! New ice melting point (K)439 ztmelts = - tmut * s_i_new(ji) + rt0 ! New ice melting point (K) 440 440 441 441 zt_i_new = zswitch_sal * t_bo_1d(ji) + ( 1. - zswitch_sal) * t_i_1d(ji, nlay_i) 442 442 443 443 zEi = cpic * ( zt_i_new - ztmelts ) & ! Specific enthalpy of forming ice (J/kg, <0) 444 & - lfus * ( 1.0 - ( ztmelts - rt t ) / ( zt_i_new - rtt) ) &445 & + rcp * ( ztmelts-rt t)444 & - lfus * ( 1.0 - ( ztmelts - rt0 ) / ( zt_i_new - rt0 ) ) & 445 & + rcp * ( ztmelts-rt0 ) 446 446 447 447 zEw = rcp * ( t_bo_1d(ji) - rt0 ) ! Specific enthalpy of seawater (J/kg, < 0) … … 464 464 zfmdt = - rhoic * dh_i_bott(ji) ! Mass flux x time step (kg/m2, < 0) 465 465 466 ztmelts = - tmut * s_i_new(ji) + rt t! New ice melting point (K)466 ztmelts = - tmut * s_i_new(ji) + rt0 ! New ice melting point (K) 467 467 468 468 zt_i_new = zswitch_sal * t_bo_1d(ji) + ( 1. - zswitch_sal) * t_i_1d(ji, nlay_i) 469 469 470 470 zEi = cpic * ( zt_i_new - ztmelts ) & ! Specific enthalpy of forming ice (J/kg, <0) 471 & - lfus * ( 1.0 - ( ztmelts - rt t ) / ( zt_i_new - rtt) ) &472 & + rcp * ( ztmelts-rt t)471 & - lfus * ( 1.0 - ( ztmelts - rt0 ) / ( zt_i_new - rt0 ) ) & 472 & + rcp * ( ztmelts-rt0 ) 473 473 474 474 zEw = rcp * ( t_bo_1d(ji) - rt0 ) ! Specific enthalpy of seawater (J/kg, < 0) … … 502 502 IF( zf_tt(ji) >= 0._wp .AND. jk > icount(ji) ) THEN ! do not calculate where layer has already disappeared from surface melting 503 503 504 ztmelts = - tmut * s_i_1d(ji,jk) + rt t! Melting point of layer jk (K)504 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 ! Melting point of layer jk (K) 505 505 506 506 IF( t_i_1d(ji,jk) >= ztmelts ) THEN !!! Internal melting … … 508 508 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of melting ice (J/kg, <0) 509 509 510 !!zEw = rcp * ( t_i_1d(ji,jk) - rt t) ! Specific enthalpy of meltwater at T = t_i_1d (J/kg, <0)510 !!zEw = rcp * ( t_i_1d(ji,jk) - rt0 ) ! Specific enthalpy of meltwater at T = t_i_1d (J/kg, <0) 511 511 512 512 zdE = 0._wp ! Specific enthalpy difference (J/kg, <0) … … 537 537 zEi = - q_i_1d(ji,jk) * r1_rhoic ! Specific enthalpy of melting ice (J/kg, <0) 538 538 539 zEw = rcp * ( ztmelts - rt t) ! Specific enthalpy of meltwater (J/kg, <0)539 zEw = rcp * ( ztmelts - rt0 ) ! Specific enthalpy of meltwater (J/kg, <0) 540 540 541 541 zdE = zEi - zEw ! Specific enthalpy difference (J/kg, <0) … … 675 675 DO ji = kideb, kiut 676 676 rswitch = 1.0 - MAX( 0._wp , SIGN( 1._wp , - ht_i_1d(ji) ) ) 677 t_su_1d(ji) = rswitch * t_su_1d(ji) + ( 1.0 - rswitch ) * rt t677 t_su_1d(ji) = rswitch * t_su_1d(ji) + ( 1.0 - rswitch ) * rt0 678 678 END DO ! ji 679 679 … … 684 684 q_s_1d(ji,jk) = ( 1.0 - rswitch ) * q_s_1d(ji,jk) 685 685 ! recalculate t_s_1d from q_s_1d 686 t_s_1d(ji,jk) = rt t+ ( 1._wp - rswitch ) * ( - q_s_1d(ji,jk) / ( rhosn * cpic ) + lfus / cpic )686 t_s_1d(ji,jk) = rt0 + ( 1._wp - rswitch ) * ( - q_s_1d(ji,jk) / ( rhosn * cpic ) + lfus / cpic ) 687 687 END DO 688 688 END DO -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
r5078 r5079 289 289 ztsub (ji) = t_su_1d(ji) ! temperature at the beg of iter pr. 290 290 ztsubit(ji) = t_su_1d(ji) ! temperature at the previous iter 291 t_su_1d(ji) = MIN( t_su_1d(ji), rt t- ztsu_err ) ! necessary291 t_su_1d(ji) = MIN( t_su_1d(ji), rt0 - ztsu_err ) ! necessary 292 292 zerrit (ji) = 1000._wp ! initial value of error 293 293 END DO … … 318 318 IF( nn_ice_thcon == 0 ) THEN ! Untersteiner (1964) formula 319 319 DO ji = kideb , kiut 320 ztcond_i(ji,0) = rcdic + zbeta * s_i_1d(ji,1) / MIN( -epsi10, t_i_1d(ji,1) - rt t)320 ztcond_i(ji,0) = rcdic + zbeta * s_i_1d(ji,1) / MIN( -epsi10, t_i_1d(ji,1) - rt0 ) 321 321 ztcond_i(ji,0) = MAX( ztcond_i(ji,0), zkimin ) 322 322 END DO … … 324 324 DO ji = kideb , kiut 325 325 ztcond_i(ji,jk) = rcdic + zbeta * ( s_i_1d(ji,jk) + s_i_1d(ji,jk+1) ) / & 326 MIN(-2.0_wp * epsi10, t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0_wp * rt t)326 MIN(-2.0_wp * epsi10, t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0_wp * rt0) 327 327 ztcond_i(ji,jk) = MAX( ztcond_i(ji,jk), zkimin ) 328 328 END DO … … 332 332 IF( nn_ice_thcon == 1 ) THEN ! Pringle et al formula included: 2.11 + 0.09 S/T - 0.011.T 333 333 DO ji = kideb , kiut 334 ztcond_i(ji,0) = rcdic + 0.090_wp * s_i_1d(ji,1) / MIN( -epsi10, t_i_1d(ji,1) - rt t) &335 & - 0.011_wp * ( t_i_1d(ji,1) - rt t)334 ztcond_i(ji,0) = rcdic + 0.090_wp * s_i_1d(ji,1) / MIN( -epsi10, t_i_1d(ji,1) - rt0 ) & 335 & - 0.011_wp * ( t_i_1d(ji,1) - rt0 ) 336 336 ztcond_i(ji,0) = MAX( ztcond_i(ji,0), zkimin ) 337 337 END DO … … 340 340 ztcond_i(ji,jk) = rcdic + & 341 341 & 0.09_wp * ( s_i_1d(ji,jk) + s_i_1d(ji,jk+1) ) & 342 & / MIN( -2._wp * epsi10, t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0_wp * rt t) &343 & - 0.0055_wp * ( t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0 * rt t)342 & / MIN( -2._wp * epsi10, t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0_wp * rt0 ) & 343 & - 0.0055_wp * ( t_i_1d(ji,jk) + t_i_1d(ji,jk+1) - 2.0 * rt0 ) 344 344 ztcond_i(ji,jk) = MAX( ztcond_i(ji,jk), zkimin ) 345 345 END DO 346 346 END DO 347 347 DO ji = kideb , kiut 348 ztcond_i(ji,nlay_i) = rcdic + 0.090_wp * s_i_1d(ji,nlay_i) / MIN( -epsi10, t_bo_1d(ji) - rt t) &349 & - 0.011_wp * ( t_bo_1d(ji) - rt t)348 ztcond_i(ji,nlay_i) = rcdic + 0.090_wp * s_i_1d(ji,nlay_i) / MIN( -epsi10, t_bo_1d(ji) - rt0 ) & 349 & - 0.011_wp * ( t_bo_1d(ji) - rt0 ) 350 350 ztcond_i(ji,nlay_i) = MAX( ztcond_i(ji,nlay_i), zkimin ) 351 351 END DO … … 435 435 DO ji = kideb , kiut 436 436 ztitemp(ji,jk) = t_i_1d(ji,jk) 437 zspeche_i(ji,jk) = cpic + zgamma * s_i_1d(ji,jk) / MAX( ( t_i_1d(ji,jk) - rt t ) * ( ztib(ji,jk) - rtt), epsi10 )437 zspeche_i(ji,jk) = cpic + zgamma * s_i_1d(ji,jk) / MAX( ( t_i_1d(ji,jk) - rt0 ) * ( ztib(ji,jk) - rt0 ), epsi10 ) 438 438 zeta_i(ji,jk) = rdt_ice / MAX( rhoic * zspeche_i(ji,jk) * zh_i(ji), epsi10 ) 439 439 END DO … … 532 532 ENDIF 533 533 534 IF ( t_su_1d(ji) < rt t) THEN534 IF ( t_su_1d(ji) < rt0 ) THEN 535 535 536 536 !------------------------------------------------------------------------------| … … 576 576 !------------------------------------------------------------------------------| 577 577 ! 578 IF ( t_su_1d(ji) < rt t) THEN578 IF ( t_su_1d(ji) < rt0 ) THEN 579 579 ! 580 580 !------------------------------------------------------------------------------| … … 693 693 isnow(ji) = 1._wp - MAX( 0._wp , SIGN( 1._wp , -ht_s_1d(ji) ) ) 694 694 ztsubit(ji) = t_su_1d(ji) 695 IF( t_su_1d(ji) < rt t) &695 IF( t_su_1d(ji) < rt0 ) & 696 696 t_su_1d(ji) = ( zindtbis(ji,numeqmin(ji)) - ztrid(ji,numeqmin(ji),3) * & 697 697 & ( isnow(ji) * t_s_1d(ji,1) + ( 1._wp - isnow(ji) ) * t_i_1d(ji,1) ) ) / zdiagbis(ji,numeqmin(ji)) … … 705 705 ! zerrit(ji) is a measure of error, it has to be under terr_dif 706 706 DO ji = kideb , kiut 707 t_su_1d(ji) = MAX( MIN( t_su_1d(ji) , rt t) , 190._wp )707 t_su_1d(ji) = MAX( MIN( t_su_1d(ji) , rt0 ) , 190._wp ) 708 708 zerrit(ji) = ABS( t_su_1d(ji) - ztsubit(ji) ) 709 709 END DO … … 711 711 DO jk = 1, nlay_s 712 712 DO ji = kideb , kiut 713 t_s_1d(ji,jk) = MAX( MIN( t_s_1d(ji,jk), rt t), 190._wp )713 t_s_1d(ji,jk) = MAX( MIN( t_s_1d(ji,jk), rt0 ), 190._wp ) 714 714 zerrit(ji) = MAX( zerrit(ji), ABS( t_s_1d(ji,jk) - ztstemp(ji,jk) ) ) 715 715 END DO … … 718 718 DO jk = 1, nlay_i 719 719 DO ji = kideb , kiut 720 ztmelt_i = -tmut * s_i_1d(ji,jk) + rt t720 ztmelt_i = -tmut * s_i_1d(ji,jk) + rt0 721 721 t_i_1d(ji,jk) = MAX( MIN( t_i_1d(ji,jk), ztmelt_i ), 190._wp ) 722 722 zerrit(ji) = MAX( zerrit(ji), ABS( t_i_1d(ji,jk) - ztitemp(ji,jk) ) ) … … 762 762 zdq(ji) = - zq_ini(ji) + ( SUM( q_i_1d(ji,1:nlay_i) ) * ht_i_1d(ji) * r1_nlay_i + & 763 763 & SUM( q_s_1d(ji,1:nlay_s) ) * ht_s_1d(ji) * r1_nlay_s ) 764 IF( t_su_1d(ji) < rt t) THEN ! case T_su < 0degC764 IF( t_su_1d(ji) < rt0 ) THEN ! case T_su < 0degC 765 765 zhfx_err(ji) = qns_ice_1d(ji) + qsr_ice_1d(ji) - zradtr_i(ji,nlay_i) - fc_bo_i(ji) + zdq(ji) * r1_rdtice 766 766 ELSE ! case T_su = 0degC … … 790 790 !----------------------------------------- 791 791 DO ji = kideb, kiut 792 IF( t_su_1d(ji) < rt t) THEN ! case T_su < 0degC792 IF( t_su_1d(ji) < rt0 ) THEN ! case T_su < 0degC 793 793 hfx_dif_1d(ji) = hfx_dif_1d(ji) + & 794 794 & ( qns_ice_1d(ji) + qsr_ice_1d(ji) - zradtr_i(ji,nlay_i) - fc_bo_i(ji) ) * a_i_1d(ji) … … 834 834 DO jk = 1, nlay_i ! Sea ice energy of melting 835 835 DO ji = kideb, kiut 836 ztmelts = - tmut * s_i_1d(ji,jk) + rt t837 rswitch = MAX( 0._wp , SIGN( 1._wp , -(t_i_1d(ji,jk) - rt t) - epsi20 ) )836 ztmelts = - tmut * s_i_1d(ji,jk) + rt0 837 rswitch = MAX( 0._wp , SIGN( 1._wp , -(t_i_1d(ji,jk) - rt0) - epsi20 ) ) 838 838 q_i_1d(ji,jk) = rhoic * ( cpic * ( ztmelts - t_i_1d(ji,jk) ) & 839 & + lfus * ( 1.0 - rswitch * ( ztmelts-rt t ) / MIN( t_i_1d(ji,jk) - rtt, -epsi20 ) ) &840 & - rcp * ( ztmelts-rt t) )839 & + lfus * ( 1.0 - rswitch * ( ztmelts-rt0 ) / MIN( t_i_1d(ji,jk) - rt0, -epsi20 ) ) & 840 & - rcp * ( ztmelts-rt0 ) ) 841 841 END DO 842 842 END DO 843 843 DO jk = 1, nlay_s ! Snow energy of melting 844 844 DO ji = kideb, kiut 845 q_s_1d(ji,jk) = rhosn * ( cpic * ( rt t- t_s_1d(ji,jk) ) + lfus )845 q_s_1d(ji,jk) = rhosn * ( cpic * ( rt0 - t_s_1d(ji,jk) ) + lfus ) 846 846 END DO 847 847 END DO -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
r5078 r5079 344 344 ! We assume that new ice is formed at the seawater freezing point 345 345 DO ji = 1, nbpac 346 ztmelts = - tmut * zs_newice(ji) + rt t! Melting point (K)346 ztmelts = - tmut * zs_newice(ji) + rt0 ! Melting point (K) 347 347 ze_newice(ji) = rhoic * ( cpic * ( ztmelts - t_bo_1d(ji) ) & 348 & + lfus * ( 1.0 - ( ztmelts - rt t ) / MIN( t_bo_1d(ji) - rtt, -epsi10 ) ) &349 & - rcp * ( ztmelts - rt t) )350 END DO ! ji348 & + lfus * ( 1.0 - ( ztmelts - rt0 ) / MIN( t_bo_1d(ji) - rt0, -epsi10 ) ) & 349 & - rcp * ( ztmelts - rt0 ) ) 350 END DO 351 351 352 352 !---------------- -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90
r5070 r5079 82 82 ! Switches 83 83 !---------- 84 iflush = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt t) ) ! =1 if summer84 iflush = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 ) ) ! =1 if summer 85 85 igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) ) ! =1 if t_su < t_bo 86 86 -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
r5078 r5079 193 193 rswitch = 1.0 - MAX( 0.0 , SIGN( 1.0 , - v_i(ji,jj,jl) + epsi20 ) ) ! rswitch = 0 if no ice and 1 if yes 194 194 zq_i = rswitch * e_i(ji,jj,jk,jl) / MAX( v_i(ji,jj,jl) , epsi20 ) * REAL(nlay_i,wp) 195 ztmelts = -tmut * s_i(ji,jj,jk,jl) + rt t! Ice layer melt temperature195 ztmelts = -tmut * s_i(ji,jj,jk,jl) + rt0 ! Ice layer melt temperature 196 196 ! 197 197 zaaa = cpic ! Conversion q(S,T) -> T (second order equation) 198 zbbb = ( rcp - cpic ) * ( ztmelts - rt t) + zq_i * r1_rhoic - lfus199 zccc = lfus * (ztmelts-rt t)198 zbbb = ( rcp - cpic ) * ( ztmelts - rt0 ) + zq_i * r1_rhoic - lfus 199 zccc = lfus * (ztmelts-rt0) 200 200 zdiscrim = SQRT( MAX(zbbb*zbbb - 4._wp*zaaa*zccc , 0._wp) ) 201 t_i(ji,jj,jk,jl) = rt t+ rswitch *( - zbbb - zdiscrim ) / ( 2.0 *zaaa )202 t_i(ji,jj,jk,jl) = MIN( rt t, MAX( 173.15_wp, t_i(ji,jj,jk,jl) ) ) ! 100-rtt < t_i < rtt201 t_i(ji,jj,jk,jl) = rt0 + rswitch *( - zbbb - zdiscrim ) / ( 2.0 *zaaa ) 202 t_i(ji,jj,jk,jl) = MIN( rt0, MAX( 173.15_wp, t_i(ji,jj,jk,jl) ) ) ! 100-rt0 < t_i < rt0 203 203 END DO 204 204 END DO … … 219 219 zq_s = rswitch * e_s(ji,jj,jk,jl) / MAX( v_s(ji,jj,jl) , epsi20 ) * REAL(nlay_s,wp) 220 220 ! 221 t_s(ji,jj,jk,jl) = rt t+ rswitch * ( - zfac1 * zq_s + zfac2 )222 t_s(ji,jj,jk,jl) = MIN( rt t, MAX( 173.15, t_s(ji,jj,jk,jl) ) ) ! 100-rtt < t_i < rtt221 t_s(ji,jj,jk,jl) = rt0 + rswitch * ( - zfac1 * zq_s + zfac2 ) 222 t_s(ji,jj,jk,jl) = MIN( rt0, MAX( 173.15, t_s(ji,jj,jk,jl) ) ) ! 100-rt0 < t_i < rt0 223 223 END DO 224 224 END DO … … 415 415 DO jj = 1, jpj 416 416 DO ji = 1, jpi 417 rswitch = ( 1._wp - MAX( 0._wp , SIGN( 1._wp , (t_i(ji,jj,jk,jl) - rt t) + epsi10 ) ) )418 zbvi = - rswitch * tmut * s_i(ji,jj,jk,jl) / MIN( t_i(ji,jj,jk,jl) - rt t, - epsi10 ) &417 rswitch = ( 1._wp - MAX( 0._wp , SIGN( 1._wp , (t_i(ji,jj,jk,jl) - rt0) + epsi10 ) ) ) 418 zbvi = - rswitch * tmut * s_i(ji,jj,jk,jl) / MIN( t_i(ji,jj,jk,jl) - rt0, - epsi10 ) & 419 419 & * v_i(ji,jj,jl) * r1_nlay_i 420 420 rswitch = ( 1._wp - MAX( 0._wp , SIGN( 1._wp , - vt_i(ji,jj) + epsi10 ) ) ) … … 536 536 zei = e_i(ji,jj,jk,jl) 537 537 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * rswitch 538 t_i(ji,jj,jk,jl) = t_i(ji,jj,jk,jl) * rswitch + rt t* ( 1._wp - rswitch )538 t_i(ji,jj,jk,jl) = t_i(ji,jj,jk,jl) * rswitch + rt0 * ( 1._wp - rswitch ) 539 539 ! update exchanges with ocean 540 540 hfx_res(ji,jj) = hfx_res(ji,jj) + ( e_i(ji,jj,jk,jl) - zei ) * r1_rdtice ! W.m-2 <0 … … 554 554 ! Zap snow energy 555 555 !----------------------------------------------------------------- 556 t_s(ji,jj,1,jl) = t_s(ji,jj,1,jl) * rswitch + rt t* ( 1._wp - rswitch )556 t_s(ji,jj,1,jl) = t_s(ji,jj,1,jl) * rswitch + rt0 * ( 1._wp - rswitch ) 557 557 e_s(ji,jj,1,jl) = e_s(ji,jj,1,jl) * rswitch 558 558 -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
r5078 r5079 138 138 DO jj = 1, jpj 139 139 DO ji = 1, jpi 140 z2d(ji,jj) = ( tm_i(ji,jj) - rt t) * zswi(ji,jj)140 z2d(ji,jj) = ( tm_i(ji,jj) - rt0 ) * zswi(ji,jj) 141 141 END DO 142 142 END DO … … 149 149 DO jj = 1, jpj 150 150 DO ji = 1, jpi 151 z2d(ji,jj) = z2d(ji,jj) + zswi(ji,jj) * ( t_su(ji,jj,jl) - rt t) * a_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi06 )151 z2d(ji,jj) = z2d(ji,jj) + zswi(ji,jj) * ( t_su(ji,jj,jl) - rt0 ) * a_i(ji,jj,jl) / MAX( at_i(ji,jj) , epsi06 ) 152 152 END DO 153 153 END DO … … 265 265 rswitch = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) ) 266 266 zei(ji,jj,jl) = zei(ji,jj,jl) + 100.0* & 267 ( - tmut * s_i(ji,jj,jk,jl) / MIN( ( t_i(ji,jj,jk,jl) - rt t), - epsi06 ) ) * &267 ( - tmut * s_i(ji,jj,jk,jl) / MIN( ( t_i(ji,jj,jk,jl) - rt0 ), - epsi06 ) ) * & 268 268 rswitch * r1_nlay_i 269 269 END DO … … 352 352 CALL histwrite( kid, "iicethic", kt, icethi , jpi*jpj, (/1/) ) 353 353 CALL histwrite( kid, "iiceconc", kt, at_i , jpi*jpj, (/1/) ) 354 CALL histwrite( kid, "iicetemp", kt, tm_i - rt t, jpi*jpj, (/1/) )354 CALL histwrite( kid, "iicetemp", kt, tm_i - rt0 , jpi*jpj, (/1/) ) 355 355 CALL histwrite( kid, "iicevelu", kt, u_ice , jpi*jpj, (/1/) ) 356 356 CALL histwrite( kid, "iicevelv", kt, v_ice , jpi*jpj, (/1/) ) -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90
r5064 r5079 194 194 t_su(ji,jj,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rn_ice_tem(ib_bdy) 195 195 DO jk = 1, nlay_s 196 t_s(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rt t196 t_s(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rt0 197 197 END DO 198 198 DO jk = 1, nlay_i 199 t_i(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rt t199 t_i(ji,jj,jk,jl) = rswitch * rn_ice_tem(ib_bdy) + ( 1.0 - rswitch ) * rt0 200 200 s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * s_i_min 201 201 END DO … … 206 206 sm_i(ji,jj,jl) = rswitch * sm_i(ii,ij,jl) + ( 1.0 - rswitch ) * s_i_min 207 207 o_i(ji,jj,jl) = rswitch * o_i(ii,ij,jl) + ( 1.0 - rswitch ) 208 t_su(ji,jj,jl) = rswitch * t_su(ii,ij,jl) + ( 1.0 - rswitch ) * rt t208 t_su(ji,jj,jl) = rswitch * t_su(ii,ij,jl) + ( 1.0 - rswitch ) * rt0 209 209 DO jk = 1, nlay_s 210 t_s(ji,jj,jk,jl) = rswitch * t_s(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rt t210 t_s(ji,jj,jk,jl) = rswitch * t_s(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rt0 211 211 END DO 212 212 DO jk = 1, nlay_i 213 t_i(ji,jj,jk,jl) = rswitch * t_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rt t213 t_i(ji,jj,jk,jl) = rswitch * t_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rt0 214 214 s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * s_i_min 215 215 END DO … … 228 228 DO jk = 1, nlay_s 229 229 ! Snow energy of melting 230 e_s(ji,jj,jk,jl) = rswitch * rhosn * ( cpic * ( rt t- t_s(ji,jj,jk,jl) ) + lfus )230 e_s(ji,jj,jk,jl) = rswitch * rhosn * ( cpic * ( rt0 - t_s(ji,jj,jk,jl) ) + lfus ) 231 231 ! Multiply by volume, so that heat content in J/m2 232 232 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) / nlay_s 233 233 END DO 234 234 DO jk = 1, nlay_i 235 ztmelts = - tmut * s_i(ji,jj,jk,jl) + rt t!Melting temperature in K235 ztmelts = - tmut * s_i(ji,jj,jk,jl) + rt0 !Melting temperature in K 236 236 ! heat content per unit volume 237 237 e_i(ji,jj,jk,jl) = rswitch * rhoic * & 238 238 ( cpic * ( ztmelts - t_i(ji,jj,jk,jl) ) & 239 + lfus * ( 1.0 - (ztmelts-rt t) / MIN((t_i(ji,jj,jk,jl)-rtt),-epsi20) ) &240 - rcp * ( ztmelts - rt t) )239 + lfus * ( 1.0 - (ztmelts-rt0) / MIN((t_i(ji,jj,jk,jl)-rt0),-epsi20) ) & 240 - rcp * ( ztmelts - rt0 ) ) 241 241 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 242 242 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * a_i(ji,jj,jl) * ht_i(ji,jj,jl) / nlay_i -
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90
r5078 r5079 41 41 REAL(wp), PUBLIC :: rt0 = 273.15_wp !: freezing point of fresh water [Kelvin] 42 42 #if defined key_lim3 43 REAL(wp), PUBLIC :: rt0_snow = 273.1 6_wp !: melting point of snow [Kelvin]44 REAL(wp), PUBLIC :: rt0_ice = 273.1 6_wp !: melting point of ice [Kelvin]43 REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow [Kelvin] 44 REAL(wp), PUBLIC :: rt0_ice = 273.15_wp !: melting point of ice [Kelvin] 45 45 #else 46 46 REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow [Kelvin]
Note: See TracChangeset
for help on using the changeset viewer.