Skip to content

Commit

Permalink
Merge branch 'master' of github.com:exoclime/THOR-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
deitrr committed Mar 15, 2019
2 parents b6dd691 + d17ec13 commit 2eac5f8
Show file tree
Hide file tree
Showing 86 changed files with 6,815 additions and 3,002 deletions.
12 changes: 6 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false

AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false

AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortFunctionsOnASingleLine: None

AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false

AlwaysBreakAfterReturnType: None

Expand Down Expand Up @@ -68,7 +68,7 @@ BreakStringLiterals: true
# limit of lign break
# 0: no limit
# the original code, didn't always use it (used for function calls and declarations, not for formulas), should we use one?
ColumnLimit: 0
ColumnLimit: 100

# CommentPragmas: str
CompactNamespaces: true
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ifeq ($(COMP), nvcc)
CC_comp_flag = -dc
ccbin :=
# ccbin := -ccbin g++-5
CDB := none
CDB := none
arch := -arch sm_$(SM)
dependencies_flags = --generate-dependencies

Expand Down Expand Up @@ -356,9 +356,9 @@ clean:
-$(RM) $(BINDIR)/release/esp
-$(RM) $(BINDIR)/prof/esp
@echo $(CYAN)clean up objects files and dependencies $(END)
-$(RM) $(OBJDIR)/debug/*.o $(OBJDIR)/debug/*.d $(OBJDIR)/debug/*.o.json
-$(RM) $(OBJDIR)/release/*.o $(OBJDIR)/release/*.d $(OBJDIR)/release/*.o.json
-$(RM) $(OBJDIR)/prof/*.o $(OBJDIR)/prof/*.d $(OBJDIR)/prof/*.o.json
-$(RM) $(OBJDIR)/debug/*.o $(OBJDIR)/debug/*.d $(OBJDIR)/debug/*.d.* $(OBJDIR)/debug/*.o.json
-$(RM) $(OBJDIR)/release/*.o $(OBJDIR)/release/*.d $(OBJDIR)/release/*.d.* $(OBJDIR)/release/*.o.json
-$(RM) $(OBJDIR)/prof/*.o $(OBJDIR)/prof/*.d $(OBJDIR)/prof/*.d.* $(OBJDIR)/prof/*.o.json
@echo $(CYAN)clean up tests binaries $(END)
-$(RM) $(BINDIR)/tests/cmdargs_test
-$(RM) $(BINDIR)/tests/storage_test
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ Current code owners: Joao Mendonca: [email protected], Russell Deitrick
$ cd THOR
$ cp Makefile.conf.template Makefile.conf
```
Find the `SM` value of your Nvidia GPU. Then open `Makefile.conf` in a text editor and edit like so:
Find the `SM` value of your Nvidia GPU. Decide if you want to run without any physics module `empty` physics module, or the one with radiative transfer, the `multi` module. Then open `Makefile.conf` in a text editor and edit like so:
```
MODULES_SRC := src/physics/managers/multi/
MODULES_SRC := src/physics/managers/<module_type>/
SM:=<SM value of your card>
```
Set `module_type`to `empty` (default) or `multi`.

```
Then head back to the command line and
```sh
Expand Down
24 changes: 24 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# changes since v2.0.0

* argument parser fails and complains when wrong number of argument for keys
* added test script to run multiple sims
* fix conservation output (was not copied back before output)
* clean up RT module startup output
* added new routines to mjolnir/hamarr (KE, SR)
* fixed issues in regrid
* changed many of the plot functions to use regrid data (some still need work)
* added entropy to global & grid conservation outputs
* fixed pot temp update error in Density_Pressure_Eqs_Poles *major*
* started generalizing plot functions in hamarr to make adding new quantities easier
* added acoustic wave experiment from Tomita & Satoh 2004
* added gravity wave experiment from Tomita & Satoh 2004
* added python scripts to allow editing of initial h5 files (preliminary)
* removed TPprof option, which didn't work as desired anyway: users should use the python tools to edit initial h5 files if non-isothermal initial state is needed
* removal of spurious vertical component of horizontal momentum diffusion has been moved
to a separate function "Correct_Horizontal" to avoid potential issues related to the order
in which threads are called
* incorrect diffusion quantity (diffmh_d) was being passed to Momentum_Eq in the dynamical core, changed now to correct value (DivM_d)
* added crash_report tool that dumps location of nans when the model crashes
* further updates to python plotting tools to make them more flexible
* added "custom_example.py" to mjolnir to demonstrate how to make multipanel plots with the python tools
* grid output now contains differential operators grad, div, and vertical component of curl (the latter is not used by the model, but may be useful in post-processing)
7 changes: 3 additions & 4 deletions ifile/deephj.thr
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ Tmean = 1759
# Reference surface pressure [Pa]
P_ref = 22000000.0

# Initialize atmosphere with Guillot TP profile (0 = isothermal)?
TPprof = 0


#-- Grid options -------------------------------------------------------------#
# Altitude of the top of the model domain [m]
Top_altitude = 8e6
Expand All @@ -79,6 +75,9 @@ DivDampP = true

# Strength of diffusion
Diffc = 0.02

# Strength of divergence damping
DivDampc = 0.02
#########################################################


Expand Down
189 changes: 189 additions & 0 deletions ifile/earth_acoustic_test.thr
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# config file for THOR
# config format version
config_version = 1

# earth acoustic wave test (Tomita & Satoh 2004)


#-- Time stepping and output options -----------------------------------------#
# number of steps
num_steps = 96

# length of timesteps in seconds
timestep = 1800

# output
# output every n steps
n_out = 2

# output directory (relative to current working directory)
# defaults to 'results'
results_path = acoustic_test_divdonly

# calculate and output quantities we hope to conserve
# angular momentum, energy, mass, (entropy soon)
conservation = true


#-- Planetary parameters -----------------------------------------------------#
# name of simulation for output files
simulation_ID = Earth

# Radius [m]
radius = 6371000.0

# Rotation rate [rad s^-1]
rotation_rate = 0

# Gravitational acceleration [m/s^2]
gravitation = 9.8

# Gas constant [J/(Kg K)] (R_univ/mean_molecular_mass)
Rd = 287.0

# Specific heat capacities [J/(Kg K)]
Cp = 1005.0

# Mean atmospheric temperature [K]
Tmean = 300.0

# Reference surface pressure [Pa] (pressure at bottom of model)
P_ref = 100000.0

#-- Grid options -------------------------------------------------------------#
# Altitude of the top of the model domain [m]
Top_altitude = 10000.0

# Horizontal resolution level.
glevel = 5

# Number of vertical layers
vlevel = 20

# Spring dynamics
spring_dynamics = true

# Parameter beta for spring dynamics
spring_beta = 1.15

## diffusion ############################################
# Hyper-diffusion
HyDiff = false

# Divergence-damping
DivDampP = true

# Strength of diffusion
Diffc = 0.02

# Strength of divergence damping
DivDampc = 0.02
#########################################################


#-- Model options ------------------------------------------------------------#
# Non-hydrostatic parameter
NonHydro = true

# Deep atmosphere (scale quantities for altitude + radius)
DeepModel = true

# Initial conditions
rest = true

# initial conditions file, used if rest is set to false
# (path relative to current working directory)
# defaults to 'ifile/esp_initial.h5'
initial =ifile/esp_initial.h5

# Core benchmark tests
# Held-Suarez test for Earth == HeldSuarez
# Benchmark test for shallow hot Jupiter == ShallowHotJupiter
# Benchmark test for deep hot Jupiter == DeepHotJupiter
# Benchmark test for tidally locked Earth == TidallyLockedEarth
# No benchmark test == NoBenchmark (model is then forced with grey RT by default)
core_benchmark = AcousticTest

# Switch off dynamical core (gcm)
# This is useful for testing/debugging physics modules
gcm_off = false

# enable convective adjustment scheme
conv_adj = 0


#-- Sponge layer (Rayleigh drag) ---------------------------------------------#
# use sponge layer (Rayleigh drag) at top of atmosphere?
SpongeLayer = false

# latitude rings (zonal mean is calculated over these)
nlat = 20

# bottom of sponge layer (fractional height)
ns_sponge = 0.75

# strength of sponge layer (1/damping time)
Rv_sponge = 1e-5

# shrink sponge by half after some time (experimental)
#shrink_sponge = true

# when to shrink sponge (days)
#t_shrink = 1


#-- Radiative transfer options (core_benchmark = NoBenchmark) --------------------------#
radiative_transfer = false
## RT parameters #######################################
# stellar temperature (k)
Tstar = 5800

# orbital distance or semi-major axis (au)
planet_star_dist = 1

# radius of host star (R_sun)
radius_star = 1

# bond albedo of planet
albedo = 0.3

# grey opt. depth of thermal wavelengths (at ref pressure)
taulw = 10

# grey opt. depth of incoming stellar flux (at ref pressure)
tausw = 1.67

# temperature of internal heat flux (bottom boundary) (K)
Tlow = 50

# diffusivity factor
diff_fac = 0.5
#########################################################

## insolation (orbit + spin-state) parameters ###########
# synchronous rotation (tidally-locking at 1:1)
sync_rot = true

# mean motion of orbit (if sync_rot=false and ecc>0) (rad/s)
#mean_motion = 1.98e-7

# initial substellar longitude (deg)
#alpha_i = 0

# initial orbital position (deg)
#true_long_i = 0

# eccentricity of orbit
#ecc = 0

# obliquity (axial-tilt) (deg)
#obliquity = 0

# longitude of periastron (relative to equinox) (deg)
# (stupid Earth convention applies)
#longp = 0
#########################################################

#-- Device options -----------------------------------------------------------#
# GPU ID number
GPU_ID_N = 0
Loading

0 comments on commit 2eac5f8

Please sign in to comment.