38 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
46 real(dp),
intent(in) :: time, dtime, dxi, deta
48 real(dp),
intent(out) :: delta_ts, glac_index, dzsl_dtau, z_mar
49 real(dp),
intent(inout) :: z_sl
56 integer(i4b) :: i, j, n
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) :: z_sle_present, z_sle_help
62 real(dp),
dimension(0:JMAX,0:IMAX,0:12) :: precip
63 real(dp),
dimension(0:JMAX,0:IMAX) :: &
68 real(dp),
dimension(0:JMAX,0:IMAX,12) :: temp_mm
69 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_ma
70 real(dp),
dimension(12) :: temp_mm_help
71 real(dp) :: temp_jja_help
72 real(dp),
dimension(0:JMAX,0:IMAX) :: et
73 real(dp) :: gamma_t, temp_diff
74 real(dp) :: gamma_p, zs_thresh, &
75 temp_rain, temp_snow, &
76 inv_delta_temp_rain_snow, coeff(0:5), inv_sqrt2_s_stat, &
77 precip_fact, frac_solid
78 real(dp) :: s_stat, beta1, beta2, pmax, mu, lambda_lti, temp_lti
79 logical,
dimension(0:JMAX,0:IMAX) :: check_point
81 real(dp),
parameter :: &
82 inv_twelve = 1.0_dp/12.0_dp, one_third = 1.0_dp/3.0_dp
103 delta_ts = sine_amplit &
104 *cos(2.0_dp*pi*time/(sine_period*year_sec)) &
111 if (time/year_sec.lt.
real(grip_time_min,dp)) then
112 delta_ts = griptemp(0)
113 else if (time/year_sec.lt.
real(grip_time_max,dp)) then
115 i_kl = floor(((time/year_sec)-
real(grip_time_min,dp))/
real(grip_time_stp,dp))
118 i_gr = ceiling(((time/year_sec)-
real(grip_time_min,dp))/
real(grip_time_stp,dp))
119 i_gr = min(i_gr, ndata_grip)
121 if (i_kl.eq.i_gr)
then
123 delta_ts = griptemp(i_kl)
127 time_kl = (grip_time_min + i_kl*grip_time_stp) *year_sec
128 time_gr = (grip_time_min + i_gr*grip_time_stp) *year_sec
130 delta_ts = griptemp(i_kl) &
131 +(griptemp(i_gr)-griptemp(i_kl)) &
132 *(time-time_kl)/(time_gr-time_kl)
138 delta_ts = griptemp(ndata_grip)
141 delta_ts = delta_ts * grip_temp_fact
148 if (time/year_sec <
real(gi_time_min,dp)) then
149 glac_index = glacial_index(0)
150 else if (time/year_sec <
real(gi_time_max,dp)) then
152 i_kl = floor(((time/year_sec)-
real(gi_time_min,dp))/
real(gi_time_stp,dp))
155 i_gr = ceiling(((time/year_sec)-
real(gi_time_min,dp))/
real(gi_time_stp,dp))
156 i_gr = min(i_gr, ndata_gi)
158 if (i_kl == i_gr)
then
160 glac_index = glacial_index(i_kl)
164 time_kl = (gi_time_min + i_kl*gi_time_stp) *year_sec
165 time_gr = (gi_time_min + i_gr*gi_time_stp) *year_sec
167 glac_index = glacial_index(i_kl) &
168 +(glacial_index(i_gr)-glacial_index(i_kl)) &
169 *(time-time_kl)/(time_gr-time_kl)
175 glac_index = glacial_index(ndata_gi)
191 t1 = -250000.0_dp *year_sec
192 t2 = -140000.0_dp *year_sec
193 t3 = -125000.0_dp *year_sec
194 t4 = -21000.0_dp *year_sec
195 t5 = -8000.0_dp *year_sec
196 t6 = 0.0_dp *year_sec
200 else if (time.lt.t2)
then
201 z_sl = z_sl_min*(time-t1)/(t2-t1)
202 else if (time.lt.t3)
then
203 z_sl = -z_sl_min*(time-t3)/(t3-t2)
204 else if (time.lt.t4)
then
205 z_sl = z_sl_min*(time-t3)/(t4-t3)
206 else if (time.lt.t5)
then
207 z_sl = -z_sl_min*(time-t5)/(t5-t4)
208 else if (time.lt.t6)
then
218 if (time/year_sec.lt.
real(specmap_time_min,dp)) then
219 z_sl = specmap_zsl(0)
220 else if (time/year_sec.lt.
real(specmap_time_max,dp)) then
222 i_kl = floor(((time/year_sec)-
real(specmap_time_min,dp))/
real(specmap_time_stp,dp))
225 i_gr = ceiling(((time/year_sec)-
real(specmap_time_min,dp))/
real(specmap_time_stp,dp))
226 i_gr = min(i_gr, ndata_specmap)
228 if (i_kl.eq.i_gr)
then
230 z_sl = specmap_zsl(i_kl)
234 time_kl = (specmap_time_min + i_kl*specmap_time_stp) *year_sec
235 time_gr = (specmap_time_min + i_gr*specmap_time_stp) *year_sec
237 z_sl = specmap_zsl(i_kl) &
238 +(specmap_zsl(i_gr)-specmap_zsl(i_kl)) &
239 *(time-time_kl)/(time_gr-time_kl)
245 z_sl = specmap_zsl(ndata_specmap)
252 if ( z_sl_old > -999999.9_dp )
then
253 dzsl_dtau = (z_sl-z_sl_old)/dtime
262 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
264 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 )
265 z_mar = fact_z_mar*z_sl
266 #elif ( MARINE_ICE_CALVING==6 || MARINE_ICE_CALVING==7 )
267 if (z_sl >= -80.0_dp)
then
270 z_mar = 10.25_dp*(z_sl+80.0_dp)-200.0_dp
272 z_mar = fact_z_mar*z_mar
284 check_point(j,i) = .false.
290 if (maske(j,i).ge.2)
then
291 check_point(j ,i ) = .true.
292 check_point(j ,i+1) = .true.
293 check_point(j ,i-1) = .true.
294 check_point(j+1,i ) = .true.
295 check_point(j-1,i ) = .true.
302 if (check_point(j,i))
then
312 if (check_point(j,i))
then
313 maske(j,i) = maske_neu(j,i)
320 gamma_t = -4.5e-03_dp
330 temp_diff = gamma_t*(zs(j,i)-zs_ref(j,i)) + delta_ts
333 temp_mm(j,i,n) = temp_mm_present(j,i,n) + temp_diff
336 #elif (TSURFACE == 5)
341 temp_diff = gamma_t*(zs(j,i)-zs_ref(j,i))
344 temp_mm(j,i,n) = temp_mm_present(j,i,n) &
345 + glac_index*temp_mm_lgm_anom(j,i,n) &
353 temp_ma(j,i) = 0.0_dp
356 temp_ma(j,i) = temp_ma(j,i) + temp_mm(j,i,n)*inv_twelve
364 #if (ELEV_DESERT == 1)
366 gamma_p = gamma_p*1.0e-03_dp
368 zs_thresh = zs_thresh
372 #if (SOLID_PRECIP == 1) /* Marsiat (1994) */
379 inv_delta_temp_rain_snow = 1.0_dp/(temp_rain-temp_snow)
381 #elif (SOLID_PRECIP == 2) /* Bales et al. (2009) */
388 coeff(0) = 5.4714e-01_dp
389 coeff(1) = -9.1603e-02_dp
390 coeff(2) = -3.314e-03_dp
391 coeff(3) = 4.66e-04_dp
392 coeff(4) = 3.8e-05_dp
393 coeff(5) = 6.0e-07_dp
395 #elif (SOLID_PRECIP == 3) /* Huybrechts and de Wolde (1999) */
399 temp_snow = temp_rain
405 inv_sqrt2_s_stat = 1.0_dp/(sqrt(2.0_dp)*s_stat)
409 #if (ABLSURFACE==1 || ABLSURFACE==2)
412 beta1 = beta1_0 *(0.001_dp/86400.0_dp)*(rho_w/rho)
414 beta2 = beta2_0 *(0.001_dp/86400.0_dp)*(rho_w/rho)
418 mu = mu_0 *(1000.0_dp*86400.0_dp)*(rho/rho_w)
421 #elif (ABLSURFACE==3)
423 lambda_lti = lambda_lti *(0.001_dp/year_sec)*(rho_w/rho)
435 #if (ACCSURFACE <= 3)
439 #if (ELEV_DESERT == 0)
443 #elif (ELEV_DESERT == 1)
445 if (zs_ref(j,i) < zs_thresh)
then
447 = exp(gamma_p*(max(zs(j,i),zs_thresh)-zs_thresh))
450 = exp(gamma_p*(max(zs(j,i),zs_thresh)-zs_ref(j,i)))
454 stop
' boundary: Parameter ELEV_DESERT must be either 0 or 1!'
458 precip(j,i,n) = precip_present(j,i,n)*precip_fact
466 precip_fact = accfact
468 precip_fact = 1.0_dp + gamma_s*delta_ts
470 precip_fact = exp(gamma_s*delta_ts)
473 #if (ACCSURFACE <= 3)
475 precip(j,i,0) = 0.0_dp
478 precip(j,i,n) = precip(j,i,n)*precip_fact
479 precip(j,i,0) = precip(j,i,0) + precip(j,i,n)*inv_twelve
483 #elif (ACCSURFACE == 5)
485 precip(j,i,0) = 0.0_dp
489 #if (PRECIP_ANOM_INTERPOL==1)
490 precip_fact = 1.0_dp-glac_index+glac_index*precip_lgm_anom(j,i,n)
492 #elif (PRECIP_ANOM_INTERPOL==2)
493 precip_fact = exp(-glac_index*gamma_precip_lgm_anom(j,i,n))
497 precip(j,i,n) = precip_present(j,i,n)*precip_fact
498 precip(j,i,0) = precip(j,i,0) + precip(j,i,n)*inv_twelve
506 accum(j,i) = precip(j,i,0)
508 snowfall(j,i) = 0.0_dp
512 #if (SOLID_PRECIP == 1) /* Marsiat (1994) */
514 if (temp_mm(j,i,n) >= temp_rain)
then
516 else if (temp_mm(j,i,n) <= temp_snow)
then
519 frac_solid = (temp_rain-temp_mm(j,i,n))*inv_delta_temp_rain_snow
522 #elif (SOLID_PRECIP == 2) /* Bales et al. (2009) */
524 if (temp_mm(j,i,n) >= temp_rain)
then
526 else if (temp_mm(j,i,n) <= temp_snow)
then
529 frac_solid = coeff(0) + temp_mm(j,i,n) * ( coeff(1) &
530 + temp_mm(j,i,n) * ( coeff(2) &
531 + temp_mm(j,i,n) * ( coeff(3) &
532 + temp_mm(j,i,n) * ( coeff(4) &
533 + temp_mm(j,i,n) * coeff(5) ) ) ) )
537 #elif (SOLID_PRECIP == 3) /* Huybrechts and de Wolde (1999) */
539 frac_solid = 1.0_dp &
540 - 0.5_dp*
erfcc((temp_rain-temp_mm(j,i,n))*inv_sqrt2_s_stat)
544 snowfall(j,i) = snowfall(j,i) + precip(j,i,n)*frac_solid*inv_twelve
548 rainfall(j,i) = precip(j,i,0) - snowfall(j,i)
550 if (snowfall(j,i) < 0.0_dp) snowfall(j,i) = 0.0_dp
551 if (rainfall(j,i) < 0.0_dp) rainfall(j,i) = 0.0_dp
557 #if (ABLSURFACE==1 || ABLSURFACE==2)
562 temp_mm_help(n) = temp_mm(j,i,n)
565 call
pdd(temp_mm_help, s_stat, et(j,i))
573 if ((beta1*et(j,i)) <= (pmax*snowfall(j,i)))
then
574 melt_star(j,i) = beta1*et(j,i)
576 runoff(j,i) = melt(j,i)+rainfall(j,i)
578 melt_star(j,i) = pmax*snowfall(j,i)
579 melt(j,i) = beta2*(et(j,i)-melt_star(j,i)/beta1)
580 runoff(j,i) = melt(j,i)+rainfall(j,i)
583 #elif (ABLSURFACE==2)
585 if ( rainfall(j,i) <= (pmax*snowfall(j,i)) )
then
587 if ( (rainfall(j,i)+beta1*et(j,i)) <= (pmax*snowfall(j,i)) )
then
588 melt_star(j,i) = rainfall(j,i)+beta1*et(j,i)
590 runoff(j,i) = melt(j,i)
592 melt_star(j,i) = pmax*snowfall(j,i)
594 *(et(j,i)-(melt_star(j,i)-rainfall(j,i))/beta1)
595 runoff(j,i) = melt(j,i)
600 melt_star(j,i) = pmax*snowfall(j,i)
601 melt(j,i) = beta2*et(j,i)
602 runoff(j,i) = melt(j,i) + rainfall(j,i)-pmax*snowfall(j,i)
608 #elif (ABLSURFACE==3)
610 temp_jja_help = one_third*(temp_mm(j,i,6)+temp_mm(j,i,7)+temp_mm(j,i,8))
612 melt_star(j,i) = 0.0_dp
613 melt(j,i) = lambda_lti*max((temp_jja_help-temp_lti), 0.0_dp)
614 runoff(j,i) = melt(j,i) + rainfall(j,i)
625 as_perp(j,i) = accum(j,i) - evap(j,i) - runoff(j,i)
635 if (melt_star(j,i).ge.melt(j,i))
then
636 temp_s(j,i) = temp_ma(j,i) &
637 +mu*(melt_star(j,i)-melt(j,i))
639 temp_s(j,i) = temp_ma(j,i)
642 if (temp_s(j,i) > -0.001_dp) temp_s(j,i) = -0.001_dp
integer(i2b) function mask_update(z_sl, i, j)
Update of the topography mask due to changes of the sea level.
Declarations of kind types for SICOPOLIS.
subroutine pdd(temp_mm, s_stat, ET)
Computation of the positive degree days (PDD) with statistical temperature fluctuations; based on sem...
real(dp) function erfcc(x)
Computation of the complementary error function erfc(x) = 1-erf(x) with a fractional error everywhere...
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine boundary(time, dtime, dxi, deta, delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
Computation of the surface temperature (must be less than 0 deg C!) and of the accumulation-ablation ...
Declarations of global variables for SICOPOLIS.