Skip to content
Draft
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Environment for running the Momentum LFRic model

See [environments/lfric/README.md](environments/lfric/README.md)

### Verification

Environment for model verification

See [environments/verification/README.md](environments/verification/README.md)

## Testing

Once an enviornment has been built it can be tested by building and running a
Expand Down
7 changes: 7 additions & 0 deletions environments/verification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Verification

Packages useful for verification work:

- [CSET](https://metoffice.github.io/CSET/)
- [METPlus](https://metplus.readthedocs.io/en/latest/)
- [Scores](https://scores.readthedocs.io/en/stable/)
7 changes: 7 additions & 0 deletions environments/verification/commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ENV_COMMANDS=(
cset
python
jupyter
run_metplus
run_metplus.py
)
12 changes: 12 additions & 0 deletions environments/verification/conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: verification
channels:
- conda-forge
- nodefaults
dependencies:
- jupyterlab
- jupyterlab-lsp
- jedi-language-server

- cset
- metplus
- scores
14 changes: 8 additions & 6 deletions site/nci/install-stage-two.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ if [[ -v NGMOENVS_DEBUG ]]; then
exit 0
fi

if ! e "${APPTAINER[@]}" run "${MOUNT_ARGS[@]}" "$NGMOENVS_BASEIMAGE" /bin/bash "${SITE_DIR}/../../utils/install-stage-two.sh"; then
# Copy failed build logs to scratch
mkdir -p "/scratch/$PROJECT/$USER/tmp/spack-stage"
cp -r "$TMPDIR/$USER/spack-stage/"* "/scratch/$PROJECT/$USER/tmp/spack-stage"
echo "Logs available under /scrach/$PROJECT/$USER/tmp/spack-stage"
exit 1
if [[ -f "$NGMOENVS_DEFS/enviornments/$ENVIRONMENT/spack.yaml" ]]; then
if ! e "${APPTAINER[@]}" run "${MOUNT_ARGS[@]}" "$NGMOENVS_BASEIMAGE" /bin/bash "${SITE_DIR}/../../utils/install-stage-two.sh"; then
# Copy failed build logs to scratch
mkdir -p "/scratch/$PROJECT/$USER/tmp/spack-stage"
cp -r "$TMPDIR/$USER/spack-stage/"* "/scratch/$PROJECT/$USER/tmp/spack-stage"
echo "Logs available under /scrach/$PROJECT/$USER/tmp/spack-stage"
exit 1
fi
fi

# Convert to squashfs
Expand Down
4 changes: 3 additions & 1 deletion utils/install-stage-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ fi
EOF

# Set compiler variables
cat "$ENVDIR/etc/compiler.sh" >> "$ENVDIR/bin/activate"
if [[ -f "$ENVDIR/etc/compiler.sh" ]]; then
cat "$ENVDIR/etc/compiler.sh" >> "$ENVDIR/bin/activate"
fi

# Run script
cat > "$ENVDIR/bin/envrun" <<EOF
Expand Down