While exploring write.config.BASGRA and write.config.SIPNET as part of
my interest in Project 4 (Standardizing Model Couplers) for GSoC 2026, I
noticed both functions contain identical blocks for:
- Loading the job template (
template.job)
- Building
hostsetup from settings$model$prerun and settings$host$prerun
- Building
hostteardown from settings$model$postrun and settings$host$postrun
- Applying common substitutions into
job.sh:
@HOST_SETUP@, @HOST_TEARDOWN@
@SITE_LAT@, @SITE_LON@
@START_DATE@, @END_DATE@
@OUTDIR@, @RUNDIR@
These could be extracted into a shared helper function (e.g. build_job_sh())
in a common location, reducing duplication and making it easier to add new
models consistently.
Is this a good direction to pursue? Happy to start with a draft implementation
if the team thinks this is worth addressing.
While exploring
write.config.BASGRAandwrite.config.SIPNETas part ofmy interest in Project 4 (Standardizing Model Couplers) for GSoC 2026, I
noticed both functions contain identical blocks for:
template.job)hostsetupfromsettings$model$prerunandsettings$host$prerunhostteardownfromsettings$model$postrunandsettings$host$postrunjob.sh:@HOST_SETUP@,@HOST_TEARDOWN@@SITE_LAT@,@SITE_LON@@START_DATE@,@END_DATE@@OUTDIR@,@RUNDIR@These could be extracted into a shared helper function (e.g.
build_job_sh())in a common location, reducing duplication and making it easier to add new
models consistently.
Is this a good direction to pursue? Happy to start with a draft implementation
if the team thinks this is worth addressing.