Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4a85abc
cleaned up options.py for #14
ray-chew Jun 7, 2025
8b83246
updated .coveragerc to reflect new folder structure
ray-chew Jun 7, 2025
3e8c858
Make user data update solution of a graph dependency
ray-chew Jun 14, 2025
efa857b
moved options one level up; update import statement
ray-chew Jun 14, 2025
80bb6d0
updated test initial condition files to work with latest UserDataInit…
ray-chew Jun 14, 2025
4c78f11
blacked everything
ray-chew Jun 14, 2025
6ea3c89
refactored physics.gas_dynamics.cfl
ray-chew Jun 14, 2025
cd091c6
refactored numerical_flux.recompute_advective_fluxes; added common op…
ray-chew Jun 14, 2025
85ec516
replaced sst with sst.ud as input to time_update.do
ray-chew Jun 14, 2025
d8414d6
introduced a cache for the temporary data containers in the advection…
ray-chew Jun 14, 2025
b6b8473
partial refactoring of recovery.py and explicit.py
ray-chew Jun 14, 2025
21ba1c4
moved slicing operations in recovery.do to slices.py
ray-chew Jun 14, 2025
0c52fbc
refactored recovery.do
ray-chew Jun 14, 2025
cfcc62c
refactored explicit.py
ray-chew Jun 14, 2025
c10227c
refactor numerical_flux.py
ray-chew Jun 14, 2025
f881c38
fix for broken CI badge in README.md
ray-chew Jun 15, 2025
0d1962b
first change to use the mem data container in second_project.py
ray-chew Jun 15, 2025
3060ee0
extended cache in variable.py to support second project
ray-chew Jun 16, 2025
86cd609
refactored and optimised second_projection.multiply_inverse_coriolis
ray-chew Jun 16, 2025
ae45536
optimised the advection routine to do in-place updates as much as pos…
ray-chew Jun 16, 2025
d8a1205
reinstate logger to info-level outputs
ray-chew Jun 16, 2025
410e1e9
refactored variable.Vars.get_dSdy
ray-chew Jun 16, 2025
cfecde5
refactored variable.Vars.get_S0c
ray-chew Jun 16, 2025
f8050b3
made second_project.euler_forward_non_advective work with mem, ud, dt
ray-chew Jun 16, 2025
7b8aa50
refactored second_project.divergence_nodes
ray-chew Jun 16, 2025
88930da
extended slices.py with more common operations
ray-chew Jun 16, 2025
eef21b3
refactored scale_wall_node_values
ray-chew Jun 16, 2025
f2b0620
refactored second_project.grad_nodes to operators.compute_grad_nodes
ray-chew Jun 16, 2025
bfc5288
extended operators.py to support averaging kernels
ray-chew Jun 16, 2025
39603eb
refactored second_projection.euler_forward_non_advective
ray-chew Jun 16, 2025
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
6 changes: 3 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[run]
source = src
omit =
src/data_assimilation/*
src/inputs/*
src/utils/debug_helpers.py
src/pybella/data_assimilation/*
src/pybella/inputs/*
src/pybella/utils/debug_helpers.py
*/tests/*
*/test_*
setup.py
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


<p align="center">
<a href="https://github.com/ray-chew/pyBELLA/actions/workflows/documentation.yml">
<img alt="GitHub Actions: docs" src=https://img.shields.io/github/actions/workflow/status/ray-chew/pyBELLA/documentation.yml?logo=github&label=docs>
<a href="https://github.com/ray-chew/pyBELLA/actions/workflows/deploy.yml">
<img alt="GitHub Actions: docs" src=https://img.shields.io/github/actions/workflow/status/ray-chew/pyBELLA/deploy.yml?logo=github&label=docs>
</a>
<a href="https://github.com/ray-chew/pyBELLA/issues">
<img alt="open issues" src=https://img.shields.io/github/issues/ray-chew/pyBELLA>
Expand Down
1 change: 0 additions & 1 deletion run_scripts/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
diag = td.compare_sol("gen_target")
diag.update_targets()


ud["output_type"] = "test"
# Do diagnostics
ud["diag"] = True
Expand Down
26 changes: 13 additions & 13 deletions src/pybella/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import numpy as np

from .flow_solver.utils import prepare

# dependencies of the atmospheric flow solver
from .flow_solver.discretisation import time_update as dis_time_update

Expand All @@ -16,7 +18,7 @@
from .data_assimilation import prepare as da_prepare, analysis as da_analysis

# package imports
from .utils import prepare, io, sim_params as params
from .utils import io, sim_params as params


##########################################################
Expand Down Expand Up @@ -67,23 +69,21 @@ def main():
debug_writer = io.create_debug_writer(params.debug, writer, mem)

logging.info("For ensemble member = %i..." % cnt)
mem = dis_time_update.do(
sst,
mem,
tout,
blend,
step_writer,
debug_writer
)
mem = dis_time_update.do(mem, sst.ud, tout, blend, step_writer, debug_writer)

if sst.ud.diag:
if sst.ud.diag_updt_targets:
strip_target.do(step_writer.OUTPUT_FILENAME + step_writer.BASE_NAME + step_writer.SUFFIX + '.h5', sst.ud, time_increment=sst.diag_comparison.time_increment)
strip_target.do(
step_writer.OUTPUT_FILENAME
+ step_writer.BASE_NAME
+ step_writer.SUFFIX
+ ".h5",
sst.ud,
time_increment=sst.diag_comparison.time_increment,
)
sst.diag_comparison.update_targets()
else:
sst.diag_comparison.test_do(
mem, sst.ud
)
sst.diag_comparison.test_do(mem, sst.ud)

futures.append(mem)

Expand Down
2 changes: 1 addition & 1 deletion src/pybella/data_assimilation/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def do_for_window(tout, outer_step, results, sst, writer):
# Update ensemble with analysis
######################################################
for mem in results:
elem, node, Sol, _, mpv, th, _ = mem
elem, node, Sol, _, mpv, th, _, _ = mem
bdry.set_explicit_boundary_data(Sol, elem, sst.ud, th, mpv)
p2_nodes = mpv.p2_nodes
bdry.set_ghostnodes_p2(p2_nodes, node, sst.ud)
Expand Down
2 changes: 1 addition & 1 deletion src/pybella/data_assimilation/letkf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import matplotlib.pyplot as plt

from ..flow_solver.utils import options as opts
from ..utils import options as opts
from . import utils

debug_cnt = 0
Expand Down
4 changes: 3 additions & 1 deletion src/pybella/data_assimilation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

import matplotlib.pyplot as plt

from ..flow_solver.utils import options as opts, boundary as bdry
from ..utils import options as opts

from ..flow_solver.utils import boundary as bdry


class ensemble(object):
Expand Down
2 changes: 1 addition & 1 deletion src/pybella/flow_solver/discretisation/grid.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from ..utils import options as opts
from ...utils import options as opts


def grid_init(ud):
Expand Down
Loading