57 real(dp),
intent(in) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
58 real(dp),
intent(in) :: dtime_temp
60 integer(i4b) :: i, j, kc, kt, kr, ii, jj
61 real(dp) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
62 at3_1(0:kcmax), at3_2(0:kcmax), at4_1(0:kcmax), &
63 at4_2(0:kcmax), at5(0:kcmax), at6(0:kcmax), at7, &
64 ai1(0:kcmax), ai2(0:kcmax), &
65 atr1, acb1, acb2, acb3, acb4, alb1, aqtlde(0:kcmax), &
67 real(dp) :: dtt_2dxi, dtt_2deta
71 at7 = 2.0_dp/
rho*dtime_temp
82 acb1 = (
ea-1.0_dp)/
aa/dzeta_c
93 dtt_2dxi = 0.5_dp*dtime_temp/dxi
94 dtt_2deta = 0.5_dp*dtime_temp/deta
100 at1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
101 at2_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
104 at3_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
107 at4_1(kc) = (
ea-1.0_dp)/(
aa*
eaz_c(kc))*dtime_temp/dzeta_c
112 if (kc /= kcmax)
then 113 at6(kc) = (
ea-1.0_dp) &
119 ai1(kc) = agediff*(
ea-1.0_dp)/(
aa*
eaz_c(kc)) &
121 if (kc /= kcmax)
then 122 ai2(kc) = (
ea-1.0_dp) &
128 aqtlde(kc) = (
aa*
eaz_c(kc))/(
ea-1.0_dp)*dzeta_c/dtime_temp
133 at1(kc) = dtime_temp/dzeta_c
134 at2_1(kc) = dtime_temp/dzeta_c
137 at3_1(kc) = dtime_temp/dzeta_c
140 at4_1(kc) = dtime_temp/dzeta_c
143 at5(kc) = 1.0_dp/
rho &
145 if (kc /= kcmax)
then 153 if (kc /= kcmax)
then 159 aqtlde(kc) = dzeta_c/dtime_temp
160 am3(kc) = dzeta_c*
beta 171 if (
maske(j,i)==0)
then 175 if (
n_cts(j,i) == -1)
then 183 call calc_temp_enth_1(at1, at2_1, at2_2, at3_1, at3_2, &
184 at4_1, at4_2, at5, at6, at7, &
185 atr1, acb1, acb2, acb3, acb4, alb1, &
187 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
196 call calc_temp_enth_2(at1, at2_1, at2_2, at3_1, at3_2, &
197 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
198 ai1, ai2, aqtlde, am3, &
199 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
205 else if (
n_cts(j,i) == 0)
then 213 call calc_temp_enth_2(at1, at2_1, at2_2, at3_1, at3_2, &
214 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
215 ai1, ai2, aqtlde, am3, &
216 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
225 call calc_temp_enth_1(at1, at2_1, at2_2, at3_1, at3_2, &
226 at4_1, at4_2, at5, at6, at7, &
227 atr1, acb1, acb2, acb3, acb4, alb1, &
229 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
236 call calc_temp_enth_2(at1, at2_1, at2_2, at3_1, at3_2, &
237 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
238 ai1, ai2, aqtlde, am3, &
239 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
249 else if (
maske(j,i)==3)
then 258 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
260 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
283 call calc_temp_enth_r(atr1, alb1, i, j)
297 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 334 call calc_temp_enth_r(atr1, alb1, i, j)
343 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 380 call calc_temp_enth_r(atr1, alb1, i, j)
389 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 426 call calc_temp_enth_r(atr1, alb1, i, j)
435 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 472 call calc_temp_enth_r(atr1, alb1, i, j)
484 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 521 call calc_temp_enth_r(atr1, alb1, i, j)
529 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 566 call calc_temp_enth_r(atr1, alb1, i, j)
580 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 617 call calc_temp_enth_r(atr1, alb1, i, j)
625 if ( (
maske(j,i) == 0).or.(
maske(j,i) == 3) )
then 662 call calc_temp_enth_r(atr1, alb1, i, j)
674 subroutine calc_temp_enth_1(at1, at2_1, at2_2, at3_1, at3_2, &
675 at4_1, at4_2, at5, at6, at7, &
676 atr1, acb1, acb2, acb3, acb4, alb1, &
678 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
685 integer(i4b),
intent(in) :: i, j
686 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
687 at3_1(0:kcmax), at3_2(0:kcmax), &
688 at4_1(0:kcmax), at4_2(0:kcmax), &
689 at5(0:kcmax), at6(0:kcmax), at7, &
690 ai1(0:kcmax), ai2(0:kcmax), &
691 atr1, acb1, acb2, acb3, acb4, alb1
692 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
694 integer(i4b) :: kc, kt, kr
695 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
696 ce5(0:kcmax), ce6(0:kcmax), ce7(0:kcmax), &
697 ctr1, ccbe1, ccb2, ccb3, ccb4, clb1
698 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
699 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
700 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
701 real(dp) :: dtt_dxi, dtt_deta
702 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
703 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
704 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
705 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
706 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
710 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
711 stop
' >>> calc_temp_enth_1: Boundary points not allowed.' 716 at4_1, at4_2, at5, at6, at7, &
717 atr1, acb1, acb2, acb3, acb4, alb1, &
719 dtime_temp, dtt_2dxi, dtt_2deta, i, j, &
720 ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
721 ctr1, ccbe1, ccb2, ccb3, ccb4, clb1, &
722 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
723 adv_vert_sg, abs_adv_vert_sg, &
724 ci1, ci2, dtt_dxi, dtt_deta)
732 lgs_a0, lgs_a1, lgs_a2, lgs_b)
736 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
748 call calc_temp_enth_1_c(ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
749 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
750 ccbe1, ccb2, ccb3, ccb4, &
751 adv_vert_sg, abs_adv_vert_sg, &
752 dtime_temp, dtt_dxi, dtt_deta, &
753 dtt_2dxi, dtt_2deta, &
755 lgs_a0, lgs_a1, lgs_a2, lgs_b)
759 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
786 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
787 adv_vert_sg, abs_adv_vert_sg, &
788 dtime_temp, dtt_dxi, dtt_deta, &
789 dtt_2dxi, dtt_2deta, &
791 lgs_a0, lgs_a1, lgs_a2, lgs_b)
795 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
804 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
806 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
817 end subroutine calc_temp_enth_1
824 at4_1, at4_2, at5, at6, at7, &
825 atr1, acb1, acb2, acb3, acb4, alb1, &
827 dtime_temp, dtt_2dxi, dtt_2deta, i, j, &
828 ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
829 ctr1, ccbe1, ccb2, ccb3, ccb4, clb1, &
830 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
831 adv_vert_sg, abs_adv_vert_sg, &
832 ci1, ci2, dtt_dxi, dtt_deta)
839 integer(i4b),
intent(in) :: i, j
840 real(dp),
intent(in) :: at1(0:kcmax), &
841 at2_1(0:kcmax), at2_2(0:kcmax), &
842 at3_1(0:kcmax), at3_2(0:kcmax), &
843 at4_1(0:kcmax), at4_2(0:kcmax), &
844 at5(0:kcmax), at6(0:kcmax), at7, &
845 ai1(0:kcmax), ai2(0:kcmax), &
846 atr1, acb1, acb2, acb3, acb4, alb1
847 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
849 real(dp),
intent(out) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
850 ct4(0:kcmax), ce5(0:kcmax), ce6(0:kcmax), &
852 ctr1, ccbe1, ccb2, ccb3, ccb4, clb1
853 real(dp),
intent(out) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
854 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
855 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
856 real(dp),
intent(out) :: ci1(0:kcmax), ci2(0:kcmax)
857 real(dp),
intent(out) :: dtt_dxi, dtt_deta
860 real(dp) :: temp_c_help(0:kcmax)
878 abs_adv_vert_sg = 0.0_dp
897 ccb3 = acb3*0.5_dp*(
vx_t(0,j,i)+
vx_t(0,j,i-1)) &
899 ccb4 = acb4*0.5_dp*(
vy_t(0,j,i)+
vy_t(0,j-1,i)) &
914 clb1 = alb1*
q_geo(j,i)
919 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
923 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
926 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
929 #elif (ADV_VERT==2 || ADV_VERT==3) 932 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
939 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
947 ce5(kc) = at5(kc)/
h_c(j,i)
959 ce7(kc) = 2.0_dp*at7 &
962 enh_c(kc,j,i), 0_i2b) &
967 ci1(kc) = ai1(kc)/
h_c(j,i)
974 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
975 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
976 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
977 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
978 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
980 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
981 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
982 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
983 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
984 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
986 #elif (ADV_VERT==2 || ADV_VERT==3) 989 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
990 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
991 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
992 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
993 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
999 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
1002 ci2(kc) = ai2(kc)/
h_c(j,i)
1006 dtt_dxi = 2.0_dp*dtt_2dxi
1007 dtt_deta = 2.0_dp*dtt_2deta
1018 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1022 integer(i4b),
intent(in) :: i, j
1023 real(dp),
intent(in) :: ctr1, clb1
1025 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1026 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1027 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1028 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1043 lgs_a2(kr) = -1.0_dp
1051 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
1053 lgs_b(kr) =
temp_r(kr,j,i)
1062 lgs_a2(kr) = -1.0_dp
1063 lgs_b(kr) = 2.0_dp*clb1
1071 lgs_b(kr) =
temp_c(0,j,i)
1080 subroutine calc_temp_enth_1_c(ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
1081 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
1082 ccbe1, ccb2, ccb3, ccb4, &
1083 adv_vert_sg, abs_adv_vert_sg, &
1084 dtime_temp, dtt_dxi, dtt_deta, &
1085 dtt_2dxi, dtt_2deta, &
1087 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1093 integer(i4b),
intent(in) :: i, j
1094 real(dp),
intent(in) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
1095 ct4(0:kcmax), ce5(0:kcmax), ce6(0:kcmax), &
1097 real(dp),
intent(in) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
1098 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
1099 ccbe1, ccb2, ccb3, ccb4, &
1100 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1101 real(dp),
intent(in) :: dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta
1103 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1104 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1105 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1106 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1108 integer(i4b) :: kc, kr
1109 real(dp) :: vx_c_help, vy_c_help
1110 real(dp) :: adv_vert_help
1131 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1133 lgs_a1(kc) = 1.0_dp+ce5(kc)*(ce6(kc)+ce6(kc-1))
1134 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1140 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1144 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1145 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
1146 +ce5(kc)*(ce6(kc)+ce6(kc-1))
1148 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
1153 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
1156 = -max(adv_vert_help, 0.0_dp) &
1160 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
1161 +ce5(kc)*(ce6(kc)+ce6(kc-1))
1163 = min(adv_vert_help, 0.0_dp) &
1170 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
1172 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1175 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1179 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1182 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1188 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1189 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1191 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
1193 ( min(vx_c_help, 0.0_dp) &
1196 +max(vx_c_help, 0.0_dp) &
1200 ( min(vy_c_help, 0.0_dp) &
1203 +max(vy_c_help, 0.0_dp) &
1217 end subroutine calc_temp_enth_1_c
1225 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
1226 adv_vert_sg, abs_adv_vert_sg, &
1227 dtime_temp, dtt_dxi, dtt_deta, &
1228 dtt_2dxi, dtt_2deta, &
1230 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1234 integer(i4b),
intent(in) :: i, j
1235 real(dp),
intent(in) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
1236 ct4(0:kcmax), ci1(0:kcmax), ci2(0:kcmax)
1237 real(dp),
intent(in) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
1238 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
1239 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1240 real(dp),
intent(in) :: dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta
1242 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1243 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1244 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1245 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1248 real(dp) :: vx_c_help, vy_c_help
1249 real(dp) :: adv_vert_help
1261 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
1262 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
1266 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1268 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1271 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1275 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1278 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1284 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1285 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1287 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1289 ( min(vx_c_help, 0.0_dp) &
1292 +max(vx_c_help, 0.0_dp) &
1296 ( min(vy_c_help, 0.0_dp) &
1299 +max(vy_c_help, 0.0_dp) &
1309 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1311 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
1312 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
1317 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
1318 lgs_a1(kc) = 1.0_dp &
1319 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
1320 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
1321 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
1325 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
1327 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
1328 lgs_a1(kc) = 1.0_dp &
1329 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
1330 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
1336 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1338 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1341 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1345 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1348 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1354 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1355 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1357 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1359 ( min(vx_c_help, 0.0_dp) &
1362 +max(vx_c_help, 0.0_dp) &
1366 ( min(vy_c_help, 0.0_dp) &
1369 +max(vy_c_help, 0.0_dp) &
1378 if (
as_perp(j,i) >= 0.0_dp)
then 1383 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
1384 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
1389 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1391 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
1394 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
1398 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
1401 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
1407 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
1408 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
1410 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
1412 ( min(vx_c_help, 0.0_dp) &
1415 +max(vx_c_help, 0.0_dp) &
1419 ( min(vy_c_help, 0.0_dp) &
1422 +max(vy_c_help, 0.0_dp) &
1436 subroutine calc_temp_enth_2(at1, at2_1, at2_2, at3_1, at3_2, &
1437 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
1438 ai1, ai2, aqtlde, am3, &
1439 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
1447 integer(i4b),
intent(in) :: i, j
1448 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
1449 at3_1(0:kcmax), at3_2(0:kcmax), &
1450 at4_1(0:kcmax), at4_2(0:kcmax), &
1451 at5(0:kcmax), at6(0:kcmax), at7, &
1452 ai1(0:kcmax), ai2(0:kcmax), &
1453 atr1, alb1, aqtlde(0:kcmax), am3(0:kcmax)
1454 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
1456 integer(i4b) :: kc, kt, kr
1457 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
1458 ce5(0:kcmax), ce6(0:kcmax), ce7(0:kcmax), ctr1, clb1
1459 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
1460 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1461 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
1462 real(dp) :: cqtlde(0:kcmax), cm3(0:kcmax)
1463 real(dp) :: dtt_dxi, dtt_deta
1464 real(dp) :: temp_c_val(0:kcmax), omega_c_val(0:kcmax)
1465 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1466 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1467 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1468 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
1469 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1471 real(dp),
parameter :: eps_omega=1.0e-12_dp
1475 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
1476 stop
' >>> calc_temp_enth_2: Boundary points not allowed.' 1481 at4_1, at4_2, at5, atr1, alb1, &
1483 dtime_temp, dtt_2dxi, dtt_2deta, i, j, &
1484 ct1, ct2, ct3, ct4, ce5, ctr1, clb1, &
1485 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
1486 adv_vert_sg, abs_adv_vert_sg, &
1487 ci1, cqtlde, dtt_dxi, dtt_deta)
1490 temp_c_val(kc) =
temp_c(kc,j,i)
1491 omega_c_val(kc) =
omega_c(kc,j,i)
1494 call calc_temp_enth_2_a2(at6, at7, ai2, am3, temp_c_val, omega_c_val, &
1495 i, j, ce6, ce7, ci2, cm3)
1502 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1506 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
1518 call calc_temp_enth_2_c(ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
1519 ct1_sg, ct2_sg, ct3_sg, ct4_sg, cm3, &
1520 adv_vert_sg, abs_adv_vert_sg, &
1521 dtime_temp, dtt_dxi, dtt_deta, &
1522 dtt_2dxi, dtt_2deta, &
1524 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1528 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
1554 #if (CALCMOD==3) /* ENTM scheme */ 1565 call calc_temp_enth_2_a2(at6, at7, ai2, am3, temp_c_val, omega_c_val, &
1566 i, j, ce6, ce7, ci2, cm3)
1570 call calc_temp_enth_2_c(ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
1571 ct1_sg, ct2_sg, ct3_sg, ct4_sg, cm3, &
1572 adv_vert_sg, abs_adv_vert_sg, &
1573 dtime_temp, dtt_dxi, dtt_deta, &
1574 dtt_2dxi, dtt_2deta, &
1576 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1580 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
1597 #elif (CALCMOD==2) /* ENTC scheme */ 1602 stop
' >>> calc_temp_enth_2: CALCMOD must be either 2 or 3!' 1635 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
1636 adv_vert_sg, abs_adv_vert_sg, &
1637 dtime_temp, dtt_dxi, dtt_deta, &
1638 dtt_2dxi, dtt_2deta, &
1640 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1644 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
1653 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
1655 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
1666 end subroutine calc_temp_enth_2
1673 at4_1, at4_2, at5, atr1, alb1, &
1675 dtime_temp, dtt_2dxi, dtt_2deta, i, j, &
1676 ct1, ct2, ct3, ct4, ce5, ctr1, clb1, &
1677 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
1678 adv_vert_sg, abs_adv_vert_sg, &
1679 ci1, cqtlde, dtt_dxi, dtt_deta)
1683 integer(i4b),
intent(in) :: i, j
1684 real(dp),
intent(in) :: at1(0:kcmax), &
1685 at2_1(0:kcmax), at2_2(0:kcmax), &
1686 at3_1(0:kcmax), at3_2(0:kcmax), &
1687 at4_1(0:kcmax), at4_2(0:kcmax), &
1688 at5(0:kcmax), ai1(0:kcmax), &
1689 atr1, alb1, aqtlde(0:kcmax)
1690 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
1692 real(dp),
intent(out) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
1693 ct4(0:kcmax), ce5(0:kcmax), &
1695 real(dp),
intent(out) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
1696 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
1697 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1698 real(dp),
intent(out) :: ci1(0:kcmax), cqtlde(0:kcmax)
1699 real(dp),
intent(out) :: dtt_dxi, dtt_deta
1716 adv_vert_sg = 0.0_dp
1717 abs_adv_vert_sg = 0.0_dp
1726 clb1 = alb1*
q_geo(j,i)
1731 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
1735 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1738 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1741 #elif (ADV_VERT==2 || ADV_VERT==3) 1744 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
1751 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
1759 ce5(kc) = at5(kc)/
h_c(j,i)
1760 ci1(kc) = ai1(kc)/
h_c(j,i)
1761 cqtlde(kc) = aqtlde(kc)*
h_c(j,i)
1768 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1769 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1770 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1771 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1772 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1774 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1775 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1776 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1777 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1778 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1780 #elif (ADV_VERT==2 || ADV_VERT==3) 1783 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
1784 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
1785 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
1786 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
1787 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
1793 dtt_dxi = 2.0_dp*dtt_2dxi
1794 dtt_deta = 2.0_dp*dtt_2deta
1803 subroutine calc_temp_enth_2_a2(at6, at7, ai2, am3, temp_c_val, omega_c_val, &
1804 i, j, ce6, ce7, ci2, cm3)
1811 integer(i4b),
intent(in) :: i, j
1812 real(dp),
intent(in) :: at6(0:kcmax), at7, ai2(0:kcmax), am3(0:kcmax)
1813 real(dp),
intent(in) :: temp_c_val(0:kcmax), omega_c_val(0:kcmax)
1815 real(dp),
intent(out) :: ce6(0:kcmax), ce7(0:kcmax), ci2(0:kcmax), &
1819 real(dp) :: temp_c_help(0:kcmax)
1842 ce7(kc) = 2.0_dp*at7 &
1844 temp_c_val(kc),
temp_c_m(kc,j,i), omega_c_val(kc), &
1845 enh_c(kc,j,i), 2_i2b) &
1850 cm3(kc) = am3(kc)*
h_c(j,i)*
c_val(temp_c_val(kc))
1857 ci2(kc) = ai2(kc)/
h_c(j,i)
1861 temp_c_help(kc) = 0.5_dp*(temp_c_val(kc)+temp_c_val(kc+1))
1864 ci2(kc) = ai2(kc)/
h_c(j,i)
1867 end subroutine calc_temp_enth_2_a2
1875 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1879 integer(i4b),
intent(in) :: i, j
1880 real(dp),
intent(in) :: ctr1, clb1
1882 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1883 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1884 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1885 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1900 lgs_a2(kr) = -1.0_dp
1908 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
1910 lgs_b(kr) =
temp_r(kr,j,i)
1919 lgs_a2(kr) = -1.0_dp
1920 lgs_b(kr) = 2.0_dp*clb1
1937 subroutine calc_temp_enth_2_c(ct1, ct2, ct3, ct4, ce5, ce6, ce7, &
1938 ct1_sg, ct2_sg, ct3_sg, ct4_sg, cm3, &
1939 adv_vert_sg, abs_adv_vert_sg, &
1940 dtime_temp, dtt_dxi, dtt_deta, &
1941 dtt_2dxi, dtt_2deta, &
1943 lgs_a0, lgs_a1, lgs_a2, lgs_b)
1949 integer(i4b),
intent(in) :: i, j
1950 integer(i2b),
intent(in) :: kcmin
1951 real(dp),
intent(in) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
1952 ct4(0:kcmax), ce5(0:kcmax), ce6(0:kcmax), &
1954 real(dp),
intent(in) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
1955 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
1956 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
1957 real(dp),
intent(in) :: cm3(0:kcmax)
1958 real(dp),
intent(in) :: dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta
1960 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
1961 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
1962 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
1963 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
1966 real(dp) :: vx_c_help, vy_c_help
1967 real(dp) :: adv_vert_help
1978 if (kcmin == 0)
then 1991 lgs_a2(kc) = -1.0_dp
2017 lgs_a2(kc) = -1.0_dp
2018 lgs_b(kc) = -cm3(kc)
2022 do kc=kcmin+1, kcmax-1
2026 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2028 lgs_a1(kc) = 1.0_dp+ce5(kc)*(ce6(kc)+ce6(kc-1))
2029 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2035 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2039 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2040 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2041 +ce5(kc)*(ce6(kc)+ce6(kc-1))
2043 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2048 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2051 = -max(adv_vert_help, 0.0_dp) &
2055 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
2056 +ce5(kc)*(ce6(kc)+ce6(kc-1))
2058 = min(adv_vert_help, 0.0_dp) &
2065 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
2067 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2070 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2074 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2077 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2083 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2084 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2086 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
2088 ( min(vx_c_help, 0.0_dp) &
2091 +max(vx_c_help, 0.0_dp) &
2095 ( min(vy_c_help, 0.0_dp) &
2098 +max(vy_c_help, 0.0_dp) &
2112 end subroutine calc_temp_enth_2_c
2120 ct1_sg, ct2_sg, ct3_sg, ct4_sg, &
2121 adv_vert_sg, abs_adv_vert_sg, &
2122 dtime_temp, dtt_dxi, dtt_deta, &
2123 dtt_2dxi, dtt_2deta, &
2125 lgs_a0, lgs_a1, lgs_a2, lgs_b)
2129 integer(i4b),
intent(in) :: i, j
2130 real(dp),
intent(in) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), &
2131 ct4(0:kcmax), ci1(0:kcmax), ci2(0:kcmax)
2132 real(dp),
intent(in) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), &
2133 ct3_sg(0:kcmax), ct4_sg(0:kcmax), &
2134 adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
2135 real(dp),
intent(in) :: dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta
2137 real(dp),
intent(out) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
2138 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
2139 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
2140 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
2143 real(dp) :: vx_c_help, vy_c_help
2144 real(dp) :: adv_vert_help
2156 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
2157 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
2161 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2163 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2166 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2170 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2173 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2179 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2180 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2182 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2184 ( min(vx_c_help, 0.0_dp) &
2187 +max(vx_c_help, 0.0_dp) &
2191 ( min(vy_c_help, 0.0_dp) &
2194 +max(vy_c_help, 0.0_dp) &
2204 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2206 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
2207 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2212 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
2213 lgs_a1(kc) = 1.0_dp &
2214 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2215 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2216 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2220 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2222 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
2223 lgs_a1(kc) = 1.0_dp &
2224 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
2225 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
2231 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2233 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2236 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2240 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2243 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2249 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2250 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2252 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2254 ( min(vx_c_help, 0.0_dp) &
2257 +max(vx_c_help, 0.0_dp) &
2261 ( min(vy_c_help, 0.0_dp) &
2264 +max(vy_c_help, 0.0_dp) &
2273 if (
as_perp(j,i) >= 0.0_dp)
then 2278 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
2279 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
2284 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2286 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2289 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2293 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2296 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2302 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2303 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2305 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2307 ( min(vx_c_help, 0.0_dp) &
2310 +max(vx_c_help, 0.0_dp) &
2314 ( min(vy_c_help, 0.0_dp) &
2317 +max(vy_c_help, 0.0_dp) &
2331 subroutine calc_temp_enth_r(atr1, alb1, i, j)
2338 integer(i4b),
intent(in) :: i, j
2339 real(dp),
intent(in) :: atr1, alb1
2341 integer(i4b) :: kc, kt, kr
2342 real(dp) :: ctr1, clb1
2343 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
2344 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
2345 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
2346 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
2347 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
2348 real(dp) :: enth_val
2353 clb1 = alb1*
q_geo(j,i)
2359 lgs_a2(kr) = -1.0_dp
2367 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
2369 lgs_b(kr) =
temp_r(kr,j,i)
2378 lgs_a2(kr) = -1.0_dp
2379 lgs_b(kr) = 2.0_dp*clb1
2391 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
2420 end subroutine calc_temp_enth_r
2427 at4_1, at4_2, at5, at6, at7, atr1, alb1, &
2429 dtime_temp, dtt_2dxi, dtt_2deta, i, j)
2438 integer(i4b),
intent(in) :: i, j
2439 real(dp),
intent(in) :: at1(0:kcmax), at2_1(0:kcmax), at2_2(0:kcmax), &
2440 at3_1(0:kcmax), at3_2(0:kcmax), &
2441 at4_1(0:kcmax), at4_2(0:kcmax), &
2442 at5(0:kcmax), at6(0:kcmax), at7, &
2443 ai1(0:kcmax), ai2(0:kcmax), &
2445 real(dp),
intent(in) :: dtime_temp, dtt_2dxi, dtt_2deta
2447 integer(i4b) :: kc, kt, kr
2448 real(dp) :: ct1(0:kcmax), ct2(0:kcmax), ct3(0:kcmax), ct4(0:kcmax), &
2449 ce5(0:kcmax), ce6(0:kcmax), ce7(0:kcmax), ctr1, clb1
2450 real(dp) :: ct1_sg(0:kcmax), ct2_sg(0:kcmax), ct3_sg(0:kcmax), &
2451 ct4_sg(0:kcmax), adv_vert_sg(0:kcmax), abs_adv_vert_sg(0:kcmax)
2452 real(dp) :: ci1(0:kcmax), ci2(0:kcmax)
2453 real(dp) :: temp_c_help(0:kcmax)
2454 real(dp) :: vx_c_help, vy_c_help
2455 real(dp) :: adv_vert_help
2456 real(dp) :: dtt_dxi, dtt_deta
2457 real(dp) :: lgs_a0(0:kcmax+ktmax+krmax+imax+jmax), &
2458 lgs_a1(0:kcmax+ktmax+krmax+imax+jmax), &
2459 lgs_a2(0:kcmax+ktmax+krmax+imax+jmax), &
2460 lgs_x(0:kcmax+ktmax+krmax+imax+jmax), &
2461 lgs_b(0:kcmax+ktmax+krmax+imax+jmax)
2462 real(dp),
parameter :: zero=0.0_dp
2466 if ((i == 0).or.(i == imax).or.(j == 0).or.(j == jmax)) &
2467 stop
' >>> calc_temp_enth_ssa: Boundary points not allowed.' 2472 clb1 = alb1*
q_geo(j,i)
2477 ct1(kc) = at1(kc)/
h_c(j,i)*0.5_dp*(
vz_c(kc,j,i)+
vz_c(kc-1,j,i))
2481 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
2484 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
2487 #elif (ADV_VERT==2 || ADV_VERT==3) 2490 ct1_sg(kc) = 0.5_dp*(at1(kc)+at1(kc+1))/
h_c(j,i)*
vz_c(kc,j,i)
2497 ct2(kc) = ( at2_1(kc)*
dzm_dtau(j,i) &
2505 ce5(kc) = at5(kc)/
h_c(j,i)
2506 ce7(kc) = 2.0_dp*at7 &
2509 enh_c(kc,j,i), 0_i2b) &
2511 ci1(kc) = ai1(kc)/
h_c(j,i)
2518 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2519 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2520 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2521 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2522 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2524 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2525 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2526 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2527 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2528 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2530 #elif (ADV_VERT==2 || ADV_VERT==3) 2533 ct2_sg(kc) = 0.5_dp*(ct2(kc)+ct2(kc+1))
2534 ct3_sg(kc) = 0.5_dp*(ct3(kc)+ct3(kc+1))
2535 ct4_sg(kc) = 0.5_dp*(ct4(kc)+ct4(kc+1))
2536 adv_vert_sg(kc) = ct1_sg(kc)-ct2_sg(kc)-ct3_sg(kc)-ct4_sg(kc)
2537 abs_adv_vert_sg(kc) = abs(adv_vert_sg(kc))
2543 temp_c_help(kc) = 0.5_dp*(
temp_c(kc,j,i)+
temp_c(kc+1,j,i))
2546 ci2(kc) = ai2(kc)/
h_c(j,i)
2550 dtt_dxi = 2.0_dp*dtt_2dxi
2551 dtt_deta = 2.0_dp*dtt_2deta
2558 lgs_a2(kr) = -1.0_dp
2566 lgs_a1(kr) = 1.0_dp + 2.0_dp*ctr1
2568 lgs_b(kr) =
temp_r(kr,j,i)
2577 lgs_a2(kr) = -1.0_dp
2578 lgs_b(kr) = 2.0_dp*clb1
2590 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, krmax)
2610 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2612 lgs_a1(kc) = 1.0_dp+ce5(kc)*(ce6(kc)+ce6(kc-1))
2613 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2619 = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2623 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2624 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2625 +ce5(kc)*(ce6(kc)+ce6(kc-1))
2627 = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) ) &
2632 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2635 = -max(adv_vert_help, 0.0_dp) &
2639 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp) &
2640 +ce5(kc)*(ce6(kc)+ce6(kc-1))
2642 = min(adv_vert_help, 0.0_dp) &
2649 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
2651 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2654 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2658 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2661 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2667 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2668 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2670 lgs_b(kc) =
enth_c(kc,j,i) + ce7(kc) &
2672 ( min(vx_c_help, 0.0_dp) &
2675 +max(vx_c_help, 0.0_dp) &
2679 ( min(vy_c_help, 0.0_dp) &
2682 +max(vy_c_help, 0.0_dp) &
2698 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
2723 lgs_a1(kc) = 1.0_dp - min(adv_vert_sg(kc), 0.0_dp)
2724 lgs_a2(kc) = min(adv_vert_sg(kc), 0.0_dp)
2728 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2730 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2733 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2737 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2740 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2746 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2747 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2749 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2751 ( min(vx_c_help, 0.0_dp) &
2754 +max(vx_c_help, 0.0_dp) &
2758 ( min(vy_c_help, 0.0_dp) &
2761 +max(vy_c_help, 0.0_dp) &
2771 lgs_a0(kc) = -0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2773 lgs_a1(kc) = 1.0_dp+ci1(kc)*(ci2(kc)+ci2(kc-1))
2774 lgs_a2(kc) = 0.5_dp*(ct1(kc)-ct2(kc)-ct3(kc)-ct4(kc)) &
2779 lgs_a0(kc) = -0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1))
2780 lgs_a1(kc) = 1.0_dp &
2781 +0.5_dp*(adv_vert_sg(kc-1)+abs_adv_vert_sg(kc-1)) &
2782 -0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2783 lgs_a2(kc) = 0.5_dp*(adv_vert_sg(kc) -abs_adv_vert_sg(kc) )
2787 adv_vert_help = 0.5_dp*(adv_vert_sg(kc)+adv_vert_sg(kc-1))
2789 lgs_a0(kc) = -max(adv_vert_help, 0.0_dp)
2790 lgs_a1(kc) = 1.0_dp &
2791 +max(adv_vert_help, 0.0_dp)-min(adv_vert_help, 0.0_dp)
2792 lgs_a2(kc) = min(adv_vert_help, 0.0_dp)
2798 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2800 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2803 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2807 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2810 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2816 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2817 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2819 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2821 ( min(vx_c_help, 0.0_dp) &
2824 +max(vx_c_help, 0.0_dp) &
2828 ( min(vy_c_help, 0.0_dp) &
2831 +max(vy_c_help, 0.0_dp) &
2840 if (
as_perp(j,i) >= zero)
then 2845 lgs_a0(kc) = -max(adv_vert_sg(kc-1), 0.0_dp)
2846 lgs_a1(kc) = 1.0_dp + max(adv_vert_sg(kc-1), 0.0_dp)
2851 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2853 ( (
vx_c(kc,j,i)-abs(
vx_c(kc,j,i))) &
2856 +(
vx_c(kc,j,i-1)+abs(
vx_c(kc,j,i-1))) &
2860 ( (
vy_c(kc,j,i)-abs(
vy_c(kc,j,i))) &
2863 +(
vy_c(kc,j-1,i)+abs(
vy_c(kc,j-1,i))) &
2869 vx_c_help = 0.5_dp*(
vx_c(kc,j,i)+
vx_c(kc,j,i-1))
2870 vy_c_help = 0.5_dp*(
vy_c(kc,j,i)+
vy_c(kc,j-1,i))
2872 lgs_b(kc) =
age_c(kc,j,i) + dtime_temp &
2874 ( min(vx_c_help, 0.0_dp) &
2877 +max(vx_c_help, 0.0_dp) &
2881 ( min(vy_c_help, 0.0_dp) &
2884 +max(vy_c_help, 0.0_dp) &
2894 call tri_sle(lgs_a0, lgs_a1, lgs_a2, lgs_x, lgs_b, kcmax)
2903 if (
age_c_neu(kc,j,i) < (age_min*year_sec)) &
2905 if (
age_c_neu(kc,j,i) > (age_max*year_sec)) &
subroutine calc_temp_enth_1_a(at1, at2_1, at2_2, at3_1, at3_2, at4_1, at4_2, at5, at6, at7, atr1, acb1, acb2, acb3, acb4, alb1, ai1, ai2, dtime_temp, dtt_2dxi, dtt_2deta, i, j, ct1, ct2, ct3, ct4, ce5, ce6, ce7, ctr1, ccbe1, ccb2, ccb3, ccb4, clb1, ct1_sg, ct2_sg, ct3_sg, ct4_sg, adv_vert_sg, abs_adv_vert_sg, ci1, ci2, dtt_dxi, dtt_deta)
Computation of temperature and age for a cold ice column with the enthalpy method: Abbreviations...
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:kcmax, 0:jmax, 0:imax) enth_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
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: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.
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)
Conversion from temperature (temp) and water content (omega) to enthalpy (enth) and vice versa...
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_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)
real(dp) function, public temp_fct_enth(enth_val, temp_m_val)
Temperature as a function of enthalpy.
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) 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 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) g
G: Acceleration due to gravity.
integer(i2b), dimension(0:jmax, 0:imax) kc_cts
kc_cts(j,i): Position kc of the CTS (for COLD, ENTC, ENTM)
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).
real(dp) function, public omega_fct_enth(enth_val, temp_m_val)
Water content as a function of enthalpy.
real(dp) ea
ea: Abbreviation for exp(aa)
subroutine calc_temp_enth_1_d(ct1, ct2, ct3, ct4, ci1, ci2, ct1_sg, ct2_sg, ct3_sg, ct4_sg, adv_vert_sg, abs_adv_vert_sg, dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta, i, j, lgs_a0, lgs_a1, lgs_a2, lgs_b)
Computation of temperature and age for a cold ice column with the enthalpy method: Set-up of the equa...
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) enth_c
enth_c(kc,j,i): Enthalpy in the upper (kc) ice domain
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.
subroutine calc_temp_enth_2_a1(at1, at2_1, at2_2, at3_1, at3_2, at4_1, at4_2, at5, atr1, alb1, ai1, aqtlde, dtime_temp, dtt_2dxi, dtt_2deta, i, j, ct1, ct2, ct3, ct4, ce5, ctr1, clb1, ct1_sg, ct2_sg, ct3_sg, ct4_sg, adv_vert_sg, abs_adv_vert_sg, ci1, cqtlde, dtt_dxi, dtt_deta)
Computation of temperature and age for an ice column with a temperate base with the enthalpy method: ...
real(dp), dimension(0:jmax, 0:imax) dh_c_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
subroutine calc_temp_enth_2_b(ctr1, clb1, i, j, lgs_a0, lgs_a1, lgs_a2, lgs_b)
Computation of temperature and age for an ice column with a temperate base with the enthalpy method: ...
integer(i2b), dimension(0:jmax, 0:imax) kc_cts_neu
(.)_neu: New value of quantity (.) computed during an integration step
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...
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) omega_c
omega_c(kc,j,i): Water content in the upper (kc) ice domain
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:ktmax, 0:jmax, 0:imax) enth_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
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)) ...
subroutine calc_temp_enth_1_b(ctr1, clb1, i, j, lgs_a0, lgs_a1, lgs_a2, lgs_b)
Computation of temperature and age for a cold ice column with the enthalpy method: Set-up of the equa...
real(dp), dimension(0:jmax, 0:imax) h_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) function, public enth_fct_temp_omega(temp_val, omega_val)
Enthalpy as a function of temperature and water content.
Computation of temperature, water content and age with the enthalpy method.
subroutine calc_temp_enth_ssa(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 ice shelves (floating ice) with the enthalpy method...
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) beta
BETA: Clausius-Clapeyron gradient of ice.
subroutine calc_temp_enth_2_d(ct1, ct2, ct3, ct4, ci1, ci2, ct1_sg, ct2_sg, ct3_sg, ct4_sg, adv_vert_sg, abs_adv_vert_sg, dtime_temp, dtt_dxi, dtt_deta, dtt_2dxi, dtt_2deta, i, j, lgs_a0, lgs_a1, lgs_a2, lgs_b)
Computation of temperature and age for an ice column with a temperate base with the enthalpy method: ...
real(dp), dimension(0:jmax, 0:imax) dzm_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
subroutine, public calc_temp_enth(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Main subroutine of calc_temp_enth_m: Computation of temperature, water content and age with the entha...
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) 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), dimension(0:jmax, 0:imax) zm_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp) function, public ratefac_c_t(temp_val, omega_val, temp_m_val)
Rate factor for cold and temperate ice: Combination of ratefac_c and ratefac_t (only for the enthalpy...
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
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: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)) ...