Adds infrastructure to the dynamical core to enable doubly-periodic runs, and refactors driver and test infrastructure to be useable with CubedSphere and Tile communicators/partitioners
Remove the sections below which do not apply.
Code changes:
driver/pace/driver/driver.py: generalized typing CubedSphereCommunicator to Communcator and create correct communicator for doubly periodic runs, added grid type to config
driver/pace/driver/grid.py: replace CubeSphereCommunicator with Communicator base class for typing
driver/pace/driver/initialization.py: replace CubeSphereCommunicator with Communicator base class for typing
driver/pace/driver/state.py: replace CubeSphereCommunicator with Communicator base class for typing
dsl/pace/dsl/caches/cache_location.py: replace CubeSpherePartitioner with Partitioner base class for typing
dsl/pace/dsl/dace/dace_config.py: replace CubeSphereCommunicator, CubeSpherePartitioner with Communicator and Partitioner base classes for typing
dsl/pace/dsl/dace/wrapped_halo_exchange.py: replace CubeSphereCommunicator with Communicator base class for typing
dsl/pace/dsl/stencil.py replace CubeSphereCommunicator with Communicator base class for typing
dsl/pace/dsl/stencil_config.py: replace CubeSphereCommunicator, CubeSpherePartitioner with Communicator and Partitioner base classes for typing
examples/notebooks/functions.py Updated call to GridIndexing.from_sizer_and_communicator()
examples/notebooks/stencil_definition.ipynb Updated call to GridIndexing.from_sizer_and_communicator()
fv3core/pace/fv3core/_config.py: update nf_omega for orthogonal grids
fv3core/pace/fv3core/initialization/dycore_state.py: replace CubeSphereCommunicator with Communicator base class for typing
fv3core/tests/savepoint/translate/translate_a2b_ord4.py: Updated constructor for a2b, but there isn't a good way to test the doubly-periodic config, so we just pass in that case
physics/tests/conftest.py: added --dperiodic command line option for doubly periodic test data
stencils/pace/stencils/c2l_ord.py: added handling for grid_type 4 and (re?)added mock echange(?)
stencils/pace/stencils/fv_update_phys.py: updating call signs, passing grid_type into updates
stencils/pace/stencils/testing/conftest.py: updating calls, adding dperiodic logic to generate a tile communicator and partitioner instead of a cubedsphere comm and partitioner
stencils/pace/stencils/testing/test_translate.py: added simple logic to create a tile comm for doubly periodic tests
stencils/pace/stencils/update_atmos_state.py: changed cubedspherecomm to comm
stencils/pace/stencils/update_dwind_phys.py: now handling for grid_type 4
Purpose
Adds infrastructure to the dynamical core to enable doubly-periodic runs, and refactors driver and test infrastructure to be useable with CubedSphere and Tile communicators/partitioners
Remove the sections below which do not apply.
Code changes:
driver/pace/driver/driver.py
: generalized typing CubedSphereCommunicator to Communcator and create correct communicator for doubly periodic runs, added grid type to configdriver/pace/driver/grid.py
: replace CubeSphereCommunicator with Communicator base class for typingdriver/pace/driver/initialization.py
: replace CubeSphereCommunicator with Communicator base class for typingdriver/pace/driver/state.py
: replace CubeSphereCommunicator with Communicator base class for typingdsl/pace/dsl/caches/cache_location.py
: replace CubeSpherePartitioner with Partitioner base class for typingdsl/pace/dsl/dace/dace_config.py
: replace CubeSphereCommunicator, CubeSpherePartitioner with Communicator and Partitioner base classes for typingdsl/pace/dsl/dace/wrapped_halo_exchange.py
: replace CubeSphereCommunicator with Communicator base class for typingdsl/pace/dsl/stencil.py
replace CubeSphereCommunicator with Communicator base class for typingdsl/pace/dsl/stencil_config.py
: replace CubeSphereCommunicator, CubeSpherePartitioner with Communicator and Partitioner base classes for typingexamples/notebooks/functions.py
Updated call to GridIndexing.from_sizer_and_communicator()examples/notebooks/stencil_definition.ipynb
Updated call to GridIndexing.from_sizer_and_communicator()fv3core/pace/fv3core/_config.py
: update nf_omega for orthogonal gridsfv3core/pace/fv3core/initialization/geos_wrapper.py
: updated call signaturefv3core/pace/fv3core/stencils/a2b_ord4.py
: Added handling for grid_type 4fv3core/pace/fv3core/stencils/c_sw.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/d2a2c_vect.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/d_sw.py
: added handling for grid_type 4, updated call signaturesfv3core/pace/fv3core/stencils/delnflux.py
fixed precision/rounding issue with nord, may no one ever need to see this code againfv3core/pace/fv3core/stencils/divergence_damping.py
: Added smagorinsky diffusion for doubly-periodic configs, updated call to a2b_ord4 for grid_type 4fv3core/pace/fv3core/stencils/dyn_core.py
: updated call signatures and args for doubly-periodic runsfv3core/pace/fv3core/stencils/fv_dynamics.py
updated call to c2lfv3core/pace/fv3core/stencils/fxadv.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/nh_p_grad.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/tracer_2d_1l.py
: replace CubeSphereCommunicator with Communicator base class for typingfv3core/pace/fv3core/stencils/updatedzc.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/xppm.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/xtp_u.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/yppm.py
: added handling for grid_type 4fv3core/pace/fv3core/stencils/ytp_v.py
: added handling for grid_type 4fv3core/tests/conftest.py
: added --dperiodic command line option for doubly periodic test datafv3core/tests/mpi/test_doubly_periodic.py
: updated call signsfv3core/tests/savepoint/translate/translate_a2b_ord4.py
: Updated constructor for a2b, but there isn't a good way to test the doubly-periodic config, so we justpass
in that casefv3core/tests/savepoint/translate/translate_cubedtolatlon.py
: update constructorfv3core/tests/savepoint/translate/translate_fxadv.py
: updated constructorfv3core/tests/savepoint/translate/translate_updatedzc.py
: updated constructorfv3core/tests/savepoint/translate/translate_xtp_u.py
: updated constructorfv3core/tests/savepoint/translate/translate_ytp_v.py
: updated constructorphysics/tests/conftest.py
: added --dperiodic command line option for doubly periodic test datastencils/pace/stencils/c2l_ord.py
: added handling for grid_type 4 and (re?)added mock echange(?)stencils/pace/stencils/fv_update_phys.py
: updating call signs, passing grid_type into updatesstencils/pace/stencils/testing/conftest.py
: updating calls, adding dperiodic logic to generate a tile communicator and partitioner instead of a cubedsphere comm and partitionerstencils/pace/stencils/testing/test_translate.py
: added simple logic to create a tile comm for doubly periodic testsstencils/pace/stencils/update_atmos_state.py
: changed cubedspherecomm to commstencils/pace/stencils/update_dwind_phys.py
: now handling for grid_type 4tests/main/fv3core/test_dycore_call.py
: updating call signstests/main/physics/test_integration.py
: updating call signstests/savepoint/conftest.py
: adding dperiodic option for doubly periodic teststests/savepoint/test_checkpoints.py
: updating call signutil/HISTORY.md
: updated with latest additionsutil/pace/util/__init__.py
: Partitioner abstract base class is now included in module by default to generalize from just CubedSphere layoutsutil/pace/util/_legacy_restart.py
: replace CubeSphereCommunicator with Communicator base class for typingutil/pace/util/communicator.py
: from_layout and size are now abstract methods on all Communicator classesutil/pace/util/grid/generation.py
: replace CubeSphereCommunicator with Communicator base class for typingutil/pace/util/grid/helper.py
: added grid_type to driver grid datautil/pace/util/partitioner.py
: Partitioner is now a useful abstract base class for typingThis got slightly larger than intended, sorry
Checklist
Before submitting this PR, please make sure:
pace-util
, HISTORY has been updatedAdditionally, if this PR contains code authored by new contributors: