Skip to content
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

Timeloop #308

Merged
merged 30 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c164b13
Constructing time loop
OngChia Oct 9, 2023
0f22f54
Constructing time loop
OngChia Oct 9, 2023
1a4a7a8
COnstructing time loop test
OngChia Oct 9, 2023
f84cae2
Merge branch 'main' into timeloop
OngChia Oct 11, 2023
80e4a62
Constructing timeloop
OngChia Oct 12, 2023
9871226
Constructing time loop
OngChia Oct 13, 2023
44dcf11
time loop under construction
OngChia Oct 18, 2023
9b6c241
Created a test for timeloop
OngChia Oct 20, 2023
aa34553
Updated the time_step call in timeloop
OngChia Oct 20, 2023
139ebb0
Finalizing timeloop and its test
OngChia Nov 6, 2023
f4924f5
Finalized timeloop before attempting to merge
OngChia Nov 7, 2023
46dd017
Resolve conflicts
OngChia Nov 7, 2023
d81909f
Resolving pre-commit failed runs
OngChia Nov 7, 2023
fa46f6c
Attempting to resolve shadowing of Python builtin in stencil 14
OngChia Nov 7, 2023
368cc57
Resolving A004 error code for abs import in dycore velocity_stencil 1…
OngChia Nov 7, 2023
fc315a1
Removed adding A004 to the flake8 ignore list in dycore
OngChia Nov 8, 2023
e86bb81
Resolving conflicts
OngChia Nov 8, 2023
df63714
Fixed bugs due to recent update of grid infrastructure, and add secon…
OngChia Nov 8, 2023
510f4dd
CLeaning up timeloop
OngChia Nov 8, 2023
9eae2c1
Resolved conflicts
OngChia Nov 8, 2023
0d4dddd
Passed qa after resolving conflicts
OngChia Nov 8, 2023
a85e3ce
Resolving issues brought up in review
OngChia Nov 17, 2023
4c3209e
Removed a bug in r04b09_iconrun_config where appla_initial_stabilizat…
OngChia Nov 17, 2023
25ab752
Merge branch 'main' of https://github.com/C2SM/icon4py into timeloop
OngChia Nov 20, 2023
4eab095
Made changes according to second review
OngChia Nov 22, 2023
c6461be
Made changes according to icon4py qa
OngChia Nov 22, 2023
56b992f
Added TODO of diagnostic variable preparation in time_integration nec…
OngChia Nov 22, 2023
664c80a
Update README.md of driver and change np.asarray to .asnumpy()
OngChia Nov 28, 2023
066bd0b
Resolved conflicts with main branch, added tests for the second time …
OngChia Nov 29, 2023
9485e34
Resolved conflicts
OngChia Nov 29, 2023
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
Prev Previous commit
Next Next commit
Removed a bug in r04b09_iconrun_config where appla_initial_stabilizat…
…ion was wrongly set to true after the review
OngChia committed Nov 17, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 4c3209ef1f53e05b8aaebaae0db65e318f36dd89
67 changes: 0 additions & 67 deletions dummy_dycore_driver_2021-06-20T12:00:00.log

This file was deleted.

9 changes: 3 additions & 6 deletions model/driver/src/icon4py/model/driver/dycore_driver.py
Original file line number Diff line number Diff line change
@@ -72,7 +72,8 @@ def __init__(
(self.run_config.end_date - self.run_config.start_date)
/ timedelta(seconds=self.run_config.dtime)
)
self._substep_timestep: float = float(self.run_config.dtime / self.run_config.n_substeps)
self._n_substeps_var: int = self.run_config.n_substeps
self._substep_timestep: float = float(self.run_config.dtime / self._n_substeps_var)

# check validity of configurations
self._validate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you rename this function to _validate_config then you don't need the extra comment.

@@ -82,8 +83,6 @@ def __init__(

self._l_init: bool = self.run_config.apply_initial_stabilization

self._n_substeps_var: int = self.run_config.n_substeps

self._now: int = 0 # TODO (Chia Rui): move to PrognosticState
self._next: int = 1 # TODO (Chia Rui): move to PrognosticState

@@ -216,7 +215,6 @@ def _integrate_one_time_step(
):

self._do_dyn_substepping(
diffusion_diagnostic_state,
solve_nonhydro_diagnostic_state,
prognostic_state_list,
prep_adv,
@@ -237,7 +235,6 @@ def _integrate_one_time_step(

def _do_dyn_substepping(
self,
diffusion_diagnostic_state: DiffusionDiagnosticState,
solve_nonhydro_diagnostic_state: DiagnosticStateNonHydro,
prognostic_state_list: list[PrognosticState],
prep_adv: PrepAdvection,
@@ -262,7 +259,7 @@ def _do_dyn_substepping(
z_fields=z_fields,
nh_constants=nh_constants,
bdy_divdamp=bdy_divdamp,
dtime=self._n_substeps_var,
dtime=self._substep_timestep,
idyn_timestep=idyn_timestep,
l_recompute=l_recompute,
l_init=self._l_init,
3 changes: 2 additions & 1 deletion model/driver/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ def r04b09_iconrun_config(
ndyn_substeps, # noqa: F811 # imported `ndyn_substeps` fixture
timeloop_date_init,
timeloop_date_exit,
timeloop_diffusion_linit_init,
) -> IconRunConfig:
"""
Create IconRunConfig matching MCH_CH_r04b09_dsl.
@@ -100,7 +101,7 @@ def r04b09_iconrun_config(
int(timeloop_date_exit[17:19]),
),
n_substeps=ndyn_substeps,
apply_initial_stabilization=True,
apply_initial_stabilization=timeloop_diffusion_linit_init,
)


1 change: 0 additions & 1 deletion model/driver/tests/test_timeloop.py
Original file line number Diff line number Diff line change
@@ -81,7 +81,6 @@ def test_run_timeloop_single_step(
r04b09_diffusion_config,
r04b09_iconrun_config,
damping_height,
timeloop_diffusion_linit_init,
timeloop_diffusion_savepoint_init,
timeloop_diffusion_savepoint_exit,
savepoint_velocity_init,