Skip to content

Commit

Permalink
Update dynamic adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Aug 13, 2023
1 parent 31d6b2c commit 7f4cfb3
Showing 1 changed file with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, test_group, mesh, init, time_integrator):
restart_times = ['0001-01-01_06:00:00', '0001-01-01_12:00:00',
'0001-01-02_00:00:00', '0001-01-03_00:00:00',
'0001-01-04_00:00:00', '0001-01-07_00:00:00',
'0001-01-31_00:00:00']
'0001-01-13_00:00:00', '0001-01-31_00:00:00']

restart_filenames = [
f'restarts/rst.{restart_time.replace(":", ".")}.nc'
Expand Down Expand Up @@ -198,16 +198,45 @@ def __init__(self, test_group, mesh, init, time_integrator):

namelist_options = {
'config_run_duration': "'00-00-03_00:00:00'",
'config_dt': "'00:04:00'",
'config_btr_dt': "'00:00:08'",
'config_implicit_bottom_drag_type': "'constant_and_rayleigh'",
'config_Rayleigh_damping_coeff': '5.0e-6',
'config_do_restart': '.true.',
'config_start_time': f"'{restart_times[4]}'"}
namelist_options.update(shared_options)
step.add_namelist_options(namelist_options)

stream_replacements = {
'output_interval': '00-00-10_00:00:00',
'restart_interval': '00-00-03_00:00:00'}
step.add_streams_file(module, 'streams.template',
template_replacements=stream_replacements)

step.add_input_file(filename=f'../{restart_filenames[4]}')
step.add_output_file(filename=f'../{restart_filenames[5]}')
self.add_step(step)

# seventh step
step_name = 'damped_adjustment_7'
step = ForwardStep(test_case=self, mesh=mesh, init=init,
time_integrator=time_integrator, name=step_name,
subdir=step_name, get_dt_from_min_res=False)

namelist_options = {
'config_run_duration': "'00-00-06_00:00:00'",
'config_dt': "'00:06:00'",
'config_btr_dt': "'00:00:12'",
'config_implicit_bottom_drag_type': "'constant_and_rayleigh'",
'config_Rayleigh_damping_coeff': '5.0e-6',
'config_do_restart': '.true.',
'config_start_time': f"'{restart_times[4]}'"}
namelist_options.update(shared_options)
step.add_namelist_options(namelist_options)

stream_replacements = {
'output_interval': '00-00-10_00:00:00',
'restart_interval': '00-00-03_00:00:00'}
'restart_interval': '00-00-06_00:00:00'}
step.add_streams_file(module, 'streams.template',
template_replacements=stream_replacements)

Expand All @@ -222,7 +251,7 @@ def __init__(self, test_group, mesh, init, time_integrator):
subdir=step_name, get_dt_from_min_res=False)

namelist_options = {
'config_run_duration': "'00-00-24_00:00:00'",
'config_run_duration': "'00-00-18_00:00:00'",
'config_dt': "'00:06:00'",
'config_btr_dt': "'00:00:12'",
'config_do_restart': '.true.',
Expand Down

0 comments on commit 7f4cfb3

Please sign in to comment.