Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
6eb2eef
feat(fesom) add tracer diagnostics to FESOM2.5
ogurses Oct 15, 2024
3e84a88
add recom_sms diag
ogurses Nov 20, 2024
434f0e6
feat(recom): add ciso and medusa components
ogurses Dec 10, 2024
0864237
input to bc_surface from medusa added and Sed_input deleted
a270105 Dec 13, 2024
eafe8e9
fix(recom) Add missing directives
ogurses Feb 12, 2025
4408f0e
two small fixes
ogurses Feb 20, 2025
db00bd1
feat(recom)!: FESOM2.6-REcoM setup with 4p3z2d
ogurses Jun 16, 2025
209e076
fix(recom) Add missing temperature function code
ogurses Jun 27, 2025
0a01669
fix(recom): Add detritus sinking velocity and K0, solubility to diagn…
ogurses Jul 8, 2025
2836492
Merge remote-tracking branch 'origin/fesom2.6_recom_tra_diags' into f…
ogurses Jul 8, 2025
66a5aeb
fix(recom) clean merge conflicts
ogurses Jul 8, 2025
bc31266
fix(recom): Correct silicate assimilation and diatom diagnostics

ogurses Aug 29, 2025
4258874
fix(recom): Correct Light limitation diagnostics(continued)
ogurses Aug 29, 2025
d82dbcb
fix(recom): Correct namelist.recom files in config folder
ogurses Aug 29, 2025
502d4d6
fix(fesom): Bugfix: sign of real salt flux
ogurses Sep 1, 2025
5349130
fix(recom): Return to saturation model for chlorophyll degradation
ogurses Sep 25, 2025
cda3511
feat(recom)!: feat(recom)!: replace `__coccos` and `__3Zoo2Det` direc…
ogurses Oct 9, 2025
80bbbe7
Merge branch 'main' into fesom2.6_recom_tra_diags
JanStreffing Oct 29, 2025
8484f71
bit more git like
JanStreffing Oct 29, 2025
bd25920
Remove comment from files array declaration
JanStreffing Oct 30, 2025
5073a7e
ci(recom): Add initialization and surface ocean boundary conditions f…
ogurses Nov 10, 2025
b4bda3c
Merge branch 'main' into fesom2.6_recom_tra_diags
suvarchal Nov 10, 2025
a8ddbb0
Merge branch 'main' into fesom2.6_recom_tra_diags
suvarchal Nov 10, 2025
41c46f5
wip building recom ci test
JanStreffing Nov 12, 2025
fc20636
Fix REcoM CI test: add push trigger and improve debugging
JanStreffing Nov 12, 2025
6e9bc49
Add REcoM namelist templates to fix CI test
JanStreffing Nov 12, 2025
79e89ac
Use default REcoM namelists from config/ instead of duplicates
JanStreffing Nov 12, 2025
0b8d5ae
Use simpler 2p1z1d REcoM configuration for faster CI test
JanStreffing Nov 12, 2025
bba9cb8
Fix sed patterns to avoid breaking namelist format
JanStreffing Nov 12, 2025
91b5f99
Fix namelist.tra to use correct test input files
JanStreffing Nov 12, 2025
074bd00
Simplify namelist patching with cleaner sed patterns
JanStreffing Nov 12, 2025
ac6b6fd
Add namelist validation checks to debug pavariables error
JanStreffing Nov 12, 2025
0c086d8
Use pre-configured namelists instead of runtime patching
JanStreffing Nov 12, 2025
ae4e009
Debug: Check if mkrun creates namelist.recom or if we need to add it
JanStreffing Nov 12, 2025
500095b
Fix: Copy and patch namelists since mkrun doesn't create them
JanStreffing Nov 12, 2025
849a33b
Fix REcoM namelist reading bug
JanStreffing Nov 12, 2025
f3e0fdb
Simplify CI workflow: remove unused nam_rsbc section
JanStreffing Nov 12, 2025
d88c4f1
Switch to 2p3z2d (30 tracers) configuration for REcoM CI test
JanStreffing Nov 12, 2025
859863b
Fix REcoM segfault: allocate missing wFlux arrays
JanStreffing Nov 12, 2025
5a14213
Set test year to 1948 to match available forcing data
JanStreffing Nov 12, 2025
2291cbe
Remove push trigger from REcoM workflow
JanStreffing Nov 12, 2025
cc1f2b8
Disable leap years for REcoM test to match forcing data
JanStreffing Nov 12, 2025
fc84680
Fix segfault: add missing argument to monthly_event call
JanStreffing Nov 12, 2025
03e4ea8
Fix dust file name: create symlink for default filename
JanStreffing Nov 12, 2025
0d3d7f8
Fix dust file path: create symlink in ClimateDataPath
JanStreffing Nov 12, 2025
8dec5e7
Fix segfault: allocate missing RiverFe array
JanStreffing Nov 12, 2025
6070aea
Enable atmospheric pressure forcing for REcoM CO2 flux
JanStreffing Nov 12, 2025
fe4dbac
Fix NetCDF files with missing _FillValue attributes
JanStreffing Nov 12, 2025
f171de0
Fix NetCDF files with proper _FillValue attributes
JanStreffing Nov 12, 2025
fdd860f
Enable atmospheric pressure forcing by patching namelist.forcing
JanStreffing Nov 12, 2025
2d49c67
Fix sed regex: escape dots in .false. pattern
JanStreffing Nov 12, 2025
2ee535c
Add namelist.forcing display to verify l_mslp patch
JanStreffing Nov 12, 2025
1cdbbc7
Fix sed pattern to handle spaces around = in l_mslp
JanStreffing Nov 12, 2025
9a8056e
Reduce debug output in CI workflow
JanStreffing Nov 12, 2025
4b5be61
Fix NetCDF fill value handling for CDO/NCO compatibility
JanStreffing Nov 12, 2025
8d59a65
Add NaN debugging to DIC calculation in REcoM
JanStreffing Nov 12, 2025
c6c21e0
Add NaN debugging to recom_forcing before CO2 flux
JanStreffing Nov 12, 2025
2a1ed34
fix(recom): Bugfixes related to ballasting
ogurses Dec 1, 2025
8f94ed3
Merge branch 'main' into fesom2.6_recom_tra_diags
JanStreffing Jan 26, 2026
075f709
overwrite Sweeney path for recom ci test
JanStreffing Jan 26, 2026
e296ae8
Merge branch 'main' into fesom2.6_recom_tra_diags
JanStreffing Feb 18, 2026
87fbce9
Merge branch 'main' into fesom2.6_recom_tra_diags
JanStreffing Feb 25, 2026
f56ee08
Refactor tracer diag loops
JanStreffing Feb 25, 2026
b1e09a8
REcoM: deduplicate ltra_diag backup/delta
JanStreffing Feb 25, 2026
cd2928f
REcoM: deduplicate benthos accumulation
JanStreffing Feb 25, 2026
f179d3c
REcoM: deduplicate init sanity-check reductions
JanStreffing Feb 25, 2026
c9287bc
REcoM: deduplicate benthos decay updates
JanStreffing Feb 25, 2026
6056444
Merge pull request #863 from FESOM/recom_refactoring_dedup
JanStreffing Feb 27, 2026
316339a
Add script to run REcoM CI test locally via Singularity
JanStreffing Apr 7, 2026
b3f981b
Fix DIC NaN caused by uninitialized ErosionTOC2D array
JanStreffing Apr 8, 2026
95a3282
Merge branch 'main' into fesom2.6_recom_tra_diags
JanStreffing Apr 8, 2026
067418c
move ci test run script to work folder
JanStreffing Apr 8, 2026
06ec4bc
update truth
JanStreffing Apr 8, 2026
0ed270b
Fix REcoM CI output: use otracers for DIN/DIC and set correct referen…
JanStreffing Apr 8, 2026
a719c41
Fix coupled_yac CI build: install libfyaml sub-headers
JanStreffing Apr 8, 2026
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
95 changes: 95 additions & 0 deletions .github/workflows/fesom2_recom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

name: "FESOM2: REcoM Biogeochemistry"
# Controls when the action will run. Triggers the workflow on pull request only.
on:
workflow_dispatch: {}
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
general_test:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: ghcr.io/fesom/fesom2_docker:fesom2_test_refactoring-master

# Service containers to run with `gfortran_ubuntu`
steps:
# NK: this changes working directory to fesom2
- uses: actions/checkout@v2

- name: Git safe directory
run: |
git config --global --add safe.directory ${PWD}

- name: Compile model with REcoM
run: |
./configure.sh ubuntu -DRECOM_COUPLED=ON

- name: Create REcoM test run
run: |
mkrun recom test_pi_recom -m docker

- name: Add REcoM namelists
run: |
# mkrun doesn't create namelist.recom, so copy from config and patch
# Using 2p3z2d (30 tracers) - more complete/tested than 2p1z1d
cp config/bin_2p3z2d/namelist.recom work_recom/
cp config/bin_2p3z2d/namelist.tra work_recom/

# Patch namelist.recom
cd work_recom

# Remove nam_rsbc section (not used by code, causes parsing errors)
sed -i '/^&nam_rsbc/,/^\//d' namelist.recom

# Set REcoM_restart to false for initialization from climatology
sed -i "s|REcoM_restart.*=.*\.true\.|REcoM_restart =.false.|" namelist.recom

# Patch tracer file list in namelist.tra
sed -i "s|fe_pisces_opa_eq_init_3D_changed_name\.nc|fe5deg.nc|" namelist.tra
sed -i "s|woa18_all_o00_01_mmol_fesom2\.nc|oxy5deg.nc|" namelist.tra
sed -i "s|woa13_all_i00_01_fesom2\.nc|si5deg.nc|" namelist.tra
sed -i "s|GLODAPv2\.2016b\.TAlk_fesom2_mmol_fix_z_Fillvalue\.nc|talk5deg.nc|" namelist.tra
sed -i "s|GLODAPv2\.2016b\.TCO2_fesom2_mmol_fix_z_Fillvalue\.nc|tco2_5deg.nc|" namelist.tra
sed -i "s|woa13_all_n00_01_fesom2\.nc|din5deg.nc|" namelist.tra
sed -i "s|phc3\.0_winter\.nc|woa18_netcdf_5deg.nc|g" namelist.tra

# Enable atmospheric pressure forcing for REcoM CO2 flux calculation
sed -i "s|l_mslp *= *\.false\.|l_mslp=.true.|" namelist.forcing

echo "--- Verifying patches ---"
echo "REcoM restart: $(grep 'REcoM_restart' namelist.recom)"
echo "Atmospheric pressure: $(grep 'l_mslp' namelist.forcing)"
cd ..

# Copy REcoM input data files
cp test/input/recom/*.nc work_recom/

# Create dust file with expected name in the source directory
# (code reads from ClimateDataPath, not work directory)
cd test/input/recom
ln -s DustClimMonthlyAlbani_pimesh.nc DustClimMonthlyAlbani.nc
cd ../../..

# Copy forcing data files (from 1948)
cp test/input/global/*.1948.nc work_recom/
cp test/input/global/runoff.nc work_recom/
cp test/input/global/PHC2_salx.nc work_recom/

- name: FESOM2 REcoM test run
run: |
cd work_recom
echo "--- Running REcoM test (32 timesteps, 1 day) ---"
chmod +x job_docker_new
./job_docker_new

- name: Check REcoM results
run: |-
cd work_recom
fcheck .
2 changes: 1 addition & 1 deletion cmake/BuildLibfyaml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ExternalProject_Add(libfyaml-external
BUILD_COMMAND make -j${CMAKE_BUILD_PARALLEL_LEVEL} -C src libfyaml.la
BUILD_IN_SOURCE ON
BUILD_BYPRODUCTS ${LIBFYAML_INSTALL_PREFIX}/lib/libfyaml.so
INSTALL_COMMAND make -C src install-libLTLIBRARIES install-includeHEADERS && make install-pkgconfigDATA
INSTALL_COMMAND make -C src install-libLTLIBRARIES install-includeHEADERS install-libfyamlHEADERS && make install-pkgconfigDATA
LOG_DOWNLOAD OFF
LOG_CONFIGURE OFF
LOG_BUILD OFF
Expand Down
45 changes: 21 additions & 24 deletions config/bin_2p1z1d/job_albedo
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash
#SBATCH --account=nwg_hauck.maresys # edit your account
#SBATCH --job-name=recom
#SBATCH --account=biogeo_model.biogeo_model
#SBATCH --job-name=2p1z1d
#SBATCH --partition=mpp
#SBATCH --time=01:30:00
####SBATCH --constraint="[rack1|rack3]"
#SBATCH -N 9
#SBATCH --cpus-per-task=1
#SBATCH --time=08:00:00
#SBATCH --qos=12h
#SBATCH --nodes=9 # Number of tasks (MPI) tasks to be launched
#SBATCH --tasks-per-node 96 #8 #4 # using all 128CPus we exceed the maxload limit (>130) of many used nodes when us parallel I/O
#SBATCH --cpus-per-task 1
#SBATCH --tasks-per-node 96 # using all 128CPus we exceed the maxload limit (>130) of many used nodes when us parallel I/O

#SBATCH -o fesom2o.out
#SBATCH -e fesom2e.out
#SBATCH -o slurm-out.out
#SBATCH -e slurm-err.out

# disable hyperthreading
#SBATCH --hint=nomultithread
Expand All @@ -23,35 +22,33 @@ ulimit -s unlimited
# determine JOBID
JOBID=`echo $SLURM_JOB_ID |cut -d"." -f1`

ln -s ../bin/fesom.x . # cp -n ../bin/fesom.x
cp -n ../config/namelist.config .
cp -n ../config/namelist.forcing .
cp -n ../config/namelist.oce .
cp -n ../config/namelist.dyn .
cp -n ../config/namelist.tra .
cp -n ../config/namelist.ice .
cp -n ../config/namelist.io .
cp -n ../config/namelist.icepack .
#ln -s ../bin/fesom.x . # cp -n ../bin/fesom.x
#cp -n ../config/namelist.config .
#cp -n ../config/namelist.forcing .
#cp -n ../config/namelist.oce .
#cp -n ../config/namelist.dyn .
#cp -n ../config/namelist.tra .
#cp -n ../config/namelist.ice .
#cp -n ../config/namelist.io .
#cp -n ../config/namelist.icepack .

#___DETERMINE SLURM JOBID+OUTPUTFILE____________________________________________
jobid=$(echo $SLURM_JOB_ID | cut -d"." -f1)
fname="fesom2_${SLURM_JOB_NAME}_${jobid}.out"
fname="fesom2.0.out"

#___PUT JOB IN QUEUE____________________________________________________________
date
####srun --mpi=pmi2 ./fesom.x >> ${fname}
srun --mpi=pmi2 ./fesom.x > fesom2.0.out
date

#qstat -f $PBS_JOBID
#export EXITSTATUS=$?
#if [ ${EXITSTATUS} -eq 0 ] || [ ${EXITSTATUS} -eq 127 ] ; then
#sbatch job_ollie
#sbatch job_albedo
#fi

#Resultpath='/albedo/scratch/user/ogurses/ocean_only/'
Resultpath='/albedo/scratch/user/ogurses/fesom2.5_recom_st1_vsink_vben_diags/'
test -d $Resultpath/fesom.2019.oce.restart && exit
Resultpath='/albedo/work/user/...'
test -e $Resultpath/fesom.xxxxx.oce.restart && exit

IsInFile=$( tail -3 fesom2.0.out | grep -c timesteps)
if (( IsInFile > 0 )); then
Expand Down
19 changes: 14 additions & 5 deletions config/bin_2p1z1d/namelist.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ runid='fesom'

&timestep
step_per_day=32 !96 !96 !72 !72 !45 !72 !96
run_length=1 !62 !62 !62 !28
run_length_unit='y' ! y, m, d, s
run_length= 1 !62 !62 !62 !28
run_length_unit='y' ! y, m, d, s
/

&clockinit ! the model starts at
Expand All @@ -18,8 +18,8 @@ yearnew=1958

&paths
MeshPath='/albedo/work/projects/p_recompdaf/frbunsen/FESOM2/meshes/core2/'
ClimateDataPath='/albedo/work/projects/MarESys/ogurses/input/corrected_input/'
ResultPath='/albedo/scratch/user/ogurses/fesom2.5_recom_st1_vsink_vben_diags/'
ClimateDataPath='/albedo/work/projects/MarESys/ogurses/input/corrected_input/'
ResultPath='/albedo/work/user/...'
/

&restart_log
Expand All @@ -29,7 +29,7 @@ raw_restart_length=1 ! --> do core dump restart
raw_restart_length_unit='off' ! e.g. y, d, h, s, off
bin_restart_length=1 ! --> do derived type binary restart
bin_restart_length_unit='off' ! e.g. y, d, h, s, off
logfile_outfreq=960 !in logfile info. output frequency, # steps
logfile_outfreq=960 !in logfile info. output frequency, # steps
/

&ale_def
Expand Down Expand Up @@ -59,9 +59,18 @@ use_cavity_partial_cell=.false.
use_floatice = .false.
use_sw_pene=.true.
flag_debug=.false.
use_transit=.false.
/

&machine
n_levels=2
n_part= 12, 36 ! 432 number of partitions on each hierarchy level
/

&icebergs
use_icesheet_coupling=.false.
ib_num=1
use_icebergs=.false.
steps_per_ib_step=8
ib_async_mode=0
/
36 changes: 28 additions & 8 deletions config/bin_2p1z1d/namelist.forcing
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ ncar_bulk_z_shum=10.0 ! height at which humi forcing is located (CORE, JRA-do: 1
use_landice_water=.false.
landice_start_mon=5
landice_end_mon=10
fwf_path='./mesh/'

/

&age_tracer
use_age_tracer=.false.
use_age_mask=.false.
age_tracer_path='./mesh/'
age_start_year=2000

/

&nam_sbc
nm_xwind_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/uas.clim61' ! name of file with winds, if nm_sbc=2
nm_ywind_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/vas.clim61' ! name of file with winds, if nm_sbc=2
nm_xstre_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/uas.clim61' ! name of file with winds, if nm_sbc=2
nm_ystre_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/vas.clim61' ! name of file with winds, if nm_sbc=2
nm_humi_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/huss.clim61' ! name of file with humidity
nm_qsr_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/rsds.clim61' ! name of file with solar heat
nm_qlw_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/rlds.clim61' ! name of file with Long wave
Expand All @@ -37,24 +49,32 @@ landice_end_mon=10
nm_mslp_file = '/albedo/work/projects/MarESys/FROM-OLLIE/forcing_JRA55-do-v1.4.0_clim61/psl.clim61' ! air_pressure_at_sea_level
nm_xwind_var = 'uas' ! name of variable in file with wind
nm_ywind_var = 'vas' ! name of variable in file with wind
nm_humi_var = 'huss' ! name of variable in file with humidity
nm_qsr_var = 'rsds' ! name of variable in file with solar heat
nm_qlw_var = 'rlds' ! name of variable in file with Long wave
nm_xstre_var = 'uas' ! name of variable in file with wind
nm_ystre_var = 'vas' ! name of variable in file with wind
nm_humi_var = 'huss' ! name of variable in file with humidity
nm_qsr_var = 'rsds' ! name of variable in file with solar heat
nm_qlw_var = 'rlds' ! name of variable in file with Long wave
nm_tair_var = 'tas' ! name of variable in file with 2m air temperature
nm_prec_var = 'prra' ! name of variable in file with total precipitation
nm_snow_var = 'prsn' ! name of variable in file with total precipitation
nm_mslp_var = 'psl' ! name of variable in file with air_pressure_at_sea_level
nm_prec_var = 'prra' ! name of variable in file with total precipitation
nm_snow_var = 'prsn' ! name of variable in file with total precipitation
nm_mslp_var = 'psl' ! name of variable in file with air_pressure_at_sea_level
nm_nc_iyear = 1900
nm_nc_imm = 1 ! initial month of time axis in netCDF
nm_nc_idd = 1 ! initial day of time axis in netCDF
nm_nc_freq = 1 ! data points per day (i.e. 86400 if the time axis is in seconds)
nm_nc_tmid = 0 ! 1 if the time stamps are given at the mid points of the netcdf file, 0 otherwise (i.e. 1 in CORE1, CORE2; 0 in JRA55)
y_perpetual=.true.
l_xwind=.true. l_ywind=.true. l_humi=.true. l_qsr=.true. l_qlw=.true. l_tair=.true. l_prec=.true. l_mslp=.true. l_cloud=.false. l_snow=.true.
l_xwind=.true. l_ywind=.true. l_xstre=.false. l_ystre=.false. l_humi=.true. l_qsr=.true. l_qlw=.true. l_tair=.true. l_prec=.true. l_mslp=.true. l_cloud=.false. l_snow=.true.
nm_runoff_file ='/albedo/pool/FESOM/forcing/CORE2/runoff.nc'
runoff_data_source ='CORE2' !Dai09, CORE2
!runoff_data_source ='Dai09' !Dai09, CORE2, JRA55
!runoff_climatology =.true.
nm_sss_data_file ='/albedo/pool/FESOM/forcing/CORE2/PHC2_salx.nc'
sss_data_source ='CORE2'
nm_sss_data_file ='/albedo/pool/FESOM/forcing/CORE2/PHC2_salx.nc'
chl_data_source ='None' !'Sweeney' monthly chlorophyll climatology or 'NONE' for constant chl_const (below). Make use_sw_pene=.TRUE. in namelist.config!
nm_chl_data_file ='/pool/data/AWICM/FESOM2/FORCING/JRA55-do-v1.4.0/Sweeney/Sweeney_2005.nc'
chl_const = 0.1
use_runoff_mapper = .FALSE.
runoff_basins_file = 'runoff_maps_regular.nc'
runoff_radius = 500000.
/
Loading
Loading