Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated .ecf files related to ufs-coastal compile #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions compile/compile_model.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path


# Create build directory if it doesn't exist
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DBUILD_UTILS=%BUILD_UTILS%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalS intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
45 changes: 45 additions & 0 deletions compile/compile_model.ecf.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path


# Create build directory if it doesn't exist
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DBUILD_UTILS=%BUILD_UTILS%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalS intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
57 changes: 57 additions & 0 deletions compile/compile_model_combined.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set common compilation flags
#COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DBUILD_UTILS=%BUILD_UTILS%"
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO%"

# Conditionally add wave coupling related flags if WAVE_COUPLING is ON
if [ "%USE_WW3%" == "ON" ]; then
COMPILE_FLAGS="$COMPILE_FLAGS -DUSE_WW3=%USE_WW3% -DPDLIB=%PDLIB%"
fi

# Determine the target application (with or without wave coupling)
if [ "%USE_WW3%" == "ON" ]; then
TARGET="coastalSW"
else
TARGET="coastalS"
fi

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" $TARGET intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
44 changes: 44 additions & 0 deletions compile/compile_model_with_waves.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DUSE_WW3=%USE_WW3% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DPDLIB=%PDLIB%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalSW intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
44 changes: 44 additions & 0 deletions compile/compile_model_with_waves.ecf.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DUSE_WW3=%USE_WW3% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DPDLIB=%PDLIB% -DBUILD_UTILS=%BUILD_UTILS%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalSW intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
44 changes: 44 additions & 0 deletions compile/compile_model_with_waves.ecf.sv2
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DUSE_WW3=%USE_WW3% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DPDLIB=%PDLIB%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalSW intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
44 changes: 44 additions & 0 deletions compile/compile_model_with_waves.ecf~
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set compilation flags
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DUSE_WW3=%USE_WW3% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DPDLIB=%PDLIB% -DBUILD_UTILS=%BUILD_UTILS%"

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" coastalSW intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
57 changes: 57 additions & 0 deletions compile_model_with_waves/compile_model_combined.ecf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
%include <head.h>

# Set the path to conda.sh
CONDA_SH="/apps/spack-managed/gcc-11.3.1/miniconda3-24.3.0-avnaftwsbozuvtsq7jrmpmcvf6c7yzlt/etc/profile.d/conda.sh"

# Check if conda.sh exists
if [ ! -f "$CONDA_SH" ]; then
echo "Error: Could not find conda.sh at $CONDA_SH"
exit 1
fi

# Initialize conda
source "$CONDA_SH"

# Activate the appropriate conda environment if needed
# conda activate your_environment_name

# Set variables
UFS_COASTAL_DIR="/work/noaa/nosofs/mjisan/ufs-weather-model/tests" # Adjust this path

# Change to the UFS Coastal directory
cd $UFS_COASTAL_DIR

# Set common compilation flags
#COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO% -DBUILD_UTILS=%BUILD_UTILS%"
COMPILE_FLAGS="-DAPP=%APP% -DUSE_ATMOS=%USE_ATMOS% -DNO_PARMETIS=%NO_PARMETIS% -DOLDIO=%OLDIO%"

# Conditionally add wave coupling related flags if WAVE_COUPLING is ON
if [ "%USE_WW3%" == "ON" ]; then
COMPILE_FLAGS="$COMPILE_FLAGS -DUSE_WW3=%USE_WW3% -DPDLIB=%PDLIB%"
fi

# Determine the target application (with or without wave coupling)
if [ "%USE_WW3%" == "ON" ]; then
TARGET="coastalSW"
else
TARGET="coastalS"
fi

# Run the compilation command
./compile.sh %UFS_CLUSTER% "$COMPILE_FLAGS" $TARGET intel YES NO

# Check if compilation was successful
if [ $? -eq 0 ]; then
echo "Compilation successful"
ecflow_client --label=info "Compilation complete"
else
echo "Compilation failed"
ecflow_client --label=error "Compilation failed"
exit 1
fi

# Deactivate the conda environment if one was activated
# conda deactivate

%include <tail.h>
Loading