The ATHAM Model: Code Structure and Usage Michael Herzog, GFDL Princeton, USA
Download
Report
Transcript The ATHAM Model: Code Structure and Usage Michael Herzog, GFDL Princeton, USA
The ATHAM Model:
Code Structure and Usage
Michael Herzog,
GFDL Princeton, USA
Gunnar Luderer,
MPI Mainz, Germany
Joerg Trentmann,
University of Mainz, Germany
Christiane Textor,
LSCE Paris, France
ATHAM Workshop, Cambridge, UK, June 19-22, 2006
Features of New ATHAM Code
revised code structure
– namelist control to avoid recompile
– directory structure to separate code from i/o
– more user-friendly (makefiles, libraries,
defined interfaces for adding new modules or
variables)
MPI support for parallel computing
– larger problem size (3d, more processes)
(in cylindric coordinates serial only)
Getting Started (unix-like system)
expand archive file atham_[dd.mm.yyyy]_tar.gz
– subdirectories source/ and input/
create directories exec/, output/, save/
specify compiler/flags in source/Makefile.COMPILE
compile code, create executable: make [atham, rebuild]
modify input files in input/
run executable exec/atham (or with make run)
visualize and analyze output files in output/
Input Files
vertical profiles:
– INPUT_profile: T(z), RH(z), u(z), v(z)
– INPUT_kinetic: viscosity, free path length of air
namelist files:
– INPUT_atham_setup: type, domain, timing
– INPUT_volcano:
processes, tracer, forcing
– INPUT_procsconfig,
INPUT_fireforcing,
INPUT_twomicrophys, INPUT_zgrid,
INPUT_coignimbrit,
INPUT_dynamic_setup
INPUT_atham_setup
type or configuration:
e.g. if volcano_setup read INPUT_volcano
coordinate system:
boundary condition: cyclic or no slip
output format:
domain size, number of grid points
number of processors for MPI version
location of zoom, spatial resolution at zoom
cylindric or cartesian
netcdf or binary
INPUT_volcano
active process modules (bulk cloud microphysic)
number of tracer
(ntrac, ntgas, ntpas)
tracer properties
(cp, cv, density, radius)
tracer names for output files
Executing and Output
executable exec/atham
– reads from input/ (except restart from output/)
– writes to output/ (old output files overwritten)
output from Parallel (MPI) version:
– separate restart and output files
for each processor, e.g. ATDAT_<px>_<py>
– output files can be recombined with exec/rebuild
– no(!) rebuild for ATDAT
– single output file if netcdf
output can be viewed with grads (qview) or ferret
Code Structure
subdirectories in source/:
– Basic/: data module, phys constants
– Atham/: dynamical core
– ProcessModules/: processes, forcing
=> add new process using process_data, .e.g. radiation
– Configurations/: problem description
=> add new problem, e.g. coignimbrit eruption
Adding a Process
Example: Radiation for volcano_setup
add radiation.F90 in source/ProcessModules/
use data from module process_data.F90 (and atham_module.F90)
register radiation module
in module processes.F90 and Makefile.COMPILE
add temperature forcing to tetflx
add radiation calls in source/Configurations/volcano.F90
– radiation_init in routine volcano_init
– radiation_preset in routine volcano_preset
– radiation_flux in routine volcano_flux
– diagnostics
in volcano_diagnostic
and volcano_final_diagnostic
Treating a New Problem
Example: Co-ignimbrite Eruption
add coignimbrit.F90 in source/Configurations/ containing:
– coignimbrit_init (coignimbrit_pointer)
– coginimbrit_preset
– coignimbrit_flux (incl. coignimbrit_forcing)
– coignimbrit_fallvel
– coignimbrit_diagnostic, coignimbrit_final_diagnostic
register coignimbrit module in module configurations.F90 and
Makefile.COMMON
use data from atham_module
add flag coignimbrit_setup in source/Basic/atham_module.F90
add coignimbrit calls in source/Atham/atham_setup.F90,
atham_forcing.F90, atham_fallvelocity.F90, atham_output.F90
Questions, Comments?