Module iceflow
This IGM module models ice flow dynamics in 3D using a Convolutional Neural Network (CNN) based on a Physics-Informed Neural Network (PINN), as described in [1]. Specifically, the CNN is trained to minimize the energy associated with high-order ice flow equations during the time iterations of a glacier evolution model. Consequently, it serves as a computationally efficient alternative to traditional solvers, capable of handling diverse ice flow regimes. Check at the IGM technical paper for further details [1].
[1] Concepts and capabilities of the Instructed Glacier Model 3.X.X, Jouvet and al.
Pre-trained emulators are provided by default. However, one may start from scratch by setting processes.iceflow.emulator.name="". The key parameters to consider in this case are:
- Physical parameters:
"processes.iceflow.physics.init_slidingco": 0.045 # Init slid. coeff. ($Mpa y^{1/3} m^{-1/3}$)
"processes.iceflow.physics.init_arrhenius": 78.0 # Init Arrhenius cts ($Mpa^{-3} y^{-1}$)
"processes.iceflow.physics.exp_glen": 3 # Glen's exponent
"processes.iceflow.physics.exp_weertman": 3 # Weertman's sliding law exponent
- Numerical parameters for the vertical discretization:
"processes.iceflow.numerics.Nz": 10 # number of vertical layers
"processes.iceflow.numerics.vert_spacing": 4.0 # 1.0 for equal vertical spacing, 4.0 otherwise
Note that in the special case of \(Nz=2\), the ice velocity profile from the bottom to the top of the ice is assumed to vary polynomially following the Shallow Ice Approximation (SIA) formula. In the case of a single layer \(Nz=1\), the ice flow is assumed to be vertically uniform, and the ice flow model reduces to the Shallow Shelf Approximation (SSA).
- Learning rate and frequency of retraining:
While this module was targeted for deep learning emulation, it is possible to use the solver (processes.iceflow.method='solved') instead of the default (processes.iceflow.method='emulated'), or use the two together (processes.iceflow.method='diagnostic') to assess the emulator against the solver. The most important parameters for solving are:
One may choose between a 2D Arrhenius factor or a 3D Arrhenius factor by setting the parameter processes.iceflow.dim_arrhenius to 2 or 3, respectively. The 3D option is required for the enthalpy model.
When treating very large arrays, retraining must be done sequentially in a patch-wise manner due to memory constraints. The size of the patch is controlled by the parameter processes.iceflow.multiple_window_size=750.
Contributors: G. Jouvet
Config Structure
iceflow:
method: emulated
force_max_velbar: 0.0
physics:
energy_components: [viscosity, gravity, sliding]
sliding:
law: weertman
weertman:
regu: 1.0e-10
exponent: 3.0
coulomb:
regu: 1.0e-10
exponent: 3.0
mu: 0.4
budd:
regu: 1.0e-10
exponent: 3.0
gravity_cst: 9.81
ice_density: 910.0
water_density: 1000.0
init_slidingco: 0.0464 # do we need this anymore?
init_arrhenius: 78.0
enhancement_factor: 1.0
exp_glen: 3.0
regu_glen: 1.0e-05
dim_arrhenius: 2
thr_ice_thk: 0.1
min_sr: 1.0e-20
max_sr: 1.0e+20
force_negative_gravitational_energy: false
cf_eswn: []
numerics:
precision: single
ord_grad_u: l2_weighted
ord_grad_theta: l2_weighted
Nz: 10
vert_spacing: 4.0
staggered_grid: 1
vert_basis: Lagrange
solver:
step_size: 1.0
nbitmax: 100
optimizer: adam
print_cost: false
fieldin: [thk, usurf, arrhenius, slidingco, dX]
emulator:
fieldin: [thk, usurf, arrhenius, slidingco, dX]
retrain_freq: 10
print_cost: false
lr: 2.0e-05
lr_init: 0.0001
lr_decay: 0.95
warm_up_it: -10000000000.0
nbit_init: 1
nbit: 1
framesizemax: 750
split_patch_method: sequential
pretrained: true
name: ''
save_model: false
exclude_borders: 0
optimizer: Adam
optimizer_clipnorm: 1.0
optimizer_epsilon: 1.0e-07
save_cost: ''
output_directory: ''
plot_sol: False
pertubate: false
network:
architecture: cnn
multiple_window_size: 0
activation: LeakyReLU
nb_layers: 16
nb_blocks: 4
nb_out_filter: 32
conv_ker_size: 3
dropout_rate: 0.0
weight_initialization: glorot_uniform
cnn3d_for_vertical: false
batch_norm: false
l2_reg: 0.0
separable: false
residual: true
diagnostic:
save_freq: 1
filename_metrics: diagnostic_metrics.txt
unified:
mapping: network
bcs: []
optimizer: adam
nbit: 1
nbit_init: 1
nbit_warmup: -1
retrain_freq: 10
adam:
lr: 2.0e-05
lr_init: 0.0001
lr_decay: 1.0
lr_decay_steps: 1000
optimizer_clipnorm: 1.0
lbfgs:
memory: 10
alpha_min: 0.0
sequential:
stages: []
line_search: hager-zhang
inputs: [thk, usurf, arrhenius, slidingco, dX]
normalization:
method: adaptive
fixed:
inputs_offsets:
thk: 0.0
usurf: 0.0
arrhenius: 0.0
slidingco: 0.0
dX: 0.0
X: 0.0
Y: 0.0
inputs_variances:
thk: 1.0
usurf: 1.0
arrhenius: 1.0
slidingco: 1.0
dX: 1.0
X: 1.0
Y: 1.0
network:
debug_mode: false
debug_freq: 100
pretrained: true
print_summary: false
output_scale: 1.0
architecture: CNN
data_preparation:
patch_size: 1000
overlap: 0.0
batch_size: 32
rotation_probability: 0.0
flip_probability: 0.0
noise_type: none
noise_scale: 0.0
target_samples: 1
halt:
freq: 1
success: []
failure: []
criteria:
rel_tol:
tol: 1e-3
ord: l2
abs_tol:
tol: 1e-3
ord: l2_weighted
patience:
patience: 100
inf: {}
nan: {}
metrics:
theta: {}
u: {}
cost: {}
grad_u_norm: {}
grad_theta_norm: {}
display:
print_cost: false
print_cost_freq: 1
Parameters
| Name | Type | Units | Description | Default Value |
|---|---|---|---|---|
| method | string | \( dimless \) | Type of method to determine the ice flow: emulated, solved, diagnostic, unified. | emulated |
| force_max_velbar | float | \( m y^{-1} \) | Upper-bound value for the velocities; applied if strictly positive. | 0.0 |
| physics.energy_components | list | \( dimless \) | List of energy components to compute; the available components are: gravity, viscosity, sliding. | ['viscosity', 'gravity', 'sliding'] |
| physics.sliding.law | string | \( dimless \) | Type of sliding law. | weertman |
| physics.sliding.weertman.regu | float | \( m y^{-1} \) | Regularization parameter for velocity magnitude. | 1e-10 |
| physics.sliding.weertman.exponent | float | \( dimless \) | Weertman exponent. | 3.0 |
| physics.sliding.coulomb.regu | float | \( m y^{-1} \) | Regularization parameter for velocity magnitude. | 1e-10 |
| physics.sliding.coulomb.exponent | float | \( dimless \) | Coulomb exponent. | 3.0 |
| physics.sliding.coulomb.mu | float | \( dimless \) | Till coefficient. | 0.4 |
| physics.sliding.budd.regu | float | \( m y^{-1} \) | Regularization parameter for velocity magnitude. | 1e-10 |
| physics.sliding.budd.exponent | float | \( dimless \) | Budd exponent. | 3.0 |
| physics.gravity_cst | float | \( m s^{-2} \) | Gravitational constant. | 9.81 |
| physics.ice_density | float | \( kg m^{-3} \) | Density of ice. | 910.0 |
| physics.water_density | float | \( kg m^{-3} \) | Density of water. | 1000.0 |
| physics.init_slidingco | float | \( MPa y^{m} m^{-m} \) | Initial value for the sliding coefficient. | 0.0464 |
| physics.init_arrhenius | float | \( MPa^{-n} y^{-1} \) | Initial value for the Arrhenius factor in Glen's flow law. | 78.0 |
| physics.enhancement_factor | float | \( dimless \) | Enhancement factor in Glen's flow law: prefactor multiplying the arrhenius factor. | 1.0 |
| physics.exp_glen | float | \( dimless \) | Glen's flow law exponent. | 3.0 |
| physics.regu_glen | float | \( dimless \) | Regularization parameter for Glen's flow law. | 1e-05 |
| physics.dim_arrhenius | integer | \( dimless \) | Dimension of the Arrhenius factor; 2 for 2D, 3 for 3D. | 2 |
| physics.thr_ice_thk | float | \( m \) | Minimal value for the ice thickness in the strain-rate computation. | 0.1 |
| physics.min_sr | float | \( y^{-1} \) | Minimal value for the strain rate. | 1e-20 |
| physics.max_sr | float | \( y^{-1} \) | Maximum value for the strain rate. | 1e+20 |
| physics.force_negative_gravitational_energy | boolean | \( dimless \) | Force the gravitational energy term to be negative. | False |
| physics.cf_eswn | list | \( dimless \) | This forces calving front at the border of the domain in the side given in the list. | [] |
| numerics.precision | string | \( dimless \) | Precision type for the fields: single, double. | single |
| numerics.ord_grad_u | string | \( dimless \) | Default type of norm used for the halt critera associated with the velocity. | l2_weighted |
| numerics.ord_grad_theta | string | \( dimless \) | Default type of norm used for the halt critera associated with the parameters. | l2_weighted |
| numerics.Nz | integer | \( dimless \) | Number of grid points for the vertical discretization. | 10 |
| numerics.vert_spacing | float | \( dimless \) | Parameter controlling the discretization density to get more points near the bed than near the surface; a value 1.0 means uniform vertical spacing. | 4.0 |
| numerics.staggered_grid | integer | \( dimless \) | Type of staggering for the horizontal discretization. | 1 |
| numerics.vert_basis | string | \( dimless \) | Basis for the vertical discretization. | Lagrange |
| solver.step_size | float | \( dimless \) | Step size for the optimizer. | 1.0 |
| solver.nbitmax | integer | \( dimless \) | Maximum number of iterations for the optimizer. | 100 |
| solver.optimizer | string | \( dimless \) | Type of optimizer. | adam |
| solver.print_cost | boolean | \( dimless \) | Display the cost during the optimization. | False |
| solver.fieldin | list | \( dimless \) | Input fields of the ice-flow solver. | ['thk', 'usurf', 'arrhenius', 'slidingco', 'dX'] |
| emulator.fieldin | list | \( dimless \) | Input fields of the ice-flow emulator. | ['thk', 'usurf', 'arrhenius', 'slidingco', 'dX'] |
| emulator.retrain_freq | integer | \( dimless \) | Frequency at which the emulator is retrained. | 10 |
| emulator.print_cost | boolean | \( dimless \) | Display the cost during the optimization. | False |
| emulator.lr | float | \( dimless \) | Learning rate for the training of the emulator. | 2e-05 |
| emulator.lr_init | float | \( dimless \) | Initial learning rate for the training of the emulator. | 0.0001 |
| emulator.lr_decay | float | \( dimless \) | Decay learning-rate parameter for the training of the emulator. | 0.95 |
| emulator.warm_up_it | integer | \( dimless \) | Number of iterations for a warm-up period, allowing intense initial training. | -10000000000.0 |
| emulator.nbit_init | integer | \( dimless \) | Number of iterations done initially for the training of the emulator. | 1 |
| emulator.nbit | integer | \( dimless \) | Number of iterations done at each time step for the training of the emulator. | 1 |
| emulator.framesizemax | integer | \( dimless \) | Size of the patch used for training the emulator; this is useful for large size arrays as otherwise the GPU memory could be overloaded. | 750 |
| emulator.split_patch_method | string | \( dimless \) | Method to split the patch for the emulator: sequential (usefull for large size arrays) or parallel. | sequential |
| emulator.pretrained | boolean | \( dimless \) | Use a pretrained emulator instead of starting from scratch. | True |
| emulator.name | string | \( dimless \) | Directory path of the pretrained ice-flow emulator; taken from the library if this is empty. | |
| emulator.save_model | boolean | \( dimless \) | Save the ice-flow emulator at the end of the simulation. | False |
| emulator.exclude_borders | integer | \( dimless \) | Quick fix of the border issue; otherwise the emulator shows zero velocity at the border. | 0 |
| emulator.optimizer | string | \( dimless \) | Type of optimizer for the emulator. | Adam |
| emulator.optimizer_clipnorm | float | \( dimless \) | Maximum value for the gradient of each weight. | 1.0 |
| emulator.optimizer_epsilon | float | \( dimless \) | Small constant for numerical stability of the Adam optimizer. | 1e-07 |
| emulator.save_cost | string | \( dimless \) | Name of the file containing the cost. | |
| emulator.output_directory | string | \( dimless \) | Directory of the file containing the cost. | |
| emulator.plot_sol | boolean | \( dimless \) | Plot the solution of the emulator at each time step. | False |
| emulator.pertubate | boolean | \( dimless \) | Perturb the input fiels during the training. | False |
| emulator.network.architecture | string | \( dimless \) | Type of network: cnn, unet. | cnn |
| emulator.network.multiple_window_size | integer | \( dimless \) | For a U-Net, this requires the window size to be a multiple of 2 to the power N. | 0 |
| emulator.network.activation | string | \( dimless \) | Type of activation function: lrelu, relu, tanh, sigmoid, ... | LeakyReLU |
| emulator.network.nb_layers | integer | \( dimless \) | Number of layers in the network. | 16 |
| emulator.network.nb_blocks | integer | \( dimless \) | Number of block layers in the U-Net. | 4 |
| emulator.network.nb_out_filter | integer | \( dimless \) | Number of output filters in the network. | 32 |
| emulator.network.conv_ker_size | integer | \( dimless \) | Size of the convolution kernel. | 3 |
| emulator.network.dropout_rate | float | \( dimless \) | Dropout rate in the CNN. | 0.0 |
| emulator.network.weight_initialization | string | \( dimless \) | Initialization type for the network weights: glorot_uniform, he_normal, lecun_normal. | glorot_uniform |
| emulator.network.cnn3d_for_vertical | boolean | \( dimless \) | Apply a 3D CNN instead of a 2D one for each horizontal layer. | False |
| emulator.network.batch_norm | boolean | \( dimless \) | Apply a batch normalization layer. | False |
| emulator.network.l2_reg | float | \( dimless \) | Amount of l2 regularization penalty. | 0.0 |
| emulator.network.separable | boolean | \( dimless \) | Apply convolution layers that are separable. | False |
| emulator.network.residual | boolean | \( dimless \) | Apply residual layer. | True |
| diagnostic.save_freq | integer | \( dimless \) | Frequency of the saving of the metrics. | 1 |
| diagnostic.filename_metrics | string | \( dimless \) | Name of the file with the metrics. | diagnostic_metrics.txt |
| unified.mapping | string | \( dimless \) | Type of mapping between the weights and the velocity. | network |
| unified.bcs | list | \( dimless \) | List of the applied boundary conditions; the available bcs are: frozen_bed, periodic_ns, periodic_we. | [] |
| unified.optimizer | list | \( dimless \) | Type of optimizer used to solve the ice flow. | adam |
| unified.nbit | integer | \( dimless \) | Number of iterations done to solve the ice flow. | 1 |
| unified.nbit_init | integer | \( dimless \) | Number of iterations done initially to solve the ice flow. | 1 |
| unified.nbit_warmup | integer | \( dimless \) | Number of iterations done for a warm-up period to solve the ice flow, allowing intense initial training. | -1 |
| unified.retrain_freq | integer | \( dimless \) | Frequency at which the ice flow is solved. | 10 |
| unified.adam.lr | float | \( dimless \) | Learning rate for the Adam optimizer. | 2e-05 |
| unified.adam.lr_init | float | \( dimless \) | Initial learning rate for the Adam optimizer. | 0.0001 |
| unified.adam.lr_decay | float | \( dimless \) | Decay learning-rate parameter for the Adam optimizer. | 1.0 |
| unified.adam.lr_decay_steps | integer | \( dimless \) | Number of steps during which the decay learning rate is applied for the Adam optimizer. | 1000 |
| unified.adam.optimizer_clipnorm | float | \( dimless \) | Maximum value for the gradient of each weight. | 1.0 |
| unified.lbfgs.memory | integer | \( dimless \) | Number of saved iteration results for the L-BFGS optimizer. | 10 |
| unified.lbfgs.alpha_min | float | \( dimless \) | Minimal value for the step size in the line search. | 0.0 |
| unified.sequential.stages | list | \( dimless \) | List containing the optimizer configurations when using a sequential optimization approach. | [] |
| unified.line_search | string | \( dimless \) | Type of line-search method. | hager-zhang |
| unified.inputs | list | \( dimless \) | Input fields of the mapping for the ice flow. | ['thk', 'usurf', 'arrhenius', 'slidingco', 'dX'] |
| unified.normalization.method | adaptive | |||
| unified.normalization.fixed.inputs_offsets.thk | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.usurf | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.arrhenius | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.slidingco | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.dX | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.X | 0.0 | |||
| unified.normalization.fixed.inputs_offsets.Y | 0.0 | |||
| unified.normalization.fixed.inputs_variances.thk | 1.0 | |||
| unified.normalization.fixed.inputs_variances.usurf | 1.0 | |||
| unified.normalization.fixed.inputs_variances.arrhenius | 1.0 | |||
| unified.normalization.fixed.inputs_variances.slidingco | 1.0 | |||
| unified.normalization.fixed.inputs_variances.dX | 1.0 | |||
| unified.normalization.fixed.inputs_variances.X | 1.0 | |||
| unified.normalization.fixed.inputs_variances.Y | 1.0 | |||
| unified.network.debug_mode | False | |||
| unified.network.debug_freq | 100 | |||
| unified.network.pretrained | boolean | \( dimless \) | Use a pretrained network instead of starting from scratch. | True |
| unified.network.print_summary | boolean | \( dimless \) | Print a summary of the network. | False |
| unified.network.output_scale | float | \( dimless \) | Scale of the outputs of the network. | 1.0 |
| unified.network.architecture | string | \( dimless \) | Type of network. | CNN |
| unified.data_preparation.patch_size | integer | \( dimless \) | Size of a patch. | 1000 |
| unified.data_preparation.overlap | float | \( dimless \) | Fraction of overlap between the patches. | 0.0 |
| unified.data_preparation.batch_size | integer | \( dimless \) | Size of batch. | 32 |
| unified.data_preparation.rotation_probability | float | \( dimless \) | Probability of rotation. | 0.0 |
| unified.data_preparation.flip_probability | float | \( dimless \) | Probability of flip. | 0.0 |
| unified.data_preparation.noise_type | string | \( dimless \) | Type of noise. | none |
| unified.data_preparation.noise_scale | float | \( dimless \) | Scale of the noise. | 0.0 |
| unified.data_preparation.target_samples | integer | \( dimless \) | Target for the number of samples. | 1 |
| unified.halt.freq | integer | \( dimless \) | Frequency of evaluation of the halt criteria. | 1 |
| unified.halt.success | list | \( dimless \) | List of success criteria. | [] |
| unified.halt.failure | list | \( dimless \) | List of failure criteria. | [] |
| unified.halt.criteria.rel_tol.tol | float | \( dimless \) | Default tolerance for the relative-change criterion. | 1e-3 |
| unified.halt.criteria.rel_tol.ord | string | \( dimless \) | Default type of norm for the relative-change criterion. | l2 |
| unified.halt.criteria.abs_tol.tol | float | \( dimless \) | Default tolerance for the absolute-change criterion. | 1e-3 |
| unified.halt.criteria.abs_tol.ord | string | \( dimless \) | Default type of norm for the absolute-change criterion. | l2_weighted |
| unified.halt.criteria.patience.patience | integer | \( dimless \) | Default number of iteration without improvement before halting. | 100 |
| unified.display.print_cost | boolean | \( dimless \) | Print the cost during the ice-flow optimization. | False |
| unified.display.print_cost_freq | integer | \( dimless \) | Frequency of printing the cost during the ice-flow optimization. | 1 |