7 !! Declarations of global variables for SICOPOLIS.
11 !! Copyright 2009-2013 Ralf Greve
15 !! This file is part of SICOPOLIS.
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33 !> Declarations of global variables for SICOPOLIS.
34 !<------------------------------------------------------------------------------
41 !> maske(j,i): Ice-land-ocean mask.
46 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske
48 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_help
50 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_neu
53 !> 0: temperate ice base with cold ice above,
54 !> 1: temperate ice base with temperate ice layer above
55 !> (only in polythermal mode)
56 integer(i2b),
dimension(0:JMAX,0:IMAX) :: n_cts
58 integer(i2b),
dimension(0:JMAX,0:IMAX) :: n_cts_neu
60 integer(i4b),
dimension(0:JMAX,0:IMAX) :: kc_cts
62 !> .true.: grounding line point
63 !> (grounded ice point with at least
64 !> one floating ice neighbour),
66 logical,
dimension(0:JMAX,0:IMAX) :: flag_grounding_line
68 !> .true.: calving front point
69 !> (floating ice point with at least
70 !> one ocean neighbour),
72 logical,
dimension(0:JMAX,0:IMAX) :: flag_calving_front
74 !> .true.: shelfy stream is applied
75 !> .false.: shelfy stream is not applied
76 logical,
dimension(0:JMAX,0:IMAX) :: flag_sf
78 real(dp),
dimension(0:IMAX) :: xi
80 real(dp),
dimension(0:JMAX) :: eta
82 real(dp),
dimension(0:KCMAX) :: zeta_c
84 real(dp),
dimension(0:KCMAX) :: eaz_c
86 real(dp),
dimension(0:KCMAX) :: eaz_c_quotient
88 real(dp),
dimension(0:KTMAX) :: zeta_t
92 !> lambda(j,i): Geographic longitude of grid point (i,j)
93 real(dp),
dimension(0:JMAX,0:IMAX) :: lambda
95 real(dp),
dimension(0:JMAX,0:IMAX) :: phi
97 real(dp),
dimension(0:JMAX,0:IMAX) :: area
99 !> on grid point (i,j)
100 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g11_g
102 !> on grid point (i,j)
103 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g22_g
105 real(dp),
dimension(0:JMAX,0:IMAX) :: insq_g11_g
107 real(dp),
dimension(0:JMAX,0:IMAX) :: insq_g22_g
109 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g11_sgx
111 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g11_sgy
113 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g22_sgx
115 real(dp),
dimension(0:JMAX,0:IMAX) :: sq_g22_sgy
117 real(dp),
dimension(0:JMAX,0:IMAX) :: insq_g11_sgx
119 real(dp),
dimension(0:JMAX,0:IMAX) :: insq_g22_sgy
121 real(dp),
dimension(0:JMAX,0:IMAX) :: zs
123 real(dp),
dimension(0:JMAX,0:IMAX) :: zm
125 real(dp),
dimension(0:JMAX,0:IMAX) :: zb
127 real(dp),
dimension(0:JMAX,0:IMAX) :: zl
129 real(dp),
dimension(0:JMAX,0:IMAX) :: zl0
131 real(dp),
dimension(0:JMAX,0:IMAX) :: wss
133 real(dp),
dimension(0:JMAX,0:IMAX) :: H_c
135 real(dp),
dimension(0:JMAX,0:IMAX) :: H_t
137 real(dp),
dimension(0:JMAX,0:IMAX) :: dzs_dxi
139 real(dp),
dimension(0:JMAX,0:IMAX) :: dzm_dxi
141 real(dp),
dimension(0:JMAX,0:IMAX) :: dzb_dxi
143 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_c_dxi
145 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_t_dxi
147 real(dp),
dimension(0:JMAX,0:IMAX) :: dzs_deta
149 real(dp),
dimension(0:JMAX,0:IMAX) :: dzm_deta
151 real(dp),
dimension(0:JMAX,0:IMAX) :: dzb_deta
153 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_c_deta
155 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_t_deta
157 real(dp),
dimension(0:JMAX,0:IMAX) :: dzs_dxi_g
159 real(dp),
dimension(0:JMAX,0:IMAX) :: dzm_dxi_g
161 real(dp),
dimension(0:JMAX,0:IMAX) :: dzb_dxi_g
163 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_c_dxi_g
165 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_t_dxi_g
167 real(dp),
dimension(0:JMAX,0:IMAX) :: dzs_deta_g
169 real(dp),
dimension(0:JMAX,0:IMAX) :: dzm_deta_g
171 real(dp),
dimension(0:JMAX,0:IMAX) :: dzb_deta_g
173 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_c_deta_g
175 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_t_deta_g
177 real(dp),
dimension(0:JMAX,0:IMAX) :: dzs_dtau
179 real(dp),
dimension(0:JMAX,0:IMAX) :: dzm_dtau
181 real(dp),
dimension(0:JMAX,0:IMAX) :: dzb_dtau
183 real(dp),
dimension(0:JMAX,0:IMAX) :: dzl_dtau
185 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_c_dtau
187 real(dp),
dimension(0:JMAX,0:IMAX) :: dH_t_dtau
189 real(dp),
dimension(0:JMAX,0:IMAX) :: d_help_b
191 real(dp),
dimension(0:JMAX,0:IMAX) :: p_b_w
193 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_b
195 real(dp),
dimension(0:JMAX,0:IMAX) :: vy_b
197 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_m
199 real(dp),
dimension(0:JMAX,0:IMAX) :: vy_m
201 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_b_g
203 real(dp),
dimension(0:JMAX,0:IMAX) :: vy_b_g
205 real(dp),
dimension(0:JMAX,0:IMAX) :: vz_b
207 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_s_g
209 real(dp),
dimension(0:JMAX,0:IMAX) :: vy_s_g
211 real(dp),
dimension(0:JMAX,0:IMAX) :: vz_s
213 real(dp),
dimension(0:JMAX,0:IMAX) :: flui_ave_sia
215 real(dp),
dimension(0:JMAX,0:IMAX) :: h_diff
217 real(dp),
dimension(0:JMAX,0:IMAX) :: qx
219 real(dp),
dimension(0:JMAX,0:IMAX) :: qy
221 real(dp),
dimension(0:JMAX,0:IMAX) :: q_gl_g
223 real(dp),
dimension(0:JMAX,0:IMAX) :: q_geo
225 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_b
227 real(dp),
dimension(0:JMAX,0:IMAX) :: temph_b
229 real(dp),
dimension(0:JMAX,0:IMAX) :: Q_bm
231 real(dp),
dimension(0:JMAX,0:IMAX) :: Q_tld
233 real(dp),
dimension(0:JMAX,0:IMAX) :: Q_b_tot
235 real(dp),
dimension(0:JMAX,0:IMAX) :: H_w
237 !> (includes liquid precipitation = rainfall!)
238 real(dp),
dimension(0:JMAX,0:IMAX) :: accum
240 real(dp),
dimension(0:JMAX,0:IMAX) :: evap
242 real(dp),
dimension(0:JMAX,0:IMAX) :: runoff
244 real(dp),
dimension(0:JMAX,0:IMAX) :: as_perp
246 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_s
248 real(dp),
dimension(0:JMAX,0:IMAX) :: am_perp
250 !> (without contribution of dzm_dtau)
251 real(dp),
dimension(0:JMAX,0:IMAX) :: am_perp_st
253 real(dp),
dimension(0:JMAX,0:IMAX) :: zs_neu
255 real(dp),
dimension(0:JMAX,0:IMAX) :: zm_neu
257 real(dp),
dimension(0:JMAX,0:IMAX) :: zb_neu
259 real(dp),
dimension(0:JMAX,0:IMAX) :: zl_neu
261 real(dp),
dimension(0:JMAX,0:IMAX) :: H_c_neu
263 real(dp),
dimension(0:JMAX,0:IMAX) :: H_t_neu
265 !> zs_ref(j,i): Reference elevation for precip_present, temp_ma_present
266 !> and temp_mj_present
267 real(dp),
dimension(0:JMAX,0:IMAX) :: zs_ref
269 !> accum_present(j,i): Present-day accumulation rate at the ice surface
270 !> (for EISMINT, ISMIP HEINO and the north and south
271 !> polar caps of Mars)
272 real(dp),
dimension(0:JMAX,0:IMAX) :: accum_present
274 !> at the ice surface
275 real(dp),
dimension(0:JMAX,0:IMAX) :: precip_ma_present
277 !> precipitation rate at the ice surface
278 real(dp),
dimension(0:JMAX,0:IMAX) :: precip_ma_lgm_anom
280 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_ma_present
282 !> southern hemisphere: January) surface temperature
283 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_mj_present
285 !> annual surface temperature
286 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_ma_lgm_anom
288 !> summer (northern hemisphere: July, southern
289 !> hemisphere: January) surface temperature
290 real(dp),
dimension(0:JMAX,0:IMAX) :: temp_mj_lgm_anom
292 !> dist_dxdy(jr,ir): Distance between grid points with delta_i=ir, delta_j=jr
293 real(dp),
dimension(-JMAX:JMAX,-IMAX:IMAX) :: dist_dxdy
295 !> precip_present(j,i,n): Present-day mean monthly precipitation rate
296 !> at the ice surface
297 real(dp),
dimension(0:JMAX,0:IMAX,12) :: precip_present
299 !> precipitation rate at the ice surface
300 real(dp),
dimension(0:JMAX,0:IMAX,12) :: precip_lgm_anom
302 !> precip_lgm_anom(j,i,n)
303 real(dp),
dimension(0:JMAX,0:IMAX,12) :: gamma_precip_lgm_anom
305 real(dp),
dimension(0:JMAX,0:IMAX,12) :: temp_mm_present
307 !> monthly surface temperature
308 real(dp),
dimension(0:JMAX,0:IMAX,12) :: temp_mm_lgm_anom
310 !> d_help_c(kc,j,i): Auxiliary quantity for the computation of vx, vy und zs
311 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: d_help_c
313 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: vx_c
315 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: vy_c
317 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: vz_c
319 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: temp_c
321 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: temp_c_neu
323 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: temp_c_m
325 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: age_c
327 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: age_c_neu
329 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: txz_c
331 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: tyz_c
333 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: sigma_c
335 real(dp),
dimension(0:KCMAX,0:JMAX,0:IMAX) :: enh_c
337 !> de_ssa(j,i): Effective strain rate of the SSA, at (i,j)
338 real(dp),
dimension(0:JMAX,0:IMAX) :: de_ssa
340 real(dp),
dimension(0:JMAX,0:IMAX) :: vis_int_g
342 real(dp),
dimension(0:JMAX,0:IMAX) :: vx_g
344 real(dp),
dimension(0:JMAX,0:IMAX) :: vy_g
346 !> d_help_t(kt,j,i): Auxiliary quantity for the computation of vx, vy und zs
347 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: d_help_t
349 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: vx_t
351 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: vy_t
353 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: vz_t
355 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: omega_t
357 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: omega_t_neu
359 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: temp_t_m
361 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: age_t
363 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: age_t_neu
365 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: txz_t
367 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: tyz_t
369 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: sigma_t
371 real(dp),
dimension(0:KTMAX,0:JMAX,0:IMAX) :: enh_t
373 !> temp_r(kr,j,i): Temperature in the bedrock
374 real(dp),
dimension(0:KRMAX,0:JMAX,0:IMAX) :: temp_r
376 real(dp),
dimension(0:KRMAX,0:JMAX,0:IMAX) :: temp_r_neu
380 !> RHO: Density of ice
396 real(dp) :: DELTA_TM_SW
398 real(dp) :: OMEGA_MAX
406 real(dp) :: FLEX_RIG_L
431 real(dp) :: BETA1_LT_0
433 real(dp) :: BETA1_HT_0
437 real(dp) :: BETA2_LT_0
439 real(dp) :: BETA2_HT_0
441 !> factors beta1 and beta2: Equatorward of phi_sep, only the
442 !> high-temperature values are used, whereas poleward of phi_sep,
443 !> beta1 and beta2 are temperature-dependent
444 real(dp) :: PHI_SEP_0
450 #if ( defined(NMARS) \
451 || defined(smars) ) /* martian ice sheet */
452 !> RHO_I: Density of ice
464 !> RF(n): Tabulated values for the rate factor of cold ice
465 real(dp),
dimension(-190:10) :: RF
467 real(dp),
dimension(-190:10) :: KAPPA
469 real(dp),
dimension(-190:10) :: C
473 !> year_zero: SICOPOLIS year zero in astronomical year numbering
474 !> [ = signed year CE (AD) ]
475 real(dp) :: year_zero
477 #if ( defined(NMARS) \
478 || defined(smars) ) /* martian ice sheet */
479 !> insol_time_min: Minimum time of the data values for the insolation etc.
480 integer(i4b) :: insol_time_min
482 integer(i4b) :: insol_time_stp
484 integer(i4b) :: insol_time_max
487 real(dp),
dimension(0:100000) :: insol_ma_90
489 real(dp),
dimension(0:100000) :: obl_data
491 real(dp),
dimension(0:100000) :: ecc_data
493 !> (= 360 deg - Ls of perihelion )
494 real(dp),
dimension(0:100000) :: ave_data
497 !> *sin(Laskar's longitude of perihelion from moving equinox),
498 !> ( where Laskar's longitude of perihelion from moving equinox
499 !> = Ls of perihelion - 180 deg )
500 real(dp),
dimension(0:100000) :: cp_data
503 !> 1: ice-free land (normal area),
505 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_chasm
507 real(dp) :: time_chasm_init
509 real(dp) :: time_chasm_end
511 real(dp),
dimension(0:JMAX,0:IMAX) :: q_geo_normal
514 #if defined(EMTP2SGE) /* EISMINT Phase 2 Simplified Geometry Experiment */
529 #elif defined(HEINO) /* ISMIP HEINO */
534 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_sedi
549 #elif ( defined(GRL) && ICE_STREAM==2 ) /* Greenland with ice streams */
554 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_sedi
555 #elif ( defined(ANT) \
556 && defined(sedi_slide) \
557 && sedi_slide==2 ) /* antarctica with sediment sliding */
558 !> maske_sedi(j,i): Sediment mask.
562 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_sedi
565 #if defined(ASF) /* Austfonna */
567 integer(i4b) :: n_surf
569 real(dp),
dimension(:),
allocatable,
save :: lambda_surf
571 real(dp),
dimension(:),
allocatable,
save :: phi_surf
573 real(dp),
dimension(:),
allocatable,
save :: x_surf
575 real(dp),
dimension(:),
allocatable,
save :: y_surf
577 real(dp),
dimension(0:JMAX,0:IMAX) :: snowfall
579 real(dp),
dimension(0:JMAX,0:IMAX) :: rainfall
580 #if ( ICE_STREAM==2 ) /* Austfonna with ice streams */
585 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_sedi
589 !> forcing_flag: Flag for the forcing type.
590 !> 1: forcing by a spatially constant surface temperature
591 !> anomaly (delta_ts),
592 !> 2: forcing by a glacial index (glac_index),
593 !> 3: forcing by time-dependent surface temperature
594 !> and precipitation data.
595 integer(i2b) :: forcing_flag
597 !> n_core: Number of positions to be considered in the time-series file
598 !> for deep boreholes
599 integer(i4b) :: n_core
601 real(dp),
dimension(:),
allocatable,
save :: lambda_core
603 real(dp),
dimension(:),
allocatable,
save :: phi_core
605 real(dp),
dimension(:),
allocatable,
save :: x_core
607 real(dp),
dimension(:),
allocatable,
save :: y_core
609 !> grip_time_min: Minimum time of the data values for the
610 !> surface temperature anomaly
611 integer(i4b) :: grip_time_min
613 !> surface temperature anomaly
614 integer(i4b) :: grip_time_stp
616 !> surface temperature anomaly
617 integer(i4b) :: grip_time_max
619 integer(i4b) :: ndata_grip
621 real(dp),
dimension(:),
allocatable,
save :: griptemp
623 !> gi_time_min: Minimum time of the data values for the glacial index
624 integer(i4b) :: gi_time_min
626 integer(i4b) :: gi_time_stp
628 integer(i4b) :: gi_time_max
630 integer(i4b) :: ndata_gi
632 real(dp),
dimension(:),
allocatable,
save :: glacial_index
634 !> specmap_time_min: Minimum time of the data values for the sea level
635 integer(i4b) :: specmap_time_min
637 integer(i4b) :: specmap_time_stp
639 integer(i4b) :: specmap_time_max
641 integer(i4b) :: ndata_specmap
643 real(dp),
dimension(:),
allocatable,
save :: specmap_zsl
645 !> time_target_topo_init: Initial time for target-topography adjustment
646 real(dp) :: time_target_topo_init
648 real(dp) :: time_target_topo_final
650 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_target
652 real(dp),
dimension(0:JMAX,0:IMAX) :: zs_target
654 real(dp),
dimension(0:JMAX,0:IMAX) :: zb_target
656 real(dp),
dimension(0:JMAX,0:IMAX) :: zl_target
658 real(dp),
dimension(0:JMAX,0:IMAX) :: H_target
660 !> maske_maxextent(j,i): Maximum ice extent mask.
661 !> 0: not allowed to glaciate,
662 !> 1: allowed to glaciate.
663 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_maxextent
665 !> ncid_temp_precip: ID of the NetCDF file containing the
666 !> surface-temperature and precipitation data
667 !> as functions of time
668 integer(i4b) :: ncid_temp_precip
670 !> and precipitation data
671 integer(i4b) :: ndata_temp_precip
673 !> and precipitation data
674 real(dp) :: temp_precip_time_min
676 !> and precipitation data
677 real(dp) :: temp_precip_time_stp
679 !> and precipitation data
680 real(dp) :: temp_precip_time_max
682 !> and precipitation data
683 real(dp),
dimension(:),
allocatable,
save :: temp_precip_time
685 !> kei(n): Tabulated values of the kei function (Kelvin function of zero order)
686 real(dp),
dimension(-10000:10000) :: kei
688 integer(i4b):: n_data_kei
690 real(dp) :: kei_r_max
692 real(dp) :: kei_r_incr
694 !> pi: Mathematical constant
695 real(dp),
parameter :: pi = 3.141592653589793_dp
697 real(dp),
parameter :: pi_inv = 1.0_dp/pi
699 real(dp),
parameter :: pi_180 = pi/180.0_dp
701 real(dp),
parameter :: pi_180_inv = 180.0_dp/pi
703 real(dp),
parameter :: eps = 1.0e-05_dp