Skip to content

Commit

Permalink
Added explicit alpha_fd coefficient to TOFD in drag_suite.F90
Browse files Browse the repository at this point in the history
  • Loading branch information
kayeekayee committed May 30, 2024
1 parent 5d77948 commit 30f5c9c
Show file tree
Hide file tree
Showing 492 changed files with 164,061 additions and 1 deletion.
1 change: 0 additions & 1 deletion sorc/ufs_utils.fd
Submodule ufs_utils.fd deleted from 7dcadc
40 changes: 40 additions & 0 deletions sorc/ufs_utils.fd/.github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
- Use this template to give a detailed message describing the change you want to make to the code.

- You may delete any sections labeled "optional".

- If you are unclear on what should be written here, see https://github.com/ufs-community/UFS_UTILS/wiki/9.-Creating-a-Pull-Request for some guidance.

- The title of this pull request should be a brief summary (ideally less than 100 characters) of the changes included in this PR. Please also include the branch to which this PR is being issued.

- Use the "Preview" tab to see what your PR will look like when you hit "Create pull request"

## --- Delete this line and those above before hitting "Create pull request" ---

## DESCRIPTION OF CHANGES:
One or more paragraphs describing the problem, solution, and required changes.

## TESTS CONDUCTED:
If there are changes to the build or source code, the tests below must be conducted. Contact a repository manager if you need assistance.

- [ ] Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera, Hercules and WCOSS2).
- [ ] Compile branch on Hera using GNU.
- [ ] Compile branch in 'Debug' mode on WCOSS2.
- [ ] Run unit tests locally on any Tier 1 machine.
- [ ] Run relevant consistency tests locally on all Tier 1 machine.

Describe any additional tests performed.

## DEPENDENCIES:
Add any links to pending PRs that are required prior to merging this PR. For example:

ufs-community/UFS_UTILS/pull/<pr_number>

## DOCUMENTATION:
If this PR is contributing new capabilities that need to be documented, please also include updates to the RST files in the docs/source directory as supporting material.

## ISSUE:
If this PR is resolving or referencing one or more issues, in this repository or elsewhere, list them here. For example, "Fixes issue mentioned in #123" or "Related to bug in https://github.com/NOAA-EMC/other_repository/pull/63"

## CONTRIBUTORS (optional):
If others have contributed to this work aside from the PR author, list them here

97 changes: 97 additions & 0 deletions sorc/ufs_utils.fd/.github/workflows/macos_clang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Clang macOS Build and Test
on: [push, pull_request, workflow_dispatch]


# Use custom shell with -l so .bash_profile is sourced
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

env:
cache_key: clang
CC: clang
FC: gfortran-11
CXX: clang

# The jobs are split into:
# 1. a dependency build step (setup), and
# 2. a UFS-utils build and test step (ufs_utils)
# The setup is run once and the environment is cached,
# so each subsequent build and test of UFS-utils can reuse the cached
# dependencies to save time (and compute).

jobs:
setup:
runs-on: macos-12

steps:
- name: checkout # this is to get the ci/spack.yaml file
uses: actions/checkout@v3
with:
path: ufs_utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[apple-clang@14\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
spack external find
spack add [email protected]
spack concretize
spack install -v --fail-fast --dirty
spack clean --all
ufs_utils:
needs: setup
runs-on: macos-12

steps:
- name: checkout
uses: actions/checkout@v3
with:
path: ufs_utils
submodules: recursive

- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

- name: build
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
export CC=mpicc
export FC=mpif90
cd ufs_utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j2 VERBOSE=1
make install
- name: ctest
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
cd ufs_utils
cd build
ctest --verbose --rerun-failed --output-on-failure
98 changes: 98 additions & 0 deletions sorc/ufs_utils.fd/.github/workflows/ubuntu_gcc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: GCC Linux Build and Test
on: [push, pull_request, workflow_dispatch]


# Use custom shell with -l so .bash_profile is sourced
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

env:
cache_key: gcc
CC: gcc-10
FC: gfortran-10
CXX: g++-10

# The jobs are split into:
# 1. a dependency build step (setup), and
# 2. a UFS-utils build and test step (ufs_utils)
# The setup is run once and the environment is cached,
# so each subsequent build and test of UFS-utils can reuse the cached
# dependencies to save time (and compute).

jobs:
setup:
runs-on: ubuntu-latest

steps:
- name: checkout # this is to get the ci/spack.yaml file
uses: actions/checkout@v3
with:
path: ufs_utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[gcc@10:10\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
sudo apt install cmake
spack external find
spack add [email protected]
spack concretize
spack install -v --fail-fast --dirty
spack clean --all
ufs_utils:
needs: setup
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
with:
path: ufs_utils
submodules: recursive

- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

- name: build
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
export CC=mpicc
export FC=mpif90
cd ufs_utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j2 VERBOSE=1
make install
- name: ctest
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
cd ufs_utils
cd build
ctest --verbose --rerun-failed --output-on-failure
116 changes: 116 additions & 0 deletions sorc/ufs_utils.fd/.github/workflows/ubuntu_intel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Intel Linux Build and Test
on: [push, pull_request, workflow_dispatch]

# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}

# Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran
env:
cache_key: intel
CC: icc
FC: ifort
CXX: icpc
I_MPI_CC: icc
I_MPI_F90: ifort

# The jobs are split into:
# 1. a dependency build step (setup), and
# 2. a UFS-utils build and test step (ufs_utils)
# The setup is run once and the environment is cached,
# so each subsequent build and test of UFS-utils can reuse the cached
# dependencies to save time (and compute).

jobs:
setup:
runs-on: ubuntu-20.04

steps:
- name: checkout # this is to get the ci/spack.yaml file
uses: actions/checkout@v3
with:
path: ufs_utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

- name: install-intel-compilers
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
sed "s/\[intel, gcc@10:10, apple-clang@14\]/\[intel\]/g" ufs_utils/ci/spack.yaml > spack_ci.yaml
spack env create ufs_utils-env spack_ci.yaml
spack env activate ufs_utils-env
spack compiler find
sudo apt install cmake
spack external find
spack add intel-oneapi-mpi
spack concretize
spack install --dirty -v --fail-fast
spack clean --all
ufs_utils:
needs: setup
runs-on: ubuntu-20.04

steps:
- name: install-intel
run: |
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
- name: checkout
uses: actions/checkout@v3
with:
path: ufs_utils
submodules: recursive

- name: cache-env
id: cache-env
uses: actions/cache@v3
with:
path: |
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ufs_utils/ci/spack.yaml') }}

- name: build
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
export CC=mpiicc
export FC=mpiifort
cd ufs_utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j2 VERBOSE=1
make install
- name: ctest
run: |
source spack/share/spack/setup-env.sh
spack env activate ufs_utils-env
cd ufs_utils
cd build
ctest --verbose --rerun-failed --output-on-failure
18 changes: 18 additions & 0 deletions sorc/ufs_utils.fd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
build/
install/
exec/
lib/

fix/am
fix/orog
fix/orog_raw
fix/sfc_climo

*.[ao]
*.mod
*.so
*.exe
*.x

*.swp
*.o
4 changes: 4 additions & 0 deletions sorc/ufs_utils.fd/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "ccpp"]
path = ccpp-physics
url = https://github.com/kayeekayee/ccpp-physics-ufs.git
branch = 2023_05_09_3a306a4
15 changes: 15 additions & 0 deletions sorc/ufs_utils.fd/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"

sphinx:
configuration: docs/source/conf.py
Loading

0 comments on commit 30f5c9c

Please sign in to comment.