Skip to content

DRAFT - Pull request to put the Isca Mars configurations into Isca's master #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
efdf0f7
First attempt at grey mars. Need to add timings before it can really …
sit23 May 11, 2018
a58dafd
Added Alex Paterson's calculation of eccentric anomaly etc to astrono…
sit23 May 11, 2018
07bb7be
Made alternative r_inv_squared subroutine so that we can pass back tr…
sit23 May 11, 2018
2b166e4
Small changes to make mars-solar-long calc more consistent across dif…
sit23 May 11, 2018
387addc
A few extra changes before full long run.
sit23 May 11, 2018
6708bfc
Added extra diagnostics to help with debugging. Problem is that model…
sit23 May 11, 2018
21a7e88
Script for calculating the equilibrium surface temperature for a rang…
sit23 May 15, 2018
9df8af6
Test mars script using lower optical depths.
sit23 May 15, 2018
0593a8a
Was having problems with output from daily averaging as obviously 1 d…
sit23 May 16, 2018
af6df4a
Making option for large scale condensation to be turned on and off in…
sit23 May 18, 2018
1ca7b41
Various updates to mars_dev, includng error checking of surface flux …
sit23 May 29, 2018
30d31d9
Simple script to interpolate mola mars altitude data into topography …
sit23 May 30, 2018
3291452
Model didn't like not having a land mask. Added this now.
sit23 May 30, 2018
4459f5c
Modernising run-plevel.py
sit23 Jun 18, 2018
a217c65
Compilation on Mac
jamesp Jul 17, 2018
9caa54f
Changes necessary to run on stephen macbook pro.
sit23 Jul 31, 2018
0be5bed
Found stable configuration of Mars model with stronger sponge.
sit23 Aug 6, 2018
19bc997
Added optin to plevel_fn to add back variables that have the scalar_a…
sit23 Aug 7, 2018
c829ed8
Managed to resurrect the local local_heating implementation I put int…
sit23 Aug 9, 2018
30b3171
Merge branch 'mac' into local_dry_heating
sit23 Aug 22, 2018
4901b0b
Modified ozone cmip timeseries script to allow for the creation of lo…
sit23 Aug 23, 2018
5be137a
Adding test case for looking at local heating rate.
sit23 Aug 23, 2018
2dffa4c
Finally managed to fix the interpolator within local heating. It was …
sit23 Aug 24, 2018
9644406
Other changes to make local heating work.
sit23 Aug 24, 2018
736c631
Merge branch 'master' into local_dry_heating
sit23 Aug 24, 2018
e519588
Merge pull request #70 from sit23/local_dry_heating
sit23 Aug 24, 2018
0d32e75
Updated comments etc.
sit23 Aug 24, 2018
902adbb
Merge branch 'master' into mars_dev
sit23 Sep 7, 2018
fc887d6
Merge branch 'master' into mars_dev
sit23 Jan 28, 2019
256a116
Significant changes to help understand what this does.
sit23 Jan 29, 2019
8eb4ab2
Updating this script to give clearer instructions.
sit23 Jan 29, 2019
7f4201d
Important fix for two-stream. It was operating by calculating the fra…
sit23 Jan 29, 2019
a26a6ea
First attempt at Titan-like simulation with Isca largely based on gre…
sit23 Feb 7, 2019
38c2f46
Merge remote-tracking branch 'upstream/local_dry_heating' into local_…
sit23 May 23, 2019
260fb4d
Merge branch 'master' into local_dry_heating
sit23 May 23, 2019
5b27a19
Merge remote-tracking branch 'upstream/local_dry_heating' into local_…
sit23 May 23, 2019
acd283a
Added equinox day to hs forcing so it can easily do earth calendars.
sit23 Jul 30, 2019
7c7eb91
Merge branch 'master' into mars_dev
sit23 Jul 30, 2019
ec69023
Adding N2 as input option for socrates.
sit23 Jul 31, 2019
3056533
Adding extra comment on equinox-day meaning in hs vs elsewhere.
sit23 Jul 31, 2019
0d47b84
Adding Martian diagnostics to socrates interface.
sit23 Jul 31, 2019
2230a3d
Added socrates mars experiment mk1.
sit23 Jul 31, 2019
386ab74
Added mola mars experiment.
sit23 Aug 20, 2019
5a0a723
Regan final titan exp.
sit23 Nov 22, 2019
a348793
Added Titan-specific grey scheme from Schneider et al 2012.:
sit23 Nov 26, 2019
c388de3
Added extra outputs of optical depths
sit23 Nov 28, 2019
04babfc
New titan experiments.
sit23 Nov 28, 2019
d56420b
Initialised two namelist variables, as otherwise they remain unset wh…
sit23 Nov 29, 2019
e8bb01e
Small updates to exp scripts.:
sit23 Nov 29, 2019
7adf45b
Added version with dry convection.
sit23 Nov 29, 2019
4f6264f
Update regan script.
sit23 Nov 29, 2019
9685433
Merge branch 'mars_dev' of github.com:sit23/Isca into mars_dev
sit23 Nov 29, 2019
073d6d3
First set of schneider rad experiments that look well resolved.
sit23 Dec 3, 2019
f0db740
Merge branch 'mars_dev' of github.com:sit23/Isca into mars_dev
sit23 Dec 3, 2019
32a60e5
Look at symmetric version.
sit23 Jan 6, 2020
40ffe8a
Update to diurnal-solar due to seg-faults caused when running without…
sit23 Feb 10, 2020
9ea9cab
Update to axisymmetric case to remove diurnal cycle.
sit23 Apr 24, 2020
ad76b53
Merge branch 'mars_dev' of github.com:sit23/Isca into mars_dev
sit23 Apr 24, 2020
ad77f53
Started process of making condensible more general than being just wa…
sit23 May 5, 2020
996eebf
Adding diffusion of surface water from tapio schneider github.
sit23 May 5, 2020
a018633
Made surface water calculation more general than just water.
sit23 May 5, 2020
da82372
Updated calculation of sat vapor pres to be more general than just wa…
sit23 May 5, 2020
34e923c
Making lots of the vapor-related constants into namelist parameters.
sit23 May 5, 2020
a3e353f
Remove seasonal cycle for test.
sit23 May 11, 2020
ff3d353
Significant additional outputs to diagnose problems with titan methan…
sit23 Jun 5, 2020
f231c4a
Adding frierson monin obukhov version downloaded from MiMA on 5th Jun…
sit23 Jun 5, 2020
3eb8f4b
Adding option to make frierson monin-obukhov version a namelist option.
sit23 Jun 15, 2020
c50c2be
Added option of spectral damping of tracer fields when using grid rep…
sit23 Jun 15, 2020
43e54ba
Making it possible to make input file on half levels.
sit23 Jul 1, 2020
b5ba32c
Making option available to force sw to be exactly what huygens measur…
sit23 Jul 1, 2020
4ed5bb3
Updating output file to allow for very long dates.
sit23 Jul 22, 2020
637ce22
Added Frierson to socrates model path names to allow compilation.
sit23 Jul 29, 2020
226d133
Merge branch 'master' into mars_dev
sit23 Aug 4, 2020
3d7a51c
Merge branch 'mars_dev' of github.com:sit23/Isca into mars_dev
sit23 Jun 8, 2021
2a494f0
rearranging experiments with correct topo labels.
sit23 Jun 9, 2021
0b7561a
Some merge problems stopped the model from working. These modificatio…
sit23 Jun 9, 2021
5905253
Merge branch 'master' into mars_dev
sit23 Mar 6, 2023
ed41d66
Extra mods to make gfort compilation work.
sit23 Mar 6, 2023
ef2eeaf
Merge branch 'master' into local_dry_heating_gfort
sit23 Mar 16, 2023
f764c69
Update experiment.
sit23 Mar 16, 2023
706c1dc
Merge branch 'local_dry_heating_gfort' into mars_dev_gfort_local_heating
sit23 Mar 16, 2023
26821ab
Adapting for Jonah.
sit23 Mar 16, 2023
0b1bcd3
Merge branch 'master' into mars_dev_gfort_local_heating
sit23 Nov 27, 2024
1ab5f96
Catching extra comma from merging process.
sit23 Nov 27, 2024
f8b6d2f
Small changes to runscript given recent lack of notify.
sit23 Nov 27, 2024
686b071
Small Mars testing updates for looking at diurnal cycle.
sit23 Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions exp/frierson_dry_heating/frierson_test_case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
import os

import numpy as np

from isca import IscaCodeBase, DiagTable, Experiment, Namelist, GFDL_BASE

NCORES = 16
base_dir = os.path.dirname(os.path.realpath(__file__))
# a CodeBase can be a directory on the computer,
# useful for iterative development
cb = IscaCodeBase.from_directory(GFDL_BASE)

# or it can point to a specific git repo and commit id.
# This method should ensure future, independent, reproducibility of results.
# cb = DryCodeBase.from_repo(repo='https://github.com/isca/isca', commit='isca1.1')

# compilation depends on computer specific settings. The $GFDL_ENV
# environment variable is used to determine which `$GFDL_BASE/src/extra/env` file
# is used to load the correct compilers. The env file is always loaded from
# $GFDL_BASE and not the checked out git repo.

cb.compile() # compile the source code to working directory $GFDL_WORK/codebase

# create an Experiment object to handle the configuration of model parameters
# and output diagnostics
exp = Experiment('frierson_test_experiment_dry_heating_mk8', codebase=cb)

exp.inputfiles = [ os.path.join(base_dir,'input/heating_rate.nc'),os.path.join(GFDL_BASE,'input/rrtm_input_files/ozone_1990.nc')]

#Tell model how to write diagnostics
diag = DiagTable()
diag.add_file('atmos_daily', 1, 'days', time_units='days')

#Tell model which diagnostics to write
diag.add_field('dynamics', 'ps', time_avg=True)
diag.add_field('dynamics', 'bk')
diag.add_field('dynamics', 'pk')
diag.add_field('atmosphere', 'precipitation', time_avg=True)
diag.add_field('mixed_layer', 't_surf', time_avg=True)
diag.add_field('dynamics', 'sphum', time_avg=True)
diag.add_field('dynamics', 'ucomp', time_avg=True)
diag.add_field('dynamics', 'vcomp', time_avg=True)
diag.add_field('dynamics', 'temp', time_avg=True)
diag.add_field('dynamics', 'vor', time_avg=True)
diag.add_field('dynamics', 'div', time_avg=True)
diag.add_field('hs_forcing', 'local_heating', time_avg=True)

exp.diag_table = diag

#Empty the run directory ready to run
exp.clear_rundir()

#Define values for the 'core' namelist
exp.namelist = namelist = Namelist({
'main_nml':{
'days' : 2,
'hours' : 0,
'minutes': 0,
'seconds': 0,
'dt_atmos':720,
'current_date' : [1,1,1,0,0,0],
'calendar' : 'thirty_day'
},

'idealized_moist_phys_nml': {
'do_damping': True,
'turb':True,
'mixed_layer_bc':True,
'do_virtual' :False,
'do_simple': True,
'roughness_mom':3.21e-05,
'roughness_heat':3.21e-05,
'roughness_moist':3.21e-05,
'two_stream_gray': True, #Use grey radiation
'convection_scheme': 'SIMPLE_BETTS_MILLER', #Use the simple Betts Miller convection scheme from Frierson
'do_local_heating':True,
},

'vert_turb_driver_nml': {
'do_mellor_yamada': False, # default: True
'do_diffusivity': True, # default: False
'do_simple': True, # default: False
'constant_gust': 0.0, # default: 1.0
'use_tau': False
},

'diffusivity_nml': {
'do_entrain':False,
'do_simple': True,
},

'surface_flux_nml': {
'use_virtual_temp': False,
'do_simple': True,
'old_dtaudv': True
},

'atmosphere_nml': {
'idealized_moist_model': True
},

#Use a large mixed-layer depth, and the Albedo of the CTRL case in Jucker & Gerber, 2017
'mixed_layer_nml': {
'tconst' : 285.,
'prescribe_initial_dist':True,
'evaporation':True,
'depth': 2.5, #Depth of mixed layer used
'albedo_value': 0.31, #Albedo value used
},

'qe_moist_convection_nml': {
'rhbm':0.7,
'Tmin':160.,
'Tmax':350.
},

'betts_miller_nml': {
'rhbm': .7 ,
'do_simp': False,
'do_shallower': True,
},

'lscale_cond_nml': {
'do_simple':True,
'do_evap':True
},

'sat_vapor_pres_nml': {
'do_simple':True
},

'damping_driver_nml': {
'do_rayleigh': True,
'trayfric': -0.25, # neg. value: time in *days*
'sponge_pbottom': 5000., #Bottom of the model's sponge down to 50hPa (units are Pa)
'do_conserve_energy': True,
},

'two_stream_gray_rad_nml': {
'rad_scheme': 'frierson', #Select radiation scheme to use, which in this case is Frierson
'do_seasonal': False, #do_seasonal=false uses the p2 insolation profile from Frierson 2006. do_seasonal=True uses the GFDL astronomy module to calculate seasonally-varying insolation.
'atm_abs': 0.2, # default: 0.0
},

# FMS Framework configuration
'diag_manager_nml': {
'mix_snapshot_average_fields': False # time avg fields are labelled with time in middle of window
},

'fms_nml': {
'domains_stack_size': 600000 # default: 0
},

'fms_io_nml': {
'threading_write': 'single', # default: multi
'fileset_write': 'single', # default: multi
},

'spectral_dynamics_nml': {
'damping_order': 4,
'water_correction_limit': 200.e2,
'reference_sea_level_press':1.0e5,
'num_levels':25, #How many model pressure levels to use
'valid_range_t':[100.,800.],
'initial_sphum':[2.e-6],
'vert_coord_option':'input', #Use the vertical levels from Frierson 2006
'surf_res':0.5,
'scale_heights' : 11.0,
'exponent':7.0,
'robert_coeff':0.03
},
'vert_coordinate_nml': {
'bk': [0.000000, 0.0117665, 0.0196679, 0.0315244, 0.0485411, 0.0719344, 0.1027829, 0.1418581, 0.1894648, 0.2453219, 0.3085103, 0.3775033, 0.4502789, 0.5244989, 0.5977253, 0.6676441, 0.7322627, 0.7900587, 0.8400683, 0.8819111, 0.9157609, 0.9422770, 0.9625127, 0.9778177, 0.9897489, 1.0000000],
'pk': [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000],
},

'hs_forcing_nml' :{
'local_heating_option':'from_file',
'local_heating_file':'heating_rate'
},
})

#Lets do a run!
if __name__=="__main__":
exp.run(1, use_restart=False, num_cores=NCORES)
for i in range(2,121):
exp.run(i, num_cores=NCORES)
Binary file added exp/frierson_dry_heating/input/heating_rate.nc
Binary file not shown.
Loading
Loading