58 real(dp),
intent(in) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
59 real(dp),
intent(in) :: dtime_temp
61 integer(i4b) :: i, j, kc, kt, kr, ii, jj
62 real(dp) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
63 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
64 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
65 acb1, acb2, acb3, acb4, &
66 ai1(0:kcmax), ai2(0:kcmax), ai3, &
68 real(dp) :: aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld
69 real(dp) :: dtime_temp_inv, dtt_2dxi, dtt_2deta
70 real(dp) :: temp_c_help(0:kcmax)
71 real(dp) :: fact_thick
72 real(dp) :: time_lag_cts
73 real(dp) :: Vol_t, Vol_t_smooth, korrfakt_t, &
74 dH_t_smooth(0:jmax,0:imax)
78 at7 = 2.0_dp/
rho*dtime_temp
80 aw1 = dtime_temp/dzeta_t
81 aw2 = dtime_temp/dzeta_t
82 aw3 = dtime_temp/dzeta_t
83 aw4 = dtime_temp/dzeta_t
84 aw5 =
nue/
rho*dtime_temp/(dzeta_t**2)
85 aw7 = 2.0_dp/(
rho*
l)*dtime_temp
88 aw9 =
beta/
l*dtime_temp
90 ai3 = agediff*dtime_temp/(dzeta_t**2)
103 acb1 = (
ea-1.0_dp)/
aa/dzeta_c
105 acb1 = 1.0_dp/dzeta_c
114 aqtld = dzeta_t/dtime_temp
116 dtt_2dxi = 0.5_dp*dtime_temp/dxi
117 dtt_2deta = 0.5_dp*dtime_temp/deta
119 dtime_temp_inv = 1.0_dp/dtime_temp
125 at1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
126 at2_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
129 at3_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
132 at4_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
137 if (kc /= kcmax)
then 138 at6(kc) = (
ea-1.0_dp) &
144 ai1(kc) = agediff*(
ea-1.0_dp)/(
aa*
eaz_c(kc)) &
146 if (kc /= kcmax)
then 147 ai2(kc) = (
ea-1.0_dp) &
156 at1(kc) = dtime_temp/dzeta_c
157 at2_1(kc) = dtime_temp/dzeta_c
160 at3_1(kc) = dtime_temp/dzeta_c
163 at4_1(kc) = dtime_temp/dzeta_c
166 at5(kc) = 1.0_dp/
rho &
168 if (kc /= kcmax)
then 176 if (kc /= kcmax)
then 192 if (
maske(j,i)==0)
then 196 if (
n_cts(j,i).eq.-1)
then 203 call calc_temp1(at1, at2_1, at2_2, at3_1, at3_2, &
204 at4_1, at4_2, at5, at6, at7, atr1, acb1, acb2, &
205 acb3, acb4, alb1, ai1, ai2, &
206 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
214 call calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, &
215 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
217 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
235 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
236 at4_1, at4_2, at5, at6, at7, atr1, &
238 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
239 ai1, ai2, ai3, dzeta_t, &
240 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
243 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
244 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
245 ai1, ai2, ai3, dzeta_t, &
246 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
253 else if (
n_cts(j,i).eq.0)
then 260 call calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, &
261 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
263 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
268 .lt. (am1*
h_c(j,i)) )
then 272 call calc_temp1(at1, at2_1, at2_2, at3_1, at3_2, &
273 at4_1, at4_2, at5, at6, at7, atr1, acb1, acb2, &
274 acb3, acb4, alb1, ai1, ai2, &
275 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
281 call calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, &
282 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
284 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
304 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
305 at4_1, at4_2, at5, at6, at7, atr1, &
307 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
308 ai1, ai2, ai3, dzeta_t, &
309 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
312 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
313 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
314 ai1, ai2, ai3, dzeta_t, &
315 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
329 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
330 at4_1, at4_2, at5, at6, at7, atr1, &
332 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
333 ai1, ai2, ai3, dzeta_t, &
334 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
339 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
340 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
341 ai1, ai2, ai3, dzeta_t, &
342 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
345 call shift_cts_downward(at1, at2_1, at2_2, at3_1, at3_2, &
346 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
347 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
348 ai1, ai2, ai3, dzeta_t, &
349 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
357 else if (
maske(j,i)==3)
then 364 call calc_temp_ssa(at1, at2_1, at2_2, at3_1, at3_2, &
365 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
367 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
400 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 440 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 480 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 520 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 563 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 602 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 647 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 686 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 747 dh_t_smooth(j,i) = numdiff_h_t* ( -4.0_dp*
h_t_neu(j,i) &
750 if (dh_t_smooth(j,i).gt.0.001_dp)
n_cts_neu(j,i) = 1
766 vol_t_smooth = 0.0_dp
770 vol_t_smooth = vol_t_smooth +
h_t_neu(j,i)*
area(j,i)
777 if (vol_t_smooth.gt.0.0_dp)
then 779 korrfakt_t = vol_t/vol_t_smooth
794 time_lag_cts = tau_cts*year_sec
803 /(time_lag_cts+dtime_temp)
825 real(dp),
intent(in) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
826 real(dp),
intent(in) :: dtime_temp
828 integer(i4b) :: i, j, kc, kr, ii, jj
829 real(dp) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
830 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
831 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
832 acb1, acb2, acb3, acb4, &
833 ai1(0:kcmax), ai2(0:kcmax), ai3, &
835 real(dp) :: aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld
836 real(dp) :: dtime_temp_inv, dtt_2dxi, dtt_2deta
837 real(dp) :: temp_c_help(0:kcmax)
841 at7 = 2.0_dp/
rho*dtime_temp
843 aw1 = dtime_temp/dzeta_t
844 aw2 = dtime_temp/dzeta_t
845 aw3 = dtime_temp/dzeta_t
846 aw4 = dtime_temp/dzeta_t
847 aw5 =
nue/
rho*dtime_temp/(dzeta_t**2)
848 aw7 = 2.0_dp/(
rho*
l)*dtime_temp
851 aw9 =
beta/
l*dtime_temp
853 ai3 = agediff*dtime_temp/(dzeta_t**2)
866 acb1 = (
ea-1.0_dp)/
aa/dzeta_c
868 acb1 = 1.0_dp/dzeta_c
877 aqtld = dzeta_t/dtime_temp
879 dtt_2dxi = 0.5_dp*dtime_temp/dxi
880 dtt_2deta = 0.5_dp*dtime_temp/deta
882 dtime_temp_inv = 1.0_dp/dtime_temp
888 at1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
889 at2_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
892 at3_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
895 at4_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
900 if (kc /= kcmax)
then 901 at6(kc) = (
ea-1.0_dp) &
907 ai1(kc) = agediff*(
ea-1.0_dp)/(
aa*
eaz_c(kc)) &
909 if (kc /= kcmax)
then 910 ai2(kc) = (
ea-1.0_dp) &
919 at1(kc) = dtime_temp/dzeta_c
920 at2_1(kc) = dtime_temp/dzeta_c
923 at3_1(kc) = dtime_temp/dzeta_c
926 at4_1(kc) = dtime_temp/dzeta_c
929 at5(kc) = 1.0_dp/
rho &
931 if (kc /= kcmax)
then 939 if (kc /= kcmax)
then 955 if (
maske(j,i)==0)
then 962 call calc_temp1(at1, at2_1, at2_2, at3_1, at3_2, &
963 at4_1, at4_2, at5, at6, at7, atr1, acb1, acb2, &
964 acb3, acb4, alb1, ai1, ai2, &
965 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
988 else if (
maske(j,i)==3)
then 996 call calc_temp_ssa(at1, at2_1, at2_2, at3_1, at3_2, &
997 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
999 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
1033 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1070 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1107 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1144 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1184 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1220 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1262 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1298 if ( (
maske(j,i).eq.0).or.(
maske(j,i).eq.3) )
then 1345 #if (defined(TEMP_CONST)) 1346 if ( temp_const > -
eps ) &
1347 stop
' >>> calc_temp_const: TEMP_CONST must be negative!' 1363 #if (defined(AGE_CONST)) 1382 subroutine calc_temp1(at1, at2_1, at2_2, at3_1, at3_2, &
1383 at4_1, at4_2, at5, at6, at7, atr1, acb1, acb2, &
1384 acb3, acb4, alb1, ai1, ai2, &
1385 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
1393 integer(i4b),
intent(in) :: i, j
1394 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
1395 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
1396 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
1397 ai1(0:kcmax), ai2(0:kcmax), &
1398 atr1, acb1, acb2, acb3, acb4, alb1
1399 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
1401 integer(i4b) :: kc, kt, kr
1402 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
1403 ct5(0:kcmax), ct6(0:kcmax), ct7(0:kcmax), ctr1, &
1404 ccb1, ccb2, ccb3, ccb4, clb1
1405 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
1406 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1407 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
1408 real(dp) :: temp_c_help(0:kcmax)
1409 real(dp) :: vx_c_help, vy_c_help
1410 real(dp) :: adv_vert_help
1411 real(dp) :: dtt_dxi, dtt_deta
1412 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1413 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1414 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1415 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
1416 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1417 real(dp),
parameter :: zero=0.0_dp
1421 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
1422 stop
' >>> calc_temp1: Boundary points not allowed.' 1437 ccb3 = acb3*0.5_dp*(
vx_t(0,j,i)+
vx_t(0,j,i-1)) &
1439 ccb4 = acb4*0.5_dp*(
vy_t(0,j,i)+
vy_t(0,j-1,i)) &
1454 clb1 = alb1*
q_geo(j,i)
1459 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
1463 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1466 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1469 #elif (ADV_VERT==2 || ADV_VERT==3) 1472 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1479 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
1502 ct7(kc) = 2.0_dp*at7 &
1506 enh_c(kc,j,i), 0_i2b) &
1511 ci1(kc) = ai1(kc)/
h_c(j,i)
1518 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1519 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1520 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1521 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1522 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1524 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1525 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1526 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1527 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1528 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1530 #elif (ADV_VERT==2 || ADV_VERT==3) 1533 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1534 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1535 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1536 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1537 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1543 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
1547 ci2(kc) = ai2(kc)/
h_c(j,i)
1551 dtt_dxi = 2.0_dp*dtt_2dxi
1552 dtt_deta = 2.0_dp*dtt_2deta
1560 lgs_a2(kr) = -1.0_dp
1568 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
1570 lgs_b(kr) =
temp_r(kr,j,i)
1579 lgs_a2(kr) = -1.0_dp
1580 lgs_b(kr) = 2.0_dp*clb1
1588 lgs_a1(kr) = -(ccb1+ccb2)
1590 lgs_b(kr) = ccb3+ccb4
1596 lgs_a0(krmax+kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1598 lgs_a1(krmax+kc) = 1.0_dp+ct5(kc)*(ct6(kc)+ct6(kc-1))
1599 lgs_a2(krmax+kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1605 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1609 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1610 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
1611 +ct5(kc)*(ct6(kc)+ct6(kc-1))
1613 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
1618 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
1621 = -max(adv_vert_help, 0.0_dp) &
1625 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
1626 +ct5(kc)*(ct6(kc)+ct6(kc-1))
1628 = min(adv_vert_help, 0.0_dp) &
1635 lgs_b(krmax+kc) =
temp_c(kc,j,i) + ct7(kc) &
1637 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1640 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1644 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1647 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1653 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1654 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1656 lgs_b(krmax+kc) =
temp_c(kc,j,i) + ct7(kc) &
1658 ( min(vx_c_help, 0.0_dp) &
1661 +max(vx_c_help, 0.0_dp) &
1665 ( min(vy_c_help, 0.0_dp) &
1668 +max(vy_c_help, 0.0_dp) &
1677 lgs_a0(krmax+kc) = 0.0_dp
1678 lgs_a1(krmax+kc) = 1.0_dp
1679 lgs_b(krmax+kc) =
temp_s(j,i)
1683 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax+krmax)
1709 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
1710 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
1714 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1716 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1719 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1723 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1726 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1732 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1733 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1735 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1737 ( min(vx_c_help, 0.0_dp) &
1740 +max(vx_c_help, 0.0_dp) &
1744 ( min(vy_c_help, 0.0_dp) &
1747 +max(vy_c_help, 0.0_dp) &
1757 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1759 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
1760 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1765 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
1766 lgs_a1(kc) = 1.0_dp &
1767 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1768 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
1769 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
1773 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
1775 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
1776 lgs_a1(kc) = 1.0_dp &
1777 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
1778 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
1784 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1786 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1789 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1793 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1796 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1802 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1803 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1805 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1807 ( min(vx_c_help, 0.0_dp) &
1810 +max(vx_c_help, 0.0_dp) &
1814 ( min(vy_c_help, 0.0_dp) &
1817 +max(vy_c_help, 0.0_dp) &
1826 if (
as_perp(j,i) >= zero)
then 1831 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
1832 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
1837 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1839 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1842 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1846 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1849 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1855 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1856 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1858 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1860 ( min(vx_c_help, 0.0_dp) &
1863 +max(vx_c_help, 0.0_dp) &
1867 ( min(vy_c_help, 0.0_dp) &
1870 +max(vy_c_help, 0.0_dp) &
1880 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
1889 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
1891 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
1902 end subroutine calc_temp1
1908 subroutine calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, &
1909 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
1911 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
1919 integer(i4b),
intent(in) :: i, j
1920 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
1921 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
1922 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
1923 ai1(0:kcmax), ai2(0:kcmax), &
1925 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
1927 integer(i4b) :: kc, kt, kr
1928 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
1929 ct5(0:kcmax), ct6(0:kcmax), ct7(0:kcmax), ctr1, clb1
1930 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
1931 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1932 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
1933 real(dp) :: temp_c_help(0:kcmax)
1934 real(dp) :: vx_c_help, vy_c_help
1935 real(dp) :: adv_vert_help
1936 real(dp) :: dtt_dxi, dtt_deta
1937 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1938 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1939 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1940 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
1941 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1942 real(dp),
parameter :: zero=0.0_dp
1946 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
1947 stop
' >>> calc_temp2: Boundary points not allowed.' 1952 clb1 = alb1*
q_geo(j,i)
1957 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
1961 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1964 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1967 #elif (ADV_VERT==2 || ADV_VERT==3) 1970 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1977 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
2000 ct7(kc) = 2.0_dp*at7 &
2004 enh_c(kc,j,i), 0_i2b) &
2009 ci1(kc) = ai1(kc)/
h_c(j,i)
2016 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2017 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2018 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2019 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2020 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2022 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2023 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2024 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2025 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2026 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2028 #elif (ADV_VERT==2 || ADV_VERT==3) 2031 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2032 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2033 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2034 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2035 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2041 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
2045 ci2(kc) = ai2(kc)/
h_c(j,i)
2049 dtt_dxi = 2.0_dp*dtt_2dxi
2050 dtt_deta = 2.0_dp*dtt_2deta
2057 lgs_a2(kr) = -1.0_dp
2065 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
2067 lgs_b(kr) =
temp_r(kr,j,i)
2076 lgs_a2(kr) = -1.0_dp
2077 lgs_b(kr) = 2.0_dp*clb1
2089 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
2108 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2110 lgs_a1(kc) = 1.0_dp+ct5(kc)*(ct6(kc)+ct6(kc-1))
2111 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2117 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2121 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2122 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2123 +ct5(kc)*(ct6(kc)+ct6(kc-1))
2125 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2130 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2133 = -max(adv_vert_help, 0.0_dp) &
2137 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
2138 +ct5(kc)*(ct6(kc)+ct6(kc-1))
2140 = min(adv_vert_help, 0.0_dp) &
2147 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
2149 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2152 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2156 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2159 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2165 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2166 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2168 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
2170 ( min(vx_c_help, 0.0_dp) &
2173 +max(vx_c_help, 0.0_dp) &
2177 ( min(vy_c_help, 0.0_dp) &
2180 +max(vy_c_help, 0.0_dp) &
2195 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
2217 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
2218 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
2222 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2224 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2227 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2231 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2234 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2240 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2241 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2243 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2245 ( min(vx_c_help, 0.0_dp) &
2248 +max(vx_c_help, 0.0_dp) &
2252 ( min(vy_c_help, 0.0_dp) &
2255 +max(vy_c_help, 0.0_dp) &
2265 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2267 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
2268 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2273 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
2274 lgs_a1(kc) = 1.0_dp &
2275 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2276 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2277 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2281 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2283 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
2284 lgs_a1(kc) = 1.0_dp &
2285 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
2286 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
2292 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2294 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2297 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2301 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2304 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2310 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2311 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2313 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2315 ( min(vx_c_help, 0.0_dp) &
2318 +max(vx_c_help, 0.0_dp) &
2322 ( min(vy_c_help, 0.0_dp) &
2325 +max(vy_c_help, 0.0_dp) &
2334 if (
as_perp(j,i) >= zero)
then 2339 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
2340 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
2345 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2347 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2350 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2354 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2357 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2363 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2364 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2366 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2368 ( min(vx_c_help, 0.0_dp) &
2371 +max(vx_c_help, 0.0_dp) &
2375 ( min(vy_c_help, 0.0_dp) &
2378 +max(vy_c_help, 0.0_dp) &
2388 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
2397 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
2399 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
2416 subroutine calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
2417 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
2418 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
2419 ai1, ai2, ai3, dzeta_t, &
2420 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
2428 integer(i4b),
intent(in) :: i, j
2429 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
2430 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
2431 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
2432 ai1(0:kcmax), ai2(0:kcmax), ai3, &
2433 atr1, am1, am2, alb1
2434 real(dp),
intent(in) :: aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld
2435 real(dp),
intent(in) :: dzeta_t, dtime_temp, dtt_2dxi, dtt_2deta
2437 integer(i4b) :: kc, kt, kr
2438 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
2439 ct5(0:kcmax), ct6(0:kcmax), ct7(0:kcmax), ctr1, cm1, cm2, &
2441 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
2442 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
2443 real(dp) :: ci1(0:kcmax), ci2(0:kcmax), ci3
2444 real(dp) :: cw1(0:ktmax), cw2(0:ktmax), cw3(0:ktmax), cw4(0:ktmax), &
2445 cw5, cw7(0:ktmax), cw8, cw9(0:ktmax)
2446 real(dp) :: cw1_sg(0:ktmax), cw2_sg(0:ktmax), cw3_sg(0:ktmax), &
2447 cw4_sg(0:ktmax), adv_vert_w_sg(0:ktmax), abs_adv_vert_w_sg(0:ktmax)
2448 real(dp) :: sigma_c_help(0:kcmax), sigma_t_help(0:ktmax), &
2449 temp_c_help(0:kcmax)
2450 real(dp) :: vx_c_help, vy_c_help, vx_t_help, vy_t_help
2451 real(dp) :: adv_vert_help, adv_vert_w_help
2452 real(dp) :: dtt_dxi, dtt_deta
2453 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
2454 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
2455 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
2456 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
2457 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
2458 real(dp),
parameter :: zero=0.0_dp
2462 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
2463 stop
' >>> calc_temp3: Boundary points not allowed.' 2469 clb1 = alb1*
q_geo(j,i)
2478 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c_neu(j,i)*
vz_c(kc,j,i)
2481 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c_neu(j,i)*
vz_c(kc,j,i)
2484 #elif (ADV_VERT==2 || ADV_VERT==3) 2487 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c_neu(j,i)*
vz_c(kc,j,i)
2494 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
2517 *
creep(sigma_c_help(kc)) &
2518 *sigma_c_help(kc)*sigma_c_help(kc)
2521 ct7(kc) = 2.0_dp*at7 &
2525 enh_c(kc,j,i), 0_i2b) &
2530 ci1(kc) = ai1(kc)/
h_c_neu(j,i)
2537 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2538 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2539 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2540 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2541 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2543 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2544 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2545 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2546 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2547 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2549 #elif (ADV_VERT==2 || ADV_VERT==3) 2552 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2553 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2554 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2555 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2556 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2562 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
2566 ci2(kc) = ai2(kc)/
h_c_neu(j,i)
2589 #elif (ADV_VERT==2 || ADV_VERT==3) 2603 -0.5_dp*(
vz_t(kt,j,i)+
vz_t(kt-1,j,i)) )
2627 *
creep(sigma_t_help(kt)) &
2628 *sigma_t_help(kt)*sigma_t_help(kt)
2631 cw7(kt) = 2.0_dp*aw7 &
2635 enh_t(kt,j,i), 1_i2b) &
2645 cw2_sg(kt) = 0.5_dp*(cw2(kt)+cw2(kt+1))
2646 cw3_sg(kt) = 0.5_dp*(cw3(kt)+cw3(kt+1))
2647 cw4_sg(kt) = 0.5_dp*(cw4(kt)+cw4(kt+1))
2648 adv_vert_w_sg(kt) = cw1_sg(kt)-cw2_sg(kt)-cw3_sg(kt)-cw4_sg(kt)
2649 abs_adv_vert_w_sg(kt) = abs(adv_vert_w_sg(kt))
2651 cw2_sg(kt) = 0.5_dp*(cw2(kt)+cw2(kt+1))
2652 cw3_sg(kt) = 0.5_dp*(cw3(kt)+cw3(kt+1))
2653 cw4_sg(kt) = 0.5_dp*(cw4(kt)+cw4(kt+1))
2654 adv_vert_w_sg(kt) = cw1_sg(kt)-cw2_sg(kt)-cw3_sg(kt)-cw4_sg(kt)
2655 abs_adv_vert_w_sg(kt) = abs(adv_vert_w_sg(kt))
2657 #elif (ADV_VERT==2 || ADV_VERT==3) 2660 cw2_sg(kt) = 0.5_dp*(cw2(kt)+cw2(kt+1))
2661 cw3_sg(kt) = 0.5_dp*(cw3(kt)+cw3(kt+1))
2662 cw4_sg(kt) = 0.5_dp*(cw4(kt)+cw4(kt+1))
2663 adv_vert_w_sg(kt) = cw1_sg(kt)-cw2_sg(kt)-cw3_sg(kt)-cw4_sg(kt)
2664 abs_adv_vert_w_sg(kt) = abs(adv_vert_w_sg(kt))
2670 dtt_dxi = 2.0_dp*dtt_2dxi
2671 dtt_deta = 2.0_dp*dtt_2deta
2678 lgs_a2(kr) = -1.0_dp
2686 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
2688 lgs_b(kr) =
temp_r(kr,j,i)
2697 lgs_a2(kr) = -1.0_dp
2698 lgs_b(kr) = 2.0_dp*clb1
2710 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
2723 lgs_a2(kt) = -1.0_dp
2730 lgs_a0(kt) = -0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - cw5
2731 lgs_a1(kt) = 1.0_dp + 2.0_dp*cw5
2732 lgs_a2(kt) = 0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - cw5
2737 = -0.5_dp*(adv_vert_w_sg(kt-1)+abs_adv_vert_w_sg(kt-1)) &
2741 +0.5_dp*(adv_vert_w_sg(kt-1)+abs_adv_vert_w_sg(kt-1)) &
2742 -0.5_dp*(adv_vert_w_sg(kt) -abs_adv_vert_w_sg(kt) ) &
2745 = 0.5_dp*(adv_vert_w_sg(kt) -abs_adv_vert_w_sg(kt) ) &
2750 adv_vert_w_help = 0.5_dp*(adv_vert_w_sg(kt)+adv_vert_w_sg(kt-1))
2753 = -max(adv_vert_w_help, 0.0_dp) &
2757 +max(adv_vert_w_help, 0.0_dp)-min(adv_vert_w_help, 0.0_dp) &
2760 = min(adv_vert_w_help, 0.0_dp) &
2767 lgs_b(kt) =
omega_t(kt,j,i) + cw7(kt) + cw8 + cw9(kt) &
2769 ( (
vx_t(kt,j,i)-abs(
vx_t(kt,j,i))) &
2772 +(
vx_t(kt,j,i-1)+abs(
vx_t(kt,j,i-1))) &
2776 ( (
vy_t(kt,j,i)-abs(
vy_t(kt,j,i))) &
2779 +(
vy_t(kt,j-1,i)+abs(
vy_t(kt,j-1,i))) &
2785 vx_t_help = 0.5_dp*(
vx_t(kt,j,i)+
vx_t(kt,j,i-1))
2786 vy_t_help = 0.5_dp*(
vy_t(kt,j,i)+
vy_t(kt,j-1,i))
2788 lgs_b(kt) =
omega_t(kt,j,i) + cw7(kt) + cw8 + cw9(kt) &
2790 ( min(vx_t_help, 0.0_dp) &
2793 +max(vx_t_help, 0.0_dp) &
2797 ( min(vy_t_help, 0.0_dp) &
2800 +max(vy_t_help, 0.0_dp) &
2810 #if (!defined(CTS_MELTING_FREEZING) || CTS_MELTING_FREEZING==1) 2812 if (
am_perp(j,i) >= zero)
then 2817 lgs_a0(kt) = -1.0_dp
2822 #elif (CTS_MELTING_FREEZING==2) 2829 stop
' >>> calc_temp3: CTS_MELTING_FREEZING must be either 1 or 2!' 2834 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, ktmax)
2842 if (lgs_x(kt) < zero)
then 2859 #if (!defined(CTS_MELTING_FREEZING) || CTS_MELTING_FREEZING==1) 2861 if (
am_perp(j,i) >= zero)
then 2868 #elif (CTS_MELTING_FREEZING==2) 2873 stop
' >>> calc_temp3: CTS_MELTING_FREEZING must be either 1 or 2!' 2878 lgs_a2(kc) = -1.0_dp
2879 lgs_b(kc) = -cm1-cm2
2885 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2887 lgs_a1(kc) = 1.0_dp+ct5(kc)*(ct6(kc)+ct6(kc-1))
2888 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2894 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2898 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2899 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2900 +ct5(kc)*(ct6(kc)+ct6(kc-1))
2902 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2907 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2910 = -max(adv_vert_help, 0.0_dp) &
2914 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
2915 +ct5(kc)*(ct6(kc)+ct6(kc-1))
2917 = min(adv_vert_help, 0.0_dp) &
2924 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
2926 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2929 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2933 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2936 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2942 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2943 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2945 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
2947 ( min(vx_c_help, 0.0_dp) &
2950 +max(vx_c_help, 0.0_dp) &
2954 ( min(vy_c_help, 0.0_dp) &
2957 +max(vy_c_help, 0.0_dp) &
2972 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
2984 lgs_a1(kt) = 1.0_dp - min(adv_vert_w_sg(kt), 0.0_dp)
2985 lgs_a2(kt) = min(adv_vert_w_sg(kt), 0.0_dp)
2989 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
2991 ( (
vx_t(kt,j,i)-abs(
vx_t(kt,j,i))) &
2994 +(
vx_t(kt,j,i-1)+abs(
vx_t(kt,j,i-1))) &
2998 ( (
vy_t(kt,j,i)-abs(
vy_t(kt,j,i))) &
3001 +(
vy_t(kt,j-1,i)+abs(
vy_t(kt,j-1,i))) &
3007 vx_t_help = 0.5_dp*(
vx_t(kt,j,i)+
vx_t(kt,j,i-1))
3008 vy_t_help = 0.5_dp*(
vy_t(kt,j,i)+
vy_t(kt,j-1,i))
3010 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3012 ( min(vx_t_help, 0.0_dp) &
3015 +max(vx_t_help, 0.0_dp) &
3019 ( min(vy_t_help, 0.0_dp) &
3022 +max(vy_t_help, 0.0_dp) &
3032 lgs_a0(kt) = -0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - ci3
3033 lgs_a1(kt) = 1.0_dp + 2.0_dp*ci3
3034 lgs_a2(kt) = 0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - ci3
3038 lgs_a0(kt) = -0.5_dp*(adv_vert_w_sg(kt-1)+abs_adv_vert_w_sg(kt-1))
3039 lgs_a1(kt) = 1.0_dp &
3040 +0.5_dp*(adv_vert_w_sg(kt-1)+abs_adv_vert_w_sg(kt-1)) &
3041 -0.5_dp*(adv_vert_w_sg(kt) -abs_adv_vert_w_sg(kt) )
3042 lgs_a2(kt) = 0.5_dp*(adv_vert_w_sg(kt) -abs_adv_vert_w_sg(kt) )
3046 adv_vert_w_help = 0.5_dp*(adv_vert_w_sg(kt)+adv_vert_w_sg(kt-1))
3048 lgs_a0(kt) = -max(adv_vert_w_help, 0.0_dp)
3049 lgs_a1(kt) = 1.0_dp &
3050 +max(adv_vert_w_help, 0.0_dp)-min(adv_vert_w_help, 0.0_dp)
3051 lgs_a2(kt) = min(adv_vert_w_help, 0.0_dp)
3057 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3059 ( (
vx_t(kt,j,i)-abs(
vx_t(kt,j,i))) &
3062 +(
vx_t(kt,j,i-1)+abs(
vx_t(kt,j,i-1))) &
3066 ( (
vy_t(kt,j,i)-abs(
vy_t(kt,j,i))) &
3069 +(
vy_t(kt,j-1,i)+abs(
vy_t(kt,j-1,i))) &
3075 vx_t_help = 0.5_dp*(
vx_t(kt,j,i)+
vx_t(kt,j,i-1))
3076 vy_t_help = 0.5_dp*(
vy_t(kt,j,i)+
vy_t(kt,j-1,i))
3078 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3080 ( min(vx_t_help, 0.0_dp) &
3083 +max(vx_t_help, 0.0_dp) &
3087 ( min(vy_t_help, 0.0_dp) &
3090 +max(vy_t_help, 0.0_dp) &
3103 lgs_a0(kt) = -0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - ci3
3104 lgs_a1(kt) = 1.0_dp + 2.0_dp*ci3
3105 lgs_a2(kt) = 0.5_dp*(cw1(kt)-cw2(kt)-cw3(kt)-cw4(kt)) - ci3
3109 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3111 ( (
vx_t(kt,j,i)-abs(
vx_t(kt,j,i))) &
3114 +(
vx_t(kt,j,i-1)+abs(
vx_t(kt,j,i-1))) &
3118 ( (
vy_t(kt,j,i)-abs(
vy_t(kt,j,i))) &
3121 +(
vy_t(kt,j-1,i)+abs(
vy_t(kt,j-1,i))) &
3127 vx_t_help = 0.5_dp*(
vx_t(kt,j,i)+
vx_t(kt,j,i-1))
3128 vy_t_help = 0.5_dp*(
vy_t(kt,j,i)+
vy_t(kt,j-1,i))
3130 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3132 ( min(vx_t_help, 0.0_dp) &
3135 +max(vx_t_help, 0.0_dp) &
3139 ( min(vy_t_help, 0.0_dp) &
3142 +max(vy_t_help, 0.0_dp) &
3148 #elif (ADV_VERT==2 || ADV_VERT==3) 3153 if (adv_vert_sg(kc) <= zero)
then 3155 lgs_a0(ktmax+kc) = 0.0_dp
3156 lgs_a1(ktmax+kc) = 1.0_dp - adv_vert_sg(kc)
3157 lgs_a2(ktmax+kc) = adv_vert_sg(kc)
3161 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3163 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
3166 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
3170 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
3173 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
3179 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
3180 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
3182 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3184 ( min(vx_c_help, 0.0_dp) &
3187 +max(vx_c_help, 0.0_dp) &
3191 ( min(vy_c_help, 0.0_dp) &
3194 +max(vy_c_help, 0.0_dp) &
3200 else if (adv_vert_w_sg(kt-1) >= zero)
then 3202 lgs_a0(kt) = -adv_vert_w_sg(kt-1)
3203 lgs_a1(kt) = 1.0_dp + adv_vert_w_sg(kt-1)
3208 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3210 ( (
vx_t(kt,j,i)-abs(
vx_t(kt,j,i))) &
3213 +(
vx_t(kt,j,i-1)+abs(
vx_t(kt,j,i-1))) &
3217 ( (
vy_t(kt,j,i)-abs(
vy_t(kt,j,i))) &
3220 +(
vy_t(kt,j-1,i)+abs(
vy_t(kt,j-1,i))) &
3226 vx_t_help = 0.5_dp*(
vx_t(kt,j,i)+
vx_t(kt,j,i-1))
3227 vy_t_help = 0.5_dp*(
vy_t(kt,j,i)+
vy_t(kt,j-1,i))
3229 lgs_b(kt) =
age_t(kt,j,i) + dtime_temp &
3231 ( min(vx_t_help, 0.0_dp) &
3234 +max(vx_t_help, 0.0_dp) &
3238 ( min(vy_t_help, 0.0_dp) &
3241 +max(vy_t_help, 0.0_dp) &
3249 lgs_a0(kt) = -0.5_dp
3251 lgs_a2(kt) = -0.5_dp
3263 lgs_a0(ktmax+kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
3265 lgs_a1(ktmax+kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
3266 lgs_a2(ktmax+kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
3271 lgs_a0(ktmax+kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
3272 lgs_a1(ktmax+kc) = 1.0_dp &
3273 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
3274 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
3275 lgs_a2(ktmax+kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
3279 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
3281 lgs_a0(ktmax+kc) = -max(adv_vert_help, 0.0_dp)
3282 lgs_a1(ktmax+kc) = 1.0_dp &
3283 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
3284 lgs_a2(ktmax+kc) = min(adv_vert_help, 0.0_dp)
3290 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3292 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
3295 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
3299 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
3302 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
3308 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
3309 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
3311 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3313 ( min(vx_c_help, 0.0_dp) &
3316 +max(vx_c_help, 0.0_dp) &
3320 ( min(vy_c_help, 0.0_dp) &
3323 +max(vy_c_help, 0.0_dp) &
3332 if (
as_perp(j,i) >= zero)
then 3333 lgs_a0(ktmax+kc) = 0.0_dp
3334 lgs_a1(ktmax+kc) = 1.0_dp
3335 lgs_b(ktmax+kc) = 0.0_dp
3337 lgs_a0(ktmax+kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
3338 lgs_a1(ktmax+kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
3343 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3345 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
3348 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
3352 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
3355 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
3361 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
3362 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
3364 lgs_b(ktmax+kc) =
age_c(kc,j,i) + dtime_temp &
3366 ( min(vx_c_help, 0.0_dp) &
3369 +max(vx_c_help, 0.0_dp) &
3373 ( min(vy_c_help, 0.0_dp) &
3376 +max(vy_c_help, 0.0_dp) &
3386 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax+ktmax)
3395 if (
age_t_neu(kt,j,i) < (age_min*year_sec)) &
3397 if (
age_t_neu(kt,j,i) > (age_max*year_sec)) &
3406 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
3408 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
3424 integer(i4b),
intent(in) :: i, j
3425 real(dp),
intent(in) :: atr1, alb1
3427 integer(i4b) :: kc, kt, kr
3428 real(dp) :: ctr1, clb1
3429 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
3430 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
3431 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
3432 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
3433 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
3438 clb1 = alb1*
q_geo(j,i)
3444 lgs_a2(kr) = -1.0_dp
3452 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
3454 lgs_b(kr) =
temp_r(kr,j,i)
3463 lgs_a2(kr) = -1.0_dp
3464 lgs_b(kr) = 2.0_dp*clb1
3476 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
3506 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
3507 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3508 ai1, ai2, ai3, dzeta_t, &
3509 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
3514 integer(i4b),
intent(in) :: i, j
3515 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
3516 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
3517 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
3518 ai1(0:kcmax), ai2(0:kcmax), ai3, &
3519 atr1, am1, am2, alb1
3520 real(dp),
intent(in) :: aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld
3521 real(dp),
intent(in) :: dzeta_t
3522 real(dp),
intent(in) :: dtime_temp, dtime_temp_inv, dtt_2dxi, dtt_2deta
3524 real(dp) :: zm_shift
3525 real(dp) :: difftemp_a, difftemp_b, interpol
3533 if (difftemp_a <= 0.0_dp)
return 3553 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3554 at4_1, at4_2, at5, at6, at7, atr1, &
3556 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3557 ai1, ai2, ai3, dzeta_t, &
3558 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3560 difftemp_b = difftemp_a
3563 if (difftemp_a > 0.0_dp)
go to 10
3569 interpol = difftemp_a/(difftemp_b-difftemp_a)*zm_shift
3581 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3582 at4_1, at4_2, at5, at6, at7, atr1, &
3584 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3585 ai1, ai2, ai3, dzeta_t, &
3586 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3593 subroutine shift_cts_downward(at1, at2_1, at2_2, at3_1, at3_2, &
3594 at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, &
3595 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3596 ai1, ai2, ai3, dzeta_t, &
3597 dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, &
3602 integer(i4b),
intent(in) :: i, j
3603 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
3604 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
3605 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
3606 ai1(0:kcmax), ai2(0:kcmax), ai3, &
3607 atr1, am1, am2, alb1
3608 real(dp),
intent(in) :: aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld
3609 real(dp),
intent(in) :: dzeta_t
3610 real(dp),
intent(in) :: dtt_2dxi, dtt_2deta, dtime_temp, dtime_temp_inv
3612 real(dp) :: zm_shift
3613 real(dp) :: difftemp_a, difftemp_b, interpol
3621 if (difftemp_a >= 0.0_dp)
return 3633 zm_shift = (
zm_neu(j,i)+zm_shift)-(
zb(j,i)+0.001_dp)
3645 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3646 at4_1, at4_2, at5, at6, at7, atr1, &
3648 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3649 ai1, ai2, ai3, dzeta_t, &
3650 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3652 difftemp_b = difftemp_a
3655 if (difftemp_a >= 0.0_dp)
then 3661 interpol = difftemp_a/(difftemp_a-difftemp_b)*zm_shift
3673 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3674 at4_1, at4_2, at5, at6, at7, atr1, &
3676 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3677 ai1, ai2, ai3, dzeta_t, &
3678 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3693 call calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, &
3694 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
3696 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3714 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3715 at4_1, at4_2, at5, at6, at7, atr1, &
3717 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3718 ai1, ai2, ai3, dzeta_t, &
3719 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3721 difftemp_b = difftemp_a
3724 if (difftemp_a < 0.0_dp)
go to 10
3730 interpol = difftemp_a/(difftemp_a-difftemp_b)*zm_shift
3742 call calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, &
3743 at4_1, at4_2, at5, at6, at7, atr1, &
3745 aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, &
3746 ai1, ai2, ai3, dzeta_t, &
3747 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3749 end subroutine shift_cts_downward
3754 subroutine calc_temp_ssa(at1, at2_1, at2_2, at3_1, at3_2, &
3755 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
3757 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
3764 integer(i4b),
intent(in) :: i, j
3765 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
3766 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
3767 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
3768 ai1(0:kcmax), ai2(0:kcmax), &
3770 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
3772 integer(i4b) :: kc, kt, kr
3773 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
3774 ct5(0:kcmax), ct6(0:kcmax), ct7(0:kcmax), ctr1, clb1
3775 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
3776 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
3777 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
3778 real(dp) :: temp_c_help(0:kcmax)
3779 real(dp) :: vx_c_help, vy_c_help
3780 real(dp) :: adv_vert_help
3781 real(dp) :: dtt_dxi, dtt_deta
3782 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
3783 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
3784 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
3785 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
3786 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
3787 real(dp),
parameter :: zero=0.0_dp
3791 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
3792 stop
' >>> calc_temp_ssa: Boundary points not allowed.' 3797 clb1 = alb1*
q_geo(j,i)
3802 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
3806 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
3809 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
3812 #elif (ADV_VERT==2 || ADV_VERT==3) 3815 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
3822 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
3833 ct7(kc) = 2.0_dp*at7 &
3837 enh_c(kc,j,i), 0_i2b) &
3839 ci1(kc) = ai1(kc)/
h_c(j,i)
3846 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
3847 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
3848 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
3849 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
3850 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
3852 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
3853 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
3854 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
3855 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
3856 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
3858 #elif (ADV_VERT==2 || ADV_VERT==3) 3861 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
3862 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
3863 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
3864 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
3865 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
3871 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
3875 ci2(kc) = ai2(kc)/
h_c(j,i)
3879 dtt_dxi = 2.0_dp*dtt_2dxi
3880 dtt_deta = 2.0_dp*dtt_2deta
3887 lgs_a2(kr) = -1.0_dp
3895 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
3897 lgs_b(kr) =
temp_r(kr,j,i)
3906 lgs_a2(kr) = -1.0_dp
3907 lgs_b(kr) = 2.0_dp*clb1
3919 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
3938 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
3940 lgs_a1(kc) = 1.0_dp+ct5(kc)*(ct6(kc)+ct6(kc-1))
3941 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
3947 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
3951 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
3952 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
3953 +ct5(kc)*(ct6(kc)+ct6(kc-1))
3955 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
3960 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
3963 = -max(adv_vert_help, 0.0_dp) &
3967 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
3968 +ct5(kc)*(ct6(kc)+ct6(kc-1))
3970 = min(adv_vert_help, 0.0_dp) &
3977 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
3979 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
3982 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
3986 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
3989 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
3995 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
3996 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
3998 lgs_b(kc) =
temp_c(kc,j,i) + ct7(kc) &
4000 ( min(vx_c_help, 0.0_dp) &
4003 +max(vx_c_help, 0.0_dp) &
4007 ( min(vy_c_help, 0.0_dp) &
4010 +max(vy_c_help, 0.0_dp) &
4025 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
4047 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
4048 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
4052 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4054 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
4057 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
4061 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
4064 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
4070 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
4071 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
4073 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4075 ( min(vx_c_help, 0.0_dp) &
4078 +max(vx_c_help, 0.0_dp) &
4082 ( min(vy_c_help, 0.0_dp) &
4085 +max(vy_c_help, 0.0_dp) &
4095 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
4097 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
4098 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
4103 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
4104 lgs_a1(kc) = 1.0_dp &
4105 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
4106 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
4107 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
4111 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
4113 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
4114 lgs_a1(kc) = 1.0_dp &
4115 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
4116 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
4122 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4124 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
4127 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
4131 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
4134 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
4140 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
4141 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
4143 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4145 ( min(vx_c_help, 0.0_dp) &
4148 +max(vx_c_help, 0.0_dp) &
4152 ( min(vy_c_help, 0.0_dp) &
4155 +max(vy_c_help, 0.0_dp) &
4164 if (
as_perp(j,i) >= zero)
then 4169 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
4170 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
4175 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4177 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
4180 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
4184 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
4187 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
4193 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
4194 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
4196 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
4198 ( min(vx_c_help, 0.0_dp) &
4201 +max(vx_c_help, 0.0_dp) &
4205 ( min(vy_c_help, 0.0_dp) &
4208 +max(vy_c_help, 0.0_dp) &
4218 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
4227 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
4229 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
4240 end subroutine calc_temp_ssa
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) vx_c
vx_c(kc,j,i): Velocity in x-direction in the upper (kc) ice domain (at (i+1/2,j,kc)) ...
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c
temp_c(kc,j,i): Temperature in the upper (kc) ice domain
real(dp) kappa_r
KAPPA_R: Heat conductivity of the lithosphere.
real(dp) delta_tm_sw
DELTA_TM_SW: Melting point depression of sea water due to its average salinity.
real(dp), dimension(0:krmax, 0:jmax, 0:imax) temp_r_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) de_c
de_c(kc,j,i): Full effective strain rate in the upper (kc) ice domain
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) age_c
age_c(kc,j,i): Age in the upper (kc) ice domain
integer(i2b), dimension(0:jmax, 0:imax) n_cts
n_cts(j,i): Mask for thermal conditions. -1: cold ice base, 0: temperate ice base with cold ice above...
real(dp), dimension(0:jmax, 0:imax) insq_g22_sgy
insq_g22_sgy(j,i): Inverse square root of g22, at (i,j+1/2)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) de_t
de_t(kt,j,i): Full effective strain rate in the lower (kt) ice domain
real(dp), dimension(0:kcmax) eaz_c
eaz_c(kc): Abbreviation for exp(aa*zeta(kc))
real(dp), dimension(0:jmax, 0:imax) q_geo
q_geo(j,i): Geothermal heat flux
real(dp), dimension(0:jmax, 0:imax) vx_b_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) age_t
age_t(kt,j,i): Age in the lower (kt) ice domain
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) enh_c
enh_c(kc,j,i): Flow enhancement factor in the upper (kc) ice domain
real(dp), dimension(0:krmax, 0:jmax, 0:imax) temp_r
temp_r(kr,j,i): Temperature in the bedrock
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) age_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) h_r
H_R: Thickness of the modelled lithosphere layer.
Material properties of ice: Rate factor, heat conductivity, specific heat (heat capacity), creep function, viscosity.
subroutine calc_temp_r(atr1, alb1, i, j)
Computation of temperature and age for an ice-free column.
real(dp), parameter eps
eps: Small number
real(dp) omega_max
OMEGA_MAX: Threshold value for the water content of temperate ice.
real(dp), dimension(0:jmax, 0:imax) insq_g11_sgx
insq_g11_sgx(j,i): Inverse square root of g11, at (i+1/2,j)
Several mathematical tools used by SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) insq_g22_g
insq_g22_g(j,i): Inverse square root of g22 on grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_t_dtau
dH_t_dtau(j,i): Derivative of H_t by tau (time)
real(dp), dimension(0:jmax, 0:imax) dh_c_dtau
dH_c_dtau(j,i): Derivative of H_c by tau (time)
real(dp) function, public kappa_val(temp_val)
Heat conductivity of ice: Linear interpolation of tabulated values in KAPPA(.).
integer(i2b), dimension(0:jmax, 0:imax) maske
maske(j,i): Ice-land-ocean mask. 0: grounded ice, 1: ice-free land, 2: ocean, 3: floating ice ...
real(dp), dimension(0:jmax, 0:imax) dh_c_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
subroutine, public calc_temp_cold(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature and age in cold-ice mode.
subroutine calc_temp2(at1, at2_1, at2_2, at3_1, at3_2, at4_1, at4_2, at5, at6, at7, atr1, alb1, ai1, ai2, dtime_temp, dtt_2dxi, dtt_2deta, i, j)
Computation of temperature and age for an ice column with a temperate base overlain by cold ice...
real(dp), dimension(0:jmax, 0:imax) as_perp
as_perp(j,i): Accumulation-ablation function at the ice surface (SMB)
real(dp), dimension(0:jmax, 0:imax) area
area(j,i): Area of grid cell associated with grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dzs_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) temp_t_m
temp_t_m(kt,j,i): Melting temperature in the lower (kt) ice domain
real(dp), dimension(0:jmax, 0:imax) de_ssa
de_ssa(j,i): Effective strain rate of the SSA, at (i,j)
real(dp), dimension(0:jmax, 0:imax) h_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_temp_const()
Isothermal mode: Setting of the temperature and age to constant values.
subroutine tri_sle(a0, a1, a2, x, b, nrows)
Solution of a system of linear equations Ax=b with tridiagonal matrix A.
real(dp) function, public creep(sigma_val)
Creep response function for ice.
real(dp), dimension(0:jmax, 0:imax) temp_s
temp_s(j,i): Ice surface temperature
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) vz_t
vz_t(kt,j,i): Velocity in z-direction in the lower (kt) ice domain (at (i,j,kt+1/2)) ...
real(dp) g
G: Acceleration due to gravity.
real(dp), dimension(0:jmax, 0:imax) q_tld
Q_tld(j,i): Water drainage rate from the temperate layer.
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine calc_temp3(at1, at2_1, at2_2, at3_1, at3_2, at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, ai1, ai2, ai3, dzeta_t, dtime_temp, dtt_2dxi, dtt_2deta, i, j)
Computation of temperature, water content and age for an ice column with a temperate base overlain by...
real(dp) function, public ratefac_c(temp_val, temp_m_val)
Rate factor for cold ice: Linear interpolation of tabulated values in RF(.).
real(dp) ea
ea: Abbreviation for exp(aa)
logical flag_aa_nonzero
flag_aa_nonzero: Flag for the exponential stretch parameter aa. .true.: aa greater than zero (non-equ...
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) age_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) aa
aa: Exponential stretch parameter of the non-equidistant vertical grid in the upper (kc) ice domain ...
real(dp) rho_c_r
RHO_C_R: Density times specific heat of the lithosphere.
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) zs
zs(j,i): Coordinate z of the surface topography
real(dp), dimension(0:jmax, 0:imax) dh_c_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) enh_t
enh_t(kt,j,i): Flow enhancement factor in the lower (kt) ice domain
integer(i2b), dimension(0:jmax, 0:imax) kc_cts_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) function, public ratefac_t(omega_val)
Rate factor for temperate ice.
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
Computation of temperature, water content and age.
real(dp), dimension(0:jmax, 0:imax) vy_b_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) omega_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) dzm_dtau
dzm_dtau(j,i): Derivative of zm by tau (time)
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c_m
temp_c_m(kc,j,i): Melting temperature in the upper (kc) ice domain
real(dp), dimension(0:jmax, 0:imax) dzb_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp) nue
NUE: Water diffusivity in ice.
real(dp) function, public c_val(temp_val)
Specific heat of ice: Linear interpolation of tabulated values in C(.).
real(dp), dimension(0:jmax, 0:imax) p_weert_inv
p_weert_inv(j,i): Inverse of p_weert
logical, dimension(0:jmax, 0:imax) flag_shelfy_stream
flag_shelfy_stream(j,i): Shelfy stream flag on the main grid. .true.: grounded ice, and at least one neighbour on the staggered grid is a shelfy stream point .false.: otherwise
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) vz_c
vz_c(kc,j,i): Velocity in z-direction in the upper (kc) ice domain (at (i,j,kc+1/2)) ...
real(dp), dimension(0:jmax, 0:imax) h_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) zm
zm(j,i): Coordinate z of the bottom of the upper (kc) ice domain = top of the lower (kt) ice domain (...
real(dp), dimension(0:kcmax) eaz_c_quotient
eaz_c_quotient(kc): Abbreviation for (eaz_c(kc)-1.0)/(ea-1.0)
real(dp), dimension(0:jmax, 0:imax) dh_t_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_t_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
subroutine shift_cts_upward(at1, at2_1, at2_2, at3_1, at3_2, at4_1, at4_2, at5, at6, at7, atr1, am1, am2, alb1, aw1, aw2, aw3, aw4, aw5, aw7, aw8, aw9, aqtld, ai1, ai2, ai3, dzeta_t, dtime_temp, dtt_2dxi, dtt_2deta, dtime_temp_inv, i, j)
Upward shifting of the CTS.
real(dp), dimension(0:jmax, 0:imax) dzm_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dzs_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) vy_t
vy_t(kt,j,i): Velocity in y-direction in the lower (kt) ice domain (at (i,j+1/2,kt)) ...
real(dp), dimension(0:jmax, 0:imax) am_perp
am_perp(j,i): Ice volume flux across the z=zm interface
real(dp) beta
BETA: Clausius-Clapeyron gradient of ice.
real(dp), dimension(0:jmax, 0:imax) dzm_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) insq_g11_g
insq_g11_g(j,i): Inverse square root of g11 on grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) c_drag
c_drag(j,i): Auxiliary quantity for the computation of the basal drag
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) vy_c
vy_c(kc,j,i): Velocity in y-direction in the upper (kc) ice domain (at (i,j+1/2,kc)) ...
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) omega_t
omega_t(kt,j,i): Water content in the lower (kt) ice domain
real(dp), dimension(0:ktmax) zeta_t
zeta_t(kt): Sigma coordinate zeta_t of grid point kt
real(dp) function, public viscosity(de_val, temp_val, temp_m_val, omega_val, enh_val, i_flag_cold_temp)
Ice viscosity as a function of the effective strain rate and the temperature (in cold ice) or the wat...
real(dp) l
L: Latent heat of ice.
real(dp), dimension(0:jmax, 0:imax) zm_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) rho
RHO: Density of ice.
integer(i2b), dimension(0:jmax, 0:imax) n_cts_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) sigma_c
sigma_c(kc,j,i): Effective stress in the upper (kc) ice domain
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) omega_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_temp_poly(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature, water content and age in polythermal mode.
real(dp), dimension(0:jmax, 0:imax) am_perp_st
am_perp_st(j,i): Steady-state part of am_perp (without contribution of dzm_dtau)
real(dp), dimension(0:jmax, 0:imax) dzb_dtau
dzb_dtau(j,i): Derivative of zb by tau (time)
real(dp), dimension(0:kcmax) zeta_c
zeta_c(kc): Sigma coordinate zeta_c of grid point kc
real(dp), dimension(0:jmax, 0:imax) h_t
H_t(j,i): Thickness of ice in the lower (kt) domain (thickness of the temperate layer for POLY...
Declarations of global variables for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) dzs_dtau
dzs_dtau(j,i): Derivative of zs by tau (time)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) vx_t
vx_t(kt,j,i): Velocity in x-direction in the lower (kt) ice domain (at (i+1/2,j,kt)) ...
real(dp), dimension(0:jmax, 0:imax) dzb_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)