Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/workflows/check-cr-approved.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check CR approved

on:
pull_request_review:
types: [submitted, edited, dismissed]
workflow_dispatch:

jobs:
check_cr_approved:
if: ${{ github.event.pull_request.number }}
uses: MetOffice/growss/.github/workflows/check-cr-approved.yaml@main
17 changes: 17 additions & 0 deletions .github/workflows/track-review-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Track Review Project

on:
workflow_run:
workflows: [Trigger Review Project]
types:
- completed

permissions:
actions: read
contents: read
pull-requests: write

jobs:
track_review_project:
uses: MetOffice/growss/.github/workflows/track-review-project.yaml@main
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/trigger-project-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Trigger Review Project

on:
pull_request_target:
types: ["opened", "synchronize", "reopened", "edited", "review_requested", "review_request_removed", "closed"]
pull_request_review:
pull_request_review_comment:

permissions:
actions: read
contents: read
pull-requests: write

jobs:
trigger_project_workflow:
uses: MetOffice/growss/.github/workflows/trigger-project-workflow.yaml@main
secrets: inherit
9 changes: 6 additions & 3 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Contributors

| GitHub user | Real Name | Affiliation | Date |
| ----------- | --------- | ----------- | ---- |
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| GitHub user | Real Name | Affiliation | Date |
|-----------------|-----------------|-------------|------------|
| james-bruten-mo | James Bruten | Met Office | 2025-12-09 |
| Pierre-siddall | Pierre Siddall | Met Office | 2025-01-19 |
| ericaneininger | Erica Neininger | Met Office | 2026-02-04 |
| dcalve | Daley Calvert | Met Office | 2026-02-04 |
16 changes: 11 additions & 5 deletions Coupled_Drivers/run_model
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,21 @@ L_MCT_VALIDATE=${L_MCT_VALIDATE:=false}

# Copy scripts to work directory so they can be found. We use the dependency
# checker script so we only copy the files we need.
FILES_TO_INSTALL=$($DRIVER_EXTRACT_DIR/extract/drivers/Coupled_Drivers/driver_dependencies.py --extract-directory $DRIVER_EXTRACT_DIR/extract/drivers/Coupled_Drivers)
if [[ $DRIVER_EXTRACT_DIR == *"fcm_make"* ]] ; then
# fcm_make infrastructure
extract_path=extract/drivers
else
extract_path=
fi
FILES_TO_INSTALL=$($DRIVER_EXTRACT_DIR/$extract_path/Coupled_Drivers/driver_dependencies.py --extract-directory $DRIVER_EXTRACT_DIR/$extract_path/Coupled_Drivers)
for file in $FILES_TO_INSTALL; do
# handle any packages
package_name=$(dirname "${file}")
if [[ $package_name != '.' && ! -d $package_name ]]; then
mkdir $package_name
fi
# as package_name will default to . then this will handle all cases
cp $DRIVER_EXTRACT_DIR/extract/drivers/Coupled_Drivers/$file $package_name
cp $DRIVER_EXTRACT_DIR/$extract_path/Coupled_Drivers/$file $package_name
done

# If the run uses LFRic, and environment variable NAMCOUPLE_STATIC is .false.
Expand All @@ -56,8 +62,8 @@ done
# compatibility
NAMCOUPLE_STATIC=${NAMCOUPLE_STATIC:=True}
if [[ "$models" == *lfric* && "$NAMCOUPLE_STATIC" == .false. ]]; then
cp $DRIVER_EXTRACT_DIR/extract/drivers/Utilities/NGMS_utils/ngms_namcouple_gen/*py ./
cp $DRIVER_EXTRACT_DIR/extract/drivers/Utilities/NGMS_utils/ngms_suite_lib/*py ./
cp $DRIVER_EXTRACT_DIR/$extract_path/Utilities/NGMS_utils/ngms_namcouple_gen/*py ./
cp $DRIVER_EXTRACT_DIR/$extract_path/Utilities/NGMS_utils/ngms_suite_lib/*py ./
fi

EXTRA_LINK_DRIVERS_INFO=$( echo ${EXTRA_LINK_DRIVERS_INFO:-} | tr '[:upper:]' '[:lower:]')
Expand All @@ -80,7 +86,7 @@ echo '[DRIVER_TEST_SCRIPT] Drivers successfully linked'
# had been completed
if [ "$L_MCT_VALIDATE" = True ]; then
echo "Running MCT validate"
cp $DRIVER_EXTRACT_DIR/extract/drivers/Coupled_Drivers/driver_utilities/mct_validate/mct_validate.py ./
cp $DRIVER_EXTRACT_DIR/$extract_path/Coupled_Drivers/driver_utilities/mct_validate/mct_validate.py ./
./mct_validate.py
fi

Expand Down
78 changes: 78 additions & 0 deletions Postprocessing/build/build_pp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# (C) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# -----------------------------------------------------------------------------
# NAME
# build_pp
#
# DESCRIPTION
# Move PostProc application code to executable location within a rose suite
#
# -----------------------------------------------------------------------------

# Fail if environment variables are unset
set -eu

# Required environment
PP_SOURCE_DIR=${PP_SOURCE_DIR:=$CYLC_WORKFLOW_RUN_DIR/share/source/moci_postproc}
PP_TARGET_DIR=${PP_TARGET_DIR:-$CYLC_WORKFLOW_SHARE_DIR/bin}

MOCILIB=${MOCILIB:=true}
MOCILIB_PATH=${MOCILIB_PATH:=$CYLC_WORKFLOW_RUN_DIR/share/moci/mocilib}

PP_COMPONENTS="atmos nemocice unicicles archive_verify"
PP_TESTS=${PP_TESTS:=false}

echo [INFO] Building PostProc application from $PP_SOURCE_DIR
echo [INFO] -- Build location: $PP_TARGET_DIR

if [[ ! -d $PP_SOURCE_DIR ]] ; then
echo [ERROR] $PP_SOURCE_DIR does not exist >&2
exit 1
fi
if [[ ! -d $PP_TARGET_DIR ]] ; then
echo [INFO] Creating build directory...
mkdir -p $PP_TARGET_DIR
fi

# Copy mocilib
if [[ "$MOCILIB" != true ]] ; then
echo [INFO] MOCIlib library not installed
elif [[ -d "$MOCILIB_PATH" ]] ; then
cp -r $MOCILIB $PP_TARGET_DIR
else
echo [ERROR] Failed to find the required \"mocilib\" library >&2
exit 1
fi

# Copy NEMO tools
if [[ -d "$PP_SOURCE_DIR/../nemotools" ]] ; then
cp $PP_SOURCE_DIR/../nemotools/* $PP_TARGET_DIR
else
echo [INFO] NEMO iceberg rebuilding tools not available
fi

# Copy main_pp executable
mainscr=$PP_SOURCE_DIR/Postprocessing/main_pp.py
if [[ -f "$mainscr" ]] ; then
cp $mainscr $PP_TARGET_DIR
else
echo [ERROR] Source for PostProc executable $mainscr does not exist >&2
exit 1
fi

# Copy component directory contents
src_dirs="common platforms $PP_COMPONENTS"
if [[ "$PP_TESTS" = true ]] ; then
src_dirs="$src_dirs unittests"
fi
for directory in $src_dirs; do
if [[ -d $PP_SOURCE_DIR/Postprocessing/$directory ]] ; then
cp $PP_SOURCE_DIR/Postprocessing/$directory/* $PP_TARGET_DIR
else
echo [ERROR] Source for PostProc component $directory does not exist >&2
exit 1
fi
done
42 changes: 38 additions & 4 deletions Utilities/mean_nemo/compiler.xc40
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
#!/bin/bash
#PBS -N compile_mean_nemo
#PBS -o compile_mean_nemo.o
#PBS -e compile_mean_nemo.e
#PBS -q shared
#PBS -l ncpus=1
#PBS -l walltime=00:01:00
#PBS -l mem=500mb

rm -f mean_nemo.exe
set -eu

module unload cray-netcdf
module load cray-netcdf
ftn -O0 mean_nemo.f90 -o mean_nemo.exe
NAME=mean_nemo

MODE=prod
#MODE=dev
#MODE=debug

case ${MODE} in
prod)
opts="-O2 -Ovector1 -hfp0 -hflex_mp=intolerant"
;;
dev)
opts="-O0"
;;
debug)
opts="-O0 -Ovector0 -hflex_mp=intolerant -e CID -Ktrap=fp -g"
;;
*)
echo "Compilation mode \"${MODE}\" not supported"
exit 1
;;
esac

cd ${PBS_O_WORKDIR}

[ -f ${NAME}.exe ] && rm -f ${NAME}.exe

module unload cray-hdf5 cray-netcdf 2>/dev/null
module load cray-hdf5 cray-netcdf

ftn ${opts} mean_nemo.f90 -o ${NAME}.exe
34 changes: 29 additions & 5 deletions Utilities/mean_nemo/compiler.xc40_login
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
#!/bin/bash

rm -f mean_nemo.exe
set -eu

module swap craype-haswell craype-ivybridge
module unload cray-netcdf
module load cray-netcdf
ftn -O0 mean_nemo.f90 -o mean_nemo_login.exe
NAME=mean_nemo_login

MODE=prod
#MODE=dev
#MODE=debug

case ${MODE} in
prod)
opts="-O2 -Ovector1 -hfp0 -hflex_mp=intolerant"
;;
dev)
opts="-O0"
;;
debug)
opts="-O0 -Ovector0 -hflex_mp=intolerant -e CID -Ktrap=fp -g"
;;
*)
echo "Mode \"${MODE}\" not supported"
exit 1
;;
esac

[ -f ${NAME}.exe ] && rm -f ${NAME}.exe

module unload cray-hdf5 cray-netcdf 2>/dev/null
module load cray-hdf5 cray-netcdf

ftn ${opts} mean_nemo.f90 -o ${NAME}.exe
Loading
Loading