Temperature test

From Interactive System for Ice sheet Simulation
Jump to: navigation, search

For this test a new driver has to be developed. This is easier than designing a configuration file that turns everything but temperature evolutions off.

Contents

Geometry

A cylinder, with domain dependent radius and height 1500 m.The netcdf file that will be input into glimmer is generated from the following python script.

#!/usr/bin/env python
 
#Run with a command line argument that is the config file to read filenames and grid data from
 
import glimcdf
from math import sin,cos,tan,pi
import numpy
import sys
 
#Parse the config file to determine how to set up the netcdf file
nc, shape = glimcdf.nc_from_config(sys.argv[1])
 
#Create variables for topography and ice thickness
topg = glimcdf.setup_variable(nc, "topg")
thk = glimcdf.setup_variable(nc, "thk")
 
#Set this on a flat surface
topg[:] = 0
 
#Create a cylinder of ice in the middle third of the domain, with a maximum height of 1500 m.
cenx = shape.nx / 2
ceny = shape.ny / 2
 
i = numpy.indices((shape.nx, shape.ny)).astype("float32")
 
#Create a field with the normalized distance from the center of the domain
r_squared = 1.0/8.0 - ((i[1,:] - cenx)/shape.nx)**2 - ((i[0,:] - ceny)/shape.ny)**2
 
H =  numpy.sqrt( numpy.where(r_squared > 0., 1500., 0.))
 
thk[0,:,:] = H.tolist()
 
nc.close()

Notice the following:

  • Script requires numpy, scipy, ConfigParse, and pycdf python modules.
  • The script expects a configuration file, where the information on the grid and name of output netcdf file is parsed.
  • The radius of the cylinder is 1/3 of the total size of the domain.

The configuration script is as follows:

[grid]
upn = 10
ewn = 30
nsn = 30
dew = 2000
dns = 2000
sigma_builtin = 1
 
[time]
niso = 1.
tend = 201000.
ntem = 1.
tstart = 200000.
dt = 1.
nvel = 1.
 
[CF default]
comment = forced upper kinematic BC
title = EISMINT-2 Exp B
 
[options]
flow_law = 2
evolution = 3
temperature = 1
vertical_integration = 1
sliding_law = 4
marine_margin = 2
stress_calc = 2
hotstart = 1
basal_water = 0
isostasy = 0
diagnostic_run = 1
 
[ho_options]
diagnostic_scheme = 2
prognostic_scheme = 0
which_ho_babc = 8
 
[CF input]
name = cylinder.nc

Boundary conditions

Upper surface is subjected to a constant temperature of xx degrees.

Lower surface have a constant heat flow in of xx milliwatts per meter squared.

The upper surface temperature is set in the source code file. The lower heat flux in the configuration file. The source code follows:

 

Time evolution

Analytic result

Error functions, check Hooke.