SICOPOLIS V3.2
 All Classes Files Functions Variables Macros
sicopolis.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Program : s i c o p o l i s . F 9 0
4 ! (SImulation COde for POLythermal Ice Sheets)
5 #define VERSION '3.2'
6 #define DATE '2016-03-02'
7 !
8 !> @mainpage
9 !!
10 !! @section Description
11 !!
12 !! SICOPOLIS (SImulation COde for POLythermal Ice Sheets) is a 3-d
13 !! dynamic/thermodynamic model that simulates the evolution of large ice
14 !! sheets and ice caps. It was originally created by Greve (1997a,b) in a
15 !! version for the Greenland ice sheet. Since then, SICOPOLIS has been
16 !! developed continuously and applied to problems of past, present and
17 !! future glaciation of Greenland, Antarctica, the entire northern
18 !! hemisphere, the polar ice caps of the planet Mars and others.
19 !!
20 !! The model is based on the shallow ice approximation for grounded ice
21 !! and the shallow shelf approximation for floating ice (e.g., Greve and
22 !! Blatter 2009). It is coded in Fortran 90 and uses finite difference
23 !! discretisation on a staggered (Arakawa C) grid, the velocity
24 !! components being taken between grid points. A variety of different
25 !! thermodynamics solvers are available, namely the polythermal two-layer
26 !! method, two versions of the one-layer enthalpy method, the cold-ice
27 !! method and the isothermal method (Greve and Blatter 2016).
28 !!
29 !! The coding is based on a consequent low-tech philosophy. All
30 !! structures are kept as simple as possible, and advanced coding
31 !! techniques are only employed where it is deemed appropriate. The use
32 !! of external libraries is kept at an absolute minimum. In fact,
33 !! SICOPOLIS can be run without external libraries at all, which makes
34 !! the installation very easy and fast.
35 !!
36 !! Required model forcing:
37 !! @li Surface mass balance (precipitation, evaporation, runoff).
38 !! @li Mean annual air temperature above the ice.
39 !! @li Eustatic sea level.
40 !! @li Geothermal heat flux.
41 !!
42 !! Main output (as functions of position and time):
43 !! @li Extent and thickness of the ice sheet.
44 !! @li Velocity field.
45 !! @li Temperature field.
46 !! @li Water-content field (temperate regions).
47 !! @li Age of the ice.
48 !! @li Isostatic displacement and temperature of the lithosphere.
49 !!
50 !! References:
51 !! @li Greve, R. 1997a.\n
52 !! A continuum-mechanical formulation for shallow polythermal ice sheets.\n
53 !! Phil. Trans. R. Soc. Lond. A 355 (1726), 921-974.
54 !! @li Greve, R. 1997b.\n
55 !! Application of a polythermal three-dimensional ice sheet model to the
56 !! Greenland ice sheet: Response to steady-state and transient climate
57 !! scenarios.\n
58 !! J. Climate 10 (5), 901-918.
59 !! @li Greve, R. and H. Blatter. 2009.\n
60 !! Dynamics of Ice Sheets and Glaciers.\n
61 !! Springer, Berlin, Germany etc., 287 pp.
62 !! @li Greve, R. and H. Blatter. 2016.\n
63 !! Comparison of thermodynamics solvers in the polythermal ice sheet model
64 !! SICOPOLIS.\n
65 !! Polar Sci. 10 (1), 11-23.
66 !! @li SICOPOLIS website: http://www.sicopolis.net/
67 !!
68 !! @section Copyright
69 !!
70 !! Copyright 2009-2016 Ralf Greve\n
71 !! (with contributions by Heinz Blatter, Reinhard Calov, Thorben Dunse,
72 !! Ben Galton-Fenzi, Thomas Goelles, Philipp Hancke, Nina Kirchner, Sascha Knell,
73 !! Alex Robinson, Tatsuru Sato, Malte Thoma)
74 !!
75 !! @section License
76 !!
77 !! SICOPOLIS is free software: you can redistribute it and/or modify
78 !! it under the terms of the GNU General Public License as published by
79 !! the Free Software Foundation, either version 3 of the License, or
80 !! (at your option) any later version.
81 !!
82 !! SICOPOLIS is distributed in the hope that it will be useful,
83 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
84 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
85 !! GNU General Public License for more details.
86 !!
87 !! You should have received a copy of the GNU General Public License
88 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
89 !!
90 !! @file
91 !!
92 !! Main program file of SICOPOLIS.
93 !!
94 !! @section Copyright
95 !!
96 !! Copyright 2009-2016 Ralf Greve
97 !!
98 !! @section License
99 !!
100 !! This file is part of SICOPOLIS.
101 !!
102 !! SICOPOLIS is free software: you can redistribute it and/or modify
103 !! it under the terms of the GNU General Public License as published by
104 !! the Free Software Foundation, either version 3 of the License, or
105 !! (at your option) any later version.
106 !!
107 !! SICOPOLIS is distributed in the hope that it will be useful,
108 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
109 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110 !! GNU General Public License for more details.
111 !!
112 !! You should have received a copy of the GNU General Public License
113 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
114 !!
115 !<
116 ! *****************************************************************
117 ! Version history:
118 ! *****************************************************************
119 ! V1.0: Modular version of SICOPOLIS, applicable to any
120 ! ice sheet.
121 ! -----------------------------------------------------------
122 ! Based on sicopolis_nhem.F95 V4.0
123 ! (northern-hemisphere version of SICOPOLIS).
124 ! -----------------------------------------------------------------
125 ! V1.1: Optional new boundary conditions for the ice
126 ! surface at the margin of the computational domain
127 ! (parameter BC_MARG).
128 ! -----------------------------------------------------------------
129 ! V1.2: Optional first-order-upstream discretization
130 ! of vertical advection terms without artificial
131 ! diffusion in the age equation
132 ! (parameter ADV_VERT).
133 ! -----------------------------------------------------------
134 ! Optional exponential coupling between accumulation
135 ! and delta_ts (parameter ACCSURFACE==3).
136 ! -----------------------------------------------------------------
137 ! V1.3: New module for the southern hemisphere included
138 ! (parameter DOMAIN==4).
139 ! -----------------------------------------------------------
140 ! Improved reading of ice-core-temperature and
141 ! sea-level data, no longer restricted to the
142 ! interval from 250 kyr BP to today.
143 ! -----------------------------------------------------------
144 ! New model domain for Scandinavia included
145 ! (parameter DOMAIN==2).
146 ! -----------------------------------------------------------------
147 ! V1.4: New module for Antarctica included.
148 ! -----------------------------------------------------------
149 ! Bugfix in subroutines sico_init
150 ! (for grl, shem, nmars):
151 ! Parameter list in calls of subroutine boundary
152 ! for parameter ANF_DAT==3 corrected.
153 ! -----------------------------------------------------------
154 ! Mars module: Degree-day model replaced by simpler
155 ! accumulation-ablation parameterization.
156 ! -----------------------------------------------------------------
157 ! V2.0: All file extensions changed from '.F95' to '.F90'.
158 ! -----------------------------------------------------------
159 ! COMMON blocks in input file 'sico.common' replaced
160 ! by module 'sico_variables'.
161 ! -----------------------------------------------------------
162 ! Character variable 'runname' (name of current run)
163 ! can have an arbitrary length of less than
164 ! 100 characters.
165 ! -----------------------------------------------------------
166 ! Variables d_help_c, d_help_t, h_diff,
167 ! maske, maske_help, n_cts, n_cts_neu, kc_cts,
168 ! as_perp, temp_s
169 ! now declared globally in module 'sico_variables'.
170 ! -----------------------------------------------------------
171 ! The header file 'sicoheader.F95' does no longer
172 ! exist; however, 'sicopolis.F90' is compiled
173 ! directly.
174 ! -----------------------------------------------------------
175 ! Header file with simulation specifications must
176 ! be called 'sico_specs.h'.
177 ! -----------------------------------------------------------
178 ! Explicit definition of paths INPATH (for input
179 ! files), OUTPATH (for output files), ANFDATPATH
180 ! (for initial-value file) and Z_SLE_PATH (for
181 ! previously computed time-series file with
182 ! sea-level equivalents) in specifications file.
183 ! -----------------------------------------------------------
184 ! Parameter DOMAIN removed. Instead, the
185 ! computational domain is now defined by a macro
186 ! ANT, GRL, SCAND, NHEM, SHEM, EMTP2SGE or NMARS.
187 ! -----------------------------------------------------------
188 ! Parameter BC_MARG (see version 1.1) removed, back
189 ! to zero-thickness boundary condition at the margin
190 ! of the numerical domain as the only possibility.
191 ! -----------------------------------------------------------
192 ! Geothermal heat flux (Q_GEO), flow-enhancement factor
193 ! (ENH) and minimum ice thickness interpreted as glaciation
194 ! (H_MIN) now defined in header file sico_specs.h.
195 ! -----------------------------------------------------------
196 ! Physical parameters now read from a file by the
197 ! new subroutine 'phys_para'.
198 ! -----------------------------------------------------------
199 ! Indexing of arrays RF(T), KAPPA(T) and C(T)
200 ! changed such that the index T now corresponds to
201 ! the temperature in deg C.
202 ! -----------------------------------------------------------
203 ! Computation of the horizontal volume flux qx, qy
204 ! moved from subroutine 'calc_top' to subroutine
205 ! 'calc_vxy'.
206 ! -----------------------------------------------------------
207 ! Forcing quantities delta_ts and z_sl added to
208 ! the output for the time-slice files produced by
209 ! subroutine 'output1'.
210 ! -----------------------------------------------------------
211 ! Bugfix in subroutine 'calc_top':
212 ! In the diffusive smoothing scheme for zs_neu, the
213 ! denominator of the correction factor 'korrfakt'
214 ! can no longer become zero due to the insertion
215 ! of a volume offset eps_vol.
216 ! -----------------------------------------------------------------
217 ! V2.0.1: Maximum surface velocity now written to the time-series
218 ! files.
219 ! -----------------------------------------------------------------
220 ! V2.0.2: Module for the southern hemisphere deleted.
221 ! ---------------------------------------------------------
222 ! New Greenland topography data based on Letreguilly and
223 ! ETOPO5 with slightly smoothed relaxed bedrock used.
224 ! -----------------------------------------------------------------
225 ! V2.0.3: Limitation of the computed horizontal velocities to an
226 ! interval [-VH_MAX, VH_MAX] to be prescribed in the
227 ! header file.
228 ! -----------------------------------------------------------------
229 ! V2.0.4: Implementation of alternative flow laws
230 ! (Goldsby-Kohlstedt, Durham) in addition to the usual
231 ! Glen's flow law (parameter FLOW_LAW).
232 ! ---------------------------------------------------------
233 ! For the north polar cap of Mars, the average dust content
234 ! of the ice can be specified (parameter FRAC_DUST).
235 ! -----------------------------------------------------------------
236 ! V2.1: Spatially variable geothermal heat flux implemented, can
237 ! be chosen by new parameter Q_GEO_MOD.
238 ! -----------------------------------------------------------
239 ! Output of time-series file for ice-core locations
240 ! prescribed in subroutine sico_init implemented
241 ! (parameter OUTSER==3).
242 ! -----------------------------------------------------------
243 ! New module for the south-polar cap of Mars included
244 ! (macro SMARS).
245 ! -----------------------------------------------------------
246 ! For the Martian ice caps (NMARS, SMARS), the mass balance
247 ! is now converted from water equiv. to (ice+dust) equiv.
248 ! (previously the dust was ignored).
249 ! -----------------------------------------------------------------
250 ! V2.2: Sub-melt basal sliding implemented (parameter GAMMA_SLIDE
251 ! in phys_para file; 0: no sub-melt sliding).
252 ! -----------------------------------------------------------
253 ! Greenland:
254 ! - New Bamber topography implemented, horizontal resolution
255 ! 40, 20 or 10 km.
256 ! - Surface temperatures (mean annual, mean July)
257 ! parameterised by Ritz et al. (1997).
258 ! - Precipitation instead of solid accumulation used as
259 ! input.
260 ! - Reeh's degree day model with statistical fluctuations,
261 ! supplemented by explicit consideration of rainfall
262 ! and different ice/snow degree-day factors for warm
263 ! and cold conditions (parameters BETA1_LT_0, BETA1_HT_0,
264 ! BETA2_LT_0, BETA2_HT_0 in phys_para file).
265 ! - Net surface mass balance computed as precipitation minus
266 ! runoff (previously solid accumulation minus melting).
267 ! - Optional climate forcing by glacial index and prescribed
268 ! LGM anomalies for surface temperature and precipitation
269 ! (parameters TSURFACE==5 and ACCSURFACE==5).
270 ! -----------------------------------------------------------
271 ! Martian ice caps (NMARS, SMARS):
272 ! - Accumulation input either in water equiv.
273 ! or in (ice+dust) equiv. (parameter ACC_UNIT).
274 ! - Lower limit of -125/-128 deg C (sublimation temperature
275 ! of CO2 over the NPC/SPC) introduced for the ice surface
276 ! temperature.
277 ! -----------------------------------------------------------------
278 ! V2.3: Implementation of Bjoern Grieger's surface-temperature
279 ! parameterisation for the Martian ice caps (parameter
280 ! TSURFACE==6).
281 ! -----------------------------------------------------------
282 ! Greenland: Optional linear or exponential interpolation
283 ! function for glacial-index-based precipitation forcing
284 ! (parameter PRECIP_ANOM_INTERPOL).
285 ! -----------------------------------------------------------------
286 ! V2.4: Implementation of an elastic lithosphere (ELRA model),
287 ! based on Sascha Knell's diploma thesis
288 ! (parameter REBOUND==2)
289 ! -----------------------------------------------------------
290 ! Implementation of Bernd Muegge's conservative first-order
291 ! upstream scheme for the age equation
292 ! (parameters ADV_HOR==3 and ADV_VERT==3).
293 ! -----------------------------------------------------------
294 ! Antarctica, Scandinavia (Greenland see V2.2):
295 ! - Precipitation instead of solid accumulation used as
296 ! input.
297 ! - Reeh's degree day model with statistical fluctuations,
298 ! supplemented by explicit consideration of rainfall.
299 ! - Net surface mass balance computed as precipitation minus
300 ! runoff (previously solid accumulation minus melting).
301 ! - Optional climate forcing by glacial index and prescribed
302 ! LGM anomalies for surface temperature and precipitation
303 ! (parameters TSURFACE==5 and ACCSURFACE==5).
304 ! -----------------------------------------------------------
305 ! Northern-hemisphere module no longer up-to-date, therefore
306 ! deleted for the time being.
307 ! -----------------------------------------------------------
308 ! Compatibility check between version number of SICOPOLIS
309 ! and version number in header file.
310 ! -----------------------------------------------------------------
311 ! V2.4.1: Antarctica, Scandinavia, Greenland:
312 ! - Optional computation of surface melting (ablation)
313 ! by the positive-degree-day (PDD) method
314 ! or the linear-temperature-index (LTI) method
315 ! (parameter ABLSURFACE).
316 ! - Computation of positive degree days (subroutine pdd)
317 ! changed from annual sinus cycle of the surface
318 ! temperature to direct use of monthly-mean temperatures.
319 ! ---------------------------------------------------------
320 ! Scandinavia:
321 ! - Climate input (surface temperature, precipitation)
322 ! changed from seasonal to monthly-mean values.
323 ! - Optional horizontal resolutions 40, 20 or 10 km.
324 ! -----------------------------------------------------------------
325 ! V2.5: Basal sliding now computed in new subroutine calc_vxy_b.
326 ! Parameters of sliding law are set in the header file
327 ! (previously in phys_para file). New options: Weertman
328 ! exponents can be chosen freely, alternative use of
329 ! full or reduced pressure in sliding law.
330 ! -----------------------------------------------------------
331 ! Antarctica, Greenland, Scandinavia:
332 ! Two variants of PDD, either with instantaneous runoff of
333 ! rainfall (ABLSURFACE==1), or with contribution of rainfall
334 ! to formation of superimposed ice (ABLSURFACE==2).
335 ! Linear-temperature-index (LTI) method is now chosen by
336 ! ABLSURFACE==3.
337 ! -----------------------------------------------------------
338 ! North- and south-polar cap of Mars:
339 ! In addition to the density and the heat conductivity,
340 ! now the specific heat is also computed as a
341 ! volume-fraction-weighed mean of the ice and dust values,
342 ! respectively. Function c_val changed accordingly.
343 ! -----------------------------------------------------------
344 ! EISMINT Phase 2 Simplified Geometry Experiment:
345 ! Input file surf_para_emtp2sge.dat and subroutine surf_para
346 ! deleted. Parameters now defined in header file.
347 ! -----------------------------------------------------------
348 ! Minimum bedrock elevation for extent of marine ice
349 ! defined by new variable z_mar. Can be chosen as a constant
350 ! (MARGIN==2, old option), as proportional to the sea-level
351 ! stand (MARGIN==3, new option) or as a piecewise linear
352 ! function of sea level (MARGIN==4, new option; as proposed
353 ! by Zweck and Huybrechts, 2005).
354 ! -----------------------------------------------------------------
355 ! V2.6: New module for ISMIP HEINO included (defined by macro
356 ! HEINO).
357 ! -----------------------------------------------------------
358 ! Additional output of the basal frictional heating in the
359 ! time-series file for the ice-core locations.
360 ! -----------------------------------------------------------
361 ! All constants throughout the program defined consistently
362 ! as double-precision constants.
363 ! -----------------------------------------------------------
364 ! New global parameters pi, pi_inv, pi_180, pi_180_inv, eps.
365 ! -----------------------------------------------------------------
366 ! V2.7: Special treatment for the chasms of the Martian NPC (Chasma
367 ! Borealis) and SPC (Chasma Australis) implemented (optional,
368 ! parameter CHASM==2). Chasm regions defined in additional
369 ! mask file -> larger geothermal heat flux and wind erosion
370 ! rate active within prescribed time interval (specified in
371 ! header file).
372 ! -----------------------------------------------------------
373 ! ISMIP HEINO: Time-series output for the sediment region
374 ! ("Hudson Bay, Hudson Strait") in new file runname.sed.
375 ! -----------------------------------------------------------
376 ! Improved restart: Time derivatives dzs_dtau, dzm_dtau,
377 ! dzb_dtau, dH_c_dtau and dH_t_dtau written to time-slice
378 ! files and read by restart routine topography3. Further,
379 ! Q_b_tot is computed as the sum of Q_bm and Q_tld in
380 ! initialization routine sico_init.
381 ! -----------------------------------------------------------
382 ! In addition to Q_b_tot (formerly called Q_mean), now also
383 ! limitations of Q_bm and Q_tld with the same lower and upper
384 ! limits, QB_MIN and QB_MAX, respectively.
385 ! -----------------------------------------------------------
386 ! In subroutine output2 Reinhard Calov's method for computing
387 ! the ice equivalent of the water volume below the sea level
388 ! (V_ges_redu) implemented.
389 ! -----------------------------------------------------------------
390 ! V2.7.1: Martian ice caps (NMARS, SMARS):
391 ! New topography inputs based on the MOLA MEGDR data with
392 ! 64 pix/deg resolution. Optional horizontal resolutions
393 ! 20, 10 or 5 km.
394 ! -----------------------------------------------------------------
395 ! V2.7.2: x and y coordinates of the origin point (i,j) = (0,0)
396 ! now defined in header file as X0 and Y0.
397 ! ---------------------------------------------------------
398 ! Optional computation of the evolution of the free
399 ! surface as usual (parameter ZS_EVOL==1),
400 ! or keeping the free surface fixed on the initial
401 ! topography (parameter ZS_EVOL==0).
402 ! ---------------------------------------------------------
403 ! Greenland:
404 ! Update of the ice-core positions according to Dahl-Jensen
405 ! (pers. comm. 2006) and inclusion of the planned NEEM
406 ! core.
407 ! ---------------------------------------------------------
408 ! Martian ice caps (NMARS, SMARS):
409 ! New version of module instemp for the LIT scheme
410 ! implemented.
411 ! -----------------------------------------------------------------
412 ! V2.8: Greenland:
413 ! Optional special sliding law for the North-East Greenland
414 ! Ice Stream NEGIS (parameter ICE_STREAM==2).
415 ! Surface meltwater effect on basal sliding implemented.
416 ! -----------------------------------------------------------
417 ! ISMIP HEINO:
418 ! Optional 25-km resolution implemented (in addition to the
419 ! standard resolution of 50 km).
420 ! -----------------------------------------------------------
421 ! Antarctica:
422 ! Re-formatting and re-naming of the input data (now same
423 ! style and units like for Greenland). Topography input newly
424 ! created from RAMPDEM V2 and BEDMAP data-sets, with an
425 ! additional 20-km resolution implemented.
426 ! -----------------------------------------------------------------
427 ! V2.8.1: Northern-hemisphere module reintroduced, topography
428 ! files newly created for horizontal resolutions of
429 ! 80, 40 and 20 km.
430 ! ---------------------------------------------------------
431 ! Explicit introduction of the evaporation (variable evap).
432 ! In the modules for the terrestrial ice sheets, evap is
433 ! set to zero, whereas in the modules for the Martian
434 ! ice caps, evap accounts for the entire ablation.
435 ! ---------------------------------------------------------
436 ! ISMIP HEINO:
437 ! Introduction of the option ANF_DAT==1, which defines the
438 ! initial topography as a thin ice layer (with a thickness
439 ! of 2*H_MIN) everywhere on the land area.
440 ! -----------------------------------------------------------------
441 ! V2.9: New module for Tibet included (defined by macro TIBET).
442 ! -----------------------------------------------------------
443 ! Greenland:
444 ! Parameterization for the surface meltwater effect on basal
445 ! sliding changed; additional dependence on ice thickness
446 ! and possible nonlinear dependence on runoff.
447 ! -----------------------------------------------------------
448 ! Topography files (for zs, zb, zb0, mask) can now be
449 ! specified in the header file.
450 ! -----------------------------------------------------------------
451 ! V3.0: Handling of ice shelf and marine ice dynamics.
452 ! -----------------------------------------------------------
453 ! SeaRISE set-up implemented.
454 ! -----------------------------------------------------------
455 ! Changing water load now considered for the LLRA model
456 ! (REBOUND==1) in the same way as for the ELRA model.
457 ! -----------------------------------------------------------
458 ! Optional output of time-slice files in NetCDF format
459 ! (controlled by parameter NETCDF).
460 ! -----------------------------------------------------------
461 ! Name of the physical-parameter file is now specified in
462 ! the header file.
463 ! -----------------------------------------------------------
464 ! New module 'sico_types' for declarations of kind types
465 ! introduced.
466 ! -----------------------------------------------------------
467 ! Subroutine 'calc_top':
468 ! Diffusive smoothing scheme for zs_neu deleted.
469 ! -----------------------------------------------------------
470 ! Introduction of module Austfonna (ASF) available at 1, 2
471 ! and 4 km horizontal resolution - Thorben Dunse.
472 ! Output5.F90 writes time-series data at specific surface
473 ! points.
474 ! -----------------------------------------------------------
475 ! Stereographic projection changed from a spherical planet
476 ! to an ellipsoidal planet.
477 ! -----------------------------------------------------------------
478 ! V3.1: Discretisation of the horizontal and vertical advection
479 ! terms in the 3-d temperature and age equations:
480 ! Improved upwind scheme implemented that uses interpolated
481 ! velocities on the main grid (ADV_HOR==3, ADV_VERT==3).
482 ! -----------------------------------------------------------
483 ! Slightly improved boundary and transition conditions for
484 ! the computation of the age.
485 ! -----------------------------------------------------------
486 ! Index order of 2-d and 3-d arrays in the time-slice output
487 ! files *.nc (netCDF) and *.erg (native binary) changed:
488 ! (j,i) -> (i,j), (kc/t/r,j,i) -> (i,j,kc/t/r).
489 ! Output time units changed from seconds to years.
490 ! -----------------------------------------------------------
491 ! Routines that use Lis changed such that they are compatible
492 ! with Lis version 1.4.13 and newer.
493 ! -----------------------------------------------------------
494 ! Solvers for systems of linear equations assembled in the
495 ! new module sico_sle_solvers.
496 ! -----------------------------------------------------------
497 ! All subroutines and functions are now included in the main
498 ! program sicopolis following a 'contains' statement.
499 ! -----------------------------------------------------------
500 ! Intent attributes inserted in all subroutines and
501 ! functions.
502 ! -----------------------------------------------------------
503 ! New topography input data for Antarctica (BEDMAP2) and
504 ! Greenland (Bamber Version 2).
505 ! -----------------------------------------------------------
506 ! New input data for the geothermal heat flux for Antarctica
507 ! and Greenland [Michael Purucker (pers. comm. 2012), based
508 ! on Fox Maule et al., (2005)].
509 ! -----------------------------------------------------------------
510 ! V3.2: Two different enthalpy methods implemented:
511 ! conventional one-layer enthalpy method (ENTC, CALCMOD==2),
512 ! melting-CTS one-layer enthalpy method (ENTM, CALCMOD==3).
513 ! -----------------------------------------------------------
514 ! New option for the treatment of the transition conditions
515 ! at the CTS in the polythermal method (CALCMOD==1):
516 ! CTS_MELTING_FREEZING==1 -> melting and freezing conditions
517 ! distinguished (as before),
518 ! CTS_MELTING_FREEZING==2 -> always melting conditions
519 ! assumed (new default).
520 ! -----------------------------------------------------------
521 ! New routine init_temp_water_age added for setting the
522 ! initial ice temperature, water content and age.
523 ! New option TEMP_INIT==4: initial ice-temperature profiles
524 ! from analytical solution for 1-d steady-state
525 ! advection-diffusion equation.
526 ! -----------------------------------------------------------
527 ! Hybrid SIA/SStA dynamics for ice streams implemented
528 ! (DYNAMICS==2).
529 ! [SIA = shallow ice approximation,
530 ! SStA = shelfy stream approximation.]
531 ! -----------------------------------------------------------
532 ! Options for an anisotropic scalar flow enhancement factor
533 ! implemented: ENHMOD==4 for grounded ice only, ENHMOD==5
534 ! for grounded and floating ice.
535 ! -----------------------------------------------------------
536 ! Parameterisation for Antarctic ice-shelf basal melting
537 ! implemented (FLOATING_ICE_BASAL_MELTING==4)
538 ! [Ben Galton-Fenzi (pers. comm. 2014, 2015)].
539 ! -----------------------------------------------------------
540 ! Glacial isostasy: Flexural rigidity of the lithosphere
541 ! and time lag of the relaxing asthenosphere can either
542 ! be constant (FLEX_RIG_MOD==1, TIME_LAG_MOD==1) or
543 ! spatially varying (FLEX_RIG_MOD==2, TIME_LAG_MOD==2).
544 ! -----------------------------------------------------------
545 ! Domain XYZ: Framework that allows creating new domains.
546 ! ISMIP HEINO is now treated as one possible XYZ domain.
547 ! *****************************************************************
548 !
549 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
550 
551 !-------- Include specification header --------
552 
553 #include "sico_specs.h"
554 
555 !-------- Include kind-type and global-variable modules --------
556 
557 #include "subroutines/general/sico_types.F90"
558 #include "subroutines/general/sico_variables.F90"
559 
560 #if (defined(ANT))
561 #include "subroutines/ant/sico_vars.F90"
562 #elif (defined(ASF))
563 #include "subroutines/asf/sico_vars.F90"
564 #elif (defined(EMTP2SGE))
565 #include "subroutines/emtp2sge/sico_vars.F90"
566 #elif (defined(GRL))
567 #include "subroutines/grl/sico_vars.F90"
568 #elif (defined(NHEM))
569 #include "subroutines/nhem/sico_vars.F90"
570 #elif (defined(NMARS))
571 #include "subroutines/nmars/sico_vars.F90"
572 #elif (defined(SCAND))
573 #include "subroutines/scand/sico_vars.F90"
574 #elif (defined(SMARS))
575 #include "subroutines/smars/sico_vars.F90"
576 #elif (defined(TIBET))
577 #include "subroutines/tibet/sico_vars.F90"
578 #elif (defined(XYZ))
579 #include "subroutines/xyz/sico_vars.F90"
580 #endif
581 
582 !-------- Include module that provides the material quantities of ice:
583 ! rate factor, heat conductivity, specific heat (heat capacity) --------
584 
585 #include "subroutines/general/ice_material_quantities.F90"
586 
587 !-------- Include module that contains the solvers for systems
588 ! of linear equations --------
589 
590 #include "subroutines/general/sico_sle_solvers.F90"
591 
592 !-------- Include NetCDF error capturing module --------
593 
594 #if (NETCDF > 1)
595 #include "subroutines/general/nc_check.F90"
596 #endif
597 
598 !-------- Include module that provides functions for the conversion from
599 ! temperature and water content to enthalpy and vice versa --------
600 
601 #include "subroutines/general/enth_temp_omega.F90"
602 
603 !-------- Include Bjoern Grieger's module for the surface-temperature
604 ! parameterisation for the Martian ice caps --------
605 
606 #if (defined(NMARS))
607 #include "subroutines/nmars/instemp.f90"
608 #elif (defined(SMARS))
609 #include "subroutines/smars/instemp.f90"
610 #endif
611 
612 !-------------------------------------------------------------------------------
613 !> Main program of SICOPOLIS.
614 !<------------------------------------------------------------------------------
615 program sicopolis
616 
617 !-------- Description of variables declared locally --------
618 
619 ! i : Index for coordinate xi
620 ! j : Index for coordinate eta
621 ! kc : Index for coordinate zeta_c
622 ! kt : Index for coordinate zeta_t
623 ! kr : Index for coordinate zeta_r
624 ! (in the bedrock)
625 ! ios : IOSTAT variable for files
626 ! itercount : Counter for the time steps
627 ! ndat2d/3d : Counters for the time-slice files
628 ! n_output : For OUTPUT==2 number of time-slice files
629 ! to be produced
630 ! dH_t_smooth(j,i) : Amount of smoothing of H_t
631 ! delta_ts : Time-dependent surface-temperature variation
632 ! glac_index : Time-dependent glacial index
633 ! forcing_flag : 1 - forcing by delta_ts, 2 - forcing by glac_index
634 ! z_sl : Sea level
635 ! dzsl_dtau : Derivative of z_sl by tau (time)
636 ! precip_mam_present(j,i) : Measured present spring precipitation
637 ! precip_jja_present(j,i) : Measured present summer precipitation
638 ! precip_son_present(j,i) : Measured present autumn precipitation
639 ! precip_djf_present(j,i) : Measured present winter precipitation
640 ! temp_mam_present(j,i) : Present spring surface temperature
641 ! from data
642 ! temp_jja_present(j,i) : Present summer surface temperature
643 ! from data
644 ! temp_son_present(j,i) : Present autumn surface temperature
645 ! from data
646 ! temp_djf_present(j,i) : Present winter surface temperature
647 ! from data
648 ! mean_accum : Mean present accumulation over land
649 ! time : Current time of simulation
650 ! time_init : Initial time of simulation
651 ! time_end : Final time of simulation
652 ! dtime : Time step for computation of velocity and
653 ! topography
654 ! dtime_temp : Time step for computation of temperature,
655 ! water content and age of the ice
656 ! dtime_wss : Time step for computation of isostatic steady-state
657 ! displacement of the lithosphere (ELRA model)
658 ! dtime_out : Time step for output of time-slice files
659 ! dtime_ser : Time step for writing of data in time-series
660 ! file
661 ! time_output(n) : For OUTPUT==2 specified times for output of
662 ! time-slice files
663 ! (.)0 : Quantity (.) before its conversion to MKS units
664 ! dxi : Grid spacing in x-direction
665 ! deta : Grid spacing in y-direction
666 ! dzeta_c : Grid spacing in z-direction in the upper (kc) ice domain
667 ! (in sigma-coordinate zeta_c)
668 ! dzeta_t : Grid spacing in z-direction in the lower (kt) ice domain
669 ! (in sigma-coordinate zeta_t)
670 ! dzeta_r : Grid spacing in z-direction in the bedrock (kr) domain
671 ! (in sigma-coordinate zeta_r)
672 ! runname : Name of simulation
673 ! anfdatname : Name of initial-value file
674 ! (only for ANF_DAT==3)
675 ! datname : Auxiliary string for generation of file names
676 
677 !-------- Declaration of variables --------
678 
679 use sico_types
680 use sico_variables
681 use sico_vars
682 
683 implicit none
684 
685 integer(i4b) :: ndat2d, ndat3d
686 integer(i4b) :: n_output
687 integer(i4b), dimension((IMAX+1)*(JMAX+1)) :: ii, jj
688 integer(i4b), dimension(0:JMAX,0:IMAX) :: nn
689 real(dp) :: delta_ts, glac_index
690 real(dp) :: mean_accum
691 real(dp) :: dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser
692 real(dp) :: time, time_init, time_end
693 real(dp), dimension(100) :: time_output
694 real(dp) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
695 real(dp) :: z_sl, dzsl_dtau, z_mar
696 character(len=100) :: runname
697 
698 !-------- Initialisations --------
699 
700 call sico_init(delta_ts, glac_index, &
701  mean_accum, &
702  dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, &
703  time, time_init, time_end, time_output, &
704  dxi, deta, dzeta_c, dzeta_t, dzeta_r, &
705  z_sl, dzsl_dtau, z_mar, &
706  ii, jj, nn, &
707  ndat2d, ndat3d, n_output, &
708  runname)
709 
710 !-------- Main loop --------
711 
712 call sico_main_loop(delta_ts, glac_index, &
713  mean_accum, &
714  dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, &
715  time, time_init, time_end, time_output, &
716  dxi, deta, dzeta_c, dzeta_t, dzeta_r, &
717  z_sl, dzsl_dtau, z_mar, &
718  ii, jj, nn, &
719  ndat2d, ndat3d, n_output, &
720  runname)
721 
722 !-------- Endings --------
723 
724 call sico_end()
725 
726 !-------- Include subroutines --------
727 
728 contains
729 
730 #if (defined(NHEM))
731 #include "subroutines/nhem/sico_init.F90"
732 #elif (defined(SCAND))
733 #include "subroutines/scand/sico_init.F90"
734 #elif (defined(GRL))
735 #include "subroutines/grl/sico_init.F90"
736 #elif (defined(NMARS))
737 #include "subroutines/nmars/sico_init.F90"
738 #elif (defined(SMARS))
739 #include "subroutines/smars/sico_init.F90"
740 #elif (defined(EMTP2SGE))
741 #include "subroutines/emtp2sge/sico_init.F90"
742 #elif (defined(ANT))
743 #include "subroutines/ant/sico_init.F90"
744 #elif (defined(TIBET))
745 #include "subroutines/tibet/sico_init.F90"
746 #elif (defined(ASF))
747 #include "subroutines/asf/sico_init.F90"
748 #elif (defined(XYZ))
749 #include "subroutines/xyz/sico_init.F90"
750 #endif
751 
752 #include "subroutines/general/sico_main_loop.F90"
753 #include "subroutines/general/sico_end.F90"
754 
755 #if (defined(NHEM))
756 #include "subroutines/nhem/phys_para.F90"
757 #elif (defined(SCAND))
758 #include "subroutines/scand/phys_para.F90"
759 #elif (defined(GRL))
760 #include "subroutines/grl/phys_para.F90"
761 #elif (defined(NMARS))
762 #include "subroutines/nmars/phys_para.F90"
763 #elif (defined(SMARS))
764 #include "subroutines/smars/phys_para.F90"
765 #elif (defined(EMTP2SGE))
766 #include "subroutines/emtp2sge/phys_para.F90"
767 #elif (defined(ANT))
768 #include "subroutines/ant/phys_para.F90"
769 #elif (defined(TIBET))
770 #include "subroutines/tibet/phys_para.F90"
771 #elif (defined(ASF))
772 #include "subroutines/asf/phys_para.F90"
773 #elif (defined(XYZ))
774 #include "subroutines/xyz/phys_para.F90"
775 #endif
776 
777 #include "subroutines/general/read_phys_para_value.F90"
778 #include "subroutines/general/read_kei.F90"
779 
780 #if (defined(NHEM))
781 #include "subroutines/nhem/topography2.F90"
782 #include "subroutines/nhem/topography3.F90"
783 #if (NETCDF > 1)
784 #include "subroutines/nhem/topography3_nc.F90"
785 #endif
786 #elif (defined(SCAND))
787 #include "subroutines/scand/topography2.F90"
788 #include "subroutines/scand/topography3.F90"
789 #if (NETCDF > 1)
790 #include "subroutines/scand/topography3_nc.F90"
791 #endif
792 #elif (defined(GRL))
793 #include "subroutines/grl/topography1.F90"
794 #include "subroutines/grl/topography2.F90"
795 #include "subroutines/grl/topography3.F90"
796 #if (NETCDF > 1)
797 #include "subroutines/grl/topography3_nc.F90"
798 #if (ZS_EVOL==2)
799 #include "subroutines/grl/read_target_topo_nc.F90"
800 #endif
801 #endif
802 #elif (defined(NMARS))
803 #include "subroutines/nmars/topography1.F90"
804 #include "subroutines/nmars/topography2.F90"
805 #include "subroutines/nmars/topography3.F90"
806 #if (NETCDF > 1)
807 #include "subroutines/nmars/topography3_nc.F90"
808 #endif
809 #elif (defined(SMARS))
810 #include "subroutines/smars/topography1.F90"
811 #include "subroutines/smars/topography2.F90"
812 #include "subroutines/smars/topography3.F90"
813 #if (NETCDF > 1)
814 #include "subroutines/smars/topography3_nc.F90"
815 #endif
816 #elif (defined(EMTP2SGE))
817 #include "subroutines/emtp2sge/topography2.F90"
818 #include "subroutines/emtp2sge/topography3.F90"
819 #if (NETCDF > 1)
820 #include "subroutines/emtp2sge/topography3_nc.F90"
821 #endif
822 #elif (defined(ANT))
823 #include "subroutines/ant/topography1.F90"
824 #include "subroutines/ant/topography2.F90"
825 #include "subroutines/ant/topography3.F90"
826 #if (NETCDF > 1)
827 #include "subroutines/ant/topography3_nc.F90"
828 #if (ZS_EVOL==2)
829 #include "subroutines/ant/read_target_topo_nc.F90"
830 #endif
831 #endif
832 #elif (defined(TIBET))
833 #include "subroutines/tibet/topography2.F90"
834 #include "subroutines/tibet/topography3.F90"
835 #if (NETCDF > 1)
836 #include "subroutines/tibet/topography3_nc.F90"
837 #endif
838 #elif (defined(ASF))
839 #include "subroutines/asf/topography1.F90"
840 #include "subroutines/asf/topography2.F90"
841 #include "subroutines/asf/topography3.F90"
842 #if (NETCDF > 1)
843 #include "subroutines/asf/topography3_nc.F90"
844 #endif
845 #elif (defined(XYZ))
846 #include "subroutines/xyz/topography1.F90"
847 #include "subroutines/xyz/topography2.F90"
848 #include "subroutines/xyz/topography3.F90"
849 #if (NETCDF > 1)
850 #include "subroutines/xyz/topography3_nc.F90"
851 #endif
852 #endif
853 
854 #if (defined(NHEM))
855 #include "subroutines/nhem/boundary.F90"
856 #elif (defined(SCAND))
857 #include "subroutines/scand/boundary.F90"
858 #elif (defined(GRL))
859 #include "subroutines/grl/boundary.F90"
860 #elif (defined(NMARS))
861 #include "subroutines/nmars/boundary.F90"
862 #elif (defined(SMARS))
863 #include "subroutines/smars/boundary.F90"
864 #elif (defined(EMTP2SGE))
865 #include "subroutines/emtp2sge/boundary.F90"
866 #elif (defined(ANT))
867 #include "subroutines/ant/boundary.F90"
868 #elif (defined(TIBET))
869 #include "subroutines/tibet/boundary.F90"
870 #elif (defined(ASF))
871 #include "subroutines/asf/boundary.F90"
872 #elif (defined(XYZ))
873 #include "subroutines/xyz/boundary.F90"
874 #endif
875 
876 #include "subroutines/general/mask_update.F90"
877 #include "subroutines/general/pdd.F90"
878 #include "subroutines/general/erfcc.F90"
879 #include "subroutines/general/init_temp_water_age.F90"
880 #include "subroutines/general/calc_temp_poly.F90"
881 #include "subroutines/general/calc_temp_cold.F90"
882 #include "subroutines/general/calc_temp_const.F90"
883 #if (CALCMOD==2 || CALCMOD==3)
884 #include "subroutines/general/calc_temp_enth.F90"
885 #include "subroutines/general/calc_temp_enth_1.F90"
886 #include "subroutines/general/calc_temp_enth_2.F90"
887 #endif
888 #include "subroutines/general/calc_temp1.F90"
889 #include "subroutines/general/calc_temp2.F90"
890 #include "subroutines/general/calc_temp3.F90"
891 #include "subroutines/general/calc_temp_r.F90"
892 #include "subroutines/general/shift_cts_upward.F90"
893 #include "subroutines/general/shift_cts_downward.F90"
894 #include "subroutines/general/calc_enhance.F90"
895 #include "subroutines/general/calc_vxy_b_sia.F90"
896 #include "subroutines/general/calc_vxy_sia.F90"
897 #include "subroutines/general/calc_vz_sia.F90"
898 #include "subroutines/general/calc_vxy_static.F90"
899 #include "subroutines/general/calc_vz_static.F90"
900 #if (MARGIN==3 || DYNAMICS==2)
901 #include "subroutines/general/calc_temp_ssa.F90"
902 #if (CALCMOD==2 || CALCMOD==3)
903 #include "subroutines/general/calc_temp_enth_ssa.F90"
904 #endif
905 #include "subroutines/general/calc_vxy_ssa.F90"
906 #include "subroutines/general/calc_vxy_ssa_matrix.F90"
907 #include "subroutines/general/calc_vis_ssa.F90"
908 #include "subroutines/general/calc_vz_ssa.F90"
909 #include "subroutines/general/viscosity.F90"
910 #endif
911 #include "subroutines/general/calc_dxyz.F90"
912 #include "subroutines/general/calc_qbm.F90"
913 #if (defined(ANT))
914 #include "subroutines/ant/sub_ice_shelf_melting_param.F90"
915 #endif
916 #include "subroutines/general/calc_water_bas.F90"
917 #include "subroutines/general/calc_gia.F90"
918 #include "subroutines/general/calc_top_1.F90"
919 #include "subroutines/general/calc_top_2.F90"
920 #include "subroutines/general/calc_top_3.F90"
921 #include "subroutines/general/calc_elra.F90"
922 #include "subroutines/general/topograd_1.F90"
923 #include "subroutines/general/topograd_2.F90"
924 #include "subroutines/general/calc_temp_melt.F90"
925 #include "subroutines/general/calc_temp_bas.F90"
926 #include "subroutines/general/creep.F90"
927 #include "subroutines/general/metric.F90"
928 #include "subroutines/general/geo_coord.F90"
929 #include "subroutines/general/num_coord.F90"
930 #include "subroutines/general/output1.F90"
931 #include "subroutines/general/output2.F90"
932 #include "subroutines/general/output3.F90"
933 #include "subroutines/general/output4.F90"
934 
935 #if (defined(ASF))
936 #include "subroutines/asf/output5.F90"
937 #endif
938 
939 #if (NETCDF > 1)
940 #include "subroutines/general/output_nc.F90"
941 #endif
942 
943 #include "subroutines/general/borehole.F90"
944 
945 #if (defined(EXEC_MAKE_ZL0))
946 #include "subroutines/general/make_zl0.F90"
947 #endif
948 
949 !-------- End of program --------
950 
951 end program sicopolis
952 
953 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
954 ! End of sicopolis.F90
955 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
956 !
subroutine sico_end()
Ending of SICOPOLIS.
Definition: sico_end.F90:35
Declarations of kind types for SICOPOLIS.
Definition: sico_types.F90:35
program sicopolis
Main program of SICOPOLIS.
Definition: sicopolis.F90:615
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars.F90:35
subroutine sico_main_loop(delta_ts, glac_index, mean_accum, dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, time, time_init, time_end, time_output, dxi, deta, dzeta_c, dzeta_t, dzeta_r, z_sl, dzsl_dtau, z_mar, ii, jj, nn, ndat2d, ndat3d, n_output, runname)
Main loop of SICOPOLIS.
subroutine sico_init(delta_ts, glac_index, mean_accum, dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, time, time_init, time_end, time_output, dxi, deta, dzeta_c, dzeta_t, dzeta_r, z_sl, dzsl_dtau, z_mar, ii, jj, nn, ndat2d, ndat3d, n_output, runname)
Initialisations for SICOPOLIS.
Definition: sico_init.F90:35
Declarations of global variables for SICOPOLIS.