├── tests ├── regression │ ├── util │ │ ├── __init__.py │ │ └── job.template │ ├── setup_hopper │ ├── setup_cheyenne │ ├── setup_derecho │ └── setup_titan ├── ross │ ├── data │ │ ├── readme.txt │ │ ├── inlets.dat │ │ ├── kbc.dat │ │ └── readme.riggs_clean │ └── ross.config ├── EISMINT │ ├── EISMINT-2 │ │ ├── mound.nc │ │ ├── trough.nc │ │ ├── e2.g.config │ │ ├── e2.h.config │ │ ├── e2.b.config │ │ ├── e2.c.config │ │ ├── e2.d.config │ │ ├── e2.j.config │ │ ├── e2.l.config │ │ ├── e2.a.config │ │ ├── e2.f.config │ │ ├── e2.i.config │ │ ├── e2.k.config │ │ └── README.md │ ├── EISMINT-1 │ │ ├── e1-fm.1.config │ │ ├── e1-fm.2.config │ │ ├── e1-fm.3.config │ │ ├── e1-mm.1.config │ │ ├── e1-mm.3.config │ │ ├── e1-mm.2.config │ │ └── README.md │ ├── isos │ │ ├── isos.llfa.config │ │ ├── isos.elfa.config │ │ ├── isos.elra.config │ │ ├── isos.llra.config │ │ └── README.md │ └── EISMINT-2-glissade │ │ ├── e2.g.config │ │ ├── e2.h.config │ │ ├── e2.b.config │ │ ├── e2.c.config │ │ ├── e2.d.config │ │ ├── e2.a.config │ │ ├── e2.f.config │ │ ├── e2.a.config.diva │ │ └── README ├── unsupported │ ├── erosion │ │ ├── topo.nc │ │ ├── erosion1.config │ │ ├── erosion0.config │ │ ├── erosion2.config │ │ ├── er-transport1.config │ │ ├── erosion3.config │ │ ├── er-transport0.config │ │ ├── erosion4.config │ │ ├── er-transport2.config │ │ ├── er-transport3.config │ │ └── er-transport4.config │ ├── exact-isothermal │ │ ├── matlab │ │ │ └── Makefile.am │ │ ├── src │ │ │ ├── trickLibtool.cpp │ │ │ ├── verif_vars.def │ │ │ └── Makefile.am │ │ ├── Makefile.am │ │ ├── scripts │ │ │ ├── Makefile.am │ │ │ ├── process_verif.py │ │ │ ├── plot_diff.py │ │ │ └── plot_vol.py │ │ ├── tests │ │ │ ├── error.cpt │ │ │ ├── template.config │ │ │ └── Makefile.am │ │ └── README │ ├── lin-non_lin │ │ ├── move_data.sh │ │ ├── l-5a.config │ │ ├── l-10a.config │ │ ├── l-20a.config │ │ ├── l-30a.config │ │ ├── nl-5a.config │ │ ├── nl-10a.config │ │ ├── nl-20a.config │ │ └── nl-30a.config │ ├── README │ └── benchmarks │ │ ├── b1.config │ │ ├── b2.config │ │ ├── b3.config │ │ ├── b4.config │ │ ├── b5.config │ │ └── b6.config ├── MISMIP │ └── mismip.code │ │ ├── runCISM.cheyenne.template │ │ └── runCISM.derecho.template ├── MISMIP3d │ └── mismip3d.code │ │ ├── runCISM.cheyenne.template │ │ └── mismip3dPlotGL.py ├── glint-example │ ├── glint_example.config.pdd │ ├── glint_example.config.smb │ └── greenland_20km.config.smb ├── dome │ ├── dome.config │ ├── dome-forcing.config │ └── README.restart ├── new │ ├── test-forcing.config │ ├── test.config │ └── README.md ├── slab │ └── slab.config ├── stream │ └── stream.config ├── halfar │ ├── halfar.config │ └── halfar-HO.config ├── shelf │ ├── shelf-circular.config │ └── shelf-confined.config ├── ismip-hom │ └── ismip-hom.config └── README.md ├── utils ├── libgptl │ ├── .gitignore │ ├── Makefile.sgi_intel │ ├── Makefile.crayxt_cnl │ ├── Makefile.aix │ ├── Makefile.crayxt_cnl_wpapi │ ├── Makefile.crayxt_cnl_gnu │ ├── Makefile.linux │ ├── Makefile.mac │ ├── README.CISM │ ├── Makefile_cesm │ └── GPTLutil.c ├── parallel_config_eval │ └── README ├── f90_dependency_tool │ └── README ├── isostasy │ └── README ├── build │ ├── config.inc_generator │ │ ├── config.inc.cmake.in │ │ └── config.inc.cmake.in.README │ ├── autocopy-to-build-dir │ ├── autogenerate-in-build-dir │ └── autogen-for-glint-and-glad-in-build-dir ├── compare-netcdf-files │ ├── Makefile │ └── README ├── README └── trilinos_config_scripts_examples │ └── README ├── libglimmer-solve ├── SLAP │ └── runTests.sh └── blas │ ├── crotg.f │ ├── srotg.f │ ├── cscal.f │ ├── drotg.f │ ├── csscal.f │ ├── ccopy.f │ ├── cswap.f │ ├── scasum.f │ ├── cdotu.f │ ├── drot.f │ ├── caxpy.f │ ├── srot.f │ ├── isamax.f │ ├── idamax.f │ ├── icamax.f │ ├── cdotc.f │ ├── sscal.f │ ├── dscal.f │ ├── dasum.f │ ├── sasum.f │ ├── scopy.f │ ├── dcopy.f │ ├── saxpy.f │ ├── daxpy.f │ ├── sdot.f │ ├── ddot.f │ ├── dnrm2.f │ ├── snrm2.f │ ├── sswap.f │ ├── dswap.f │ └── scnrm2.f ├── libdycore ├── dycore_to_glimmer_extern.H ├── Ymir │ ├── YmirToGlimmer.H │ └── YmirToGlimmer.cpp ├── CHANGELOG ├── CMakeLists.txt ├── README ├── BISICLES │ ├── BisiclesToGlimmer.H │ └── BisiclesToGlimmer.cpp ├── FELIX │ ├── FelixToGlimmer.H │ └── FelixToGlimmer.cpp ├── DyCoreModelRegistry.H └── dycore_stubs │ └── glimmer_to_dycore_stubs.F90 ├── libglide └── glide_nan.inc ├── libglimmer-trilinos ├── CMakeLists.txt ├── Makefile.Trilinos.export.in └── matrixInterface.hpp ├── libglimmer ├── writestats.h ├── mpi_mod.F90 ├── glimmer_vers.F90.cmake.in ├── glimmer_vers.F90.in.in └── glimmer_writestats.F90 ├── FUNDING ├── libglad ├── README └── glad_vars.def ├── .gitignore ├── NEWS ├── cism_driver ├── cism_cesm_interface.F90 └── cism_driver.F90 └── AUTHORS /tests/regression/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/libgptl/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | *.o 3 | *.mod 4 | -------------------------------------------------------------------------------- /libglimmer-solve/SLAP/runTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo 2 | ./dlapqc 4 | -------------------------------------------------------------------------------- /tests/ross/data/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ESCOMP/CISM/main/tests/ross/data/readme.txt -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/mound.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ESCOMP/CISM/main/tests/EISMINT/EISMINT-2/mound.nc -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/trough.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ESCOMP/CISM/main/tests/EISMINT/EISMINT-2/trough.nc -------------------------------------------------------------------------------- /tests/unsupported/erosion/topo.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ESCOMP/CISM/main/tests/unsupported/erosion/topo.nc -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/matlab/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = verifAE.m verifBC.m verifBu.m verifD.m 2 | -------------------------------------------------------------------------------- /tests/regression/setup_hopper: -------------------------------------------------------------------------------- 1 | module load python 2 | module load netcdf 3 | module load netcdf4-python 4 | 5 | module list 6 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/src/trickLibtool.cpp: -------------------------------------------------------------------------------- 1 | 2 | // Having a cpp file tricks libtool into using the CXX compiler to link 3 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = matlab src scripts tests 2 | 3 | EXTRA_DIST = README 4 | 5 | data:: 6 | (cd tests && $(MAKE) $@) 7 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/scripts/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_SCRIPTS=run_verif.py 2 | EXTRA_DIST = $(bin_SCRIPTS) plot_errors.py plot_time.py plot_verif.py plot_vol.py plot_diff.py 3 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/move_data.sh: -------------------------------------------------------------------------------- 1 | # simple shell script to move data file if it exists 2 | infile=$1 3 | outfile=$2 4 | if [ -f $infile ] 5 | then 6 | mv $infile $outfile 7 | fi 8 | -------------------------------------------------------------------------------- /tests/regression/util/job.template: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #PBS -A PBS_A 3 | #PBS -q PBS_q 4 | #PBS -N PBS_N 5 | #PBS -l walltime=PBS_walltime 6 | #PBS -l PBS_RES=RES_NUM 7 | #PBS -j oe 8 | #PBS -m ae 9 | -------------------------------------------------------------------------------- /tests/unsupported/README: -------------------------------------------------------------------------------- 1 | 2 | This directory contains older test cases for the shallow ice model which are not currently supported. 3 | 4 | Use at your own risk! 5 | 6 | (last edited on 2-11-14 by SFP) 7 | -------------------------------------------------------------------------------- /libdycore/dycore_to_glimmer_extern.H: -------------------------------------------------------------------------------- 1 | #include "DyCoreModelRegistry.H" 2 | 3 | int dycore_registry(int init,int get_model_by_index,int * model_index, 4 | DyCoreToGlimmer ** dycore_to_glimmer_ptr,int dycore_type); 5 | -------------------------------------------------------------------------------- /utils/parallel_config_eval/README: -------------------------------------------------------------------------------- 1 | This directory includes a Fortran 90 program for evaluating possible decompositions for a CISM grid (dimensions of which are entered manually at run-time). 2 | It must be compiled manually. 3 | -------------------------------------------------------------------------------- /utils/f90_dependency_tool/README: -------------------------------------------------------------------------------- 1 | This file has a python script that can be used to evaluate file dependencies in Fortran 90 code. It is no longer actively used, but has been retained in the repository in case it may be of use in the future. 2 | 3 | -------------------------------------------------------------------------------- /libglide/glide_nan.inc: -------------------------------------------------------------------------------- 1 | #ifndef GLIDE_NAN_INC 2 | #define GLIDE_NAN_INC 3 | 4 | #define IS_NAN(x) ((x) /= (x)) 5 | #define IS_INF(x) (ISNAN((x)*0)) 6 | #define IS_POS_INF(x) (IS_INF(x) .and. ((x) > 0) 7 | #define IS_NEG_INF(x) (IS_INF(x) .and. ((x) < 0) 8 | #endif 9 | -------------------------------------------------------------------------------- /utils/isostasy/README: -------------------------------------------------------------------------------- 1 | This directory contains the file relaxed.F90, from the original Glimmer release. 2 | This is a utility to add relaxed bedrock topography to netCDF input files. 3 | It has not been tested recently, but is retained in case it may be useful in the future. 4 | 5 | -------------------------------------------------------------------------------- /utils/build/config.inc_generator/config.inc.cmake.in: -------------------------------------------------------------------------------- 1 | #define FC_FUNC(name,NAME) name ## _ 2 | 3 | #define FC_FUNC_(name,NAME) name ## _ 4 | 5 | #define HAVE_2003ARGS 6 | 7 | #define VERSION "2.0.5" 8 | 9 | #define GLIMMER_FCFLAGS "(Not reported in cmake build)" 10 | 11 | -------------------------------------------------------------------------------- /tests/MISMIP/mismip.code/runCISM.cheyenne.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #PBS -N MISMIP 4 | #PBS -A P93300601 5 | #PBS -l walltime=00:01:00 6 | #PBS -q economy 7 | #PBS -j oe 8 | #PBS -m abe 9 | #PBS -l select=1:ncpus=1:mpiprocs=1 10 | 11 | mpiexec_mpt ./cism_driver mismip.config 12 | -------------------------------------------------------------------------------- /tests/MISMIP3d/mismip3d.code/runCISM.cheyenne.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #PBS -N MISMIP3d 4 | #PBS -A P93300601 5 | #PBS -l walltime=00:01:00 6 | #PBS -q main 7 | #PBS -j oe 8 | #PBS -m abe 9 | #PBS -l select=1:ncpus=1:mpiprocs=1 10 | 11 | mpiexec ./cism_driver mismip3d.config 12 | -------------------------------------------------------------------------------- /libglimmer-trilinos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | FILE(GLOB CPPSOURCES *.cpp) 3 | FILE(GLOB CPPHEADERS *.hpp) 4 | 5 | add_library(glimmercismcpp ${CPPSOURCES} ${CPPHEADERS}) 6 | include_directories ( ${CISM_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} 7 | ${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) 8 | 9 | -------------------------------------------------------------------------------- /libdycore/Ymir/YmirToGlimmer.H: -------------------------------------------------------------------------------- 1 | #include "../DyCoreToGlimmer.H" 2 | 3 | #ifndef YMIR_TO_GLIMMER 4 | #define YMIR_TO_GLIMMER 5 | 6 | class YmirToGlimmer : public DyCoreToGlimmer 7 | { 8 | public: 9 | 10 | // int initDyCore(); 11 | // int runDyCore(); 12 | // int deleteDyCore(); 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /utils/compare-netcdf-files/Makefile: -------------------------------------------------------------------------------- 1 | # Set the environment variable NETCDF to the path of your NETCDF installation. 2 | 3 | CXX=g++ 4 | CXXFLAGS= -O3 -m64 5 | CXXLIBS = -I$(NETCDF)/include -L$(NETCDF)/lib -lnetcdf_c++ 6 | 7 | all: 8 | $(CXX) compare.cpp $(CXXLIBS) $(CXXFLAGS) -o compare 9 | 10 | clean: 11 | rm compare 12 | 13 | -------------------------------------------------------------------------------- /utils/compare-netcdf-files/README: -------------------------------------------------------------------------------- 1 | This directory contains a C++ program to compare any variables common to two netcdf files. 2 | See compare.cpp for more details. 3 | 4 | The code must be compiled manually using the included Makefile. It may need to be modified to work with your system, but is quite simple, so any changes will probably be minor. 5 | 6 | -------------------------------------------------------------------------------- /tests/regression/setup_cheyenne: -------------------------------------------------------------------------------- 1 | module load intel/17.0.1 2 | module load git 3 | module loat python 4 | 5 | module load jupyter 6 | 7 | module load wrapt 8 | module load pylint 9 | 10 | module load numpy 11 | 12 | module load numexpr 13 | module load bottleneck 14 | module load pandas 15 | 16 | module load netcdf4-python 17 | 18 | module list 19 | -------------------------------------------------------------------------------- /libdycore/CHANGELOG: -------------------------------------------------------------------------------- 1 | Changes in libdycore and its subdirectories: 2 | 3 | 10/4/10 (DFM) 4 | (a) BISICLES/BisiclesToGlimmer.[H,cpp] -- removed hardwired path to bike_driver.H 5 | 6 | (b) dycore_to_glimmer_extern.cpp -- included and in order to compile on my machine here at LBL 7 | 8 | (c) DyCoreToGlimmer.cpp -- include 9 | 10 | -------------------------------------------------------------------------------- /libdycore/Ymir/YmirToGlimmer.cpp: -------------------------------------------------------------------------------- 1 | #include "YmirToGlimmer.H" 2 | 3 | using namespace std; 4 | 5 | int 6 | YmirToGlimmer::initDyCore() 7 | { 8 | cout << "In Ymir initDyCore" << endl; 9 | } 10 | 11 | int 12 | YmirToGlimmer::runDyCore() 13 | { 14 | cout << "In Ymir runDyCore" << endl; 15 | } 16 | 17 | int 18 | YmirToGlimmer::deleteDyCore() 19 | { 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /tests/MISMIP/mismip.code/runCISM.derecho.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #PBS -N MISMIP 4 | #PBS -A P93300601 5 | #PBS -l walltime=01:30:00 6 | #PBS -q main 7 | #PBS -j oe 8 | #PBS -m abe 9 | #PBS -l select=1:ncpus=128:mpiprocs=128 10 | 11 | module load intel/2023.2.1 12 | module load craype/2.7.23 13 | module load mkl/2023.2.0 14 | 15 | mpiexec -n 128 ./cism_driver mismip.config 16 | -------------------------------------------------------------------------------- /tests/regression/setup_derecho: -------------------------------------------------------------------------------- 1 | module load intel 2 | ##module load git 3 | module load conda 4 | conda activate npl 5 | 6 | ##module load jupyter 7 | 8 | ##module load wrapt 9 | ##module load pylint 10 | 11 | ##module load numpy 12 | 13 | ##module load numexpr 14 | ##module load bottleneck 15 | ##module load pandas 16 | 17 | ##module load netcdf4-python 18 | 19 | module list 20 | -------------------------------------------------------------------------------- /utils/README: -------------------------------------------------------------------------------- 1 | The various subdirectories in this directory hold utilities that may be useful for working with CISM. 2 | The 'build' subdirectory holds scripts that are used by the cmake build system when building the code 3 | and is necessary for successful compiling. The other subdirectories hold miscellaneous tools that are 4 | not required, but may be useful. See the individual README files in each subdirectory for details. 5 | -------------------------------------------------------------------------------- /tests/glint-example/glint_example.config.pdd: -------------------------------------------------------------------------------- 1 | 2 | [GLEX climate] 3 | days_in_year = 360 4 | total_years = 10 5 | climate_tstep = 6 # hours 6 | gcm_smb = .false. 7 | 8 | [GLEX precip] 9 | filename: ncep-doe_6h_climate.64x32.nc 10 | variable: prcp 11 | 12 | [GLEX temps] 13 | filename: ncep-doe_6h_climate.64x32.nc 14 | variable: temp2m 15 | kelvin: .false. 16 | 17 | [GLEX orog] 18 | filename: orog.igcmgrid.64x32.nc 19 | variable: topg 20 | -------------------------------------------------------------------------------- /tests/glint-example/glint_example.config.smb: -------------------------------------------------------------------------------- 1 | 2 | [GLEX climate] 3 | days_in_year = 360 4 | total_years = 10 5 | climate_tstep = 6 # hours 6 | gcm_smb = .true. 7 | 8 | [GLEX precip] 9 | filename: ncep-doe_6h_climate.64x32.nc 10 | variable: prcp 11 | 12 | [GLEX temps] 13 | filename: ncep-doe_6h_climate.64x32.nc 14 | variable: temp2m 15 | kelvin: .false. 16 | 17 | [GLEX orog] 18 | filename: orog.igcmgrid.64x32.nc 19 | variable: topg 20 | -------------------------------------------------------------------------------- /utils/build/config.inc_generator/config.inc.cmake.in.README: -------------------------------------------------------------------------------- 1 | Notes about config.inc.cmake.in: 2 | 3 | Autoconf generated a config.inc file with lots of defines. 4 | This file is an attempt to hardwire the required defines and 5 | just rename this file config.inc at cmake configuration time. 6 | Not sure if it will work to have it machine independent. Andy 6/2012 7 | 8 | FC_FUNC_: As FC_FUNC, but for C identifiers containing underscores. 9 | 10 | -------------------------------------------------------------------------------- /utils/trilinos_config_scripts_examples/README: -------------------------------------------------------------------------------- 1 | This directory holds example do-configure scripts for building Trilinos for use with CISM. 2 | Refer to comments in the scripts and the CISM Documentation for details. 3 | Note that these scripts should NOT be run in the location, but moved to your Trilinos 4 | build location after downloading Trilinos source code from http://trilinos.sandia.gov/. 5 | They are provided as examples with the required Trilinos packages and settings enabled. 6 | -------------------------------------------------------------------------------- /libglimmer/writestats.h: -------------------------------------------------------------------------------- 1 | /** \brief write model run statistics to file 2 | * 3 | * \author Magnus Hagdorn 4 | * \date April 2009 5 | * 6 | * \param resname name of the output result file 7 | * \param cfgname name of the model configuration file 8 | * \param time the elapsed wall clock time in seconds 9 | * 10 | * open statistics file (create it if it does not exist), gather info 11 | * from environment and write to file. 12 | * The file gets locked to avoid parallel access 13 | */ 14 | void gc_writestats(const char *resname, const char *cfgname, double wallTime); 15 | -------------------------------------------------------------------------------- /libdycore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # libdycore build 2 | 3 | FILE(GLOB DYCORE_SOURCES *.cpp *.cpp) 4 | FILE(GLOB DYCORE_HEADERS *.H *.H) 5 | 6 | IF (CISM_ENABLE_BISICLES) 7 | FILE(GLOB BISICLES_SOURCES *.cpp BISICLES/*.cpp) 8 | FILE(GLOB BISICLES_HEADERS *.H BISICLES/*.H) 9 | ENDIF() 10 | 11 | add_library(DyCoreToGlimmer ${DYCORE_SOURCES} ${DYCORE_HEADERS} 12 | ${BISICLES_SOURCES} ${BISICLES_HEADERS}) 13 | 14 | # Need include directories from Trilinos but also mod files from glimmer 15 | 16 | include_directories (${BISICLES_INTERFACE_DIR}) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /FUNDING: -------------------------------------------------------------------------------- 1 | 2 | The development of CISM has been supported by the following U.K. and U.S. funding agencies: 3 | 4 | Agency, Country Program 5 | ---------------- ------------ 6 | National Environmental Research Council, U.K. Centre for Polar and Ocean Modelling 7 | National Science Foundation, U.S. Office of Polar Programs 8 | Department of Energy, U.S. Biological and Environmental Research 9 | Department of Energy, U.S. Advanced Scientific Computing Research 10 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b1.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # no temperature 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 0 18 | flow_law = 0 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b2.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # temperature coupling 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 2 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/src/verif_vars.def: -------------------------------------------------------------------------------- 1 | # setup for code generator 2 | [VARSET] 3 | # prefix of the generated module 4 | name: verif 5 | # f90 type containing all necessary data 6 | datatype: verif_type 7 | # module where type is defined 8 | datamod: verif 9 | 10 | 11 | [thke] 12 | dimensions: time, y1, x1 13 | units: meter 14 | long_name: exact ice thickness 15 | data: data%exact_h 16 | standard_name: land_ice_thickness 17 | coordinates: lon lat 18 | 19 | [ivole] 20 | dimensions: time 21 | units: km3 22 | factor: len0*len0*1.e-9 23 | long_name: exact ice volume 24 | data: data%ivol_e 25 | -------------------------------------------------------------------------------- /tests/regression/setup_titan: -------------------------------------------------------------------------------- 1 | # WARNING: this will break in the future. 2 | # Default modules no longer work, so versioned modules. 3 | 4 | # Latest numpy is needed, and it only works with gnu. 5 | module unload PrgEnv-pgi PrgEnv-gnu 6 | module load PrgEnv-gnu 7 | 8 | module load python 9 | module load python_numpy/1.9.2 10 | module load python_scipy/0.15.1 11 | module load python_matplotlib 12 | 13 | # Only one version of matplot lib, and it loads numpy 1.7.1 14 | # along side 1.9.2 for some reason. Just unloading it works. 15 | module unload python_numpy/1.7.1 16 | 17 | module load python_netcdf4/1.1.7 18 | module load cray-netcdf-hdf5parallel 19 | 20 | module list 21 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b3.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # isostasy: llfa 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 2 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | [isostasy] 38 | lithosphere = 0 39 | asthenosphere = 0 40 | 41 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b4.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # isostasy: llra 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 2 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | [isostasy] 38 | lithosphere = 0 39 | asthenosphere = 1 40 | 41 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b5.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # isostasy: elfa 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 2 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | [isostasy] 38 | lithosphere = 1 39 | asthenosphere = 0 40 | 41 | -------------------------------------------------------------------------------- /tests/unsupported/benchmarks/b6.config: -------------------------------------------------------------------------------- 1 | # GLIMMER Benchmark 1 2 | # based on EISMINT-2 Exp A run 3 | # isostasy: elra 4 | 5 | [EISMINT-2] 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 61 10 | nsn = 61 11 | upn = 11 12 | dew = 25000 13 | dns = 25000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 2 19 | isostasy = 0 20 | #sliding_law = 4 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 1 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 10000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | 37 | [isostasy] 38 | lithosphere = 1 39 | asthenosphere = 1 40 | 41 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/tests/error.cpt: -------------------------------------------------------------------------------- 1 | # cpt file created by: makecpt -Cpolar -T-8/8/1 2 | #COLOR_MODEL = RGB 3 | # 4 | -250 0 0 255 -100 0 0 255 5 | -100 32 32 255 -50 32 32 255 6 | -50 64 64 255 -25 64 64 255 7 | -25 96 96 255 -10 96 96 255 8 | -10 128 128 255 -5 128 128 255 9 | -5 159 159 255 -2 159 159 255 10 | -2 191 191 255 -1 191 191 255 11 | -1 223 223 255 0 223 223 255 12 | 0 255 255 255 1 255 255 255 13 | 1 255 223 223 2 255 223 223 14 | 2 255 191 191 5 255 191 191 15 | 5 255 159 159 10 255 159 159 16 | 10 255 127 127 25 255 127 127 17 | 25 255 96 96 50 255 96 96 18 | 50 255 64 64 100 255 64 64 19 | 100 255 32 32 250 255 32 32 20 | B 0 0 255 21 | F 255 0 0 22 | N 128 128 128 23 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/tests/template.config: -------------------------------------------------------------------------------- 1 | #WHL - This template may need some work. 2 | 3 | [grid] 4 | # grid sizes 5 | ewn = 65 6 | nsn = 65 7 | upn = 11 8 | dew = #GRIDSIZE# 9 | dns = #GRIDSIZE# 10 | 11 | [options] 12 | dycore = 0 13 | temperature = 0 14 | flow_law = 0 15 | isostasy = 0 16 | slip_coeff = 0 17 | marine_margin = 3 18 | evolution = #SOLVER# 19 | basal_water = 0 20 | vertical_integration = 1 21 | 22 | [time] 23 | tend = 200000. 24 | dt = #DELTATIME# 25 | 26 | [parameters] 27 | flow_factor = 1. 28 | geothermal = -42e-3 29 | 30 | [CF default] 31 | title: #TITLE# 32 | 33 | [CF output] 34 | name: #OUTNAME# 35 | frequency: 1000 36 | variables: thk uflx vflx uvel vvel acab 37 | -------------------------------------------------------------------------------- /tests/ross/data/inlets.dat: -------------------------------------------------------------------------------- 1 | 110 78 206.000 170.000 2 | 110 79 206.000 170.000 3 | 110 80 206.000 170.000 4 | 98 101 209.000 470.000 5 | 98 102 209.000 470.000 6 | 97 102 209.000 470.000 7 | 97 103 209.000 470.000 8 | 80 121 228.000 250.000 9 | 79 121 228.000 250.000 10 | 79 122 228.000 250.000 11 | 78 122 228.000 250.000 12 | 78 123 228.000 250.000 13 | 53 139 227.000 600.000 14 | 53 140 227.000 600.000 15 | 52 140 227.000 600.000 16 | 52 141 227.000 600.000 17 | 51 141 227.000 600.000 18 | 50 141 227.000 600.000 19 | 32 141 -66.000 285.000 20 | 31 141 -66.000 285.000 21 | 31 140 -66.000 285.000 22 | 30 140 -66.000 285.000 23 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-fm.1.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # fixed margin 3 | 4 | [EISMINT-1 fixed margin] 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 31 9 | nsn = 31 10 | upn = 11 11 | dew = 50000 12 | dns = 50000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 0 21 | vertical_integration = 1 22 | basal_mass_balance = 0 23 | 24 | [time] 25 | tend = 200000. 26 | dt = 10. 27 | ntem = 1. 28 | nvel = 1. 29 | niso = 1. 30 | 31 | [parameters] 32 | geothermal = -42.e-3 33 | 34 | [CF default] 35 | title: EISMINT-1 fixed margin 36 | comment: forced upper kinematic BC 37 | 38 | [CF output] 39 | name: e1-fm.1.nc 40 | frequency: 1000 41 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 42 | 43 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/crotg.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CROTG(CA,CB,C,S) 2 | * .. Scalar Arguments .. 3 | COMPLEX CA,CB,S 4 | REAL C 5 | * .. 6 | * 7 | * Purpose 8 | * ======= 9 | * 10 | * CROTG determines a complex Givens rotation. 11 | * 12 | * .. Local Scalars .. 13 | COMPLEX ALPHA 14 | REAL NORM,SCALE 15 | * .. 16 | * .. Intrinsic Functions .. 17 | INTRINSIC CABS,CONJG,SQRT 18 | * .. 19 | IF (CABS(CA).NE.0.) GO TO 10 20 | C = 0. 21 | S = (1.,0.) 22 | CA = CB 23 | GO TO 20 24 | 10 CONTINUE 25 | SCALE = CABS(CA) + CABS(CB) 26 | NORM = SCALE*SQRT((CABS(CA/SCALE))**2+ (CABS(CB/SCALE))**2) 27 | ALPHA = CA/CABS(CA) 28 | C = CABS(CA)/NORM 29 | S = ALPHA*CONJG(CB)/NORM 30 | CA = ALPHA*NORM 31 | 20 CONTINUE 32 | RETURN 33 | END 34 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.g.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 1 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | dt_diag = 5000. 30 | idiag = 31 31 | jdiag = 31 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: EISMINT-2 Exp G 39 | comment: forced upper kinematic BC 40 | 41 | [CF output] 42 | name: e2.g.nc 43 | frequency: 1000 44 | variables: thk bmlt btemp temp ubas vbas uvel vvel wvel wgrd acab diffu bwat 45 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/l-5a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 5. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: linear, dt=5a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: l-5a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/l-10a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 10. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: linear, dt=10a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: l-10a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/l-20a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 20. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: linear, dt=20a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: l-20a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/l-30a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 30. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: linear, dt=30a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: l-30a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/nl-5a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 2 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 5. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: non-linear, dt=5a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: nl-5a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-fm.2.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # fixed margin 3 | 4 | [EISMINT-1 fixed margin] 5 | period = 20000. 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 31 10 | nsn = 31 11 | upn = 11 12 | dew = 50000 13 | dns = 50000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 0 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 10. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | geothermal = -42.e-3 34 | 35 | [CF default] 36 | title: EISMINT-1 fixed margin (time-dependent) 37 | comment: forcing period 20000a, forced upper kinematic BC 38 | 39 | [CF output] 40 | name: e1-fm.2.nc 41 | frequency: 1000 42 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 43 | 44 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-fm.3.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # fixed margin 3 | 4 | [EISMINT-1 fixed margin] 5 | period = 40000. 6 | 7 | [grid] 8 | # grid sizes 9 | ewn = 31 10 | nsn = 31 11 | upn = 11 12 | dew = 50000 13 | dns = 50000 14 | 15 | [options] 16 | dycore = 0 17 | temperature = 1 18 | flow_law = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 0 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 10. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | geothermal = -42.e-3 34 | 35 | [CF default] 36 | title: EISMINT-1 fixed margin (time-dependent) 37 | comment: forcing period 40000a, forced upper kinematic BC 38 | 39 | [CF output] 40 | name: e1-fm.3.nc 41 | frequency: 1000 42 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 43 | 44 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/nl-10a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 2 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 10. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: non-linear, dt=10a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: nl-10a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/nl-20a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 2 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 20. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: non-linear, dt=20a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: nl-20a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/unsupported/lin-non_lin/nl-30a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 2 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 30. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: non-linear, dt=30a 39 | comment: EISMINT-2 Exp H, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: nl-30a.nc 43 | frequency: 1000 44 | variables: thk bmlt temp btemp ubas vbas uuvel vvel wvel bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-mm.1.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 450.0e3 7 | 8 | [grid] 9 | # grid sizes 10 | ewn = 31 11 | nsn = 31 12 | upn = 11 13 | dew = 50000 14 | dns = 50000 15 | 16 | [options] 17 | dycore = 0 18 | temperature = 1 19 | flow_law = 0 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 0 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tend = 200000. 28 | dt = 10. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | 36 | [CF default] 37 | title: EISMINT-1 moving margin 38 | comment: forced upper kinematic BC 39 | 40 | [CF output] 41 | name: e1-mm.1.nc 42 | frequency: 1000 43 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 44 | 45 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/erosion1.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 50000. 27 | dt = 5. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [Erosion] 38 | 39 | [CF default] 40 | title: erosion 41 | comment: simple erosion 42 | 43 | [CF output] 44 | name: erosion1.nc 45 | frequency: 1000 46 | variables: thk bmlt temp uvel vvel bwat topg erate erosion 47 | 48 | [CF input] 49 | name: topo.nc 50 | time: 1 51 | 52 | -------------------------------------------------------------------------------- /libdycore/README: -------------------------------------------------------------------------------- 1 | The libdycore directory contains routines that allow CISM to be connected to 2 | external dynamic cores written in C++. Currently, an interface to the 3 | BISICLES dycore is being developed. A prototype driver that uses the BISICLES 4 | dycore can be found in example-drivers/simple_bisicles/src. Build instructions 5 | are located in that directory. A typical build of the BISICLES/libDyCoreToGlimmer.a 6 | library can be performed using run_make. Building BISICLES requires access to the 7 | BISICLES and Chombo installations. For more information on BISICLES and Chombo, 8 | please send email to dfmartin@lbl.gov or ranken@lanl.gov. Some additional information 9 | can also be found in glimmer_to_dycore.info, though this file is out-of-date. 10 | 11 | For a description of BISICLES, see: 12 | https://seesar.lbl.gov/anag/staff/martin/talks/Martin-LIWG-Jan2011_final.pdf. 13 | 14 | Last Revised: 04/19/12 DMR 15 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/erosion0.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | temperature = 1 15 | flow_law = 2 16 | isostasy = 0 17 | marine_margin = 3 18 | evolution = 0 19 | basal_water = 1 20 | slip_coeff = 2 21 | #sliding_law = 0 22 | vertical_integration = 1 23 | 24 | [time] 25 | tend = 50000. 26 | dt = 5. 27 | ntem = 1. 28 | nvel = 1. 29 | niso = 1. 30 | 31 | [parameters] 32 | flow_factor = 1. 33 | geothermal = -42.e-3 34 | basal_tract_const = 1.e-3 35 | 36 | [Erosion] 37 | update_topo = 0 38 | 39 | [CF default] 40 | title: erosion, no topo 41 | comment: simple erosion 42 | 43 | [CF output] 44 | name: erosion0.nc 45 | frequency: 1000 46 | variables: thk bmlt temp uvel vvel bwat topg erate erosion 47 | 48 | [CF input] 49 | name: topo.nc 50 | time: 1 51 | 52 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.h.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 # could also set slip_coeff = 3 (constant where T = Tpmp) 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | dt_diag = 5000. 30 | idiag = 31 31 | jdiag = 31 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [CF default] 38 | title: EISMINT-2 Exp H 39 | comment: forced upper kinematic BC 40 | 41 | [CF output] 42 | name: e2.h.nc 43 | frequency: 1000 44 | variables: thk bmlt btemp temp ubas vbas uvel vvel wvel wgrd acab diffu bwat 45 | 46 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.b.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | temperature = -30. 1.67e-5 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tstart = 200000. 28 | tend = 400000. 29 | dt = 5. 30 | ntem = 1. 31 | dt_diag = 5000. 32 | idiag = 31 33 | jdiag = 31 34 | 35 | [parameters] 36 | geothermal = -42.e-3 37 | 38 | [CF default] 39 | title: EISMINT-2 Exp B 40 | comment: forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e2.b.nc 44 | frequency: 1000 45 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 46 | 47 | [CF input] 48 | name: e2.a.restart.nc 49 | time: 2 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.c.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.25 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tstart = 200000. 28 | tend = 400000. 29 | dt = 5. 30 | ntem = 1. 31 | dt_diag = 5000. 32 | idiag = 31 33 | jdiag = 31 34 | 35 | [parameters] 36 | geothermal = -42.e-3 37 | 38 | [CF default] 39 | title: EISMINT-2 Exp C 40 | comment: forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e2.c.nc 44 | frequency: 1000 45 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 46 | 47 | [CF input] 48 | name: e2.a.restart.nc 49 | time: 2 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.d.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.5 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tstart = 200000. 28 | tend = 400000. 29 | dt = 5. 30 | ntem = 1. 31 | dt_diag = 5000. 32 | idiag = 31 33 | jdiag = 31 34 | 35 | [parameters] 36 | geothermal = -42.e-3 37 | 38 | [CF default] 39 | title: EISMINT-2 Exp D 40 | comment: forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e2.d.nc 44 | frequency: 1000 45 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 46 | 47 | [CF input] 48 | name: e2.a.restart.nc 49 | time: 2 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-mm.3.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 450.0e3 7 | period = 40000. 8 | 9 | [grid] 10 | # grid sizes 11 | ewn = 31 12 | nsn = 31 13 | upn = 11 14 | dew = 50000 15 | dns = 50000 16 | 17 | [options] 18 | dycore = 0 19 | temperature = 1 20 | flow_law = 0 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 0 24 | vertical_integration = 1 25 | basal_mass_balance = 0 26 | 27 | [time] 28 | tend = 200000. 29 | dt = 10. 30 | ntem = 1. 31 | nvel = 1. 32 | niso = 1. 33 | 34 | [parameters] 35 | geothermal = -42.e-3 36 | 37 | [CF default] 38 | title: EISMINT-1 moving margin (time-dependent) 39 | comment: forcing period 40000a, forced upper kinematic BC 40 | 41 | [CF output] 42 | name: e1-mm.3.nc 43 | frequency: 1000 44 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 45 | 46 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.j.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.25 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | #sliding_law = 4 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tstart = 200000. 28 | tend = 400000. 29 | dt = 5. 30 | ntem = 1. 31 | dt_diag = 5000. 32 | idiag = 31 33 | jdiag = 31 34 | 35 | [parameters] 36 | geothermal = -42.e-3 37 | 38 | [CF default] 39 | title: EISMINT-2 Exp J 40 | comment: forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e2.j.nc 44 | frequency: 1000 45 | variables: topg thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 46 | 47 | [CF input] 48 | name: e2.i.restart.nc 49 | time: 2 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.l.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.25 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | #sliding_law = 4 20 | marine_margin = 3 21 | evolution = 0 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tstart = 200000. 28 | tend = 400000. 29 | dt = 5. 30 | ntem = 1. 31 | dt_diag = 5000. 32 | idiag = 31 33 | jdiag = 31 34 | 35 | [parameters] 36 | geothermal = -42.e-3 37 | 38 | [CF default] 39 | title: EISMINT-2 Exp L 40 | comment: forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e2.l.nc 44 | frequency: 1000 45 | variables: topg thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 46 | 47 | [CF input] 48 | name: e2.k.restart.nc 49 | time: 2 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | slip_coeff = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | dt_diag = 5000. 30 | idiag = 31 31 | jdiag = 31 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | 36 | [CF default] 37 | title: EISMINT-2 Exp A 38 | comment: forced upper kinematic BC 39 | 40 | [CF output] 41 | name: e2.a.nc 42 | frequency: 1000 43 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 44 | 45 | [CF restart] 46 | name: e2.a.restart.nc 47 | xtype: double 48 | frequency: 100000 49 | variables: restart 50 | write_init: F 51 | 52 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/srotg.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SROTG(SA,SB,C,S) 2 | * .. Scalar Arguments .. 3 | REAL C,S,SA,SB 4 | * .. 5 | * 6 | * Purpose 7 | * ======= 8 | * 9 | * construct givens plane rotation. 10 | * jack dongarra, linpack, 3/11/78. 11 | * 12 | * 13 | * .. Local Scalars .. 14 | REAL R,ROE,SCALE,Z 15 | * .. 16 | * .. Intrinsic Functions .. 17 | INTRINSIC ABS,SIGN,SQRT 18 | * .. 19 | ROE = SB 20 | IF (ABS(SA).GT.ABS(SB)) ROE = SA 21 | SCALE = ABS(SA) + ABS(SB) 22 | IF (SCALE.NE.0.0) GO TO 10 23 | C = 1.0 24 | S = 0.0 25 | R = 0.0 26 | Z = 0.0 27 | GO TO 20 28 | 10 R = SCALE*SQRT((SA/SCALE)**2+ (SB/SCALE)**2) 29 | R = SIGN(1.0,ROE)*R 30 | C = SA/R 31 | S = SB/R 32 | Z = 1.0 33 | IF (ABS(SA).GT.ABS(SB)) Z = S 34 | IF (ABS(SB).GE.ABS(SA) .AND. C.NE.0.0) Z = 1.0/C 35 | 20 SA = R 36 | SB = Z 37 | RETURN 38 | END 39 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/erosion2.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 50000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [isostasy] 41 | 42 | [CF default] 43 | title: erosion, llfa 44 | comment: simple erosion, with llfa 45 | 46 | [CF output] 47 | name: erosion2.nc 48 | frequency: 1000 49 | variables: thk bmlt temp uvel vvel bwat topg erate erosion slc relx 50 | 51 | [CF input] 52 | name: topo.nc 53 | time: 1 54 | 55 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/cscal.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CSCAL(N,CA,CX,INCX) 2 | * .. Scalar Arguments .. 3 | COMPLEX CA 4 | INTEGER INCX,N 5 | * .. 6 | * .. Array Arguments .. 7 | COMPLEX CX(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * scales a vector by a constant. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 3/93 to return if incx .le. 0. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | * .. Local Scalars .. 20 | INTEGER I,NINCX 21 | * .. 22 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 23 | IF (INCX.EQ.1) GO TO 20 24 | * 25 | * code for increment not equal to 1 26 | * 27 | NINCX = N*INCX 28 | DO 10 I = 1,NINCX,INCX 29 | CX(I) = CA*CX(I) 30 | 10 CONTINUE 31 | RETURN 32 | * 33 | * code for increment equal to 1 34 | * 35 | 20 DO 30 I = 1,N 36 | CX(I) = CA*CX(I) 37 | 30 CONTINUE 38 | RETURN 39 | END 40 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/e1-mm.2.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 450.0e3 7 | period = 20000. 8 | 9 | [grid] 10 | # grid sizes 11 | ewn = 31 12 | nsn = 31 13 | upn = 11 14 | dew = 50000 15 | dns = 50000 16 | 17 | [options] 18 | dycore = 0 19 | temperature = 1 20 | flow_law = 0 21 | marine_margin = 3 22 | evolution = 0 23 | basal_water = 0 24 | vertical_integration = 1 25 | basal_mass_balance = 0 26 | 27 | [time] 28 | tend = 200000. 29 | dt = 10. 30 | ntem = 1. 31 | nvel = 1. 32 | niso = 1. 33 | 34 | [parameters] 35 | geothermal = -42.e-3 36 | 37 | [CF default] 38 | title: EISMINT-1 moving margin (time-dependent) 39 | institution: University of Edinburgh 40 | comment: forcing period 20000a, forced upper kinematic BC 41 | 42 | [CF output] 43 | name: e1-mm.2.nc 44 | frequency: 1000 45 | variables: thk uflx vflx bmlt btemp temp uvel vvel wvel diffu acab 46 | 47 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.f.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | temperature = -50. 1.6700000E-05 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 0 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 2 22 | basal_water = 1 23 | vertical_integration = 1 24 | basal_mass_balance = 0 25 | 26 | [time] 27 | tend = 200000. 28 | dt = 5. 29 | ntem = 1. 30 | dt_diag = 5000. 31 | idiag = 31 32 | jdiag = 31 33 | 34 | [parameters] 35 | geothermal = -42.e-3 36 | 37 | [CF default] 38 | title: EISMINT-2 Exp F 39 | comment: forced upper kinematic BC 40 | 41 | [CF output] 42 | name: e2.f.nc 43 | frequency: 1000 44 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 45 | 46 | [CF restart] 47 | name: e2.f.restart.nc 48 | frequency: 100000 49 | xtype: double 50 | variables: restart 51 | write_init: F 52 | 53 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/er-transport1.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [Erosion] 38 | 39 | [Basic_Transport] 40 | 41 | [CF default] 42 | title: transport 43 | comment: erosion + transport 44 | 45 | [CF output] 46 | name: er-transport1.nc 47 | frequency: 1000 48 | variables: thk bmlt bwat topg erate erosion seds1 seds2 seds3 taux tauy seds2_max seds2_vx seds2_vy 49 | 50 | [CF input] 51 | name: topo.nc 52 | time: 1 53 | 54 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.i.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | #sliding_law = 4 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | dt_diag = 5000. 30 | idiag = 31 31 | jdiag = 31 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | 36 | [CF default] 37 | title: EISMINT-2 Exp I 38 | comment: forced upper kinematic BC 39 | 40 | [CF input] 41 | name: trough.nc 42 | 43 | [CF output] 44 | name: e2.i.nc 45 | frequency: 1000 46 | variables: topg thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 47 | 48 | [CF restart] 49 | name: e2.i.restart.nc 50 | frequency: 100000 51 | xtype: double 52 | variables: restart 53 | write_init: F 54 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/e2.k.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | #sliding_law = 4 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | vertical_integration = 1 23 | basal_mass_balance = 0 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | dt_diag = 5000. 30 | idiag = 31 31 | jdiag = 31 32 | 33 | [parameters] 34 | geothermal = -42.e-3 35 | 36 | [CF default] 37 | title: EISMINT-2 Exp K 38 | comment: forced upper kinematic BC 39 | 40 | [CF input] 41 | name: mound.nc 42 | 43 | [CF output] 44 | name: e2.k.nc 45 | frequency: 1000 46 | variables: topg thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 47 | 48 | [CF restart] 49 | name: e2.k.restart.nc 50 | frequency: 100000 51 | xtype: double 52 | variables: restart 53 | write_init: F 54 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/erosion3.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 50000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [isostasy] 41 | lithosphere = 1 42 | 43 | [CF default] 44 | title: erosion, elfa 45 | comment: simple erosion, with elfa 46 | 47 | [CF output] 48 | name: erosion3.nc 49 | frequency: 1000 50 | variables: thk bmlt temp uvel vvel bwat topg erate erosion slc relx 51 | 52 | [CF input] 53 | name: topo.nc 54 | time: 1 55 | 56 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.sgi_intel: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | FC := mpif90 5 | CC := mpicc 6 | 7 | CPPDEF := -DFORTRANUNDERSCORE -DSPMD -DHAVE_NANOTIME -DBIT64 8 | FFLAGS := -O2 $(CPPDEF) 9 | CFLAGS := $(CPPDEF) 10 | FREEFLAGS := 11 | 12 | .F90.o: 13 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 14 | .F.o: 15 | $(FC) -c $(FFLAGS) -I. $< 16 | .c.o: 17 | $(CC) -c $(CFLAGS) -I. $< 18 | 19 | #------------------------------------------------------------------------ 20 | # Targets/rules that depend on architecture specific variables. 21 | #------------------------------------------------------------------------ 22 | 23 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 24 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 25 | RM := rm 26 | AR := ar 27 | ARFLAGS := -rc 28 | RANLIB := ranlib 29 | 30 | all: libgptl.a 31 | 32 | libgptl.a : $(OBJS) 33 | $(AR) $(ARFLAGS) $@ $(OBJS) 34 | $(RANLIB) $@ 35 | 36 | clean: 37 | $(RM) -f *.o *.mod *.a 38 | 39 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/drotg.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DROTG(DA,DB,C,S) 2 | * .. Scalar Arguments .. 3 | DOUBLE PRECISION C,DA,DB,S 4 | * .. 5 | * 6 | * Purpose 7 | * ======= 8 | * 9 | * construct givens plane rotation. 10 | * jack dongarra, linpack, 3/11/78. 11 | * 12 | * 13 | * .. Local Scalars .. 14 | DOUBLE PRECISION R,ROE,SCALE,Z 15 | * .. 16 | * .. Intrinsic Functions .. 17 | INTRINSIC DABS,DSIGN,DSQRT 18 | * .. 19 | ROE = DB 20 | IF (DABS(DA).GT.DABS(DB)) ROE = DA 21 | SCALE = DABS(DA) + DABS(DB) 22 | IF (SCALE.NE.0.0d0) GO TO 10 23 | C = 1.0d0 24 | S = 0.0d0 25 | R = 0.0d0 26 | Z = 0.0d0 27 | GO TO 20 28 | 10 R = SCALE*DSQRT((DA/SCALE)**2+ (DB/SCALE)**2) 29 | R = DSIGN(1.0d0,ROE)*R 30 | C = DA/R 31 | S = DB/R 32 | Z = 1.0d0 33 | IF (DABS(DA).GT.DABS(DB)) Z = S 34 | IF (DABS(DB).GE.DABS(DA) .AND. C.NE.0.0d0) Z = 1.0d0/C 35 | 20 DA = R 36 | DB = Z 37 | RETURN 38 | END 39 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/er-transport0.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 0 20 | basal_water = 1 21 | slip_coeff = 2 22 | #sliding_law = 0 23 | vertical_integration = 1 24 | 25 | [time] 26 | tend = 200000. 27 | dt = 5. 28 | ntem = 1. 29 | nvel = 1. 30 | niso = 1. 31 | 32 | [parameters] 33 | flow_factor = 1. 34 | geothermal = -42.e-3 35 | basal_tract_const = 1.e-3 36 | 37 | [Erosion] 38 | update_topo = 0 39 | 40 | [Basic_Transport] 41 | 42 | [CF default] 43 | title: transport, no topo 44 | comment: erosion + transport 45 | 46 | [CF output] 47 | name: er-transport0.nc 48 | frequency: 1000 49 | variables: thk bmlt bwat topg erate erosion seds1 seds2 seds3 taux tauy seds2_max seds2_vx seds2_vy 50 | 51 | [CF input] 52 | name: topo.nc 53 | time: 1 54 | 55 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/erosion4.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 50000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [isostasy] 41 | lithosphere = 1 42 | asthenosphere = 1 43 | 44 | [CF default] 45 | title: erosion, elra 46 | comment: simple erosion, with elra 47 | 48 | [CF output] 49 | name: erosion4.nc 50 | frequency: 1000 51 | variables: thk bmlt temp uvel vvel bwat topg erate erosion slc relx 52 | 53 | [CF input] 54 | name: topo.nc 55 | time: 1 56 | 57 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-1/README.md: -------------------------------------------------------------------------------- 1 | ==================== 2 | EISMINT-1 test cases 3 | ==================== 4 | 5 | To run a particular test case, first create a symbolic link (or copy of) your executable, e.g.: 6 | 7 | ```sh 8 | ln -s ../../../builds/mac-gnu/cism_driver/cism_driver 9 | ``` 10 | 11 | For a serial build, the EISMINT-1, moving margin, test case 3 can be run using: 12 | 13 | ```sh 14 | ./cism_driver e1-mm.3.config 15 | ``` 16 | 17 | and likewise for other test cases ("mm" = moving margin; "fm" = fixed margin). 18 | 19 | For a parallel build, one would use: 20 | 21 | ```sh 22 | mpirun -np 1 ./cism_driver e1-mm.3.config 23 | ``` 24 | 25 | To view the results use ncview or another utility for viewing netCDF files. 26 | 27 | More information on the EISMINT-1 test cases can be found here: 28 | * Huybrechts, P., A.J. Payne, 1996: The EISMINT benchmarks for testing 29 | ice-sheet models. Annals of Glaciology, 23, 1–12. 30 | 31 | 32 | (last edited on 2-6-14 by SFP) 33 | -------------------------------------------------------------------------------- /tests/EISMINT/isos/isos.llfa.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 0.0e3 7 | mb_amplitude = 500000. 8 | period = 60000. 9 | 10 | [grid] 11 | # grid sizes 12 | ewn = 31 13 | nsn = 31 14 | upn = 11 15 | dew = 50000 16 | dns = 50000 17 | 18 | [options] 19 | dycore = 0 20 | temperature = 1 21 | flow_law = 0 22 | #sliding_law = 4 23 | marine_margin = 3 24 | evolution = 2 25 | basal_water = 0 26 | vertical_integration = 0 27 | isostasy = 1 28 | basal_mass_balance = 0 29 | 30 | [time] 31 | tend = 50000. 32 | dt = 10. 33 | ntem = 1. 34 | nvel = 1. 35 | dt_diag = 1000. 36 | idiag = 16 37 | jdiag = 16 38 | 39 | [isostasy] 40 | lithosphere = 0 41 | asthenosphere = 0 42 | 43 | [parameters] 44 | geothermal = -42.e-3 45 | 46 | [CF default] 47 | title: local lithosphere, fluid asthenosphere 48 | 49 | [CF output] 50 | name: isos.llfa.nc 51 | frequency: 1000 52 | variables: topg slc thk uflx vflx bmlt btemp temp uvel vvel wvel relx 53 | 54 | -------------------------------------------------------------------------------- /tests/EISMINT/isos/isos.elfa.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 0.0e3 7 | mb_amplitude = 500000. 8 | period = 60000. 9 | 10 | [grid] 11 | # grid sizes 12 | ewn = 31 13 | nsn = 31 14 | upn = 11 15 | dew = 50000 16 | dns = 50000 17 | 18 | [options] 19 | dycore = 0 20 | temperature = 1 21 | flow_law = 0 22 | #sliding_law = 4 23 | marine_margin = 3 24 | evolution = 2 25 | basal_water = 0 26 | vertical_integration = 0 27 | isostasy = 1 28 | basal_mass_balance = 0 29 | 30 | [time] 31 | tend = 50000. 32 | dt = 10. 33 | ntem = 1. 34 | nvel = 1. 35 | dt_diag = 1000. 36 | idiag = 16 37 | jdiag = 16 38 | 39 | [isostasy] 40 | lithosphere = 1 41 | asthenosphere = 0 42 | 43 | [parameters] 44 | geothermal = -42.e-3 45 | 46 | [CF default] 47 | title: elastic lithosphere, fluid asthenosphere 48 | 49 | [CF output] 50 | name: isos.elfa.nc 51 | frequency: 1000 52 | variables: topg slc thk uflx vflx bmlt btemp temp uvel vvel wvel relx 53 | 54 | -------------------------------------------------------------------------------- /tests/EISMINT/isos/isos.elra.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 0.0e3 7 | mb_amplitude = 500000. 8 | period = 60000. 9 | 10 | [grid] 11 | # grid sizes 12 | ewn = 31 13 | nsn = 31 14 | upn = 11 15 | dew = 50000 16 | dns = 50000 17 | 18 | [options] 19 | dycore = 0 20 | temperature = 1 21 | flow_law = 0 22 | #sliding_law = 4 23 | marine_margin = 3 24 | evolution = 2 25 | basal_water = 0 26 | vertical_integration = 0 27 | isostasy = 1 28 | basal_mass_balance = 0 29 | 30 | [time] 31 | tend = 50000. 32 | dt = 10. 33 | ntem = 1. 34 | nvel = 1. 35 | dt_diag = 1000. 36 | idiag = 16 37 | jdiag = 16 38 | 39 | [isostasy] 40 | lithosphere = 1 41 | asthenosphere = 1 42 | 43 | [parameters] 44 | geothermal = -42.e-3 45 | 46 | [CF default] 47 | title: elastic lithosphere, relaxing asthenosphere 48 | 49 | [CF output] 50 | name: isos.elra.nc 51 | frequency: 1000 52 | variables: topg slc thk uflx vflx bmlt btemp temp uvel vvel wvel relx 53 | 54 | -------------------------------------------------------------------------------- /tests/EISMINT/isos/isos.llra.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-1 test-case 2 | # moving margin 3 | 4 | [EISMINT-1 moving margin] 5 | temperature = -3.150 1.e-2 6 | massbalance = 0.5 1.0e-5 0.0e3 7 | mb_amplitude = 500000. 8 | period = 60000. 9 | 10 | [grid] 11 | # grid sizes 12 | ewn = 31 13 | nsn = 31 14 | upn = 11 15 | dew = 50000 16 | dns = 50000 17 | 18 | [options] 19 | dycore = 0 20 | temperature = 1 21 | flow_law = 0 22 | #sliding_law = 4 23 | marine_margin = 3 24 | evolution = 2 25 | basal_water = 0 26 | vertical_integration = 0 27 | isostasy = 1 28 | basal_mass_balance = 0 29 | 30 | [time] 31 | tend = 50000. 32 | dt = 10. 33 | ntem = 1. 34 | nvel = 1. 35 | dt_diag = 1000. 36 | idiag = 16 37 | jdiag = 16 38 | 39 | [isostasy] 40 | lithosphere = 0 41 | asthenosphere = 1 42 | 43 | [parameters] 44 | geothermal = -42.e-3 45 | 46 | [CF default] 47 | title: local lithosphere, relaxing asthenosphere 48 | 49 | [CF output] 50 | name: isos.llra.nc 51 | frequency: 1000 52 | variables: topg slc thk uflx vflx bmlt btemp temp uvel vvel wvel relx 53 | 54 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/er-transport2.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 200000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [Basic_Transport] 41 | 42 | [isostasy] 43 | 44 | [CF default] 45 | title: transport, llfa 46 | comment: erosion + transport 47 | 48 | [CF output] 49 | name: er-transport2.nc 50 | frequency: 1000 51 | variables: thk bmlt bwat topg erate erosion seds1 seds2 seds3 taux tauy seds2_max seds2_vx seds2_vy slc relx 52 | 53 | [CF input] 54 | name: topo.nc 55 | time: 1 56 | 57 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.crayxt_cnl: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DLINUX -DFORTRANUNDERSCORE -DSPMD -DHAVE_NANOTIME -DBIT64 -DHAVE_COMM_F2C 5 | 6 | FC := ftn -mp 7 | CC := cc -mp 8 | FFLAGS := -i4 -Mdalign -Mextend -byteswapio $(CPPDEF) 9 | CFLAGS := $(CPPDEF) 10 | FREEFLAGS := -Mfree 11 | 12 | .F90.o: 13 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 14 | .F.o: 15 | $(FC) -c $(FFLAGS) -I. $< 16 | .c.o: 17 | $(CC) -c $(CFLAGS) -I. $< 18 | 19 | #------------------------------------------------------------------------ 20 | # Targets/rules that depend on architecture specific variables. 21 | #------------------------------------------------------------------------ 22 | 23 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 24 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 25 | RM := rm 26 | AR := ar 27 | ARFLAGS := -rc 28 | RANLIB := ranlib 29 | 30 | all: libgptl.a 31 | 32 | libgptl.a : $(OBJS) 33 | $(AR) $(ARFLAGS) $@ $(OBJS) 34 | $(RANLIB) $@ 35 | 36 | clean: 37 | $(RM) -f *.o *.mod *.a 38 | 39 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.aix: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DAIX -DSPMD -DHAVE_COMM_F2C 5 | 6 | FC := mpxlf90_r 7 | CC := mpcc_r 8 | FFLAGS := $(CPPDEF) -q64 -qarch=auto 9 | CFLAGS := $(CPPDEF) -q64 -qkeyword=inline 10 | FREEFLAGS := -qsuffix=f=f90:cpp=F90 11 | FIXEDFLAGS := -qfixed=132 12 | 13 | .F90.o: 14 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 15 | .F.o: 16 | $(FC) -c $(FIXEDFLAGS) $(FFLAGS) -I. $< 17 | .c.o: 18 | $(CC) -c $(CFLAGS) -I. $< 19 | 20 | #------------------------------------------------------------------------ 21 | # Targets/rules that depend on architecture specific variables. 22 | #------------------------------------------------------------------------ 23 | 24 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 25 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 26 | RM := rm 27 | AR := ar 28 | ARFLAGS := -rc 29 | RANLIB := ranlib 30 | 31 | all: libgptl.a 32 | 33 | libgptl.a : $(OBJS) 34 | $(AR) $(ARFLAGS) $@ $(OBJS) 35 | $(RANLIB) $@ 36 | 37 | clean: 38 | $(RM) -f *.o *.mod *.a 39 | 40 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/er-transport3.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 200000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [Basic_Transport] 41 | 42 | [isostasy] 43 | lithosphere = 1 44 | 45 | [CF default] 46 | title: transport, elfa 47 | comment: erosion + transport, with elfa 48 | 49 | [CF output] 50 | name: er-transport3.nc 51 | frequency: 1000 52 | variables: thk bmlt bwat topg erate erosion seds1 seds2 seds3 taux tauy seds2_max seds2_vx seds2_vy slc relx 53 | 54 | [CF input] 55 | name: topo.nc 56 | time: 1 57 | 58 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.crayxt_cnl_wpapi: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DLINUX -DFORTRANUNDERSCORE -DSPMD -DHAVE_PAPI -DHAVE_NANOTIME -DBIT64 -DHAVE_COMM_F2C 5 | 6 | FC := ftn -mp 7 | CC := cc -mp 8 | FFLAGS := -i4 -Mdalign -Mextend -byteswapio $(CPPDEF) 9 | CFLAGS := $(CPPDEF) 10 | FREEFLAGS := -Mfree 11 | 12 | .F90.o: 13 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 14 | .F.o: 15 | $(FC) -c $(FFLAGS) -I. $< 16 | .c.o: 17 | $(CC) -c $(CFLAGS) -I. $< 18 | 19 | #------------------------------------------------------------------------ 20 | # Targets/rules that depend on architecture specific variables. 21 | #------------------------------------------------------------------------ 22 | 23 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 24 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 25 | RM := rm 26 | AR := ar 27 | ARFLAGS := -rc 28 | RANLIB := ranlib 29 | 30 | all: libgptl_wpapi.a 31 | 32 | libgptl_wpapi.a : $(OBJS) 33 | $(AR) $(ARFLAGS) $@ $(OBJS) 34 | $(RANLIB) $@ 35 | 36 | clean: 37 | $(RM) -f *.o *.mod *.a 38 | 39 | -------------------------------------------------------------------------------- /tests/unsupported/erosion/er-transport4.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 76 8 | nsn = 76 9 | upn = 11 10 | dew = 20000 11 | dns = 20000 12 | 13 | [options] 14 | dycore = 0 15 | topo_is_relaxed = 1 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | marine_margin = 3 20 | evolution = 0 21 | basal_water = 1 22 | slip_coeff = 2 23 | #sliding_law = 0 24 | vertical_integration = 1 25 | 26 | [time] 27 | tend = 200000. 28 | dt = 5. 29 | ntem = 1. 30 | nvel = 1. 31 | niso = 1. 32 | 33 | [parameters] 34 | flow_factor = 1. 35 | geothermal = -42.e-3 36 | basal_tract_const = 1.e-3 37 | 38 | [Erosion] 39 | 40 | [Basic_Transport] 41 | 42 | [isostasy] 43 | lithosphere = 1 44 | asthenosphere = 1 45 | 46 | [CF default] 47 | title: transport, elra 48 | comment: erosion + transport, with elra 49 | 50 | [CF output] 51 | name: er-transport4.nc 52 | frequency: 1000 53 | variables: thk bmlt bwat topg erate erosion seds1 seds2 seds3 taux tauy seds2_max seds2_vx seds2_vy slc relx 54 | 55 | [CF input] 56 | name: topo.nc 57 | time: 1 58 | 59 | -------------------------------------------------------------------------------- /libglimmer-trilinos/Makefile.Trilinos.export.in: -------------------------------------------------------------------------------- 1 | ## Configure processes this file and replaces the strings in @..@ 2 | ## If configured --with-trilinos, this pulls in a Makefile where 3 | ## Trilinos variables are defined (e.g. Trilinos_LIBS), which 4 | ## are used in libglide/Makefile.am within an if Trilinos block. 5 | ## Else, this just becomes an unused comment 6 | 7 | ## For Trilinos 10.4 or later, use these lines 8 | @TRILINOS_TRUE@include @TRILINOS_PREFIX@/include/Makefile.export.Trilinos 9 | @TRILINOS_TRUE@TRILINOS_LIBS_BASE = $(top_builddir)/libglimmer-trilinos/libglimmertrilinos.la $(Trilinos_LIBRARIES) $(Trilinos_TPL_LIBRARIES) 10 | 11 | ## For versions of Trilinos before 10.4, uncomment these two lines instead to grab 12 | ## libraries from NOX since a unified Makefile.export.Trilinos did not yet exist 13 | #@TRILINOS_TRUE@include @TRILINOS_PREFIX@/include/Makefile.export.NOX 14 | #@TRILINOS_TRUE@TRILINOS_LIBS_BASE = $(top_builddir)/libglimmer-trilinos/libglimmertrilinos.la $(NOX_LIBRARIES) $(NOX_TPL_LIBRARIES) 15 | 16 | TRILINOS_LIBS_ALL = $(TRILINOS_LIBS_BASE) @EXTRA_LDLIBS_SUBST@ 17 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.g.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 2 # 2 = Glissade 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 3 # 3 = incremental remapping 20 | basal_water = 1 21 | slip_coeff = 1 22 | vertical_integration = 0 # glissade does not support option 1 23 | basal_mass_balance = 0 24 | 25 | [ho_options] 26 | which_ho_approx = -1 # -1 = local SIA 27 | which_ho_sparse = 3 # 3 = parallel PCG 28 | 29 | [time] 30 | tend = 200000. 31 | dt = 5. 32 | ntem = 1. 33 | dt_diag = 5000. 34 | idiag = 31 35 | jdiag = 31 36 | 37 | [parameters] 38 | geothermal = -42.e-3 39 | ice_limit = 1. 40 | basal_tract_const = 1.e-3 41 | 42 | [CF default] 43 | title: EISMINT-2 Exp G 44 | comment: forced upper kinematic BC 45 | 46 | [CF output] 47 | name: e2.g.nc 48 | frequency: 1000 49 | variables: thk bmlt btemp temp ubas vbas uvel vvel wvel wgrd acab diffu bwat 50 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.crayxt_cnl_gnu: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DLINUX -DFORTRANUNDERSCORE -DSPMD -DHAVE_NANOTIME -DBIT64 -DHAVE_COMM_F2C 5 | 6 | FC := ftn -fopenmp 7 | CC := cc -fopenmp 8 | # FFLAGS := -i4 -Mdalign -Mextend -byteswapio $(CPPDEF) 9 | FFLAGS := $(CPPDEF) 10 | CFLAGS := $(CPPDEF) 11 | # FREEFLAGS := -Mfree 12 | FREEFLAGS := 13 | 14 | .F90.o: 15 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 16 | .F.o: 17 | $(FC) -c $(FFLAGS) -I. $< 18 | .c.o: 19 | $(CC) -c $(CFLAGS) -I. $< 20 | 21 | #------------------------------------------------------------------------ 22 | # Targets/rules that depend on architecture specific variables. 23 | #------------------------------------------------------------------------ 24 | 25 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 26 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 27 | RM := rm 28 | AR := ar 29 | ARFLAGS := -rc 30 | RANLIB := ranlib 31 | 32 | all: libgptl.a 33 | 34 | libgptl.a : $(OBJS) 35 | $(AR) $(ARFLAGS) $@ $(OBJS) 36 | $(RANLIB) $@ 37 | 38 | clean: 39 | $(RM) -f *.o *.mod *.a 40 | 41 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.linux: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DFORTRANUNDERSCORE -DSPMD -DBIT64 -DHAVE_COMM_F2C -I/usr/include/openmpi 5 | #-DHAVE_NANOTIME 6 | FC := mpif90 7 | CC := mpicc 8 | # FFLAGS := -i4 -Mdalign -Mextend -byteswapio $(CPPDEF) 9 | FFLAGS := $(CPPDEF) 10 | CFLAGS := $(CPPDEF) 11 | # FREEFLAGS := -Mfree 12 | FREEFLAGS := 13 | 14 | .F90.o: 15 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 16 | .F.o: 17 | $(FC) -c $(FFLAGS) -I. $< 18 | .c.o: 19 | $(CC) -c $(CFLAGS) -I. $< 20 | 21 | #------------------------------------------------------------------------ 22 | # Targets/rules that depend on architecture specific variables. 23 | #------------------------------------------------------------------------ 24 | 25 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 26 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 27 | RM := rm 28 | AR := ar 29 | ARFLAGS := -rc 30 | RANLIB := ranlib 31 | 32 | all: libgptl.a 33 | 34 | libgptl.a : $(OBJS) 35 | $(AR) $(ARFLAGS) $@ $(OBJS) 36 | $(RANLIB) $@ 37 | 38 | clean: 39 | $(RM) -f *.o *.mod *.a 40 | 41 | 42 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile.mac: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F .F90 .c .o 3 | 4 | CPPDEF := -DFORTRANUNDERSCORE -DSPMD -DBIT64 -DHAVE_COMM_F2C -I/opt/local/include/openmpi 5 | #-DHAVE_NANOTIME 6 | FC := mpif90 7 | CC := mpicc 8 | # FFLAGS := -i4 -Mdalign -Mextend -byteswapio $(CPPDEF) 9 | FFLAGS := $(CPPDEF) 10 | CFLAGS := $(CPPDEF) 11 | # FREEFLAGS := -Mfree 12 | FREEFLAGS := 13 | 14 | .F90.o: 15 | $(FC) -c $(FREEFLAGS) $(FFLAGS) -I. $< 16 | .F.o: 17 | $(FC) -c $(FFLAGS) -I. $< 18 | .c.o: 19 | $(CC) -c $(CFLAGS) -I. $< 20 | 21 | #------------------------------------------------------------------------ 22 | # Targets/rules that depend on architecture specific variables. 23 | #------------------------------------------------------------------------ 24 | 25 | OBJS := GPTLget_memusage.o GPTLprint_memusage.o GPTLutil.o f_wrappers.o \ 26 | gptl.o gptl_papi.o perf_utils.o perf_mod.o 27 | RM := rm 28 | AR := ar 29 | ARFLAGS := -rc 30 | RANLIB := ranlib 31 | 32 | all: libgptl.a 33 | 34 | libgptl.a : $(OBJS) 35 | $(AR) $(ARFLAGS) $@ $(OBJS) 36 | $(RANLIB) $@ 37 | 38 | clean: 39 | $(RM) -f *.o *.mod *.a 40 | 41 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/csscal.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CSSCAL(N,SA,CX,INCX) 2 | * .. Scalar Arguments .. 3 | REAL SA 4 | INTEGER INCX,N 5 | * .. 6 | * .. Array Arguments .. 7 | COMPLEX CX(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * scales a complex vector by a real constant. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 3/93 to return if incx .le. 0. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | * .. Local Scalars .. 20 | INTEGER I,NINCX 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC AIMAG,CMPLX,REAL 24 | * .. 25 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 26 | IF (INCX.EQ.1) GO TO 20 27 | * 28 | * code for increment not equal to 1 29 | * 30 | NINCX = N*INCX 31 | DO 10 I = 1,NINCX,INCX 32 | CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I))) 33 | 10 CONTINUE 34 | RETURN 35 | * 36 | * code for increment equal to 1 37 | * 38 | 20 DO 30 I = 1,N 39 | CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I))) 40 | 30 CONTINUE 41 | RETURN 42 | END 43 | -------------------------------------------------------------------------------- /utils/build/autocopy-to-build-dir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script needs to be run before the cmake command for CMake 3 | # builds. It should be called from all cmake scripts. 4 | # 5 | # This script auto-generates files that were autogerenated as part 6 | # of the autoconf system. 7 | 8 | echo 9 | echo "Automated copy of config.inc and glimmer_vers.F90 to build directory" 10 | echo 11 | 12 | mkdir -p fortran_autogen_srcs 13 | pushd fortran_autogen_srcs 14 | 15 | if [ $# -eq 1 ]; 16 | then 17 | export CISM_SOURCE_DIR=$1 18 | else 19 | export CISM_SOURCE_DIR=../../../ 20 | echo $1 21 | fi 22 | echo "Auto-copy script is using CISM source directory: " 23 | echo $CISM_SOURCE_DIR 24 | 25 | # Just a copy of a file without version info 26 | # pushd ../libglimmer 27 | echo " --making copy of glimmer_vers.F90" 28 | cp -p $CISM_SOURCE_DIR/libglimmer/glimmer_vers.F90.cmake.in glimmer_vers.F90 29 | 30 | # Just a copy of a file with minimal info 31 | popd 32 | mkdir -p fortran_autocopy_includes 33 | pushd fortran_autocopy_includes 34 | 35 | echo " --making copy of config.inc" 36 | cp -p $CISM_SOURCE_DIR/utils/build/config.inc_generator/config.inc.cmake.in config.inc 37 | popd 38 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.h.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 2 # 2 = Glissade 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | marine_margin = 3 19 | evolution = 3 # 3 = incremental remapping 20 | basal_water = 1 21 | slip_coeff = 2 # could also set slip_coeff = 3 (constant where T = Tpmp) 22 | vertical_integration = 0 # glissade does not support option 1 23 | basal_mass_balance = 0 24 | 25 | [ho_options] 26 | which_ho_approx = -1 # -1 = local SIA 27 | which_ho_sparse = 3 # 3 = parallel PCG 28 | 29 | [time] 30 | tend = 200000. 31 | dt = 5. 32 | ntem = 1. 33 | dt_diag = 5000. 34 | idiag = 31 35 | jdiag = 31 36 | 37 | [parameters] 38 | geothermal = -42.e-3 39 | ice_limit = 1. 40 | basal_tract_const = 1.e-3 41 | 42 | [CF default] 43 | title: EISMINT-2 Exp H 44 | comment: forced upper kinematic BC 45 | 46 | [CF output] 47 | name: e2.h.nc 48 | frequency: 1000 49 | variables: thk bmlt btemp temp ubas vbas uvel vvel wvel wgrd acab diffu bwat 50 | 51 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/ccopy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CCOPY(N,CX,INCX,CY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*),CY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * CCOPY copies a vector x to a vector y. 13 | * 14 | * Further Details 15 | * =============== 16 | * 17 | * jack dongarra, linpack, 3/11/78. 18 | * modified 12/3/93, array(1) declarations changed to array(*) 19 | * 20 | * .. Local Scalars .. 21 | INTEGER I,IX,IY 22 | * .. 23 | IF (N.LE.0) RETURN 24 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 25 | * 26 | * code for unequal increments or equal increments 27 | * not equal to 1 28 | * 29 | IX = 1 30 | IY = 1 31 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 32 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 33 | DO 10 I = 1,N 34 | CY(IY) = CX(IX) 35 | IX = IX + INCX 36 | IY = IY + INCY 37 | 10 CONTINUE 38 | RETURN 39 | * 40 | * code for both increments equal to 1 41 | * 42 | 20 DO 30 I = 1,N 43 | CY(I) = CX(I) 44 | 30 CONTINUE 45 | RETURN 46 | END 47 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.b.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | temperature = -30. 1.67e-5 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 2 # 2 = Glissade 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 3 # 3 = incremental remapping 22 | basal_water = 1 23 | vertical_integration = 0 # glissade does not support option 1 24 | basal_mass_balance = 0 25 | 26 | [ho_options] 27 | which_ho_approx = -1 # -1 = local SIA 28 | which_ho_sparse = 3 # 3 = parallel PCG 29 | 30 | [time] 31 | tstart = 200000. 32 | tend = 400000. 33 | dt = 5. 34 | ntem = 1. 35 | dt_diag = 5000. 36 | idiag = 31 37 | jdiag = 31 38 | 39 | [parameters] 40 | geothermal = -42.e-3 41 | ice_limit = 1. 42 | 43 | [CF default] 44 | title: EISMINT-2 Exp B 45 | comment: forced upper kinematic BC 46 | 47 | [CF output] 48 | name: e2.b.nc 49 | frequency: 1000 50 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 51 | 52 | [CF input] 53 | name: e2.a.restart.nc 54 | time: 2 55 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.c.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.25 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 2 # 2 = Glissade 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 3 # 3 = incremental remapping 22 | basal_water = 1 23 | vertical_integration = 0 # glissade does not support option 1 24 | basal_mass_balance = 0 25 | 26 | [ho_options] 27 | which_ho_approx = -1 # -1 = local SIA 28 | which_ho_sparse = 3 # 3 = parallel PCG 29 | 30 | [time] 31 | tstart = 200000. 32 | tend = 400000. 33 | dt = 5. 34 | ntem = 1. 35 | dt_diag = 5000. 36 | idiag = 31 37 | jdiag = 31 38 | 39 | [parameters] 40 | geothermal = -42.e-3 41 | ice_limit = 1. 42 | 43 | [CF default] 44 | title: EISMINT-2 Exp C 45 | comment: forced upper kinematic BC 46 | 47 | [CF output] 48 | name: e2.c.nc 49 | frequency: 1000 50 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 51 | 52 | [CF input] 53 | name: e2.a.restart.nc 54 | time: 2 55 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.d.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | massbalance = 0.5 1.05e-5 425.0e3 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 2 # 2 = Glissade 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 3 # 3 = incremental remapping 22 | basal_water = 1 23 | vertical_integration = 0 # glissade does not support option 1 24 | basal_mass_balance = 0 25 | 26 | [ho_options] 27 | which_ho_approx = -1 # -1 = local SIA 28 | which_ho_sparse = 3 # 3 = parallel PCG 29 | 30 | [time] 31 | tstart = 200000. 32 | tend = 400000. 33 | dt = 5. 34 | ntem = 1. 35 | dt_diag = 5000. 36 | idiag = 31 37 | jdiag = 31 38 | 39 | [parameters] 40 | geothermal = -42.e-3 41 | ice_limit = 1. 42 | 43 | [CF default] 44 | title: EISMINT-2 Exp D 45 | comment: forced upper kinematic BC 46 | 47 | [CF output] 48 | name: e2.d.nc 49 | frequency: 1000 50 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 51 | 52 | [CF input] 53 | name: e2.a.restart.nc 54 | time: 2 55 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.a.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 2 # 2 = Glissade 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | slip_coeff = 0 19 | marine_margin = 3 20 | evolution = 3 # 3 = incremental remapping 21 | basal_water = 1 22 | vertical_integration = 0 # glissade does not support option 1 23 | basal_mass_balance = 0 24 | 25 | [ho_options] 26 | which_ho_approx = -1 # -1 = local SIA 27 | which_ho_sparse = 3 # 3 = parallel PCG 28 | 29 | [time] 30 | tend = 200000. 31 | dt = 5. 32 | ntem = 1. 33 | dt_diag = 5000. 34 | idiag = 31 35 | jdiag = 31 36 | 37 | [parameters] 38 | geothermal = -42.e-3 39 | ice_limit = 1. 40 | 41 | [CF default] 42 | title: EISMINT-2 Exp A 43 | comment: forced upper kinematic BC 44 | 45 | [CF output] 46 | name: e2.a.nc 47 | frequency: 1000 48 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 49 | 50 | [CF restart] 51 | name: e2.a.restart.nc 52 | xtype: double 53 | frequency: 100000 54 | variables: restart 55 | write_init: F 56 | 57 | -------------------------------------------------------------------------------- /tests/ross/data/kbc.dat: -------------------------------------------------------------------------------- 1 | 54 3 2 | 55 3 3 | 55 4 4 | 55 5 5 | 56 6 6 | 57 6 7 | 57 7 8 | 58 7 9 | 58 8 10 | 58 9 11 | 59 9 12 | 59 10 13 | 60 10 14 | 60 11 15 | 60 12 16 | 61 12 17 | 61 13 18 | 62 13 19 | 62 14 20 | 62 15 21 | 63 15 22 | 63 16 23 | 64 16 24 | 64 17 25 | 65 17 26 | 65 18 27 | 65 19 28 | 66 19 29 | 66 20 30 | 67 20 31 | 67 21 32 | 67 22 33 | 68 22 34 | 68 23 35 | 95 50 36 | 95 51 37 | 96 51 38 | 96 52 39 | 96 53 40 | 97 53 41 | 97 54 42 | 98 54 43 | 98 55 44 | 98 56 45 | 99 56 46 | 99 57 47 | 99 58 48 | 100 58 49 | 100 59 50 | 100 60 51 | 101 60 52 | 101 61 53 | 102 61 54 | 102 62 55 | 102 63 56 | 103 63 57 | 103 64 58 | 103 65 59 | 104 65 60 | 104 66 61 | 104 67 62 | 105 67 63 | 105 68 64 | 106 68 65 | 106 69 66 | 106 70 67 | 107 70 68 | 107 71 69 | 107 72 70 | 108 72 71 | 108 73 72 | 108 74 73 | 109 74 74 | 109 75 75 | 110 75 76 | 110 76 77 | 110 77 78 | -------------------------------------------------------------------------------- /tests/dome/dome.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 10. 11 | dt = 1. 12 | dt_diag = 1. 13 | idiag = 10 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 2 # 1 = glam, 2 = glissade 18 | flow_law = 2 # 0 = isothermal, 2 = temperature dependent 19 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 20 | temperature = 1 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 21 | 22 | [ho_options] 23 | which_ho_babc = 4 # 4 = no-slip at bed 24 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 25 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 26 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 27 | 28 | [parameters] 29 | ice_limit = 1. # min thickness (m) for dynamics 30 | 31 | [CF default] 32 | comment = created with dome.py 33 | title = parabolic dome test case using first-order dynamics 34 | 35 | [CF input] 36 | name = dome.nc 37 | time = 1 38 | 39 | [CF output] 40 | variables = thk usurf uvel vvel velnorm temp 41 | frequency = 1 42 | name = dome.out.nc 43 | 44 | -------------------------------------------------------------------------------- /tests/new/test-forcing.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 5. 11 | dt = 0.15 12 | 13 | [options] 14 | dycore = 2 # 0 = glide, 1 = glam, 2 = glissade 15 | flow_law = 2 # 0 = constant, 2 = Paterson-Budd 16 | evolution = 3 # 3 = remapping 17 | temperature = 1 # 1 = prognostic, 3 = enthalpy 18 | 19 | [ho_options] 20 | which_ho_babc = 4 # 4 = no-slip at bed 21 | which_ho_efvs = 2 # 0 = constant, 2 = nonlinear eff. visc. w/ n=3 22 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = Glissade PCG, 4 = Trilinos for linear solver 23 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 24 | 25 | [parameters] 26 | ice_limit = 1. # min thickness (m) for dynamics 27 | 28 | [CF default] 29 | comment = created with runTest.py 30 | title = parabolic dome test case using first-order dynamics and time-dependent forcing 31 | 32 | [CF input] 33 | name = test-forced.nc 34 | time = 1 35 | 36 | [CF output] 37 | variables = thk usurf uvel vvel velnorm temp artm acab 38 | frequency = 0.0001 39 | name = test-forced.out.nc 40 | 41 | [CF forcing] 42 | name = test-forcing.nc 43 | -------------------------------------------------------------------------------- /utils/build/autogenerate-in-build-dir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script needs to be run before the cmake command for CMake 3 | # builds. It should be called from all cmake scripts. 4 | # 5 | # This script auto-generates files that were autogenerated as part 6 | # of the autoconf system. 7 | 8 | echo 9 | echo "Auto-generating glide_io.F90 in build directory." 10 | echo 11 | 12 | mkdir -p fortran_autogen_srcs 13 | pushd fortran_autogen_srcs 14 | 15 | if [ $# -eq 1 ]; 16 | then 17 | export CISM_SOURCE_DIR=$1 18 | else 19 | export CISM_SOURCE_DIR=../../../ 20 | echo $1 21 | fi 22 | echo "Auto-generate script is using CISM source directory: " 23 | echo $CISM_SOURCE_DIR 24 | 25 | ########################## 26 | # The following lines generate several *_io.F90 files, based on variable definition files: 27 | 28 | echo " --creating glide_io.F90" 29 | 30 | # Save path to source files used in autogeneration 31 | export GLIDE_VARS_PATH=$CISM_SOURCE_DIR/libglide/glide_vars.def 32 | export NCDF_TEMPL_PATH=$CISM_SOURCE_DIR/libglimmer/ncdf_template.F90.in 33 | 34 | # Call python script with source file arguments 35 | python3 -V 36 | python3 $CISM_SOURCE_DIR/utils/build/generate_ncvars.py $GLIDE_VARS_PATH $NCDF_TEMPL_PATH 37 | 38 | popd 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/new/test.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 10. 11 | dt = 1. 12 | dt_diag = 1. 13 | idiag = 10 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 2 # 1 = glam, 2 = glissade 18 | flow_law = 2 # 0 = isothermal, 2 = temperature dependent 19 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 20 | temperature = 1 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 21 | 22 | [ho_options] 23 | which_ho_babc = 4 # 4 = no-slip at bed 24 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 25 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 26 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 27 | 28 | [parameters] 29 | ice_limit = 1. # min thickness (m) for dynamics 30 | 31 | [CF default] 32 | comment = created with runTest.py 33 | title = parabolic dome test case using first-order dynamics 34 | 35 | [CF input] 36 | name = test.nc 37 | time = 1 38 | 39 | [CF output] 40 | variables = thk usurf uvel vvel velnorm temp 41 | frequency = 1 42 | name = test.out.nc 43 | 44 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/cswap.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CSWAP(N,CX,INCX,CY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*),CY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * interchanges two vectors. 13 | * jack dongarra, linpack, 3/11/78. 14 | * modified 12/3/93, array(1) declarations changed to array(*) 15 | * 16 | * 17 | * .. Local Scalars .. 18 | COMPLEX CTEMP 19 | INTEGER I,IX,IY 20 | * .. 21 | IF (N.LE.0) RETURN 22 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 23 | * 24 | * code for unequal increments or equal increments not equal 25 | * to 1 26 | * 27 | IX = 1 28 | IY = 1 29 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 30 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 31 | DO 10 I = 1,N 32 | CTEMP = CX(IX) 33 | CX(IX) = CY(IY) 34 | CY(IY) = CTEMP 35 | IX = IX + INCX 36 | IY = IY + INCY 37 | 10 CONTINUE 38 | RETURN 39 | * 40 | * code for both increments equal to 1 41 | 20 DO 30 I = 1,N 42 | CTEMP = CX(I) 43 | CX(I) = CY(I) 44 | CY(I) = CTEMP 45 | 30 CONTINUE 46 | RETURN 47 | END 48 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.f.config: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | temperature = -50. 1.6700000E-05 5 | 6 | [grid] 7 | # grid sizes 8 | ewn = 61 9 | nsn = 61 10 | upn = 11 11 | dew = 25000 12 | dns = 25000 13 | 14 | [options] 15 | dycore = 2 # 2 = Glissade 16 | temperature = 1 17 | flow_law = 2 18 | isostasy = 0 19 | slip_coeff = 0 20 | marine_margin = 3 21 | evolution = 3 # 3 = incremental remapping 22 | basal_water = 1 23 | vertical_integration = 0 # glissade does not support option 1 24 | basal_mass_balance = 0 25 | 26 | [ho_options] 27 | which_ho_approx = -1 # -1 = local SIA 28 | which_ho_sparse = 3 # 3 = parallel PCG 29 | 30 | [time] 31 | tend = 200000. 32 | dt = 5. 33 | ntem = 1. 34 | dt_diag = 5000. 35 | idiag = 31 36 | jdiag = 31 37 | 38 | [parameters] 39 | geothermal = -42.e-3 40 | ice_limit = 1. 41 | 42 | [CF default] 43 | title: EISMINT-2 Exp F 44 | comment: forced upper kinematic BC 45 | 46 | [CF output] 47 | name: e2.f.nc 48 | frequency: 1000 49 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 50 | 51 | [CF restart] 52 | name: e2.f.restart.nc 53 | frequency: 100000 54 | xtype: double 55 | variables: restart 56 | write_init: F 57 | 58 | -------------------------------------------------------------------------------- /tests/slab/slab.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 20 3 | ewn = 30 4 | nsn = 5 5 | dew = 50 6 | dns = 50 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 0. 11 | dt = 0.01 12 | dt_diag = 0.01 13 | idiag = 15 14 | jdiag = 5 15 | 16 | [options] 17 | dycore = 2 # 2 = glissade 18 | flow_law = 0 # 0 = constant flwa (default = 1.e-16 Pa-n yr-1) 19 | evolution = 3 # 3 = remapping 20 | temperature = 1 # 1 = prognostic 21 | basal_mass_balance = 0 # 0 = basal mbal not in continuity eqn 22 | 23 | [ho_options] 24 | which_ho_babc = 5 # 5 = externally-supplied beta(required by test case) 25 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG 26 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 27 | which_ho_approx = 4 # 2 = BP, 3 = L1L2, 4 = DIVA 28 | diva_slope_correction = .true. # if true, apply slope correction so DIVA resembles BP 29 | 30 | [parameters] 31 | ice_limit = 1. # min thickness (m) for dynamics 32 | geothermal = 0. 33 | 34 | [CF default] 35 | comment = created with slab.py 36 | title = inclined slab test case for higher-order dynamics 37 | 38 | [CF input] 39 | name = slab.nc 40 | time = 1 41 | 42 | [CF output] 43 | variables = thk usurf uvel vvel velnorm topg beta 44 | frequency = 1 45 | name = slab.out.nc 46 | -------------------------------------------------------------------------------- /utils/libgptl/README.CISM: -------------------------------------------------------------------------------- 1 | General Purpose Timing Library (GPTL) is a third-party library for performing timing. It is included as an optional library that can be built into CISM. This version of GPTL is modified from the version in CESM, which is at least a year behind the official version. Documentation for the official version can be found at this link: http://jmrosinski.github.io/GPTL/ 2 | 3 | To use GPTL with CISM, one first must build the GPTL libraries, and then build CISM with the GPTL libraries linked. 4 | 5 | Building GPTL is completely separate from the CISM build system. To do so, use one of the included Makefiles. Makefile.mac is a generic build for a Mac that may require some adjusting for your system. It could also be modified to work with a Linux machine fairly easily. 6 | 7 | To build CISM with GPTL, add the following flags to your cmake build script: 8 | -D CISM_USE_GPTL_INSTRUMENTATION:BOOL=ON \ 9 | -D CISM_GPTL_DIR=/your/path/to/libgptl \ 10 | Then re-source your build script and re-run make. 11 | 12 | When running with a GPTL-enabled CISM executable, you will see the following additional output files in your run directory that include timing information per processor and overall timing statistics: 13 | cism_timing.N where N is the processor number 14 | cism_timing_stats 15 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/scasum.f: -------------------------------------------------------------------------------- 1 | REAL FUNCTION SCASUM(N,CX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * takes the sum of the absolute values of a complex vector and 13 | * returns a single precision result. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 3/93 to return if incx .le. 0. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | * .. Local Scalars .. 20 | REAL STEMP 21 | INTEGER I,NINCX 22 | * .. 23 | * .. Intrinsic Functions .. 24 | INTRINSIC ABS,AIMAG,REAL 25 | * .. 26 | SCASUM = 0.0e0 27 | STEMP = 0.0e0 28 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 29 | IF (INCX.EQ.1) GO TO 20 30 | * 31 | * code for increment not equal to 1 32 | * 33 | NINCX = N*INCX 34 | DO 10 I = 1,NINCX,INCX 35 | STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I))) 36 | 10 CONTINUE 37 | SCASUM = STEMP 38 | RETURN 39 | * 40 | * code for increment equal to 1 41 | * 42 | 20 DO 30 I = 1,N 43 | STEMP = STEMP + ABS(REAL(CX(I))) + ABS(AIMAG(CX(I))) 44 | 30 CONTINUE 45 | SCASUM = STEMP 46 | RETURN 47 | END 48 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/cdotu.f: -------------------------------------------------------------------------------- 1 | COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*),CY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * CDOTU forms the dot product of two vectors. 13 | * 14 | * Further Details 15 | * =============== 16 | * 17 | * jack dongarra, linpack, 3/11/78. 18 | * modified 12/3/93, array(1) declarations changed to array(*) 19 | * 20 | * .. Local Scalars .. 21 | COMPLEX CTEMP 22 | INTEGER I,IX,IY 23 | * .. 24 | CTEMP = (0.0,0.0) 25 | CDOTU = (0.0,0.0) 26 | IF (N.LE.0) RETURN 27 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 28 | * 29 | * code for unequal increments or equal increments 30 | * not equal to 1 31 | * 32 | IX = 1 33 | IY = 1 34 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 35 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 36 | DO 10 I = 1,N 37 | CTEMP = CTEMP + CX(IX)*CY(IY) 38 | IX = IX + INCX 39 | IY = IY + INCY 40 | 10 CONTINUE 41 | CDOTU = CTEMP 42 | RETURN 43 | * 44 | * code for both increments equal to 1 45 | * 46 | 20 DO 30 I = 1,N 47 | CTEMP = CTEMP + CX(I)*CY(I) 48 | 30 CONTINUE 49 | CDOTU = CTEMP 50 | RETURN 51 | END 52 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/drot.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S) 2 | * .. Scalar Arguments .. 3 | DOUBLE PRECISION C,S 4 | INTEGER INCX,INCY,N 5 | * .. 6 | * .. Array Arguments .. 7 | DOUBLE PRECISION DX(*),DY(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * applies a plane rotation. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | DOUBLE PRECISION DTEMP 20 | INTEGER I,IX,IY 21 | * .. 22 | IF (N.LE.0) RETURN 23 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 24 | * 25 | * code for unequal increments or equal increments not equal 26 | * to 1 27 | * 28 | IX = 1 29 | IY = 1 30 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 31 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 32 | DO 10 I = 1,N 33 | DTEMP = C*DX(IX) + S*DY(IY) 34 | DY(IY) = C*DY(IY) - S*DX(IX) 35 | DX(IX) = DTEMP 36 | IX = IX + INCX 37 | IY = IY + INCY 38 | 10 CONTINUE 39 | RETURN 40 | * 41 | * code for both increments equal to 1 42 | * 43 | 20 DO 30 I = 1,N 44 | DTEMP = C*DX(I) + S*DY(I) 45 | DY(I) = C*DY(I) - S*DX(I) 46 | DX(I) = DTEMP 47 | 30 CONTINUE 48 | RETURN 49 | END 50 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/e2.a.config.diva: -------------------------------------------------------------------------------- 1 | # configuration for the EISMINT-2 test-case 2 | 3 | [EISMINT-2] 4 | 5 | [grid] 6 | # grid sizes 7 | ewn = 61 8 | nsn = 61 9 | upn = 11 10 | dew = 25000 11 | dns = 25000 12 | 13 | [options] 14 | dycore = 2 # 2 = Glissade 15 | temperature = 1 16 | flow_law = 2 17 | isostasy = 0 18 | slip_coeff = 0 19 | marine_margin = 3 20 | evolution = 3 # 3 = incremental remapping 21 | basal_water = 1 22 | vertical_integration = 0 # glissade does not support option 1 23 | basal_mass_balance = 0 24 | 25 | [ho_options] 26 | which_ho_approx = 4 # 4 = DIVA 27 | which_ho_sparse = 3 # 3 = parallel PCG 28 | which_ho_nonlinear = 1 # 1 = accelerated Picard 29 | which_ho_precond = 1 # 1 = diagonal 30 | which_ho_babc = 4 # 4 = no slip 31 | 32 | [time] 33 | tend = 200000. 34 | dt = 5. 35 | ntem = 1. 36 | dt_diag = 5000. 37 | idiag = 31 38 | jdiag = 31 39 | 40 | [parameters] 41 | geothermal = -42.e-3 42 | ice_limit = 1. 43 | 44 | [CF default] 45 | title: EISMINT-2 Exp A 46 | comment: forced upper kinematic BC 47 | 48 | [CF output] 49 | name: e2.a.nc 50 | frequency: 1000 51 | variables: thk bmlt btemp temp uvel vvel wvel wgrd acab diffu 52 | 53 | [CF restart] 54 | name: e2.a.restart.nc 55 | xtype: double 56 | frequency: 100000 57 | variables: restart 58 | write_init: F 59 | 60 | -------------------------------------------------------------------------------- /libdycore/BISICLES/BisiclesToGlimmer.H: -------------------------------------------------------------------------------- 1 | // The DyCoreToGlimmer class provides methods to move Glimmer Fortran data to C++ structures 2 | // for access by the Chombo-based BISICLES model. The structure names and structure member 3 | // names mostly correspond to derived types defined in Glimmer. In general, pointers to 4 | // the Fortran data arrays are used, rather than copies of these arrays. This saves space 5 | // and reduces the steps needed to update the Glimmer data between calls to the BISICLES 6 | // ice sheet modeling program. Methods are provided to set these array pointers, and 7 | // copy array dimension information. Objects of this class are accessed by extern C 8 | // routines in bike_to_glim_extern.cpp, and by the BISICLES front end. DMR--5/24/10 9 | 10 | #ifndef BISICLESTOGLIMMER 11 | #define BISICLESTOGLIMMER 12 | 13 | 14 | #include 15 | #include 16 | #include "bike_driver.H" 17 | #include "../DyCoreToGlimmer.H" 18 | 19 | 20 | class BisiclesToGlimmer : public DyCoreToGlimmer 21 | { 22 | private: 23 | // AmrIce bisicles_object; 24 | 25 | public: 26 | 27 | //DynCoreToGlimmer BisiclesToGlimmer(); 28 | int initDyCore(const char * input_fname); 29 | // cur_time_yr is updated in place as solution is evolved 30 | int runDyCore(double& cur_time_yr, const double time_inc_yr); 31 | int deleteDyCore(); 32 | 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/caxpy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY) 2 | * .. Scalar Arguments .. 3 | COMPLEX CA 4 | INTEGER INCX,INCY,N 5 | * .. 6 | * .. Array Arguments .. 7 | COMPLEX CX(*),CY(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * CAXPY constant times a vector plus a vector. 14 | * 15 | * Further Details 16 | * =============== 17 | * 18 | * jack dongarra, linpack, 3/11/78. 19 | * modified 12/3/93, array(1) declarations changed to array(*) 20 | * 21 | * .. Local Scalars .. 22 | INTEGER I,IX,IY 23 | * .. 24 | * .. External Functions .. 25 | REAL SCABS1 26 | EXTERNAL SCABS1 27 | * .. 28 | IF (N.LE.0) RETURN 29 | IF (SCABS1(CA).EQ.0.0E+0) RETURN 30 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 31 | * 32 | * code for unequal increments or equal increments 33 | * not equal to 1 34 | * 35 | IX = 1 36 | IY = 1 37 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 38 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 39 | DO 10 I = 1,N 40 | CY(IY) = CY(IY) + CA*CX(IX) 41 | IX = IX + INCX 42 | IY = IY + INCY 43 | 10 CONTINUE 44 | RETURN 45 | * 46 | * code for both increments equal to 1 47 | * 48 | 20 DO 30 I = 1,N 49 | CY(I) = CY(I) + CA*CX(I) 50 | 30 CONTINUE 51 | RETURN 52 | END 53 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2/README.md: -------------------------------------------------------------------------------- 1 | ==================== 2 | EISMINT-2 test cases 3 | ==================== 4 | 5 | To run a particular test case, first create a symbolic link (or copy of) your 6 | executable, e.g.: 7 | 8 | ```sh 9 | ln -s ../../../builds/mac-gnu/cism_driver/cism_driver 10 | ``` 11 | 12 | For a serial build, EISMINT-2 test A can be run using: 13 | 14 | ```sh 15 | ./cism_driver e2.a.config 16 | ``` 17 | 18 | For a parallel build, one would use: 19 | 20 | ```sh 21 | mpirun -np 1 ./cism_driver e2.a.config 22 | ``` 23 | 24 | and likewise for other test cases. 25 | 26 | Note that some tests use output "hotstart" files (marked with a "hot" 27 | extension) from previous tests as input files, so the tests should be run 28 | sequentially, starting with test A. 29 | 30 | To view the results use ncview or another utility for viewing netCDF files. 31 | 32 | More information on the EISMINT-2 test cases can be found here: 33 | * Payne, A. J. and Coauthors, 2000: Results from the EISMINT model 34 | intercomparison: the effects of thermomechanical coupling. J Glaciol, 46, 35 | 227–238. 36 | 37 | (last edited on 2-6-14 by SFP) 38 | 39 | WHL TODO (Aug. 2021): 40 | * Add a script that will run the full suite of EISMINT-2 tests 41 | * Add a directory of config files for Glissade EISMINT-2 tests, with the option to run in parallel 42 | 43 | -------------------------------------------------------------------------------- /tests/dome/dome-forcing.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 5. 11 | dt = 0.15 12 | 13 | [options] 14 | dycore = 2 # 0 = glide, 1 = glam, 2 = glissade 15 | flow_law = 2 # 0 = constant, 2 = Paterson-Budd 16 | evolution = 3 # 3 = remapping 17 | temperature = 1 # 1 = prognostic, 3 = enthalpy 18 | 19 | [ho_options] 20 | which_ho_babc = 4 # 4 = no-slip at bed 21 | which_ho_efvs = 2 # 0 = constant, 2 = nonlinear eff. visc. w/ n=3 22 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = Glissade PCG, 4 = Trilinos for linear solver 23 | which_ho_nonlinear = 0 # 0 = Picard, 1 = JFNK 24 | 25 | [parameters] 26 | ice_limit = 1. # min thickness (m) for dynamics 27 | 28 | [CF default] 29 | comment = created with dome.py 30 | title = parabolic dome test case using first-order dynamics and time-dependent forcing 31 | 32 | [CF input] 33 | name = dome-forced.nc 34 | time = 1 35 | 36 | [CF output] 37 | variables = thk usurf uvel vvel velnorm temp artm acab 38 | frequency = 0.0001 39 | name = dome-forced.out.nc 40 | 41 | # An example of how to use a forcing file. 42 | # This file is generated by dome.forcing.py 43 | # which needs to be run before using this config file. 44 | [CF forcing] 45 | name = dome-forcing.nc 46 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/srot.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S) 2 | * .. Scalar Arguments .. 3 | REAL C,S 4 | INTEGER INCX,INCY,N 5 | * .. 6 | * .. Array Arguments .. 7 | REAL SX(*),SY(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * applies a plane rotation. 14 | * 15 | * Further Details 16 | * =============== 17 | * 18 | * jack dongarra, linpack, 3/11/78. 19 | * modified 12/3/93, array(1) declarations changed to array(*) 20 | * 21 | * 22 | 23 | * .. Local Scalars .. 24 | REAL STEMP 25 | INTEGER I,IX,IY 26 | * .. 27 | IF (N.LE.0) RETURN 28 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 29 | * 30 | * code for unequal increments or equal increments not equal 31 | * to 1 32 | * 33 | IX = 1 34 | IY = 1 35 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 36 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 37 | DO 10 I = 1,N 38 | STEMP = C*SX(IX) + S*SY(IY) 39 | SY(IY) = C*SY(IY) - S*SX(IX) 40 | SX(IX) = STEMP 41 | IX = IX + INCX 42 | IY = IY + INCY 43 | 10 CONTINUE 44 | RETURN 45 | * 46 | * code for both increments equal to 1 47 | * 48 | 20 DO 30 I = 1,N 49 | STEMP = C*SX(I) + S*SY(I) 50 | SY(I) = C*SY(I) - S*SX(I) 51 | SX(I) = STEMP 52 | 30 CONTINUE 53 | RETURN 54 | END 55 | -------------------------------------------------------------------------------- /libglad/README: -------------------------------------------------------------------------------- 1 | This directory contains an alternative to glint that can be used when a GCM 2 | passes already-downscaled fields: glad (where the "a.d." stands for "already 3 | downscaled"). glad acts as a lightweight layer between the GCM and the rest of 4 | CISM. It is responsible for: 5 | 6 | (1) Handling time stepping and temporal averaging 7 | 8 | (2) Providing a simpler interface to the climate model, rather than requiring 9 | the climate model to make detailed calls to things like glide_tstep_p1, etc. 10 | 11 | (3) Translating inputs and outputs into appropriate quantities 12 | 13 | Eventually, it is possible that this layer could be removed, moving some of its 14 | functionality up into the GLC layer of CESM/ACME, and some of its functionality 15 | down into the rest of the CISM code. However, we may choose to keep this 16 | lightweight layer in place, because it does have some value. 17 | 18 | ---- 19 | 20 | The main differences between the code here and the code in libglint are: 21 | 22 | (1) libglad does not do any upscaling / downscaling / interpolation 23 | 24 | (2) libglad currently only works with SMB inputs - not PDD, etc. 25 | 26 | ---- 27 | 28 | Note that a few modules here are also used by libglint, including: 29 | 30 | - glad_constants.F90 31 | 32 | - glad_restart_gcm.F90 33 | 34 | So those may contain a bit of code that is needed by libglint but not by 35 | libglad. 36 | 37 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/isamax.f: -------------------------------------------------------------------------------- 1 | INTEGER FUNCTION ISAMAX(N,SX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL SX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * finds the index of element having max. absolute value. 13 | * jack dongarra, linpack, 3/11/78. 14 | * modified 3/93 to return if incx .le. 0. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | REAL SMAX 20 | INTEGER I,IX 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC ABS 24 | * .. 25 | ISAMAX = 0 26 | IF (N.LT.1 .OR. INCX.LE.0) RETURN 27 | ISAMAX = 1 28 | IF (N.EQ.1) RETURN 29 | IF (INCX.EQ.1) GO TO 20 30 | * 31 | * code for increment not equal to 1 32 | * 33 | IX = 1 34 | SMAX = ABS(SX(1)) 35 | IX = IX + INCX 36 | DO 10 I = 2,N 37 | IF (ABS(SX(IX)).LE.SMAX) GO TO 5 38 | ISAMAX = I 39 | SMAX = ABS(SX(IX)) 40 | 5 IX = IX + INCX 41 | 10 CONTINUE 42 | RETURN 43 | * 44 | * code for increment equal to 1 45 | * 46 | 20 SMAX = ABS(SX(1)) 47 | DO 30 I = 2,N 48 | IF (ABS(SX(I)).LE.SMAX) GO TO 30 49 | ISAMAX = I 50 | SMAX = ABS(SX(I)) 51 | 30 CONTINUE 52 | RETURN 53 | END 54 | -------------------------------------------------------------------------------- /libdycore/FELIX/FelixToGlimmer.H: -------------------------------------------------------------------------------- 1 | // The DyCoreToGlimmer class provides methods to move Glimmer Fortran data to C++ structures 2 | // for access by the Chombo-based FELIX model. The structure names and structure member 3 | // names mostly correspond to derived types defined in Glimmer. In general, pointers to 4 | // the Fortran data arrays are used, rather than copies of these arrays. This saves space 5 | // and reduces the steps needed to update the Glimmer data between calls to the FELIX 6 | // ice sheet modeling program. Methods are provided to set these array pointers, and 7 | // copy array dimension information. Objects of this class are accessed by extern C 8 | // routines in felix_to_glim_extern.cpp, and by the FELIX front end. DMR--5/24/10 9 | 10 | #ifndef FELIXTOGLIMMER 11 | #define FELIXTOGLIMMER 12 | 13 | 14 | #include 15 | #include 16 | #include "/home/ikalash/Desktop/clean/Albany2/src/FELIX/interface_with_cism/felix_driver.H" 17 | #include "../DyCoreToGlimmer.H" 18 | 19 | 20 | class FelixToGlimmer : public DyCoreToGlimmer 21 | { 22 | private: 23 | // AmrIce bisicles_object; 24 | 25 | public: 26 | 27 | //DynCoreToGlimmer FelixToGlimmer(); 28 | int initDyCore(const char * input_fname); 29 | // cur_time_yr is updated in place as solution is evolved 30 | int runDyCore(float& cur_time_yr, const float time_inc_yr); 31 | int deleteDyCore(); 32 | 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/idamax.f: -------------------------------------------------------------------------------- 1 | INTEGER FUNCTION IDAMAX(N,DX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION DX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * finds the index of element having max. absolute value. 13 | * jack dongarra, linpack, 3/11/78. 14 | * modified 3/93 to return if incx .le. 0. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | DOUBLE PRECISION DMAX 20 | INTEGER I,IX 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC DABS 24 | * .. 25 | IDAMAX = 0 26 | IF (N.LT.1 .OR. INCX.LE.0) RETURN 27 | IDAMAX = 1 28 | IF (N.EQ.1) RETURN 29 | IF (INCX.EQ.1) GO TO 20 30 | * 31 | * code for increment not equal to 1 32 | * 33 | IX = 1 34 | DMAX = DABS(DX(1)) 35 | IX = IX + INCX 36 | DO 10 I = 2,N 37 | IF (DABS(DX(IX)).LE.DMAX) GO TO 5 38 | IDAMAX = I 39 | DMAX = DABS(DX(IX)) 40 | 5 IX = IX + INCX 41 | 10 CONTINUE 42 | RETURN 43 | * 44 | * code for increment equal to 1 45 | * 46 | 20 DMAX = DABS(DX(1)) 47 | DO 30 I = 2,N 48 | IF (DABS(DX(I)).LE.DMAX) GO TO 30 49 | IDAMAX = I 50 | DMAX = DABS(DX(I)) 51 | 30 CONTINUE 52 | RETURN 53 | END 54 | -------------------------------------------------------------------------------- /libglad/glad_vars.def: -------------------------------------------------------------------------------- 1 | #[] 2 | #dimensions: time, y1, x1 3 | #units: 4 | #long_name: 5 | #data: 6 | #factor: 7 | 8 | # setup for code generator 9 | [VARSET] 10 | # prefix of the generated module 11 | name: glad 12 | # f90 type containing all necessary data 13 | datatype: glad_instance 14 | # module where type is defined 15 | datamod: glad_type 16 | # path to parallel derived type 17 | datapath: data%model 18 | 19 | [lat] 20 | dimensions: time, y1, x1 21 | units: degreeN 22 | long_name: latitude 23 | standard_name: latitude 24 | data: data%lat 25 | load: 1 26 | 27 | [lon] 28 | dimensions: time, y1, x1 29 | units: degreeE 30 | long_name: longitude 31 | data: data%lon 32 | load: 1 33 | standard_name: longitude 34 | 35 | [rofi_tavg] 36 | dimensions: time, y1, x1 37 | units: kg m-2 s-1 38 | long_name: solid calving flux 39 | data: data%rofi_tavg 40 | load: 1 41 | coordinates: lon lat 42 | 43 | [rofl_tavg] 44 | dimensions: time, y1, x1 45 | units: kg m-2 s-1 46 | long_name: liquid runoff flux 47 | data: data%rofl_tavg 48 | load: 1 49 | coordinates: lon lat 50 | 51 | [hflx_tavg] 52 | dimensions: time, y1, x1 53 | units: W m-2 54 | long_name: heat flux to ice surface 55 | data: data%hflx_tavg 56 | load: 1 57 | coordinates: lon lat 58 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/icamax.f: -------------------------------------------------------------------------------- 1 | INTEGER FUNCTION ICAMAX(N,CX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * finds the index of element having max. absolute value. 13 | * jack dongarra, linpack, 3/11/78. 14 | * modified 3/93 to return if incx .le. 0. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | REAL SMAX 20 | INTEGER I,IX 21 | * .. 22 | * .. External Functions .. 23 | REAL SCABS1 24 | EXTERNAL SCABS1 25 | * .. 26 | ICAMAX = 0 27 | IF (N.LT.1 .OR. INCX.LE.0) RETURN 28 | ICAMAX = 1 29 | IF (N.EQ.1) RETURN 30 | IF (INCX.EQ.1) GO TO 20 31 | * 32 | * code for increment not equal to 1 33 | * 34 | IX = 1 35 | SMAX = SCABS1(CX(1)) 36 | IX = IX + INCX 37 | DO 10 I = 2,N 38 | IF (SCABS1(CX(IX)).LE.SMAX) GO TO 5 39 | ICAMAX = I 40 | SMAX = SCABS1(CX(IX)) 41 | 5 IX = IX + INCX 42 | 10 CONTINUE 43 | RETURN 44 | * 45 | * code for increment equal to 1 46 | * 47 | 20 SMAX = SCABS1(CX(1)) 48 | DO 30 I = 2,N 49 | IF (SCABS1(CX(I)).LE.SMAX) GO TO 30 50 | ICAMAX = I 51 | SMAX = SCABS1(CX(I)) 52 | 30 CONTINUE 53 | RETURN 54 | END 55 | -------------------------------------------------------------------------------- /tests/stream/stream.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 2 3 | ewn = 15 4 | nsn = 31 5 | dew = 2000.0 6 | dns = 2000.0 7 | 8 | [time] 9 | tstart = 0.0 10 | tend = 0.0 11 | dt = 1.0 12 | 13 | [options] 14 | dycore = 2 # 1 = glam, 2 = glissade 15 | flow_law = 0 # 0 = isothermal, 2 = temperature dependent 16 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 17 | 18 | [ho_options] 19 | which_ho_babc = 15 # till yield stress map taken from .nc input 20 | which_ho_efvs = 2 # nonlinear eff. visc. w/ n=3 21 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 22 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 23 | which_ho_approx = 2 # 1 = SSA, 2 = Blatter-Pattyn, 3 = L1L2 24 | which_ho_precond = 1 # 0 = none, 1 = diagonal, 2 = SIA based (ONLY use for which_ho_approx = 2) 25 | which_ho_assemble_beta = 1 # 0=smoothed by FEM assembly, 1 = local approx. 26 | glissade_maxiter = 300 # max. no. of nonlinear (Picard) iterations for Glissade 27 | 28 | [parameters] 29 | periodic_offset_ew = 30.0 30 | beta_grounded_min = 0. 31 | 32 | [CF default] 33 | comment = none 34 | title = simple ice stream - yield stress set for analytical solution 35 | 36 | [CF input] 37 | name = stream.nc 38 | time = 1 39 | 40 | [CF output] 41 | variables = usrf topg thk flwa uvel vvel velnorm tauf 42 | frequency = 1 43 | name = stream.out.nc 44 | xtype = double 45 | -------------------------------------------------------------------------------- /tests/halfar/halfar.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 200. 11 | dt = 5.0 12 | dt_diag = 5.0 13 | idiag = 10 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 0 ;# 0 = glide, 1 = glam 18 | flow_law = 0 ;# 0 = NOTE: flow_law option needs to be 0 for the test case to work properly. 19 | evolution = 2 ;# 2 = iterated diffusion 20 | temperature = 0 ;# 0 = isothermal temp. If temp is turned on, will not affect flwa because flow_law=0. 21 | basal_mass_balance = 0 ;# 0 = bmlt not in continuity equation 22 | 23 | [ho_options] 24 | # Note: these are ignored for SIA (glide dycore) 25 | which_ho_babc = 4 ;# 4 = no-slip at bed 26 | which_ho_efvs = 2 ;# 0 = constant, 2 = nonlinear eff. visc. w/ n=3 27 | which_ho_sparse = 1 ;# 1 = SLAP GMRES, 4 = Trilinos for linear solver 28 | which_ho_nonlinear = 1 ;# 0 = Picard, 1 = accelerated Picard 29 | 30 | [parameters] 31 | ice_limit = 10. ;# min thickness (m) for dynamics 32 | default_flwa = 1.0e-16 ;# NOTE: The Halfar testing script requires that flwa is supplied here! 33 | 34 | [CF default] 35 | comment = created with halfar.py 36 | title = halfar dome test case 37 | 38 | [CF input] 39 | name = halfar.nc 40 | time = 1 41 | 42 | [CF output] 43 | variables = restart 44 | # Note: 'restart' auto-expands to the important state variables 45 | frequency = 5. 46 | name = halfar.out.nc 47 | 48 | -------------------------------------------------------------------------------- /utils/libgptl/Makefile_cesm: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .SUFFIXES: .F90 .o .c .f90 3 | # name of macros file - but default this is generic 4 | 5 | VPATH := $(GPTL_DIR) 6 | 7 | ifeq ($(strip $(MACFILE)),) 8 | MACFILE := Macros 9 | endif 10 | 11 | # Machine specific macros file 12 | # This must be included before any settings are overwritten 13 | # But must be AFTER any definitions it uses are defined. 14 | # So be careful if moving this either earlier or later in the makefile!!! 15 | include $(MACFILE) 16 | 17 | 18 | OBJS = gptl.o GPTLutil.o GPTLget_memusage.o GPTLprint_memusage.o \ 19 | gptl_papi.o f_wrappers.o perf_mod.o perf_utils.o 20 | 21 | 22 | libgptl.a: $(OBJS) 23 | $(AR) ruv $@ $(OBJS) 24 | 25 | 26 | 27 | .c.o: 28 | $(CC) -c $(INCLDIR) $(INCS) $(CFLAGS) $(CPPDEFS) $< 29 | .F.o: 30 | $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FPPDEFS) $(FIXEDFLAGS) $< 31 | .f90.o: 32 | $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) $< 33 | .F90.o: 34 | $(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FPPDEFS) $(FREEFLAGS) $< 35 | 36 | mostlyclean: 37 | $(RM) -f *.f *.f90 38 | 39 | clean: 40 | $(RM) -f *.f *.f90 *.d *.$(MOD_SUFFIX) $(OBJS) 41 | 42 | 43 | install: libgptl.a 44 | cp perf_mod.$(MOD_SUFFIX) $(INCROOT) 45 | cp libgptl.a $(LIBROOT) 46 | 47 | 48 | perf_mod.o: perf_utils.o 49 | f_wrappers.o: gptl.h private.h 50 | f_wrappers_pmpi.o: gptl.h private.h 51 | gptl.o: gptl.h private.h 52 | util.o: gptl.h private.h 53 | gptl_papi.o: gptl.h private.h 54 | pmpi.o: gptl.h private.h 55 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/cdotc.f: -------------------------------------------------------------------------------- 1 | COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX CX(*),CY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * forms the dot product of two vectors, conjugating the first 13 | * vector. 14 | * 15 | * Further Details 16 | * =============== 17 | * 18 | * jack dongarra, linpack, 3/11/78. 19 | * modified 12/3/93, array(1) declarations changed to array(*) 20 | * 21 | * .. Local Scalars .. 22 | COMPLEX CTEMP 23 | INTEGER I,IX,IY 24 | * .. 25 | * .. Intrinsic Functions .. 26 | INTRINSIC CONJG 27 | * .. 28 | CTEMP = (0.0,0.0) 29 | CDOTC = (0.0,0.0) 30 | IF (N.LE.0) RETURN 31 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 32 | * 33 | * code for unequal increments or equal increments 34 | * not equal to 1 35 | * 36 | IX = 1 37 | IY = 1 38 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 39 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 40 | DO 10 I = 1,N 41 | CTEMP = CTEMP + CONJG(CX(IX))*CY(IY) 42 | IX = IX + INCX 43 | IY = IY + INCY 44 | 10 CONTINUE 45 | CDOTC = CTEMP 46 | RETURN 47 | * 48 | * code for both increments equal to 1 49 | * 50 | 20 DO 30 I = 1,N 51 | CTEMP = CTEMP + CONJG(CX(I))*CY(I) 52 | 30 CONTINUE 53 | CDOTC = CTEMP 54 | RETURN 55 | END 56 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/sscal.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SSCAL(N,SA,SX,INCX) 2 | * .. Scalar Arguments .. 3 | REAL SA 4 | INTEGER INCX,N 5 | * .. 6 | * .. Array Arguments .. 7 | REAL SX(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * scales a vector by a constant. 14 | * uses unrolled loops for increment equal to 1. 15 | * jack dongarra, linpack, 3/11/78. 16 | * modified 3/93 to return if incx .le. 0. 17 | * modified 12/3/93, array(1) declarations changed to array(*) 18 | * 19 | * 20 | * .. Local Scalars .. 21 | INTEGER I,M,MP1,NINCX 22 | * .. 23 | * .. Intrinsic Functions .. 24 | INTRINSIC MOD 25 | * .. 26 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 27 | IF (INCX.EQ.1) GO TO 20 28 | * 29 | * code for increment not equal to 1 30 | * 31 | NINCX = N*INCX 32 | DO 10 I = 1,NINCX,INCX 33 | SX(I) = SA*SX(I) 34 | 10 CONTINUE 35 | RETURN 36 | * 37 | * code for increment equal to 1 38 | * 39 | * 40 | * clean-up loop 41 | * 42 | 20 M = MOD(N,5) 43 | IF (M.EQ.0) GO TO 40 44 | DO 30 I = 1,M 45 | SX(I) = SA*SX(I) 46 | 30 CONTINUE 47 | IF (N.LT.5) RETURN 48 | 40 MP1 = M + 1 49 | DO 50 I = MP1,N,5 50 | SX(I) = SA*SX(I) 51 | SX(I+1) = SA*SX(I+1) 52 | SX(I+2) = SA*SX(I+2) 53 | SX(I+3) = SA*SX(I+3) 54 | SX(I+4) = SA*SX(I+4) 55 | 50 CONTINUE 56 | RETURN 57 | END 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore editor temporaries and backups 2 | *~ 3 | .#* 4 | \#*# 5 | *.swp 6 | 7 | # Ignore python bytecode files 8 | *.pyc 9 | 10 | # Ignore build temporary files 11 | CMakeCache.txt 12 | CMakeFiles 13 | Makefile 14 | autocopy.log 15 | Makefile.am 16 | build 17 | cmake_install.cmake 18 | fortran_autocopy_includes 19 | fortran_autogen_srcs 20 | fortran_mod_files 21 | lib 22 | 23 | #ignore cism_driver executables 24 | cism_driver 25 | 26 | #ignore test outputs 27 | results 28 | *config.log 29 | *out.nc 30 | *restart.nc 31 | output 32 | *.o* 33 | e1-mm.3.nc 34 | isos.elra.nc 35 | mismip.config 36 | mismip3d.config 37 | mismip3dInit.nc 38 | greenland_20km.config.pdd.log 39 | greenland_20km.config.smb.log 40 | pbsout.txt 41 | linear 42 | P75R 43 | P75S 44 | Stnd 45 | mismip+Ice0 46 | 47 | #Ignore compiled topography files 48 | bin_to_cube/bin_to_cube 49 | bin_to_cube/bin_to_cube.o 50 | bin_to_cube/shr_kind_mod.mod 51 | bin_to_cube/shr_kind_mod.o 52 | cube_to_target/cube_to_target 53 | cube_to_target/cube_to_target.o 54 | cube_to_target/reconstruct.mod 55 | cube_to_target/reconstruct.o 56 | cube_to_target/remap.mod 57 | cube_to_target/remap.o 58 | cube_to_target/ridge_ana.mod 59 | cube_to_target/ridge_ana.o 60 | cube_to_target/rot.o 61 | cube_to_target/rotation.mod 62 | cube_to_target/shared_vars.mod 63 | cube_to_target/shared_vars.o 64 | cube_to_target/shr_kind_mod.mod 65 | cube_to_target/shr_kind_mod.o 66 | cube_to_target/smooth_topo_cube.o 67 | cube_to_target/smooth_topo_cube_sph.mod 68 | -------------------------------------------------------------------------------- /libglimmer-trilinos/matrixInterface.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TRILINOSMATIX_INTERFACE_H 2 | #define TRILINOSMATIX_INTERFACE_H 3 | 4 | #include 5 | #include "Epetra_Comm.h" 6 | #include "Epetra_Map.h" 7 | #include "Epetra_LocalMap.h" 8 | #ifdef GLIMMER_MPI 9 | #include "mpi.h" 10 | #include "Epetra_MpiComm.h" 11 | #else 12 | #include "Epetra_SerialComm.h" 13 | #endif 14 | #include "Epetra_CrsMatrix.h" 15 | #include "Epetra_Vector.h" 16 | #include "Epetra_Import.h" 17 | 18 | #include "Teuchos_ConfigDefs.hpp" 19 | #include "Teuchos_FancyOStream.hpp" 20 | 21 | class TrilinosMatrix_Interface { 22 | public: 23 | // Constructor 24 | TrilinosMatrix_Interface(const Teuchos::RCP& rowMap, 25 | int bandwidth, const Epetra_Comm& comm); 26 | 27 | // Destructor 28 | ~TrilinosMatrix_Interface(); 29 | 30 | // Accessors 31 | bool isSparsitySet() const; 32 | int bandwidth() const; 33 | int matrixOrder() const; 34 | const Epetra_Map& getRowMap() const; 35 | Teuchos::RCP& getOperator(); 36 | 37 | // Mutators 38 | void finalizeSparsity(); // Call FillComplet to lock in sparsity pattern 39 | void updateOperator(Teuchos::RCP newOperator); 40 | 41 | private: 42 | bool isFillCompleted_; // to indicate if operator_ is "FillComplete()"ed 43 | int bandwidth_; 44 | int matrixOrder_; 45 | const Epetra_Comm& comm_; 46 | Teuchos::RCP operator_; 47 | Teuchos::RCP rowMap_; 48 | }; 49 | #endif 50 | -------------------------------------------------------------------------------- /tests/EISMINT/isos/README.md: -------------------------------------------------------------------------------- 1 | =================== 2 | Isostasy test cases 3 | =================== 4 | 5 | The test cases in this directory demonstrate the range of options for modeling 6 | isostatic bedrock adjustment coupled to ice thickness evolution. The ice 7 | evolution is based on a modified EISMINT-2 test case for an idealized, 8 | axisymmetric ice sheet, which grows and then shrinks as a function of the mass 9 | balance over the course of the model run. 10 | 11 | Four configuration files allow for the four possible combinations of modeling 12 | the bedrock response: 13 | 14 | * llfa - local lithosphere, fluid asthenosphere 15 | * llra - local lithosphere, relaxed asthenosphere 16 | * elfa - elastic lithosphere, fluid asthenosphere 17 | * elra - elastic lithosphere, relaxed asthenosphere 18 | 19 | See the documentation for more discussion of these different models. 20 | 21 | To run a particular test case, first create a symbolic link (or copy of) your 22 | executable, e.g.: 23 | 24 | ```sh 25 | ln -s ../../../builds/mac-gnu/cism_driver/cism_driver 26 | ``` 27 | 28 | For a serial build, the EISMINT-1, moving margin, test case 3 can be run using: 29 | 30 | ```sh 31 | ./cism_driver isos.elra.config 32 | ``` 33 | 34 | and likewise for other test cases. 35 | 36 | For a parallel build, one would use: 37 | 38 | ```sh 39 | mpirun -np 1 ./cism_driver isos.elra.config 40 | ``` 41 | 42 | To view the results use ncview or another utility for viewing netCDF files. 43 | 44 | (last edited on 2-6-14 by SFP) 45 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/dscal.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DSCAL(N,DA,DX,INCX) 2 | * .. Scalar Arguments .. 3 | DOUBLE PRECISION DA 4 | INTEGER INCX,N 5 | * .. 6 | * .. Array Arguments .. 7 | DOUBLE PRECISION DX(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | ** 13 | * scales a vector by a constant. 14 | * uses unrolled loops for increment equal to one. 15 | * jack dongarra, linpack, 3/11/78. 16 | * modified 3/93 to return if incx .le. 0. 17 | * modified 12/3/93, array(1) declarations changed to array(*) 18 | * 19 | * 20 | * .. Local Scalars .. 21 | INTEGER I,M,MP1,NINCX 22 | * .. 23 | * .. Intrinsic Functions .. 24 | INTRINSIC MOD 25 | * .. 26 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 27 | IF (INCX.EQ.1) GO TO 20 28 | * 29 | * code for increment not equal to 1 30 | * 31 | NINCX = N*INCX 32 | DO 10 I = 1,NINCX,INCX 33 | DX(I) = DA*DX(I) 34 | 10 CONTINUE 35 | RETURN 36 | * 37 | * code for increment equal to 1 38 | * 39 | * 40 | * clean-up loop 41 | * 42 | 20 M = MOD(N,5) 43 | IF (M.EQ.0) GO TO 40 44 | DO 30 I = 1,M 45 | DX(I) = DA*DX(I) 46 | 30 CONTINUE 47 | IF (N.LT.5) RETURN 48 | 40 MP1 = M + 1 49 | DO 50 I = MP1,N,5 50 | DX(I) = DA*DX(I) 51 | DX(I+1) = DA*DX(I+1) 52 | DX(I+2) = DA*DX(I+2) 53 | DX(I+3) = DA*DX(I+3) 54 | DX(I+4) = DA*DX(I+4) 55 | 50 CONTINUE 56 | RETURN 57 | END 58 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | CISM NEWS 2 | 3 | CISM Version 2.0 4 | ================ 5 | 6 | CISM2.0, which originated from Glimmer-CISM and Glimmer, has a number of major changes 7 | relative to these previous codes: 8 | 9 | * addition of robust, parallel, 3D, 1st-order accurate approximation to the Stokes momentum 10 | balance ("Glissade" dynamical core) 11 | * adition of 3D, parallel mass and temperature transport 12 | * addition of software interfaces to modern C++ based solver libraries (e.g., Trilinos) 13 | * replacement of the Autotools build system with Cmake build system 14 | * addition of new test cases for higher-order models 15 | * re-ordering of the time step to be fully consistent with explicit forward Euler scheme 16 | * addition of a new high level "cism_driver", which replaces and reproduces functionality of several 17 | old drivers and allows for more flexible integration of additional and/or external dycores 18 | * re-arrangement of the directory structure 19 | * modifications to the GLINT coupling software to support coupling with CESM and other climate models 20 | that compute surface mass balance external to the ice sheet model 21 | * new and updated documentation 22 | 23 | More information including full documentation of the code can be found at: 24 | https://github.com/CISM/cism-documentation 25 | 26 | The original Glimmer-CISM and Glimmer codes can be found at the Glimmer-CISM Github organization: 27 | https://github.com/glimmer-cism 28 | 29 | updated 8/27/2014 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /libdycore/DyCoreModelRegistry.H: -------------------------------------------------------------------------------- 1 | // DyCoreModelRegistry is used to store multiple dynamic core models 2 | // without using global variables, and allowing retrieval by an 3 | // integer model index. --DMR 5/24/10 4 | 5 | #include "DyCoreToGlimmer.H" 6 | //IK, 8/6/13: added some ifdefs here to allow for other external dycores than just bisicles 7 | 8 | #ifdef CISM_HAS_BISICLES 9 | #include "BISICLES/BisiclesToGlimmer.H" 10 | #endif 11 | //#include "Ymir/YmirToGlimmer.H" 12 | //IK, 8/6/13: added the following for FELIX as external dycore 13 | #ifdef CISM_HAS_FELIX 14 | #include "FELIX/FelixToGlimmer.H" 15 | #endif 16 | 17 | #ifndef DYCORE_MODEL_REGISTRY 18 | #define DYCORE_MODEL_REGISTRY 19 | 20 | #define DYCORE_MODEL_COUNT 10 21 | 22 | class DyCoreModelRegistry 23 | { 24 | private: 25 | 26 | struct RegistryEntry { 27 | DyCoreToGlimmer * dycore_to_glimmer; 28 | int dycore_type; // 0=BISICLES, 1=Ymir, 2=FELIX 29 | int my_reg_index; 30 | int dycore_present; 31 | } entry[DYCORE_MODEL_COUNT]; 32 | 33 | int cur_model_count; 34 | 35 | 36 | public: 37 | 38 | DyCoreModelRegistry(); 39 | int ClearRegistryEntries(); 40 | int ClearRegistryEntry(int index); 41 | DyCoreToGlimmer * getDyCoreToGlimmerByIndex(int index); 42 | //int * getDyCoreToGlimmerByIndex(int index); 43 | int getModelCount(); 44 | int incModelCount(); 45 | int setDyCoreByType(int index,int dyncore_type); 46 | int setRegistryIndex(int index); 47 | int getRegistryIndex(int index); 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /tests/shelf/shelf-circular.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 5 3 | ewn = 41 4 | nsn = 41 5 | dew = 1250.0 6 | dns = 1250.0 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 0. 11 | dt = 1.0 12 | dt_diag = 1.0 13 | idiag = 10 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 2 # 1 = glam, 2 = glissade 18 | flow_law = 0 # 0 = isothermal, 2 = temperature dependent 19 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 20 | temperature = 0 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 21 | marine_margin = 0 # 0 = do nothing (also see option "whichmarn" in glide_types.F90) 22 | 23 | [ho_options] 24 | which_ho_babc = 5 # 5 = take basal traction param value from .nc input 25 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 26 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 27 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 28 | which_ho_approx = 2 # 1 = SSA, 2 = Blatter-Pattyn, 3 = L1L2 29 | which_ho_precond = 2 # 0 = none, 1 = diagonal, 2 = SIA based (ONLY use for which_ho_approx = 2) 30 | 31 | [parameters] 32 | default_flwa = 5.7e-18 33 | beta_grounded_min = 0. 34 | 35 | [CF default] 36 | comment = created by runShelfCircular.py 37 | title = Circular Shelf Experiment (first-order dynamics) 38 | 39 | [CF input] 40 | name = shelf-circular.nc 41 | time = 1 42 | 43 | [CF output] 44 | variables = thk uvel vvel velnorm flwa topg lsurf 45 | frequency = 1 46 | name = shelf-circular.out.nc 47 | 48 | -------------------------------------------------------------------------------- /tests/ismip-hom/ismip-hom.config: -------------------------------------------------------------------------------- 1 | # Test from ISMIP-HOM higher-order test suite 2 | # see: Pattyn et al., The Cryosphere, 2, 95–108, 2008. 3 | # www.the-cryosphere.net/2/95/2008 4 | # http://homepages.ulb.ac.be/~fpattyn/ismip/ismiphom.pdf 5 | 6 | [grid] 7 | upn = 11 8 | ewn = 40 9 | nsn = 40 10 | dew = 4000 11 | dns = 4000 12 | 13 | [time] 14 | tstart = 0. 15 | tend = 0. 16 | dt = 1. 17 | dt_diag = 1. 18 | idiag = 10 19 | jdiag = 10 20 | 21 | [options] 22 | dycore = 2 # 1 = glam, 2 = glissade 23 | flow_law = 0 # 0 = isothermal, 2 = temperature dependent 24 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 25 | temperature = 0 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 26 | 27 | [ho_options] 28 | which_ho_babc = 4 # 4 = no-slip at bed; 5 = beta field from .nc input 29 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 30 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 31 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 32 | which_ho_assemble_beta = 1 # 0=smoothed by FEM assembly, 1 = local approx. 33 | 34 | [parameters] 35 | beta_grounded_min = 0. 36 | 37 | [CF default] 38 | comment = generated by runISMIPHOM.py 39 | title = ISMIP-HOM Experiment 40 | 41 | [CF input] 42 | name = ismip-hom.nc 43 | time = 1 44 | 45 | [CF output] 46 | variables = uvel vvel uvel_extend vvel_extend topg thk usurf wvel velnorm 47 | frequency = 1 48 | name = ismip-hom.out.nc 49 | 50 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/dasum.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION DX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * takes the sum of the absolute values. 13 | * jack dongarra, linpack, 3/11/78. 14 | * modified 3/93 to return if incx .le. 0. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | DOUBLE PRECISION DTEMP 20 | INTEGER I,M,MP1,NINCX 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC DABS,MOD 24 | * .. 25 | DASUM = 0.0d0 26 | DTEMP = 0.0d0 27 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 28 | IF (INCX.EQ.1) GO TO 20 29 | * 30 | * code for increment not equal to 1 31 | * 32 | NINCX = N*INCX 33 | DO 10 I = 1,NINCX,INCX 34 | DTEMP = DTEMP + DABS(DX(I)) 35 | 10 CONTINUE 36 | DASUM = DTEMP 37 | RETURN 38 | * 39 | * code for increment equal to 1 40 | * 41 | * 42 | * clean-up loop 43 | * 44 | 20 M = MOD(N,6) 45 | IF (M.EQ.0) GO TO 40 46 | DO 30 I = 1,M 47 | DTEMP = DTEMP + DABS(DX(I)) 48 | 30 CONTINUE 49 | IF (N.LT.6) GO TO 60 50 | 40 MP1 = M + 1 51 | DO 50 I = MP1,N,6 52 | DTEMP = DTEMP + DABS(DX(I)) + DABS(DX(I+1)) + DABS(DX(I+2)) + 53 | + DABS(DX(I+3)) + DABS(DX(I+4)) + DABS(DX(I+5)) 54 | 50 CONTINUE 55 | 60 DASUM = DTEMP 56 | RETURN 57 | END 58 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/sasum.f: -------------------------------------------------------------------------------- 1 | REAL FUNCTION SASUM(N,SX,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL SX(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * takes the sum of the absolute values. 13 | * uses unrolled loops for increment equal to one. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 3/93 to return if incx .le. 0. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | 20 | * .. Local Scalars .. 21 | REAL STEMP 22 | INTEGER I,M,MP1,NINCX 23 | * .. 24 | * .. Intrinsic Functions .. 25 | INTRINSIC ABS,MOD 26 | * .. 27 | SASUM = 0.0e0 28 | STEMP = 0.0e0 29 | IF (N.LE.0 .OR. INCX.LE.0) RETURN 30 | IF (INCX.EQ.1) GO TO 20 31 | * 32 | * code for increment not equal to 1 33 | * 34 | NINCX = N*INCX 35 | DO 10 I = 1,NINCX,INCX 36 | STEMP = STEMP + ABS(SX(I)) 37 | 10 CONTINUE 38 | SASUM = STEMP 39 | RETURN 40 | * 41 | * code for increment equal to 1 42 | * 43 | * 44 | * clean-up loop 45 | * 46 | 20 M = MOD(N,6) 47 | IF (M.EQ.0) GO TO 40 48 | DO 30 I = 1,M 49 | STEMP = STEMP + ABS(SX(I)) 50 | 30 CONTINUE 51 | IF (N.LT.6) GO TO 60 52 | 40 MP1 = M + 1 53 | DO 50 I = MP1,N,6 54 | STEMP = STEMP + ABS(SX(I)) + ABS(SX(I+1)) + ABS(SX(I+2)) + 55 | + ABS(SX(I+3)) + ABS(SX(I+4)) + ABS(SX(I+5)) 56 | 50 CONTINUE 57 | 60 SASUM = STEMP 58 | RETURN 59 | END 60 | -------------------------------------------------------------------------------- /libglimmer/mpi_mod.F90: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! mpi_mod.F90 - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | 27 | module mpi_mod 28 | ! This module wraps the external mpi module 29 | 30 | #ifndef NO_MPIMOD 31 | use mpi 32 | #endif 33 | 34 | implicit none 35 | 36 | #ifdef NO_MPIMOD 37 | #include 38 | #endif 39 | 40 | public 41 | 42 | end module mpi_mod 43 | -------------------------------------------------------------------------------- /tests/shelf/shelf-confined.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 5 3 | ewn = 43 4 | nsn = 44 5 | dew = 5000.0 6 | dns = 5000.0 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 0. 11 | dt = 1. 12 | dt_diag = 1. 13 | idiag = 22 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 2 # 1 = glam, 2 = glissade 18 | flow_law = 0 # 0 = isothermal, 2 = temperature dependent 19 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 20 | temperature = 0 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 21 | marine_margin = 0 # 0 = do nothing (also see option "whichmarn" in glide_types.F90) 22 | 23 | [ho_options] 24 | which_ho_babc = 5 # 5 = take basal traction param value from .nc input 25 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 26 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 27 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 28 | which_ho_approx = 2 # 1 = SSA, 2 = Blatter-Pattyn, 3 = L1L2 29 | which_ho_precond = 2 # 0 = none, 1 = diagonal, 2 = SIA based (ONLY use for which_ho_approx = 2) 30 | which_ho_gradient_margin = 2 # 0 = land BC, 1 = hybrid BC, 2 = shelf BC 31 | 32 | [parameters] 33 | default_flwa = 5.7e-18 34 | beta_grounded_min = 0. 35 | 36 | [CF default] 37 | comment = Same as experiment 3 from EISMINT-shelf 38 | title = Confined Shelf Experiment (first-order dynamics) 39 | 40 | [CF input] 41 | name = shelf-confined.nc 42 | time = 1 43 | 44 | [CF output] 45 | variables = thk uvel vvel velnorm 46 | frequency = 1 47 | name = shelf-confined.out.nc 48 | 49 | -------------------------------------------------------------------------------- /cism_driver/cism_cesm_interface.F90: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! cism_cesm_interface.F90 - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | 27 | 28 | module cism_cesm_interface_module 29 | 30 | contains 31 | 32 | subroutine cism_cesm_interface() 33 | 34 | use cism_front_end_module 35 | 36 | call cism_front_end() 37 | 38 | end subroutine cism_cesm_interface 39 | 40 | end module cism_cesm_interface_module 41 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/README: -------------------------------------------------------------------------------- 1 | Introduction 2 | ------------ 3 | This module contains a f95 implementation of the exact solutions for 4 | isothermal ice sheet models developed by Ed Bueler et al [1]. The f95 code 5 | is based on their matlab code which is included in this module with their 6 | agreement. 7 | 8 | Compilation 9 | ----------- 10 | As of 2014, compilation/automatically running these tests is no longer supported. 11 | The instructions below for "Running the Test Suite" are left for 12 | reference only, but the instructions are no longer supported and likely no longer work. 13 | The Makefile.am files located in this directory and its subdirectories 14 | were used by the Autotools build system which is 15 | no longer used by CISM. The Makefile.am files have been left for 16 | reference only. 17 | 18 | Running the Test Suite 19 | ---------------------- 20 | Running the entire test suite for all resolutions takes quite some time. If 21 | you are willing to wait you can just run 22 | make png 23 | in the tests directory. Alternatively, you can run individual tests using the 24 | run_verif.py script. Run "run_verif.py -h" for a list of options. 25 | 26 | Licensing 27 | --------- 28 | The code is licensed under the GNU General Public Licence. A copy of the GPL 29 | is included in this module. See the file COPYING. 30 | 31 | 32 | References 33 | ---------- 34 | [1] E. Bueler, C. S. Lingle, J. A. Kallen-Brown, D. N. Covey, L. N. Bowman 35 | (2005) "Exact solutions and numerical verification for isothermal ice sheets," 36 | J. Glaciol. 51 (no. 173), 291--306. 37 | 38 | [2] https://developer.berlios.de/projects/glimmer-cism/ 39 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/scopy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SCOPY(N,SX,INCX,SY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL SX(*),SY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * copies a vector, x, to a vector, y. 13 | * uses unrolled loops for increments equal to 1. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | INTEGER I,IX,IY,M,MP1 20 | * .. 21 | * .. Intrinsic Functions .. 22 | INTRINSIC MOD 23 | * .. 24 | IF (N.LE.0) RETURN 25 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 26 | * 27 | * code for unequal increments or equal increments 28 | * not equal to 1 29 | * 30 | IX = 1 31 | IY = 1 32 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 33 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 34 | DO 10 I = 1,N 35 | SY(IY) = SX(IX) 36 | IX = IX + INCX 37 | IY = IY + INCY 38 | 10 CONTINUE 39 | RETURN 40 | * 41 | * code for both increments equal to 1 42 | * 43 | * 44 | * clean-up loop 45 | * 46 | 20 M = MOD(N,7) 47 | IF (M.EQ.0) GO TO 40 48 | DO 30 I = 1,M 49 | SY(I) = SX(I) 50 | 30 CONTINUE 51 | IF (N.LT.7) RETURN 52 | 40 MP1 = M + 1 53 | DO 50 I = MP1,N,7 54 | SY(I) = SX(I) 55 | SY(I+1) = SX(I+1) 56 | SY(I+2) = SX(I+2) 57 | SY(I+3) = SX(I+3) 58 | SY(I+4) = SX(I+4) 59 | SY(I+5) = SX(I+5) 60 | SY(I+6) = SX(I+6) 61 | 50 CONTINUE 62 | RETURN 63 | END 64 | -------------------------------------------------------------------------------- /tests/halfar/halfar-HO.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 10 3 | ewn = 31 4 | nsn = 31 5 | dew = 2000 6 | dns = 2000 7 | 8 | [time] 9 | tstart = 0. 10 | tend = 200. 11 | dt = 1. 12 | dt_diag = 1. 13 | idiag = 10 14 | jdiag = 10 15 | 16 | [options] 17 | dycore = 2 ;# 0 = glide, 1 = glam, 2 = glissade 18 | flow_law = 0 ;# 0 = flow_law option needs to be 0 for the test case to work properly. 19 | evolution = 3 ;# 2 = iterated diffusion, 3 = IR 20 | temperature = 0 ;# 0 = isothermal temp evolution, if turned on, will not affect flwa because default_flwa is specified below. 21 | marine_margin = 0 ;# 0 = no calving 22 | basal_mass_balance = 0 ;# 0 = bmlt not in continuity equation 23 | 24 | [ho_options] 25 | which_ho_babc = 4 ;# 4 = no-slip at bed 26 | which_ho_efvs = 2 ;# 0 = constant, 2 = nonlinear eff. visc. w/ n=3 27 | which_ho_sparse = 3 ;# 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 28 | which_ho_nonlinear = 0 ;# 0 = Picard, 1 = accelerated Picard 29 | which_ho_approx = 2 ;# 1 = SSA, 2 = Blatter-Pattyn, 4 = DIVA 30 | which_ho_precond = 2 ;# 1 = diagonal, 2 = physics-based SIA 31 | which_ho_gradient = 2 ;# 0 = centered, 1 = 1st order upstream, 2 = 2nd order upstream 32 | 33 | [parameters] 34 | ice_limit = 1. ;# min thickness (m) for dynamics 35 | default_flwa = 1.0e-16 ;# NOTE: The Halfar testing script requires that flwa is supplied here! 36 | 37 | [CF default] 38 | comment = created with halfar.py 39 | title = halfar dome test case 40 | 41 | [CF input] 42 | name = halfar.nc 43 | time = 1 44 | 45 | [CF output] 46 | variables = restart 47 | frequency = 5. 48 | name = halfarHO.out.nc 49 | 50 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/dcopy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DCOPY(N,DX,INCX,DY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION DX(*),DY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * copies a vector, x, to a vector, y. 13 | * uses unrolled loops for increments equal to one. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | INTEGER I,IX,IY,M,MP1 20 | * .. 21 | * .. Intrinsic Functions .. 22 | INTRINSIC MOD 23 | * .. 24 | IF (N.LE.0) RETURN 25 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 26 | * 27 | * code for unequal increments or equal increments 28 | * not equal to 1 29 | * 30 | IX = 1 31 | IY = 1 32 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 33 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 34 | DO 10 I = 1,N 35 | DY(IY) = DX(IX) 36 | IX = IX + INCX 37 | IY = IY + INCY 38 | 10 CONTINUE 39 | RETURN 40 | * 41 | * code for both increments equal to 1 42 | * 43 | * 44 | * clean-up loop 45 | * 46 | 20 M = MOD(N,7) 47 | IF (M.EQ.0) GO TO 40 48 | DO 30 I = 1,M 49 | DY(I) = DX(I) 50 | 30 CONTINUE 51 | IF (N.LT.7) RETURN 52 | 40 MP1 = M + 1 53 | DO 50 I = MP1,N,7 54 | DY(I) = DX(I) 55 | DY(I+1) = DX(I+1) 56 | DY(I+2) = DX(I+2) 57 | DY(I+3) = DX(I+3) 58 | DY(I+4) = DX(I+4) 59 | DY(I+5) = DX(I+5) 60 | DY(I+6) = DX(I+6) 61 | 50 CONTINUE 62 | RETURN 63 | END 64 | -------------------------------------------------------------------------------- /tests/EISMINT/EISMINT-2-glissade/README: -------------------------------------------------------------------------------- 1 | This directory contains config files for running EISMINT-2 test cases A, B, C, D, F, G and H 2 | with the Glissade local shallow-ice solver. 3 | These are the seven cases discussed in the paper by Payne et al. (2000, JGR). 4 | Tests I, J, K and L are omitted. 5 | 6 | The Glissade local SIA solver is similar to Glide, except that the continuity equation 7 | is solved using an explicit upwind-weighted advection scheme (usually incremental remapping) 8 | instead of an implicit diffusion scheme. 9 | See module glissade_velo_sia.F90 for the solver algorithm. 10 | 11 | The different settings, compared to the Glide tests, are as follows: 12 | * dycore = 2 (Glissade) 13 | * evolution = 3 (IR transport) 14 | * vertical_evolution = 0 (not constrained by upper kinematic BC) 15 | * which_ho_approx = -1 (Glissade local SIA solver) 16 | * which_ho_sparse = 3 17 | * ice_limit = 1 (minimum thickess for active ice = 1 m) 18 | 19 | Note: The Glissade local SIA scheme does not need a sparse solver, 20 | but the default value (which_ho_sparse = 0) triggers an error in parallel runs. 21 | 22 | Tests are typically run as follows: 23 | 24 | > ./cism_driver e2.a.config 25 | 26 | where cism_driver is a symbolic link to the executable: 27 | 28 | cism_driver@ -> ../../../builds/mac-gnu/cism_driver/cism_driver 29 | 30 | The Glissade SIA solver is slower than Glide. 31 | Unlike Glide, however, the Glissade solver can be run in parallel, e.g. 32 | 33 | > mpirun -n 4 ./cism_driver e2.a.config 34 | 35 | One config file, e2.a.config.diva, is included with higher-order settings 36 | appropriate for the Glissade DIVA solver. 37 | Other config files could be modified in a similar way. 38 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/saxpy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY) 2 | * .. Scalar Arguments .. 3 | REAL SA 4 | INTEGER INCX,INCY,N 5 | * .. 6 | * .. Array Arguments .. 7 | REAL SX(*),SY(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * SAXPY constant times a vector plus a vector. 14 | * uses unrolled loop for increments equal to one. 15 | * jack dongarra, linpack, 3/11/78. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | * .. Local Scalars .. 20 | INTEGER I,IX,IY,M,MP1 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC MOD 24 | * .. 25 | IF (N.LE.0) RETURN 26 | IF (SA.EQ.0.0) RETURN 27 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 28 | * 29 | * code for unequal increments or equal increments 30 | * not equal to 1 31 | * 32 | IX = 1 33 | IY = 1 34 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 35 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 36 | DO 10 I = 1,N 37 | SY(IY) = SY(IY) + SA*SX(IX) 38 | IX = IX + INCX 39 | IY = IY + INCY 40 | 10 CONTINUE 41 | RETURN 42 | * 43 | * code for both increments equal to 1 44 | * 45 | * 46 | * clean-up loop 47 | * 48 | 20 M = MOD(N,4) 49 | IF (M.EQ.0) GO TO 40 50 | DO 30 I = 1,M 51 | SY(I) = SY(I) + SA*SX(I) 52 | 30 CONTINUE 53 | IF (N.LT.4) RETURN 54 | 40 MP1 = M + 1 55 | DO 50 I = MP1,N,4 56 | SY(I) = SY(I) + SA*SX(I) 57 | SY(I+1) = SY(I+1) + SA*SX(I+1) 58 | SY(I+2) = SY(I+2) + SA*SX(I+2) 59 | SY(I+3) = SY(I+3) + SA*SX(I+3) 60 | 50 CONTINUE 61 | RETURN 62 | END 63 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/daxpy.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY) 2 | * .. Scalar Arguments .. 3 | DOUBLE PRECISION DA 4 | INTEGER INCX,INCY,N 5 | * .. 6 | * .. Array Arguments .. 7 | DOUBLE PRECISION DX(*),DY(*) 8 | * .. 9 | * 10 | * Purpose 11 | * ======= 12 | * 13 | * constant times a vector plus a vector. 14 | * uses unrolled loops for increments equal to one. 15 | * jack dongarra, linpack, 3/11/78. 16 | * modified 12/3/93, array(1) declarations changed to array(*) 17 | * 18 | * 19 | * .. Local Scalars .. 20 | INTEGER I,IX,IY,M,MP1 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC MOD 24 | * .. 25 | IF (N.LE.0) RETURN 26 | IF (DA.EQ.0.0d0) RETURN 27 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 28 | * 29 | * code for unequal increments or equal increments 30 | * not equal to 1 31 | * 32 | IX = 1 33 | IY = 1 34 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 35 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 36 | DO 10 I = 1,N 37 | DY(IY) = DY(IY) + DA*DX(IX) 38 | IX = IX + INCX 39 | IY = IY + INCY 40 | 10 CONTINUE 41 | RETURN 42 | * 43 | * code for both increments equal to 1 44 | * 45 | * 46 | * clean-up loop 47 | * 48 | 20 M = MOD(N,4) 49 | IF (M.EQ.0) GO TO 40 50 | DO 30 I = 1,M 51 | DY(I) = DY(I) + DA*DX(I) 52 | 30 CONTINUE 53 | IF (N.LT.4) RETURN 54 | 40 MP1 = M + 1 55 | DO 50 I = MP1,N,4 56 | DY(I) = DY(I) + DA*DX(I) 57 | DY(I+1) = DY(I+1) + DA*DX(I+1) 58 | DY(I+2) = DY(I+2) + DA*DX(I+2) 59 | DY(I+3) = DY(I+3) + DA*DX(I+3) 60 | 50 CONTINUE 61 | RETURN 62 | END 63 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/sdot.f: -------------------------------------------------------------------------------- 1 | REAL FUNCTION SDOT(N,SX,INCX,SY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL SX(*),SY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * forms the dot product of two vectors. 13 | * uses unrolled loops for increments equal to one. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | 19 | * .. Local Scalars .. 20 | REAL STEMP 21 | INTEGER I,IX,IY,M,MP1 22 | * .. 23 | * .. Intrinsic Functions .. 24 | INTRINSIC MOD 25 | * .. 26 | STEMP = 0.0e0 27 | SDOT = 0.0e0 28 | IF (N.LE.0) RETURN 29 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 30 | * 31 | * code for unequal increments or equal increments 32 | * not equal to 1 33 | * 34 | IX = 1 35 | IY = 1 36 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 37 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 38 | DO 10 I = 1,N 39 | STEMP = STEMP + SX(IX)*SY(IY) 40 | IX = IX + INCX 41 | IY = IY + INCY 42 | 10 CONTINUE 43 | SDOT = STEMP 44 | RETURN 45 | * 46 | * code for both increments equal to 1 47 | * 48 | * 49 | * clean-up loop 50 | * 51 | 20 M = MOD(N,5) 52 | IF (M.EQ.0) GO TO 40 53 | DO 30 I = 1,M 54 | STEMP = STEMP + SX(I)*SY(I) 55 | 30 CONTINUE 56 | IF (N.LT.5) GO TO 60 57 | 40 MP1 = M + 1 58 | DO 50 I = MP1,N,5 59 | STEMP = STEMP + SX(I)*SY(I) + SX(I+1)*SY(I+1) + 60 | + SX(I+2)*SY(I+2) + SX(I+3)*SY(I+3) + SX(I+4)*SY(I+4) 61 | 50 CONTINUE 62 | 60 SDOT = STEMP 63 | RETURN 64 | END 65 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/ddot.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION DX(*),DY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * forms the dot product of two vectors. 13 | * uses unrolled loops for increments equal to one. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | DOUBLE PRECISION DTEMP 20 | INTEGER I,IX,IY,M,MP1 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC MOD 24 | * .. 25 | DDOT = 0.0d0 26 | DTEMP = 0.0d0 27 | IF (N.LE.0) RETURN 28 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 29 | * 30 | * code for unequal increments or equal increments 31 | * not equal to 1 32 | * 33 | IX = 1 34 | IY = 1 35 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 36 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 37 | DO 10 I = 1,N 38 | DTEMP = DTEMP + DX(IX)*DY(IY) 39 | IX = IX + INCX 40 | IY = IY + INCY 41 | 10 CONTINUE 42 | DDOT = DTEMP 43 | RETURN 44 | * 45 | * code for both increments equal to 1 46 | * 47 | * 48 | * clean-up loop 49 | * 50 | 20 M = MOD(N,5) 51 | IF (M.EQ.0) GO TO 40 52 | DO 30 I = 1,M 53 | DTEMP = DTEMP + DX(I)*DY(I) 54 | 30 CONTINUE 55 | IF (N.LT.5) GO TO 60 56 | 40 MP1 = M + 1 57 | DO 50 I = MP1,N,5 58 | DTEMP = DTEMP + DX(I)*DY(I) + DX(I+1)*DY(I+1) + 59 | + DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4) 60 | 50 CONTINUE 61 | 60 DDOT = DTEMP 62 | RETURN 63 | END 64 | -------------------------------------------------------------------------------- /tests/ross/ross.config: -------------------------------------------------------------------------------- 1 | [grid] 2 | upn = 11 3 | # x and y dimensions are one more than the raw data, 4 | # because we are choosing to use the raw data on the velocity grid. 5 | ewn = 148 6 | nsn = 112 7 | dew = 6822 8 | dns = 6822 9 | 10 | [time] 11 | tstart = 0. 12 | tend = 0. 13 | dt = 1. 14 | dt_diag = 1. 15 | idiag = 80 16 | jdiag = 30 17 | 18 | [options] 19 | dycore = 2 # 1 = glam, 2 = glissade 20 | flow_law = 0 # 0 = isothermal, 2 = temperature dependent 21 | evolution = 3 # 3 = inc. remapping, 4 = FO upwind 22 | marine_margin = 3 # 3 = threshold from relaxed bedrock (also see option "whichmarn" in glide_types.F90) 23 | temperature = 0 # 0 = set column to surf. air temp, 1 = prognostic, 2 = hold at init. values 24 | 25 | [ho_options] 26 | which_ho_babc = 5 # 5 = take basal traction param value from .nc input 27 | which_ho_efvs = 2 # 2 = nonlinear eff. visc. w/ n=3 28 | which_ho_sparse = 3 # 1 = SLAP GMRES, 3 = glissade parallel PCG, 4 = Trilinos for linear solver 29 | which_ho_nonlinear = 0 # 0 = Picard, 1 = accelerated Picard 30 | which_ho_approx = 1 # 1 = SSA, 2 = Blatter-Pattyn, 3 = L1L2 31 | which_ho_precond = 1 # 0 = none, 1 = diagonal, 2 = SIA based (ONLY use for which_ho_approx = 2) 32 | glissade_maxiter = 300 # max. no. of nonlinear (Picard) iterations for Glissade 33 | 34 | [parameters] 35 | default_flwa = 4.6e-18 36 | # value of "flwa" is set as specified for EISMINT-Ross benchmark. 37 | # See: http://homepages.vub.ac.be/~phuybrec/eismint/iceshelf.html 38 | # See also: MacAyeal et al., Ann. Glaciol., 23, 1996 pp.46-51 39 | 40 | [CF default] 41 | title = EISMINT-Ross Benchmark Experiment 42 | 43 | [CF input] 44 | name = ross.nc 45 | time = 1 46 | 47 | [CF output] 48 | variables = thk uvel vvel wvel velnorm 49 | frequency = 1 50 | name = ross.out.nc 51 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/dnrm2.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION X(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * DNRM2 returns the euclidean norm of a vector via the function 13 | * name, so that 14 | * 15 | * DNRM2 := sqrt( x'*x ) 16 | * 17 | * 18 | * -- This version written on 25-October-1982. 19 | * Modified on 14-October-1993 to inline the call to DLASSQ. 20 | * Sven Hammarling, Nag Ltd. 21 | * 22 | * 23 | * .. Parameters .. 24 | DOUBLE PRECISION ONE,ZERO 25 | PARAMETER (ONE=1.0D+0,ZERO=0.0D+0) 26 | * .. 27 | * .. Local Scalars .. 28 | DOUBLE PRECISION ABSXI,NORM,SCALE,SSQ 29 | INTEGER IX 30 | * .. 31 | * .. Intrinsic Functions .. 32 | INTRINSIC ABS,SQRT 33 | * .. 34 | IF (N.LT.1 .OR. INCX.LT.1) THEN 35 | NORM = ZERO 36 | ELSE IF (N.EQ.1) THEN 37 | NORM = ABS(X(1)) 38 | ELSE 39 | SCALE = ZERO 40 | SSQ = ONE 41 | * The following loop is equivalent to this call to the LAPACK 42 | * auxiliary routine: 43 | * CALL DLASSQ( N, X, INCX, SCALE, SSQ ) 44 | * 45 | DO 10 IX = 1,1 + (N-1)*INCX,INCX 46 | IF (X(IX).NE.ZERO) THEN 47 | ABSXI = ABS(X(IX)) 48 | IF (SCALE.LT.ABSXI) THEN 49 | SSQ = ONE + SSQ* (SCALE/ABSXI)**2 50 | SCALE = ABSXI 51 | ELSE 52 | SSQ = SSQ + (ABSXI/SCALE)**2 53 | END IF 54 | END IF 55 | 10 CONTINUE 56 | NORM = SCALE*SQRT(SSQ) 57 | END IF 58 | * 59 | DNRM2 = NORM 60 | RETURN 61 | * 62 | * End of DNRM2. 63 | * 64 | END 65 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/snrm2.f: -------------------------------------------------------------------------------- 1 | REAL FUNCTION SNRM2(N,X,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL X(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * SNRM2 returns the euclidean norm of a vector via the function 13 | * name, so that 14 | * 15 | * SNRM2 := sqrt( x'*x ). 16 | * 17 | * Further Details 18 | * =============== 19 | * 20 | * -- This version written on 25-October-1982. 21 | * Modified on 14-October-1993 to inline the call to SLASSQ. 22 | * Sven Hammarling, Nag Ltd. 23 | * 24 | * 25 | * .. Parameters .. 26 | REAL ONE,ZERO 27 | PARAMETER (ONE=1.0E+0,ZERO=0.0E+0) 28 | * .. 29 | * .. Local Scalars .. 30 | REAL ABSXI,NORM,SCALE,SSQ 31 | INTEGER IX 32 | * .. 33 | * .. Intrinsic Functions .. 34 | INTRINSIC ABS,SQRT 35 | * .. 36 | IF (N.LT.1 .OR. INCX.LT.1) THEN 37 | NORM = ZERO 38 | ELSE IF (N.EQ.1) THEN 39 | NORM = ABS(X(1)) 40 | ELSE 41 | SCALE = ZERO 42 | SSQ = ONE 43 | * The following loop is equivalent to this call to the LAPACK 44 | * auxiliary routine: 45 | * CALL SLASSQ( N, X, INCX, SCALE, SSQ ) 46 | * 47 | DO 10 IX = 1,1 + (N-1)*INCX,INCX 48 | IF (X(IX).NE.ZERO) THEN 49 | ABSXI = ABS(X(IX)) 50 | IF (SCALE.LT.ABSXI) THEN 51 | SSQ = ONE + SSQ* (SCALE/ABSXI)**2 52 | SCALE = ABSXI 53 | ELSE 54 | SSQ = SSQ + (ABSXI/SCALE)**2 55 | END IF 56 | END IF 57 | 10 CONTINUE 58 | NORM = SCALE*SQRT(SSQ) 59 | END IF 60 | * 61 | SNRM2 = NORM 62 | RETURN 63 | * 64 | * End of SNRM2. 65 | * 66 | END 67 | -------------------------------------------------------------------------------- /utils/build/autogen-for-glint-and-glad-in-build-dir: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script needs to be run before the cmake command for CMake 3 | # builds. It should be called from all cmake scripts. 4 | # 5 | # This script auto-generates files that were autogerenated as part 6 | # of the autoconf system. 7 | 8 | echo 9 | echo "Auto-generating glint_io.F90, glint_mbal_io.F90," 10 | echo "glad_io.F90, glad_mbal_io.F90 in build directory." 11 | echo 12 | 13 | mkdir -p fortran_autogen_srcs 14 | pushd fortran_autogen_srcs 15 | 16 | if [ $# -eq 1 ]; 17 | then 18 | export CISM_SOURCE_DIR=$1 19 | else 20 | export CISM_SOURCE_DIR=../../../ 21 | echo $1 22 | fi 23 | echo "Auto-generate script is using CISM source directory: " 24 | echo $CISM_SOURCE_DIR 25 | 26 | ########################## 27 | # The following lines generate *_io.F90 files, based on variable definition files: 28 | 29 | echo " --creating glint_io.F90, glint_mbal_io.F90, glad_io.F90 and glad_mbal_io.F90 " 30 | 31 | # Save path to source files used in autogeneration 32 | export NCDF_TEMPL_PATH=$CISM_SOURCE_DIR/libglimmer/ncdf_template.F90.in 33 | export GLINT_VARS_PATH=$CISM_SOURCE_DIR/libglint/glint_vars.def 34 | export GLINT_MBAL_PATH=$CISM_SOURCE_DIR/libglint/glint_mbal_vars.def 35 | export GLAD_VARS_PATH=$CISM_SOURCE_DIR/libglad/glad_vars.def 36 | export GLAD_MBAL_PATH=$CISM_SOURCE_DIR/libglad/glad_mbal_vars.def 37 | 38 | # Call python script with source file arguments 39 | python3 -V 40 | python3 $CISM_SOURCE_DIR/utils/build/generate_ncvars.py $GLINT_VARS_PATH $NCDF_TEMPL_PATH 41 | python3 $CISM_SOURCE_DIR/utils/build/generate_ncvars.py $GLINT_MBAL_PATH $NCDF_TEMPL_PATH 42 | python3 $CISM_SOURCE_DIR/utils/build/generate_ncvars.py $GLAD_VARS_PATH $NCDF_TEMPL_PATH 43 | python3 $CISM_SOURCE_DIR/utils/build/generate_ncvars.py $GLAD_MBAL_PATH $NCDF_TEMPL_PATH 44 | 45 | popd 46 | 47 | 48 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/sswap.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SSWAP(N,SX,INCX,SY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | REAL SX(*),SY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * interchanges two vectors. 13 | * uses unrolled loops for increments equal to 1. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | REAL STEMP 20 | INTEGER I,IX,IY,M,MP1 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC MOD 24 | * .. 25 | IF (N.LE.0) RETURN 26 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 27 | * 28 | * code for unequal increments or equal increments not equal 29 | * to 1 30 | * 31 | IX = 1 32 | IY = 1 33 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 34 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 35 | DO 10 I = 1,N 36 | STEMP = SX(IX) 37 | SX(IX) = SY(IY) 38 | SY(IY) = STEMP 39 | IX = IX + INCX 40 | IY = IY + INCY 41 | 10 CONTINUE 42 | RETURN 43 | * 44 | * code for both increments equal to 1 45 | * 46 | * 47 | * clean-up loop 48 | * 49 | 20 M = MOD(N,3) 50 | IF (M.EQ.0) GO TO 40 51 | DO 30 I = 1,M 52 | STEMP = SX(I) 53 | SX(I) = SY(I) 54 | SY(I) = STEMP 55 | 30 CONTINUE 56 | IF (N.LT.3) RETURN 57 | 40 MP1 = M + 1 58 | DO 50 I = MP1,N,3 59 | STEMP = SX(I) 60 | SX(I) = SY(I) 61 | SY(I) = STEMP 62 | STEMP = SX(I+1) 63 | SX(I+1) = SY(I+1) 64 | SY(I+1) = STEMP 65 | STEMP = SX(I+2) 66 | SX(I+2) = SY(I+2) 67 | SY(I+2) = STEMP 68 | 50 CONTINUE 69 | RETURN 70 | END 71 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = index.html template.config error.cpt 2 | 3 | test_b = test_B_non-lin_50km_10.00a.nc test_B_lin_50km_10.00a.nc \ 4 | test_B_non-lin_20km_2.00a.nc test_B_lin_20km_2.00a.nc \ 5 | test_B_non-lin_10km_0.50a.nc test_B_lin_10km_0.50a.nc \ 6 | test_B_non-lin_5km_0.10a.nc test_B_lin_5km_0.10a.nc 7 | test_c = test_C_non-lin_50km_5.00a.nc test_C_lin_50km_5.00a.nc \ 8 | test_C_non-lin_20km_1.00a.nc test_C_lin_20km_1.00a.nc \ 9 | test_C_non-lin_10km_0.50a.nc test_C_lin_10km_0.50a.nc \ 10 | test_C_non-lin_5km_0.10a.nc test_C_lin_5km_0.10a.nc 11 | test_d = test_D_non-lin_50km_5.00a.nc test_D_lin_50km_5.00a.nc \ 12 | test_D_non-lin_20km_1.00a.nc test_D_lin_20km_1.00a.nc 13 | 14 | CLEANFILES = $(all_tests) 15 | 16 | all_tests = $(test_b) $(test_c) $(test_d) 17 | 18 | graphics: vole_c.png vole_d.png errors.png time.png $(subst nc,png,$(all_tests)) 19 | 20 | errors.png: $(all_tests) 21 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_errors.py -o $@ $^ 22 | 23 | time.png: results 24 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_time.py -o $@ $^ 25 | 26 | vole_b.png: $(test_b) 27 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_vol.py -o $@ $^ 28 | 29 | vole_c.png: $(test_c) 30 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_vol.py -o $@ $^ 31 | 32 | vole_d.png: $(test_d) 33 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_vol.py -o $@ $^ 34 | 35 | results: $(all_tests) 36 | 37 | %.png: %.nc 38 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/plot_diff.py -T-1 -o $@ $< 39 | 40 | %.nc: $(top_srcdir)/tests/exact-isothermal/tests/template.config 41 | $(PYTHON) $(top_srcdir)/tests/exact-isothermal/scripts/run_verif.py -m ../src/verif_glide @SGE_OPTS@ -f $* $< 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/scripts/process_verif.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # 3 | # Magnus Hagdorn 4 | # 5 | # process results from verif tests 6 | 7 | import numpy, Scientific.IO.NetCDF, pygsl, sys,math 8 | from pygsl import histogram 9 | 10 | def process(fname): 11 | """Process verif output file. 12 | 13 | fname: name of file 14 | 15 | return: tuple of (exp_name, solver, dx, dt, dome_e, max_e, min_e, mean_e, sd_e)""" 16 | 17 | # extract errors 18 | ncf = Scientific.IO.NetCDF.NetCDFFile(fname) 19 | diff = ncf.variables['thke'][-1,:,:] - ncf.variables['thk'][-1,:,:] 20 | centre = (numpy.shape(diff)[0]-1)/2 21 | dome_e = diff[centre,centre] 22 | diff = numpy.ravel(diff) 23 | max_e = max(diff) 24 | min_e = min(diff) 25 | if (abs(max_e-min_e) < 1e-10): 26 | max_e=max_e+5e-10 27 | min_e=min_e-5e-10 28 | hist = histogram.histogram(100) 29 | hist.set_ranges_uniform(math.floor(min_e),math.ceil(max_e)) 30 | for e in diff.tolist(): 31 | hist.increment(e) 32 | mean_e = hist.mean() 33 | sd_e = hist.sigma() 34 | 35 | config = ncf.title.split(',') 36 | exp_name = config[0][-1] 37 | solver = config[1].strip() 38 | dx = float(config[2].strip()[:-2]) 39 | dt = float(config[3].strip()[:-1]) 40 | 41 | ncf.close() 42 | 43 | return (exp_name, solver, dx, dt, dome_e, max_e, min_e, mean_e, sd_e) 44 | 45 | 46 | if __name__ == '__main__': 47 | 48 | # create output file 49 | out = open('verif_results.data','w') 50 | out.write('#exp\tsolver\tdx\t\tdt\t\te_dome\t\tmax_e\t\tmean_e\t\tsd_e\n') 51 | for f in sys.argv[1:]: 52 | (exp_name, solver, dx, dt, e_dome, max_e, min_e, mean_e, sd_e) = process(f) 53 | out.write("%s\t%s\t%f\t%f\t%f\t%f\t%f\t%f\n"%(exp_name,solver,dx,dt,e_dome,max_e,mean_e,sd_e)) 54 | out.close() 55 | 56 | 57 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/dswap.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE DSWAP(N,DX,INCX,DY,INCY) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,INCY,N 4 | * .. 5 | * .. Array Arguments .. 6 | DOUBLE PRECISION DX(*),DY(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * interchanges two vectors. 13 | * uses unrolled loops for increments equal one. 14 | * jack dongarra, linpack, 3/11/78. 15 | * modified 12/3/93, array(1) declarations changed to array(*) 16 | * 17 | * 18 | * .. Local Scalars .. 19 | DOUBLE PRECISION DTEMP 20 | INTEGER I,IX,IY,M,MP1 21 | * .. 22 | * .. Intrinsic Functions .. 23 | INTRINSIC MOD 24 | * .. 25 | IF (N.LE.0) RETURN 26 | IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 27 | * 28 | * code for unequal increments or equal increments not equal 29 | * to 1 30 | * 31 | IX = 1 32 | IY = 1 33 | IF (INCX.LT.0) IX = (-N+1)*INCX + 1 34 | IF (INCY.LT.0) IY = (-N+1)*INCY + 1 35 | DO 10 I = 1,N 36 | DTEMP = DX(IX) 37 | DX(IX) = DY(IY) 38 | DY(IY) = DTEMP 39 | IX = IX + INCX 40 | IY = IY + INCY 41 | 10 CONTINUE 42 | RETURN 43 | * 44 | * code for both increments equal to 1 45 | * 46 | * 47 | * clean-up loop 48 | * 49 | 20 M = MOD(N,3) 50 | IF (M.EQ.0) GO TO 40 51 | DO 30 I = 1,M 52 | DTEMP = DX(I) 53 | DX(I) = DY(I) 54 | DY(I) = DTEMP 55 | 30 CONTINUE 56 | IF (N.LT.3) RETURN 57 | 40 MP1 = M + 1 58 | DO 50 I = MP1,N,3 59 | DTEMP = DX(I) 60 | DX(I) = DY(I) 61 | DY(I) = DTEMP 62 | DTEMP = DX(I+1) 63 | DX(I+1) = DY(I+1) 64 | DY(I+1) = DTEMP 65 | DTEMP = DX(I+2) 66 | DX(I+2) = DY(I+2) 67 | DY(I+2) = DTEMP 68 | 50 CONTINUE 69 | RETURN 70 | END 71 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = verif_glide 2 | lib_LTLIBRARIES = libverif.la 3 | 4 | include $(top_builddir)/libglimmer-trilinos/Makefile.Trilinos.export 5 | TRILINOS_LIBS = $(TRILINOS_LIBS_ALL) 6 | 7 | variable_DATA = verif_vars.def 8 | variabledir = $(pkgdatadir) 9 | dist_variable_DATA = $(variable_DATA) 10 | 11 | nodist_include_HEADERS := $(wildcard *.mod) 12 | 13 | EXTRA_DIST = f90_dep.mak 14 | BUILT_SOURCES = verif_io.F90 15 | CLEANFILES = $(BUILT_SOURCES) f90_dep.mak $(wildcard *.mod) 16 | 17 | libverif_la_SOURCES = verif.F90 verifBC.F90 verifD.F90 verif_io.F90 18 | libverif_la_LDFLAGS=-all-static 19 | verif_glide_SOURCES = verif_glide.F90 trickLibtool.cpp 20 | verif_glide_LDADD = $(top_builddir)/libglide/libglide.la $(top_builddir)/libglimmer-solve/libglimmer-solve.la \ 21 | $(top_builddir)/libglimmer/libglimmer-IO.la $(top_builddir)/libglimmer/libglimmer.la libverif.la \ 22 | $(NETCDF_LDFLAGS) $(HDF5_LDFLAGS) $(NETCDF_LIBS) $(BLAS_LIBS) $(LAPACK_LIBS) $(PARDISO_LIBS) $(UMFPACK_LIBS) \ 23 | $(TRILINOS_LIBS) $(FCLIBS) $(FLIBS) 24 | 25 | AM_FCFLAGS = $(NETCDF_FCFLAGS) $(FC_MODINC)$(top_builddir)/libglimmer-solve $(FC_MODINC)$(top_builddir)/libglide $(FC_MODINC)$(top_builddir)/libglimmer 26 | 27 | #some special rules for automatically generating ncdf src code 28 | verif_io.F90: verif_vars.def $(top_srcdir)/libglimmer/ncdf_template.F90.in 29 | $(PYTHON) $(top_srcdir)/scripts/generate_ncvars.py $^ 30 | 31 | -include f90_dep.mak 32 | 33 | # this fixes the build order: f90_dep.mak has .lo for verif_glide.o 34 | # but since verif_glide isn't a library, there is no verif_glide.lo 35 | # target, there is only a verif_glide.o target which never depends on 36 | # the other targets, so it builds early and is missing it's .mod files 37 | verif_glide.o : verif_glide.lo 38 | 39 | include $(top_srcdir)/extra_rules.am 40 | -------------------------------------------------------------------------------- /libdycore/dycore_stubs/glimmer_to_dycore_stubs.F90: -------------------------------------------------------------------------------- 1 | ! The glimmer_to_dycore stubs module contains stubs for the Fortran side of the Glimmer-DyCore 2 | ! interface. It uses the routines in dycore_to_glim_extern.cpp to create one 3 | ! or more instances of a dynamic core ice sheet model. The dycore_model_index is 4 | ! the only parameter needed by glimmer_to_dycore subroutines to interact with a 5 | ! specific instance of a dynamic core model. DMR--5/24/10 6 | 7 | module glimmer_to_dycore 8 | !*FD glimmer_to_dycore contains Fortran routines to couple Glimmer to a 9 | ! dynamic core model. 10 | use glide_types 11 | use simple_forcing 12 | 13 | contains 14 | 15 | subroutine gtd_init_dycore_interface(model,dycore_type,dycore_model_index) 16 | type(glide_global_type) :: model 17 | integer*4 dycore_model_index, error_code 18 | integer*4 dycore_type ! 0=BISICLES, 1=Ymir 19 | 20 | ! call dycore_init_registry() 21 | ! call dycore_init_model(dycore_type,dycore_model_index,error_code) 22 | ! call gtd_set_geometry_vars(model,dycore_model_index) 23 | 24 | ! print *,"In init_dycore_interface, dycore_type = ",dycore_type 25 | ! print *,"In init_dycore_interface, dycore1 = ",dycore_model_index 26 | end subroutine gtd_init_dycore_interface 27 | 28 | subroutine gtd_run_dycore(dycore_model_index) 29 | integer*4 dycore_model_index 30 | 31 | ! call dycore_run_model(dycore_model_index) 32 | end subroutine gtd_run_dycore 33 | 34 | subroutine gtd_set_geometry_vars(model,dycore_model_index) 35 | type(glide_global_type) :: model 36 | integer*4 dycore_model_index 37 | 38 | end subroutine gtd_set_geometry_vars 39 | 40 | 41 | subroutine gtd_set_velocity_vars(model,dycore_model_index) 42 | type(glide_global_type) :: model 43 | integer*4 dycore_model_index 44 | 45 | end subroutine gtd_set_velocity_vars 46 | 47 | 48 | 49 | end module glimmer_to_dycore 50 | -------------------------------------------------------------------------------- /libglimmer/glimmer_vers.F90.cmake.in: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! glimmer_vers.F90.cmake.in - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | 27 | 28 | !> the glimmer version as a string 29 | function glimmer_version_char() 30 | implicit none 31 | character(len=100) :: glimmer_version_char 32 | 33 | !glimmer_version_char = 'GLIMMER v. ??: (CMake build does not get version)' 34 | glimmer_version_char = 'CISM 2.0' 35 | end function glimmer_version_char 36 | 37 | !> the glimmer version as an integer 38 | function glimmer_version_int() 39 | implicit none 40 | integer :: glimmer_version_int 41 | glimmer_version_int = 10000*1 + 100*7 + 1 42 | end function glimmer_version_int 43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/new/README.md: -------------------------------------------------------------------------------- 1 | How to create a new CISM test 2 | ============================= 3 | 4 | Note: For setting up the experiments in an NCAR computing environment, 5 | follow the steps in the README.NCAR_HPC file in the tests directory. 6 | 7 | This directory contains a new test template called `runTest.py` which 8 | should be used to create a new test in CISM. This template is based on the 9 | `tests/dome` test, and you should start by playing around with that test 10 | so that you understand how the options work, and how the tests are run. If you 11 | maintain the structure of this test template, your new test will work with the 12 | `tests/regression/build_and_test.py` structure (BATS). 13 | 14 | Creating a new test 15 | ---------------------------- 16 | 17 | Say we want to create a higher-order test for Antarctica, which we will 18 | call `antarctica` The first thing we do is make the Antarctica test 19 | directory, and then move into it: 20 | 21 | ```bash 22 | $ mkdir $CISM/tests/higher-order/antarctica 23 | $ cd $CISM/tests/higher-order/antarctica 24 | ``` 25 | 26 | Next, we copy the `runTest.py` python script template into your new test 27 | directory, the `*.config` files, and the netCDF tools module `netCDF.py` from 28 | the `$CISM/tests/new` directory. 29 | 30 | ```bash 31 | $ cp $CISM/tests/new/runTest.py runAntarctica.py 32 | $ cp $CISM/tests/new/test.config antarctica.config 33 | $ cp $CISM/tests/new/test-forcing.config antarctica-forcing.config 34 | $ cp $CISM/test/new/netCDF.py ./ 35 | ``` 36 | 37 | Next, we open up the `runAntarctica.py` script in our favorite editor 38 | and create our test. Most of the structure of the test has been created 39 | from the template. To finish the test, we find the `#FIXME:` statements 40 | in the `runAntarctica.py`, read the associated comment text, and create 41 | what we need for the test case. 42 | 43 | 44 | _Last updated: August 13, 2015 by Joseph H Kennedy at ORNL_ 45 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The following authors (listed alphabetically) have contributed to this version of CISM. 2 | Affiliations shown with an asterisk (*) are no longer current. 3 | 4 | Erin Barker Los Alamos National Laboratory (*) 5 | Tim Bocek University of Montana, Missoula (*) 6 | Josh Campbell University of Montana, Missoula (*) 7 | Katherine J. Evans Oak Ridge National Laboratory 8 | Jeremy Fyke Los Alamos National Laboratory (*) 9 | Glen Granzow University of Montana, Missoula 10 | Magnus Hagdorn School of GeoSciences, University of Edinburgh 11 | Brian Hand University of Montana, Missoula (*) 12 | Felix Hebeler University of Zurich(*) 13 | Matthew Hoffman Los Alamos National Laboratory 14 | Jesse Johnson University of Montana, Missoula 15 | Irina Kalashnikova Sandia National Laboratories 16 | Gunter Leguy Los Alamos National Laboratory (*), National Center for Atmospheric Research 17 | Jean-Francois Lemieux New York University (*) 18 | William Lipscomb Los Alamos National Laboratory (*), National Center for Atmospheric Research 19 | Daniel Martin Lawrence Berkeley National Laboratory 20 | Jeffrey A. Nichols Oak Ridge National Laboratory 21 | Ryan Nong Sandia National Laboratories (*) 22 | Matthew R. Norman Oak Ridge National Laboratory 23 | Tony Payne University of Bristol 24 | Stephen Price Los Alamos National Laboratory 25 | Doug Ranken Los Alamos National Laboratory 26 | Ian Rutt Dept. of Geography, Swansea University 27 | William Sacks National Center for Atmospheric Research 28 | Andrew Salinger Sandia National Laboratories 29 | James B. White III Oak Ridge National Laboratory (*) 30 | Jon Wolfe National Center for Atmospheric Research (*) 31 | Patrick Worley Oak Ridge National Laboratory 32 | Timothy Wylie University of Montana, Missoula (*) 33 | -------------------------------------------------------------------------------- /libglimmer/glimmer_vers.F90.in.in: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! glimmer_vers.F90.in.in - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | 27 | 28 | !> the glimmer version as a string 29 | function glimmer_version_char() 30 | implicit none 31 | character(len=100) :: glimmer_version_char 32 | glimmer_version_char = 'GLIMMER v. @GLIMMER_MAJOR_VERSION@.@GLIMMER_MINOR_VERSION@.@GLIMMER_MICRO_VERSION@@GLIMMER_SVN_VERS@' 33 | end function glimmer_version_char 34 | 35 | !> the glimmer version as an integer 36 | function glimmer_version_int() 37 | implicit none 38 | integer :: glimmer_version_int 39 | glimmer_version_int = 10000*@GLIMMER_MAJOR_VERSION@ + 100*@GLIMMER_MINOR_VERSION@ + @GLIMMER_MICRO_VERSION@ 40 | end function glimmer_version_int 41 | 42 | 43 | -------------------------------------------------------------------------------- /libdycore/FELIX/FelixToGlimmer.cpp: -------------------------------------------------------------------------------- 1 | // The DyCoreToGlimmer class provides methods to move Glimmer Fortran data to C++ structures 2 | // for access by the Chombo-based FELIX model. The structure names and structure member 3 | // names mostly correspond to derived types defined in Glimmer. In general, pointers to 4 | // the Fortran data arrays are used, rather than copies of these arrays. This saves space 5 | // and reduces the steps needed to update the Glimmer data between calls to the FELIX 6 | // ice sheet modeling program. Methods are provided to set these array pointers, and 7 | // copy array dimension information. Objects of this class are accessed by extern C 8 | // routines in felix_to_glim_extern.cpp, and by the FELIX front end. DMR--5/24/10 9 | 10 | #include "FelixToGlimmer.H" 11 | 12 | 13 | using namespace std; 14 | 15 | 16 | int 17 | FelixToGlimmer::initDyCore(const char * input_fname) 18 | { 19 | 20 | // long * dimInfo; 21 | 22 | cout << "In FELIX initDyCore" << endl; 23 | // dimInfo = this -> getLongVar("dimInfo","geometry"); 24 | 25 | 26 | // cout << "DimInfo in initDyCore: " << endl; 27 | // for (i=0;i<10;i++) cout << dimInfo[i] << " "; 28 | // cout << "In FELIX initDyCore, calling felix_driver_inin:" << endl; 29 | felix_driver_init(2,0,this,input_fname); 30 | return 0; // ought to make sensible use of this. 31 | 32 | } 33 | 34 | // updates cur_time_yr to match time update in dycore 35 | int 36 | FelixToGlimmer::runDyCore(float& cur_time_yr, const float time_inc_yr) 37 | { 38 | cout << "In FELIX runDyCore" << endl; 39 | felix_driver_run(this,cur_time_yr,time_inc_yr); 40 | return 0; // ought to make sensible use of this. 41 | } 42 | 43 | int 44 | FelixToGlimmer::deleteDyCore() 45 | { 46 | felix_driver_finalize(this -> getDyCoreIndex()); 47 | return 0; // ought to make sensible use of this. 48 | } 49 | 50 | //int storeFelixObject(AmrIce bisicles_object) 51 | //{} 52 | 53 | //AmrIce retrieveFelixObject() 54 | //{} 55 | -------------------------------------------------------------------------------- /libdycore/BISICLES/BisiclesToGlimmer.cpp: -------------------------------------------------------------------------------- 1 | // The DyCoreToGlimmer class provides methods to move Glimmer Fortran data to C++ structures 2 | // for access by the Chombo-based BISICLES model. The structure names and structure member 3 | // names mostly correspond to derived types defined in Glimmer. In general, pointers to 4 | // the Fortran data arrays are used, rather than copies of these arrays. This saves space 5 | // and reduces the steps needed to update the Glimmer data between calls to the BISICLES 6 | // ice sheet modeling program. Methods are provided to set these array pointers, and 7 | // copy array dimension information. Objects of this class are accessed by extern C 8 | // routines in bike_to_glim_extern.cpp, and by the BISICLES front end. DMR--5/24/10 9 | 10 | #include "BisiclesToGlimmer.H" 11 | 12 | 13 | using namespace std; 14 | 15 | 16 | int 17 | BisiclesToGlimmer::initDyCore(const char * input_fname) 18 | { 19 | 20 | // long * dimInfo; 21 | 22 | cout << "In BISICLES initDyCore" << endl; 23 | // dimInfo = this -> getLongVar("dimInfo","geometry"); 24 | 25 | 26 | // cout << "DimInfo in initDyCore: " << endl; 27 | // for (i=0;i<10;i++) cout << dimInfo[i] << " "; 28 | // cout << "In BISICLES initDyCore, calling bike_driver_inin:" << endl; 29 | bike_driver_init(2,0,this,input_fname); 30 | return 0; // ought to make sensible use of this. 31 | 32 | } 33 | 34 | // updates cur_time_yr to match time update in dycore 35 | int 36 | BisiclesToGlimmer::runDyCore(double& cur_time_yr, const double time_inc_yr) 37 | { 38 | cout << "In BISICLES runDyCore" << endl; 39 | bike_driver_run(this,cur_time_yr,time_inc_yr); 40 | return 0; // ought to make sensible use of this. 41 | } 42 | 43 | int 44 | BisiclesToGlimmer::deleteDyCore() 45 | { 46 | bike_driver_finalize(this -> getDyCoreIndex()); 47 | return 0; // ought to make sensible use of this. 48 | } 49 | 50 | //int storeBisiclesObject(AmrIce bisicles_object) 51 | //{} 52 | 53 | //AmrIce retrieveBisiclesObject() 54 | //{} 55 | -------------------------------------------------------------------------------- /utils/libgptl/GPTLutil.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: util.c,v 1.13 2010-01-01 01:34:07 rosinski Exp $ 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "private.h" 10 | 11 | static bool abort_on_error = false; /* flag says to abort on any error */ 12 | static int max_error = 500; /* max number of error print msgs */ 13 | 14 | /* 15 | ** GPTLerror: error return routine to print a message and return a failure 16 | ** value. 17 | ** 18 | ** Input arguments: 19 | ** fmt: format string 20 | ** variable list of additional arguments for vfprintf 21 | ** 22 | ** Return value: -1 (failure) 23 | */ 24 | 25 | int GPTLerror (const char *fmt, ...) 26 | { 27 | va_list args; 28 | 29 | va_start (args, fmt); 30 | static int num_error = 0; 31 | 32 | if (fmt != NULL && num_error < max_error) { 33 | #ifndef NO_VPRINTF 34 | (void) vfprintf (stderr, fmt, args); 35 | #else 36 | (void) fprintf (stderr, "GPTLerror: no vfprintf: fmt is %s\n", fmt); 37 | #endif 38 | if (num_error == max_error) 39 | (void) fprintf (stderr, "Truncating further error print now after %d msgs", 40 | num_error); 41 | ++num_error; 42 | } 43 | 44 | va_end (args); 45 | 46 | if (abort_on_error) 47 | exit (-1); 48 | 49 | return (-1); 50 | } 51 | 52 | /* 53 | ** GPTLset_abort_on_error: User-visible routine to set abort_on_error flag 54 | ** 55 | ** Input arguments: 56 | ** val: true (abort on error) or false (don't) 57 | */ 58 | 59 | void GPTLset_abort_on_error (bool val) 60 | { 61 | abort_on_error = val; 62 | } 63 | 64 | /* 65 | ** GPTLallocate: wrapper utility for malloc 66 | ** 67 | ** Input arguments: 68 | ** nbytes: size to allocate 69 | ** 70 | ** Return value: pointer to the new space (or NULL) 71 | */ 72 | 73 | void *GPTLallocate (const int nbytes) 74 | { 75 | void *ptr; 76 | 77 | if ( nbytes <= 0 || ! (ptr = malloc (nbytes))) 78 | (void) GPTLerror ("GPTLallocate: malloc failed for %d bytes\n", nbytes); 79 | 80 | return ptr; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/scripts/plot_diff.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # 3 | # Magnus Hagdorn 4 | # 5 | # plot difference between numeric and exact solution 6 | 7 | import os.path 8 | import pylab, matplotlib 9 | import Scientific.IO.NetCDF 10 | import numpy.ma 11 | from argparse import ArgumentParser 12 | 13 | 14 | if __name__ == '__main__': 15 | 16 | usage = """usage: %prog [options] file.nc 17 | 18 | plot difference between exact and simulated solution at specified time""" 19 | 20 | parser = ArgumentParser(usage=usage) 21 | parser.add_argument("-o","--output",metavar="FILE",help="write image to file. image type is determined by file suffix") 22 | parser.add_argument("-T","--time-slice",metavar="T",default=-1,type=int,help="extract data for time slice T") 23 | options = parser.parse_args() 24 | 25 | if len(args)!=1: 26 | parser.error('Expecting one input file') 27 | 28 | infile = Scientific.IO.NetCDF.NetCDFFile(args[0],'r') 29 | diff = infile.variables['thk'][options.time_slice,:,:] - infile.variables['thke'][options.time_slice,:,:] 30 | mask = numpy.where(infile.variables['thk'][options.time_slice,:,:] + infile.variables['thke'][options.time_slice,:,:] > 0, False, True) 31 | diff = numpy.ma.array(diff,mask=mask) 32 | extent = [infile.variables['x1'][0]/1000.,infile.variables['x1'][-1]/1000., 33 | infile.variables['y1'][0]/1000.,infile.variables['y1'][-1]/1000.] 34 | #() 35 | 36 | pylab.title("Experiment %s"%infile.title) 37 | pylab.imshow(diff,origin='lower', 38 | norm=matplotlib.colors.Normalize(vmin=-200,vmax=200), 39 | cmap=matplotlib.cm.RdBu_r, 40 | extent=extent) 41 | pylab.colorbar() 42 | pylab.contour(diff,extent=extent,colors='k') 43 | 44 | pylab.contour(infile.variables['thk'][options.time_slice,:,:],[0],colors='grey',extent=extent) 45 | 46 | if options.output!=None: 47 | pylab.savefig(options.output) 48 | else: 49 | pylab.show() 50 | 51 | -------------------------------------------------------------------------------- /tests/dome/README.restart: -------------------------------------------------------------------------------- 1 | These are instructions for demonstrating exact restart for the evolving-dome problem. 2 | 3 | Assume the standard config file is dome.config and runs for 10 years. 4 | 5 | (1) Create a file called dome.config.5yr. Here is how it should differ from dome.config: 6 | 7 | < tend = 10. 8 | --- 9 | > tend = 5. 10 | 44c44,50 11 | < name = dome.out.nc 12 | --- 13 | > name = dome.5yr.out.nc 14 | > 15 | > [CF output] 16 | > variables = restart 17 | > xtype = double 18 | > start = 5 19 | > frequency = 5 20 | > name = dome.restart.nc 21 | 22 | The 'start = 5' line is needed to ensure that restart fields are written only after year 5, and not at startup. 23 | 24 | Note: For the dome problem, velocities are zero on the global boundaries. If velocities on global boundaries 25 | are nonzero (as in MISMIP), you must add the following under [options]: 26 | 27 | restart_extend_velo = 1 28 | 29 | (2) Create a file called dome.config.5yr.continue. Here is how it should differ from dome.config: 30 | 31 | < tstart = 0. 32 | --- 33 | > tstart = 5. 34 | 22a23 35 | > restart = 1 36 | 38,39c39,40 37 | < name = dome.nc 38 | < time = 1 39 | --- 40 | > name = dome.restart.nc 41 | > time = 1 42 | 44c45,46 43 | < name = dome.out.nc 44 | --- 45 | > name = dome.5yr.continue.out.nc 46 | 47 | (3) Run the standard 10-year evolving-dome test: 48 | 49 | > cism driver dome.config 50 | 51 | NOTE: To test exact restart, we **cannot** use the Python script dome.py. 52 | This is because the Python script will replace the existing dome.restart.nc with a standard dome input file 53 | that is called dome.restart.nc but contains only topg and thk as input. 54 | 55 | (4) Run the 5-yr evolving-dome test, writing a restart file at the end: 56 | 57 | > cism_driver dome.config.5yr 58 | 59 | (5) Run the continuation test from year 5 to year 10: 60 | 61 | > cism_driver dome.config.5yr.continue 62 | 63 | (6) Compare log files (dome.config.log v. dome.config.5yr.continue.log) and netCDF output files 64 | (dome.out.nc v. dome.5yr.continue.out.nc) and make sure results are bit-for-bit. 65 | 66 | -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | The subdirectories in this directory contain Python scripts to run various 2 | "experiments" using Glimmer/CISM. Some details about the experiments and how 3 | to run them are given in the `README.md` files found in each subdirectory 4 | and they are summarized in the documentation. 5 | 6 | This directory also contains two Python source files: 7 | 8 | netCDF.py 9 | ========= 10 | 11 | `netCDF.py` is a "module" (that is, code that is meant to be used by other Python 12 | programs, not run by itself) that allows the Python scripts in the 13 | subdirectories to use whichever of the three python netCDF file packages, 14 | Scientific.IO.NetCDF, netCDF4, or pycdf, that the user has installed. There 15 | are links to this module in each of the subdirectories, but is is also 16 | included in this directory for reference. 17 | 18 | Of the three python netCDF file packages, pycdf is __NOT__ recommended. There have 19 | been problems with some versions of this module on some computers. If you run 20 | `netCDF.py` by entering the following on a command line 21 | 22 | ```sh 23 | python netCDF.py 24 | ``` 25 | 26 | a line should be output telling you which netCDF package will be used when 27 | running the Glimmer/CISM scripts on your computer. 28 | 29 | viewNetCDF.py 30 | ============= 31 | 32 | `viewNetCDF.py` is a script for viewing the netCDF files that are read and/or 33 | written by Glimmer/CISM. There are other tools available for doing this, such 34 | as ncview; You may (or may not) prefer `viewNetCDF.py`; it works better on some 35 | systems than others. To run `viewNetCDF.py` enter the following on a command 36 | line: 37 | 38 | ```sh 39 | python viewNetCDF.py filename.nc 40 | ``` 41 | 42 | where `filename.nc` is the name of the netCDF file that you want to view. Left 43 | click on a variable name that appears in the list at the top left of the 44 | Graphical User Interface (GUI) that appears, then left click on the "plot" 45 | button. In addition to the options displayed on the GUI there are some 46 | options "hidden" in a pop-up menu that appears if you right click on the GUI. 47 | -------------------------------------------------------------------------------- /tests/ross/data/readme.riggs_clean: -------------------------------------------------------------------------------- 1 | This is an exerpt from a PISM README file downloaded from 2 | http://svn.gna.org/viewcvs/pism/trunk/examples/eisross/ 3 | describing the riggs_clean.dat file 4 | 5 | riggs_data_edit_fromDM.txt (=FILE1): This text file was sent to 6 | Ed Bueler (=ELB) by Doug MacAyeal on 19 Dec 2006. It seems to 7 | contain the (global) latitude and longitude of the 149 locations 8 | of RIGGS data which were actually used to compute the \chi^2 measure. 9 | 10 | riggs_clean.dat: This text file is a modified version 11 | of the previous file. ELB removed some clutter to make it 12 | machine-readable, and included the latitude and longitude from the 13 | above file. The RIGGS grid system is clearly described in Table A1, 14 | Part 1 of R. Thomas and three others, "Glaciological Studies on the 15 | Ross Ice Shelf, Antarctica, 1973-1978", Antarctica Research Series 16 | Volume 42, American Geophysical Union 1984. (Unfortunately the 17 | grid system has been destroyed in the file "RIGGS.dat".) The 18 | obviously spurious point "N16" in the RIGGS data has been thrown out; 19 | note that Figure 11 in (Thomas et al 1984) does not contain it either. 20 | There are 14 columns in this file: 21 | COLUMN MEANING 22 | 1 index of point used in FILE1 23 | 2 north latitude (i.e. actual latitude) from FILE1 24 | 3 west longitude from FILE1 25 | 4 degrees grid south latitude 26 | (table A1, part 1 in Thomas et al 1984) 27 | 5 minutes grid south latitude (") 28 | 6 seconds grid south latitude (") 29 | 7 degrees grid east*OR*west longitude (") 30 | 8 minutes grid east*OR*west longitude (") 31 | 9 seconds grid east*OR*west longitude (") 32 | 10 +1 if west, -1 if east (regards columns 7,8,9) (") 33 | 11 speed (m/a) at point 34 | 12 *geographic* bearing at point 35 | 13 grid bearing at point 36 | (table A1, part 2 in Thomas et al 1984) 37 | 14 estimated speed error (m/a; note replaced with 30 38 | for Chi^2 stat in MacAyeal et al 1996) 39 | 40 | 41 | -------------------------------------------------------------------------------- /libglimmer/glimmer_writestats.F90: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! glimmer_writestats.F90 - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | 27 | module glimmer_writestats 28 | !> F90 wrapper to gc_writestats 29 | !! 30 | !! \author Magnus Hagdorn 31 | !! \date April 2009 32 | 33 | implicit none 34 | 35 | contains 36 | 37 | subroutine glimmer_write_stats(resname, cfgname, wallTime) 38 | 39 | use glimmer_global, only : dp 40 | use cism_parallel, only: main_task 41 | implicit none 42 | character(len=*), intent(in) :: resname !< name of the output result file 43 | character(len=*), intent(in) :: cfgname !< name of ice sheet configuration file 44 | real(kind=dp), intent(in) :: wallTime !< elapsed wall clock tine in seconds 45 | 46 | if (main_task) call gf_writestats(resname, cfgname, wallTime) 47 | 48 | end subroutine glimmer_write_stats 49 | 50 | end module glimmer_writestats 51 | -------------------------------------------------------------------------------- /libglimmer-solve/blas/scnrm2.f: -------------------------------------------------------------------------------- 1 | REAL FUNCTION SCNRM2(N,X,INCX) 2 | * .. Scalar Arguments .. 3 | INTEGER INCX,N 4 | * .. 5 | * .. Array Arguments .. 6 | COMPLEX X(*) 7 | * .. 8 | * 9 | * Purpose 10 | * ======= 11 | * 12 | * SCNRM2 returns the euclidean norm of a vector via the function 13 | * name, so that 14 | * 15 | * SCNRM2 := sqrt( conjg( x' )*x ) 16 | * 17 | * 18 | * 19 | * -- This version written on 25-October-1982. 20 | * Modified on 14-October-1993 to inline the call to CLASSQ. 21 | * Sven Hammarling, Nag Ltd. 22 | * 23 | * 24 | * .. Parameters .. 25 | REAL ONE,ZERO 26 | PARAMETER (ONE=1.0E+0,ZERO=0.0E+0) 27 | * .. 28 | * .. Local Scalars .. 29 | REAL NORM,SCALE,SSQ,TEMP 30 | INTEGER IX 31 | * .. 32 | * .. Intrinsic Functions .. 33 | INTRINSIC ABS,AIMAG,REAL,SQRT 34 | * .. 35 | IF (N.LT.1 .OR. INCX.LT.1) THEN 36 | NORM = ZERO 37 | ELSE 38 | SCALE = ZERO 39 | SSQ = ONE 40 | * The following loop is equivalent to this call to the LAPACK 41 | * auxiliary routine: 42 | * CALL CLASSQ( N, X, INCX, SCALE, SSQ ) 43 | * 44 | DO 10 IX = 1,1 + (N-1)*INCX,INCX 45 | IF (REAL(X(IX)).NE.ZERO) THEN 46 | TEMP = ABS(REAL(X(IX))) 47 | IF (SCALE.LT.TEMP) THEN 48 | SSQ = ONE + SSQ* (SCALE/TEMP)**2 49 | SCALE = TEMP 50 | ELSE 51 | SSQ = SSQ + (TEMP/SCALE)**2 52 | END IF 53 | END IF 54 | IF (AIMAG(X(IX)).NE.ZERO) THEN 55 | TEMP = ABS(AIMAG(X(IX))) 56 | IF (SCALE.LT.TEMP) THEN 57 | SSQ = ONE + SSQ* (SCALE/TEMP)**2 58 | SCALE = TEMP 59 | ELSE 60 | SSQ = SSQ + (TEMP/SCALE)**2 61 | END IF 62 | END IF 63 | 10 CONTINUE 64 | NORM = SCALE*SQRT(SSQ) 65 | END IF 66 | * 67 | SCNRM2 = NORM 68 | RETURN 69 | * 70 | * End of SCNRM2. 71 | * 72 | END 73 | -------------------------------------------------------------------------------- /cism_driver/cism_driver.F90: -------------------------------------------------------------------------------- 1 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | ! 3 | ! cism_driver.F90 - part of the Community Ice Sheet Model (CISM) 4 | ! 5 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 | ! 7 | ! Copyright (C) 2005-2018 8 | ! CISM contributors - see AUTHORS file for list of contributors 9 | ! 10 | ! This file is part of CISM. 11 | ! 12 | ! CISM is free software: you can redistribute it and/or modify it 13 | ! under the terms of the Lesser GNU General Public License as published 14 | ! by the Free Software Foundation, either version 3 of the License, or 15 | ! (at your option) any later version. 16 | ! 17 | ! CISM is distributed in the hope that it will be useful, 18 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ! Lesser GNU General Public License for more details. 21 | ! 22 | ! You should have received a copy of the Lesser GNU General Public License 23 | ! along with CISM. If not, see . 24 | ! 25 | !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 26 | program cism_driver 27 | 28 | ! use glimmer_commandline 29 | ! use glide 30 | use glimmer_paramets, only: iulog 31 | use gcm_cism_interface 32 | use cism_parallel, only: parallel_initialise, parallel_finalise 33 | 34 | integer :: which_gcm = GCM_GLINT_MODEL 35 | type(gcm_to_cism_type) :: g2c 36 | 37 | if (command_argument_count() == 0) then 38 | write(iulog,*) "" 39 | write(iulog,*) "Call cism_driver with either 1 or 2 arguments. Examples:" 40 | write(iulog,*) "cism_driver ice_sheet.config" 41 | write(iulog,*) "cism_driver ice_sheet.config climate.config" 42 | write(iulog,*) "" 43 | stop 44 | end if 45 | 46 | call parallel_initialise 47 | 48 | call gci_init_interface(which_gcm,g2c) 49 | call gci_run_model(g2c) 50 | call gci_finalize_interface(g2c) 51 | 52 | call parallel_finalise 53 | 54 | end program cism_driver 55 | -------------------------------------------------------------------------------- /tests/unsupported/exact-isothermal/scripts/plot_vol.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # 3 | # Magnus Hagdorn 4 | # 5 | # plot relative volume errors 6 | 7 | 8 | import Scientific.IO.NetCDF 9 | import pylab 10 | from argparse import ArgumentParser 11 | 12 | def parse_title(title): 13 | """Parse title string.""" 14 | 15 | t = title.split(',') 16 | 17 | exp_name = t[0][-1] 18 | solver = t[1].strip() 19 | dx = t[2].strip()[:-2] 20 | dt = t[3].strip()[:-1] 21 | 22 | return (exp_name,solver,dx,dt) 23 | 24 | def calc_verror(cffile): 25 | 26 | verror = (cffile.variables['ivol'][:]-cffile.variables['ivole'][:])/cffile.variables['ivole'][:] 27 | verror[0] = 0. 28 | return verror 29 | 30 | if __name__ == '__main__': 31 | 32 | usage = """usage: %prog [options] file1.nc [filen.nc] 33 | 34 | plot relative volume error as a function of time""" 35 | 36 | parser = OptionParser(usage=usage) 37 | parser.add_option("-o","--output",metavar="FILE",help="write image to file. image type is determined by file suffix") 38 | (options, args) = parser.parse_args() 39 | 40 | if len(args)<1: 41 | parser.error('Expecting at least one file') 42 | 43 | 44 | # start plotting 45 | pylab.figure(1) 46 | vol_err = pylab.subplot(111) 47 | vol_err.set_xlabel = 'time [ka]' 48 | vol_err.set_ylabel = 'relative volume error' 49 | 50 | styles = {'non-lin':'-','lin':':','ADI':'--'} 51 | colours = ['red','green','blue','cyan','yellow','orange','magenta','pink'] 52 | 53 | plotted = {} 54 | i = 0 55 | for f in args: 56 | cffile = Scientific.IO.NetCDF.NetCDFFile(f,'r') 57 | (exp_name,solver,dx,dt) = parse_title(cffile.title) 58 | title = 'dx=%skm, dt=%sa'%(dx,dt) 59 | if title not in plotted: 60 | plotted[title] = i 61 | i = i+1 62 | label = title 63 | else: 64 | label = None 65 | vol_err.plot(cffile.variables['time'][:],calc_verror(cffile),ls=styles[solver],color=colours[plotted[title]],label=label) 66 | cffile.close() 67 | 68 | vol_err.legend() 69 | 70 | if options.output!=None: 71 | pylab.savefig(options.output) 72 | else: 73 | pylab.show() 74 | -------------------------------------------------------------------------------- /tests/MISMIP3d/mismip3d.code/mismip3dPlotGL.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # This script plots the grounding line position for all 3 MISMIP3d experiments at the end of each experiment. 4 | # This script requires the user to have run the python script "mismip3dWriteGL.py". 5 | 6 | 7 | from netCDF4 import Dataset 8 | import numpy as np 9 | import matplotlib.pyplot as plt 10 | 11 | #################################### 12 | # Function used later in the code # 13 | #################################### 14 | 15 | 16 | def glplot(ncfile, times, colora, label): 17 | """ 18 | add a plot of grounding line points to current axes. 19 | makes use of the numpy.ma.MaskedArray when reading xGL,yGL 20 | """ 21 | ncid = Dataset(ncfile, 'r') 22 | time = ncid.variables["time"][:] 23 | lxmax = 0.0 24 | lxmin = 800.0 25 | for i in range(0, len(times)): 26 | seq = (time == times[i]) 27 | xGL = ncid.variables["xGL"][:, seq]*1e-3 28 | lxmax = max(np.max(xGL), lxmax) 29 | lxmin = min(np.min(xGL), lxmin) 30 | yGL = ncid.variables["yGL"][:, seq]*1e-3 31 | plt.plot(xGL, yGL, 's', ms=3, mfc=colora[i], 32 | mec=colora[i], label=label + ', t = ' + format(times[i])) 33 | return lxmin, lxmax 34 | 35 | 36 | ######## 37 | # Code # 38 | ######## 39 | 40 | model = '_cism' 41 | 42 | 43 | plt.figure(figsize=(7, 7)) 44 | 45 | fileStd = 'Stnd/Stnd' + model + '.nc' 46 | ncidStd = Dataset(fileStd,'r') 47 | timeStd = ncidStd.variables["time"][:] 48 | xmin, xmax = glplot(fileStd, [timeStd[-1]], ['black'], 'Stnd') 49 | xminplot = xmin 50 | 51 | fileP75S = 'P75S/P75S' + model + '.nc' 52 | ncidP75S = Dataset(fileP75S,'r') 53 | timeP75S = ncidP75S.variables["time"][:] 54 | xmin, xmax = glplot(fileP75S, [timeP75S[-1]], ['red'], 'P75S') 55 | xminplot = xmin 56 | xmaxplot = xmax 57 | 58 | fileP75R = 'P75R/P75R' + model + '.nc' 59 | ncidP75R = Dataset(fileP75R,'r') 60 | timeP75R = ncidP75R.variables["time"][:] 61 | plt.xlim([xminplot-50.0, xmaxplot+50.0]) 62 | xmin, xmax = glplot(fileP75R, [timeP75R[-1]], ['blue'], 'P75R') 63 | 64 | plt.legend(frameon=True, borderaxespad=0, loc='right') 65 | plt.xlabel(r'$x$ (km)') 66 | plt.ylabel(r'$y$ (km)') 67 | 68 | # Saving the figure. 69 | plt.savefig("mismip3dPlotGL.pdf") 70 | -------------------------------------------------------------------------------- /tests/glint-example/greenland_20km.config.smb: -------------------------------------------------------------------------------- 1 | [grid] 2 | ewn = 76 3 | nsn = 141 4 | upn = 11 5 | dew = 20000. 6 | dns = 20000. 7 | 8 | [GLINT climate] 9 | precip_mode = 1 # 1 = use precip as is 10 | acab_mode = 0 # 0 = SMB from GCM, 1 = PDD scheme 11 | 12 | [projection] 13 | type = STERE 14 | centre_longitude = 321.0 15 | centre_latitude = 90.0 16 | false_easting = 800000.0 17 | false_northing = 3400000.0 18 | standard_parallel = 71.0 19 | 20 | [options] 21 | dycore = 0 # 0 = glide, 2 = glissade 22 | evolution = 0 # 0 = pseudo diffusion, 2 = iterated diffusion, 3 = remap 23 | temperature = 1 # 0 = sfc air, 1 = prognostic 24 | temp_init = 2 # 1 = sfc air, 2 = linear profile 25 | flow_law = 2 # 0 = constant, 2 = Paterson-Budd 26 | slip_coeff = 0 # 0 = no slip, 1 = constant, 3 = constant where T=Tpmp 27 | basal_water = 0 # 0 = none, 1 = local 28 | basal_mass_balance = 0 # 0 = not in continuity eqn, 1 = in continuity eqn 29 | gthf = 0 # 0 = uniform, 1 = prescribe from file 30 | marine_margin = 1 # 1 = remove all floating ice, 4 = present bedrock threshold 31 | vertical_integration = 0 # 0 = standard, 1 = upper kinemetic BC 32 | sigma = 0 # 0 = compute, 2 = read from config file 33 | restart = 0 # 0 = initial run, 1 = restart 34 | 35 | [time] 36 | dt = 1. 37 | dt_diag = 1. 38 | idiag = 25 39 | jdiag = 74 40 | 41 | [parameters] 42 | log_level = 6 43 | ice_limit = 100. # meters 44 | marine_limit = -200. # meters 45 | geothermal = -5.e-2 # W/m2, positive down 46 | flow_factor_ground = 3. # dimensionless 47 | hydro_time = 1000. # yr 48 | basal_tract_const = 1.e-3 # (m/yr)/Pa 49 | 50 | ######################################## 51 | # I/O configuration follows 52 | ######################################## 53 | 54 | [CF default] 55 | title: GLINT example test run 56 | #institution: My Institution 57 | comment: results from a Greenland 20-km test run with SMB forcing 58 | 59 | [CF input] 60 | name: gland20.input.nc 61 | 62 | [CF output] 63 | name: greenland_20km.smb.nc 64 | frequency: 10 65 | variables: thk usurf topg temp uvel vvel velnorm acab artm bmlt bwat 66 | 67 | [CF restart] 68 | name: greenland_20km.smb.restart.nc 69 | frequency: 1000 70 | variables: restart 71 | xtype: double 72 | write_init: F 73 | --------------------------------------------------------------------------------