Pace
An implementation of the FV3GFS / SHiELD atmospheric model developed by NOAA/GFDL using the NDSL middleware in Python, itself based on GT4Py and DaCe.
https://github.com/NOAA-GFDL/pace
Category: Atmosphere
Sub Category: Atmospheric Composition and Dynamics
Keywords from Contributors
climate-modeling transformations measuring archives compose reporter observation animations annotation optimize
Last synced: about 9 hours ago
JSON representation
Repository metadata
Re-write of FV3GFS weather/climate model in Python
- Host: GitHub
- URL: https://github.com/NOAA-GFDL/pace
- Owner: NOAA-GFDL
- License: apache-2.0
- Created: 2022-02-07T20:08:10.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-03-24T16:43:44.000Z (about 1 month ago)
- Last Synced: 2025-04-22T00:03:38.619Z (6 days ago)
- Language: Python
- Size: 11.7 MB
- Stars: 17
- Watchers: 8
- Forks: 16
- Open Issues: 30
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changed_from_main.py
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
README.md
Pace
Pace is an implementation of the FV3GFS / SHiELD atmospheric model developed by NOAA/GFDL using the NDSL middleware in Python, itself based on GT4Py and DaCe. The model can be run on a laptop using Python-based backend or on thousands of heterogeneous compute nodes of a large supercomputer.
🚧 WARNING This repo is under active development - supported features and procedures can change rapidly and without notice. 🚧
The repository model code is split between pyFV3 for the dynamical core and pySHiELD for the physics parametrization. A full depencies looks like the following:
flowchart TD
GT4Py.cartesian --> |Stencil DSL|NDSL
DaCe --> |Full program opt|NDSL
NDSL --> pyFV3
NDSL --> pySHiELD
pyFV3 --> |Dynamics|Pace
pySHiELD --> |Physics|Pace
Quickstart - bare metal
Build
Pace requires:
- GCC > 9.2
- MPI
- Python 3.8.
For GPU backends CUDA and/or ROCm is required depending on the targeted hardware.
For GT stencils backends, you will also need the headers of the boost libraries in your $PATH
. This could be down like this.
cd BOOST/ROOT
wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz
tar -xzf boost_1_79_0.tar.gz
mkdir -p boost_1_79_0/include
mv boost_1_79_0/boost boost_1_79_0/include/
export BOOST_ROOT=BOOST/ROOT/boost_1_79_0
When cloning Pace you will need to update the repository's submodules as well:
git clone --recursive https://github.com/NOAA-GFDL/pace.git
or if you have already cloned the repository:
git submodule update --init --recursive
We recommend creating a python venv
or conda
environment specifically for Pace.
python3 -m venv venv_name
source venv_name/bin/activate
Inside of your pace venv
or conda environment pip install the Python requirements, GT4Py, and Pace:
pip3 install -r requirements_dev.txt -c constraints.txt
Shell scripts to install Pace on specific machines such as Gaea can be found in examples/build_scripts/
.
Run
Located in the directory examples/configs/
there are several example configurations to exhibit the current functionality of Pace. We suggest a new user start with the baroclinic_c12.yaml
configuration.
Before starting any run, including unit tests, the user must ensure that the proper input files are available. For the baroclinic_c12.yaml
configuration a script to generate these files and place them in the location referenced in the configuration file is available in the examples/
directory; generate_eta_files.py
. To generate the files use the following commands from the top level of the clone of Pace:
mkdir tests/main/input
python3 examples/generate_eta_files.py
mv *eta*.nc tests/main/input
These commands will generate the files necessary and place them in the tests/main/input
directory. Once the files are generated the baroclinic_c12.yaml
configuration can be used to generate a run:
mpirun -n 6 python3 -m pace.run examples/configs/baroclinic_c12.yaml
# or with oversubscribe if you do not have at least 6 cores
mpirun -n 6 --oversubscribe python3 -m pace.run examples/configs/baroclinic_c12.yaml
After the run completes, you will see an output direcotry output.zarr
. An example to visualize the output is provided in examples/plot_output.py
. See the driver example section for more details.
Environment variable configuration
PACE_CONSTANTS
: Pace is bundled with various constants.GFDL
NOAA's FV3 dynamical core constants (original port)GFS
Constant as defined in NOAA GFSGEOS
Constant as defined in GEOS v13
PACE_FLOAT_PRECISION
: default precision of the field & scalars in the numerics. Default to 64.PACE_LOGLEVEL
: logging level to display (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default to INFO.
Quickstart - Docker
Build
While it is possible to install and build pace bare-metal, we can ensure all system libraries are installed with the correct versions by using a Docker container to test and develop pace.
First, you will need to update the git submodules so that any dependencies are cloned and at the correct version:
git submodule update --init --recursive
Then build the pace
docker image at the top level.
make build
Run
make dev
mpirun --mca btl_vader_single_copy_mechanism none -n 6 python -m pace.run /examples/configs/baroclinic_c12.yaml
History
This repository was first developed at AI2 and the institute conserves an archived copy with the latest state before the NOAA took over.
Running pace in containers
Docker images exist in the Github Container Registry associated with the NOAA-GFDL organization.
These images are publicly accessible and can be used to run a Docker container to work with pace.
The following are directions on how to setup the pace conda environment interactively in a container.
The latest images can be pulled with the Docker as shown below or
with any other container management tools:
docker pull ghcr.io/noaa-gfdl/pace_mpich:3.8
for MPICH installation of MPI; and
docker pull ghcr.io/noaa-gfdl/pace_openmpi:3.8
for OpenMPI installation of MPI.
If permission issues arise during the pull, a Github personal token
may be required. The steps to create a personal token is found
here
Once the token has been generated, the image can be pulled for example with with:
docker login --username GITHUB_USERNAME --password TOKEN
docker pull ghcr.io/noaa-gfdl/pace_mpich:3.8
Any container management tools compatible with Docker images can be used
to run the container interactively from the pulled image.
With Docker, the following command runs the container interactively.
docker run -it pace_mpich:3.8
In the container, the default base
conda environment is already activated.
The pace
conda environment can be created by following the steps below:
git clone --recursive -b develop https://github.com/NOAA-GFDL/pace.git pace
cd pace
cp /home/scripts/setup_env.sh . && chmod +x setup_env.sh
source ./setup_env.sh
Owner metadata
- Name: NOAA - Geophysical Fluid Dynamics Laboratory
- Login: NOAA-GFDL
- Email: [email protected]
- Kind: organization
- Description: U.S Department of Commerce, National Oceanic and Atmospheric Administration
- Website: www.gfdl.noaa.gov
- Location: Princeton, New Jersey
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/11219395?v=4
- Repositories: 47
- Last ynced at: 2023-08-13T13:41:07.559Z
- Profile URL: https://github.com/NOAA-GFDL
GitHub Events
Total
- Issues event: 4
- Watch event: 2
- Member event: 1
- Issue comment event: 13
- Push event: 8
- Pull request review comment event: 5
- Pull request review event: 26
- Pull request event: 21
- Fork event: 6
- Create event: 1
Last Year
- Issues event: 4
- Watch event: 2
- Member event: 1
- Issue comment event: 13
- Push event: 8
- Pull request review comment event: 5
- Pull request review event: 26
- Pull request event: 21
- Fork event: 6
- Create event: 1
Committers metadata
Last synced: 6 days ago
Total Commits: 1,213
Total Committers: 28
Avg Commits per committer: 43.321
Development Distribution Score (DDS): 0.849
Commits in past year: 19
Committers in past year: 6
Avg Commits per committer in past year: 3.167
Development Distribution Score (DDS) in past year: 0.579
Name | Commits | |
---|---|---|
rheacangeo | 5****o | 183 |
Jeremy McGibbon | j****m@v****m | 156 |
Elynn Wu | e****0@g****m | 146 |
Jeremy McGibbon | m****n@u****u | 126 |
Florian Deconinck | d****n@g****m | 102 |
Johann Dahm | j****d@v****m | 96 |
Tobias Wicky | w****b@g****m | 64 |
eddie-c-davis | 2****s | 60 |
Rhea George | R****G@R****l | 50 |
oelbert | o****6@g****m | 47 |
Chris Kung | c****g@n****v | 42 |
Oliver Fuhrer | o****r | 36 |
dependabot[bot] | 4****] | 30 |
Frank Malatino | 1****o | 19 |
MiKyung Lee | 5****3 | 10 |
ajdas1 | a****1@g****m | 9 |
Noah D Brenowitz | n****2@g****m | 6 |
Mark Cheeseman | M****C@v****m | 5 |
Oliver Watt-Meyer | o****m@v****m | 5 |
Brian Henn | b****n@a****g | 4 |
Spencer Clark | s****k@g****m | 4 |
dependabot-preview[bot] | 2****] | 4 |
Roman Cattaneo | r****c | 3 |
Eddie Davis | e****d@v****m | 2 |
Xingqiu Yuan | x****n@n****v | 1 |
Anna Kwa | a****k@v****m | 1 |
Tristan Abbott | t****2@g****m | 1 |
yniederm | y****n@s****h | 1 |
Committer domains:
- vulcan.com: 6
- student.ethz.ch: 1
- noaa.gov: 1
- allenai.org: 1
- nasa.gov: 1
- uw.edu: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 47
Total pull requests: 90
Average time to close issues: about 1 month
Average time to close pull requests: 13 days
Total issue authors: 7
Total pull request authors: 8
Average comments per issue: 1.77
Average comments per pull request: 1.4
Merged pull request: 78
Bot issues: 0
Bot pull requests: 0
Past year issues: 5
Past year pull requests: 24
Past year average time to close issues: about 12 hours
Past year average time to close pull requests: 13 days
Past year issue authors: 4
Past year pull request authors: 7
Past year average comments per issue: 1.6
Past year average comments per pull request: 0.92
Past year merged pull request: 20
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- FlorianDeconinck (14)
- fmalatino (10)
- oelbert (7)
- mlee03 (6)
- bensonr (5)
- xyuan (4)
- cponder (1)
Top Pull Request Authors
- fmalatino (35)
- FlorianDeconinck (18)
- mlee03 (16)
- oelbert (15)
- romanc (3)
- jjuyeonkim (1)
- xyuan (1)
- thabbott (1)
Top Issue Labels
- enhancement (8)
- todo (3)
- question (2)
- bug (1)
- documentation (1)
- good first issue (1)
Top Pull Request Labels
Score: 7.182352111885262