7 !! Computation of the surface temperature (must be less than 0 deg C!)
8 !! and of the accumulation-ablation function.
12 !! Copyright 2009-2013 Ralf Greve
16 !! This file is part of SICOPOLIS.
18 !! SICOPOLIS is free software: you can redistribute it and/or modify
19 !! it under the terms of the GNU General Public License as published by
20 !! the Free Software Foundation, either version 3 of the License, or
21 !! (at your option) any later version.
23 !! SICOPOLIS is distributed in the hope that it will be useful,
24 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
25 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 !! GNU General Public License for more details.
28 !! You should have received a copy of the GNU General Public License
29 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
31 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
34 !> Computation of the surface temperature (must be less than 0 deg C!)
35 !! and of the accumulation-ablation function.
36 !<------------------------------------------------------------------------------
38 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
45 real(dp),
intent(in) :: time, dtime, dxi, deta
47 real(dp),
intent(out) :: delta_ts, glac_index, dzsl_dtau, z_mar
48 real(dp),
intent(inout) :: z_sl
57 integer(i4b) :: i_gr, i_kl
59 real(dp) :: z_sl_min, t1, t2, t3, t4, t5, t6
60 real(dp) :: time_gr, time_kl
61 real(dp),
dimension(0:JMAX,0:IMAX) :: dist
63 logical,
dimension(0:JMAX,0:IMAX) :: check_point
82 delta_ts = sine_amplit &
83 *cos(2.0_dp*pi*time/(sine_period*year_sec)) &
90 if (time/year_sec.lt.
real(grip_time_min,dp)) then
91 delta_ts = griptemp(0)
92 else if (time/year_sec.lt.
real(grip_time_max,dp)) then
94 i_kl = floor(((time/year_sec) &
95 -
real(grip_time_min,dp))/
real(grip_time_stp,dp))
98 i_gr = ceiling(((time/year_sec) &
99 -
real(grip_time_min,dp))/
real(grip_time_stp,dp))
100 i_gr = min(i_gr, ndata_grip)
102 if (i_kl.eq.i_gr)
then
104 delta_ts = griptemp(i_kl)
108 time_kl = (grip_time_min + i_kl*grip_time_stp) *year_sec
109 time_gr = (grip_time_min + i_gr*grip_time_stp) *year_sec
111 delta_ts = griptemp(i_kl) &
112 +(griptemp(i_gr)-griptemp(i_kl)) &
113 *(time-time_kl)/(time_gr-time_kl)
119 delta_ts = griptemp(ndata_grip)
122 delta_ts = delta_ts * grip_temp_fact
141 t1 = -250000.0_dp *year_sec
142 t2 = -140000.0_dp *year_sec
143 t3 = -125000.0_dp *year_sec
144 t4 = -21000.0_dp *year_sec
145 t5 = -8000.0_dp *year_sec
146 t6 = 0.0_dp *year_sec
150 else if (time.lt.t2)
then
151 z_sl = z_sl_min*(time-t1)/(t2-t1)
152 else if (time.lt.t3)
then
153 z_sl = -z_sl_min*(time-t3)/(t3-t2)
154 else if (time.lt.t4)
then
155 z_sl = z_sl_min*(time-t3)/(t4-t3)
156 else if (time.lt.t5)
then
157 z_sl = -z_sl_min*(time-t5)/(t5-t4)
158 else if (time.lt.t6)
then
168 if (time/year_sec.lt.
real(specmap_time_min,dp)) then
169 z_sl = specmap_zsl(0)
170 else if (time/year_sec.lt.
real(specmap_time_max,dp)) then
172 i_kl = floor(((time/year_sec) &
173 -
real(specmap_time_min,dp))/
real(specmap_time_stp,dp))
176 i_gr = ceiling(((time/year_sec) &
177 -
real(specmap_time_min,dp))/
real(specmap_time_stp,dp))
178 i_gr = min(i_gr, ndata_specmap)
180 if (i_kl.eq.i_gr)
then
182 z_sl = specmap_zsl(i_kl)
186 time_kl = (specmap_time_min + i_kl*specmap_time_stp) *year_sec
187 time_gr = (specmap_time_min + i_gr*specmap_time_stp) *year_sec
189 z_sl = specmap_zsl(i_kl) &
190 +(specmap_zsl(i_gr)-specmap_zsl(i_kl)) &
191 *(time-time_kl)/(time_gr-time_kl)
197 z_sl = specmap_zsl(ndata_specmap)
204 if ( z_sl_old > -999999.9_dp )
then
205 dzsl_dtau = (z_sl-z_sl_old)/dtime
214 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
216 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 )
217 z_mar = fact_z_mar*z_sl
218 #elif ( MARINE_ICE_CALVING==6 || MARINE_ICE_CALVING==7 )
219 if (z_sl >= -80.0_dp)
then
222 z_mar = 10.25_dp*(z_sl+80.0_dp)-200.0_dp
224 z_mar = fact_z_mar*z_mar
236 check_point(j,i) = .false.
242 if (maske(j,i).ge.2)
then
243 check_point(j ,i ) = .true.
244 check_point(j ,i+1) = .true.
245 check_point(j ,i-1) = .true.
246 check_point(j+1,i ) = .true.
247 check_point(j-1,i ) = .true.
254 if (check_point(j,i))
then
264 if (check_point(j,i))
then
265 maske(j,i) = maske_neu(j,i)
274 dist(j,i) = sqrt( (xi(i)-x_hat)**2 + (eta(j)-y_hat)**2 )
283 temp_s(j,i) = temp_min + s_t*dist(j,i)**3
284 temp_s(j,i) = temp_s(j,i) + delta_ts
286 if (temp_s(j,i) > -0.001_dp) temp_s(j,i) = -0.001_dp
289 accum_present(j,i) = b_min + (b_max-b_min)*rad_inv*dist(j,i)
290 accum(j,i) = accum_present(j,i)
292 as_perp(j,i) = accum(j,i)