forked from NOAA-EMC/GFDL_atmos_cubed_sphere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
24,219 additions
and
3,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
name: Compile SHiELD SOLO and run tests | ||
|
||
# This GitHub Action Workflow is running on the cloud devcimultiintel cluster | ||
# The tests are run inside of a container with the following software/libraries: | ||
# -intel: 2023.2.0 | ||
# -hdf5: 1.14.0 | ||
# -netcdf-c: 4.9.2 | ||
# -netcdf-fortran: 4.6.0 | ||
# -cmake | ||
# -libyaml | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# run weekly on Sunday | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
#this should cancel in progress ci runs for the same PR | ||
#(e.g. a second commit on the same PR comes in while CI is still running) | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
checkout: | ||
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere' | ||
runs-on: [gfdlacsciintel] | ||
name: Checkout Code | ||
steps: | ||
# It can take a long time (5-15 minutes) to spinup nodes | ||
# so this salloc will prompt 46 nodes to startup and stay active for 20 min | ||
# this is enough nodes for the first 17 tests to run in parallel, and we | ||
# have 17 runners configured. | ||
- run: salloc --partition=p2 -N 46 -J $GITHUB_SHA sleep 20m & | ||
- run: /contrib/fv3/GFDL_atmos_cubed_sphere_CI/checkout.sh $GITHUB_REF $GITHUB_SHA | ||
|
||
build: | ||
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere' | ||
runs-on: [gfdlacsciintel] | ||
name: SOLO SHiELD build | ||
needs: [checkout] | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 3 | ||
matrix: | ||
runpath: [/contrib/fv3/GFDL_atmos_cubed_sphere_CI/] | ||
runscript: [swcompile.sh, nhcompile.sh, hydrocompile.sh] | ||
steps: | ||
- env: | ||
RUNPATH: ${{ matrix.runpath }} | ||
RUNSCRIPT: ${{ matrix.runscript }} | ||
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA | ||
|
||
test: | ||
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere' | ||
runs-on: [gfdlacsciintel] | ||
name: SOLO SHiELD test suite | ||
needs: [checkout, build] | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 17 | ||
matrix: | ||
runpath: [/contrib/fv3/GFDL_atmos_cubed_sphere_CI/] | ||
runscript: | ||
# These are placed in order of largest to smallest jobs | ||
#layout 8,8 needs 8 nodes on dvcimultiintel cluster | ||
- C512r20.solo.superC.sh | ||
- C768.sw.BTwave.sh | ||
#layout 4,8 needs 4 nodes on dvcimultiintel cluster | ||
- C256r20.solo.superC.sh | ||
- C384.sw.BLvortex.sh | ||
#layout 4,4 needs 2 nodes on dvcimultiintel cluster | ||
- C128r20.solo.superC.sh | ||
- C128r3.solo.TC.d1.sh | ||
- C128r3.solo.TC.h6.sh | ||
- C128r3.solo.TC.sh | ||
- C128r3.solo.TC.tr8.sh | ||
- C192.sw.BLvortex.sh | ||
- C192.sw.BTwave.sh | ||
- C192.sw.modon.sh | ||
- C384.sw.BTwave.sh | ||
#layout 4,1 and 2,2 need 1 node on dvcimultiintel cluster | ||
- C96.solo.BCdry.hyd.sh | ||
- C96.solo.BCdry.sh | ||
- C96.solo.BCmoist.hyd.d3.sh | ||
- C96.solo.BCmoist.hyd.sh | ||
- C96.solo.BCmoist.nhK.sh | ||
- C96.solo.BCmoist.sh | ||
- C96.solo.mtn_rest.hyd.diff2.sh | ||
- C96.solo.mtn_rest.hyd.sh | ||
- C96.solo.mtn_rest.nonmono.diff2.sh | ||
- C96.solo.mtn_rest.sh | ||
- C96.sw.BLvortex.sh | ||
- C96.sw.BTwave.sh | ||
- C96.sw.modon.sh | ||
- C96.sw.RHwave.sh | ||
- d96_1k.solo.mtn_rest_shear.olddamp.sh | ||
- d96_1k.solo.mtn_rest_shear.sh | ||
- d96_1k.solo.mtn_schar.mono.sh | ||
- d96_1k.solo.mtn_schar.sh | ||
- d96_2k.solo.bubble.n0.sh | ||
- d96_2k.solo.bubble.nhK.sh | ||
- d96_2k.solo.bubble.sh | ||
- d96_500m.solo.mtn_schar.sh | ||
steps: | ||
# This will end the slurm job started in the checkout job | ||
- run: scancel -n $GITHUB_SHA | ||
- env: | ||
RUNPATH: ${{ matrix.runpath }} | ||
RUNSCRIPT: ${{ matrix.runscript }} | ||
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA | ||
shutdown: | ||
if: always() && github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere' | ||
runs-on: [gfdlacsciintel] | ||
name: Shutdown Processes | ||
needs: [checkout, build, test] | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 17 | ||
matrix: | ||
test: | ||
- C512r20.solo.superC | ||
- C768.sw.BTwave | ||
- C256r20.solo.superC | ||
- C384.sw.BLvortex | ||
- C128r20.solo.superC | ||
- C128r3.solo.TC.d1 | ||
- C128r3.solo.TC.h6 | ||
- C128r3.solo.TC | ||
- C128r3.solo.TC.tr8 | ||
- C192.sw.BLvortex | ||
- C192.sw.BTwave | ||
- C192.sw.modon | ||
- C384.sw.BTwave | ||
- C96.solo.BCdry.hyd | ||
- C96.solo.BCdry | ||
- C96.solo.BCmoist.hyd.d3 | ||
- C96.solo.BCmoist.hyd | ||
- C96.solo.BCmoist.nhK | ||
- C96.solo.BCmoist | ||
- C96.solo.mtn_rest.hyd.diff2 | ||
- C96.solo.mtn_rest.hyd | ||
- C96.solo.mtn_rest.nonmono.diff2 | ||
- C96.solo.mtn_rest | ||
- C96.sw.BLvortex | ||
- C96.sw.BTwave | ||
- C96.sw.modon | ||
- C96.sw.RHwave | ||
- d96_1k.solo.mtn_rest_shear.olddamp | ||
- d96_1k.solo.mtn_rest_shear | ||
- d96_1k.solo.mtn_schar.mono | ||
- d96_1k.solo.mtn_schar | ||
- d96_2k.solo.bubble.n0 | ||
- d96_2k.solo.bubble.nhK | ||
- d96_2k.solo.bubble | ||
- d96_500m.solo.mtn_schar | ||
steps: | ||
- run: scancel -n $GITHUB_SHA | ||
- env: | ||
JOB: ${{ github.sha }}_${{ matrix.test }} | ||
run: scancel -n $JOB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Old Build Cleanup | ||
|
||
# This GitHub Action Workflow is runing on the GFDL_ACS_CIINTEL cluster | ||
# This will delete all build directories older than 30 days | ||
# Build directories are on the cloud at /contrib/fv3/2023.2.0 | ||
|
||
on: | ||
schedule: | ||
# run daily at midnight | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
delete: | ||
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere' | ||
runs-on: [gfdlacsciintel] | ||
name: Delete Builds | ||
steps: | ||
- run: find /contrib/fv3/2023.2.0/GFDL_atmos_cubed_sphere/refs/pull -maxdepth 1 -mindepth 1 -mtime +30 -type d -print -exec rm -rf "{}" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Contributing Guide for the GFDL_atmos_cubed_sphere Repository | ||
|
||
This guide will walk a developer through the correct process for making a Pull Request in this repository. | ||
GFDL_atmos_cubed_sphere is a repository with 4 different development branches. It is imperitive that the developer understands the difference between each branch. | ||
|
||
## Understanding the Development Branches | ||
|
||
There are 4 different development branches being supported in this repository. | ||
|
||
| Branch | Description | | ||
| :--- | :--- | | ||
| main | This branch is the main development branch. The SHiELD model will compile with this branch. When there is a Public Release of the FV3 Dyncamical Core, updates will first be introduced to this branch. | | ||
| dev/gfdl | This branch is used for all AM4 based GFDL Models. | | ||
| dev/emc | This branch is used for the UFS Weather Model development. | | ||
| dev/gfdl_am5 | This branch is being used for GFDL AM5 development. | | ||
|
||
## How to contribute code changes | ||
|
||
1. Create a Fork | ||
1. Click on **Fork** in the top right of the repository GitHub page | ||
2. The **Owner** should be set to your GitHub username | ||
3. The **Repository Name** should be GFDL_atmos_cubed_sphere | ||
4. Click **Create fork** | ||
|
||
2. Create an Issue describing the change that you would like to implement. | ||
1. Navigate to the **Issue** tab at the top of the repository GitHub page | ||
2. Click on the **New issue** button | ||
3. Choose from one of the suggested templates (Bug Report, Feature Request, or Support Request) | ||
4. Fill out the Issue with specifics and submit issue | ||
|
||
3. Clone the repository locally on your machine | ||
|
||
`git clone https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere.git` | ||
|
||
4. Add your fork locally | ||
|
||
This guide will refer to the fork as `myFork`, but you can name this anything. | ||
|
||
`git remote add myFork https://github.com/<username>/GFDL_atmos_cubed_sphere.git` | ||
|
||
`git remote -v` will display all remote repositories that you have added. The repository that you cloned will be named `origin` by default. | ||
|
||
The ouput of `git remote -v` should be similar to: | ||
|
||
``` | ||
myFork https://github.com/<username>/GFDL_atmos_cubed_sphere.git (fetch) | ||
myFork https://github.com/<username>/GFDL_atmos_cubed_sphere.git (push) | ||
origin https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere.git (fetch) | ||
origin https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere.git (push) | ||
``` | ||
5. Checkout the branch that you would like your changes added to | ||
Refer to section [Understanding the Development Branches](#Understanding-the-Development-Branches) to choose which branch to checkout | ||
This guide will reference this branch as `baseBranch` | ||
`git checkout baseBranch ` | ||
6. Create a feature branch to make your changes to | ||
This guide will refer to this new branch as `newBranch`, but you should name this branch with a unique name related to the task | ||
`git checkout -b newBranch` | ||
7. Update the code | ||
1. To see the files you have modified use the command `git status` | ||
2. To see exactly what you changed in each file use the command `git diff` | ||
3. When you are satisfied with your changes stage them for a commit | ||
`git add <filenames or paths of all added and modified files>` | ||
4. Make a commit | ||
`git commit -m "Descriptive message describing what you have changed in this commit"` | ||
5. Make sure branch is up to date with the base branch (main, dev/gfdl, dev/emc, or dev/gfdl_am5) | ||
`git fetch origin baseBranch` | ||
`git merge origin/baseBranch` | ||
6. Push that commit to your fork | ||
`git push myFork newBranch` | ||
8. Create a Pull Request | ||
1. Navigate to your fork on GitHub | ||
The URL to get you to your fork should be `https://github.com/<username>/GFDL_atmos_cubed_sphere` | ||
2. Navigate to the **Pull requests** tab at the top of the repository GitHub page | ||
3. Click on the **New pull request** button | ||
4. The **base repository** should be *NOAA-GFDL/GFDL_atmos_cubed_sphere* | ||
5. The **base** branch is the branch you would like to add your changes to | ||
Refer to section [Understanding the Development Branches](#Understanding-the-Development-Branches) | ||
This is the same branch that you originally checked out in Step 5 of this guide that was referred to as `baseBranch` | ||
6. The **head repository** should be your fork (e.g. *\<username\>/GFDL_atmos_cubed_sphere*) | ||
7. The **compare** branch is the feeature branch containing your updates. This was referred to as `newBranch` in this guide | ||
You should now see a comparison of the two branches | ||
8. Click on the **Create pull request** button | ||
9. Fill in the details of the Pull request, being sure to follow the template provided: | ||
1. Provide a desciption: Include a summary of the change and which issue is fixed. | ||
Please also include relevant motivation and context. | ||
List any dependencies that are required for this change. | ||
2. Link the Issue from Step 2 by including a line `Fixes #123` where *123* is the Issue # | ||
3. Please describe the tests that you ran to verify your changes. | ||
Please also note any relevant details for your test configuration (e.g. compiler, OS). | ||
Include enough information so someone can reproduce your tests. | ||
4. Ensure that all checkboxes are populated. If something does not apply, please check it and note that it does not apply somewhere in the PR. | ||
If you have not completed an item in the checklist, the PR will not be merged. | ||
To check a box replace the space in `[ ]` with an x `[x]` | ||
5. Click on the **Create pull request** button. | ||
10. Code managers will assign reviewers to the PR. | ||
If you would like someone specific to review your PR please leave a comment on the PR requesting that. | ||
When all reviewers approve the code, a code manager will merge the code and your changes will now be in the relevant development branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.