
Set one or more parameter values in a DYRESM-CAEDYM configuration
Source:R/set_dy_cd_param.R
set_dy_cd_param.RdThin, aeme-free wrapper for editing a DYRESM-CAEDYM model directory in
place. DYRESM-CAEDYM has no keyed config file like GLM-AED's .nml –
its tunables are split between the positional <lakename>.cfg
(light extinction, layer thickness limits, time step, output interval)
and the positional dyresm3p1.par (bulk aerodynamic drag, albedo,
emissivity, mixing efficiencies, ...). This function exposes a curated
set of those by friendly name and edits the right line of the right
file, leaving formatting otherwise untouched. Intended for a
DYRESM-CAEDYM-only workflow where a user just wants to tweak parameters,
run the model, and load the output.
Usage
set_dy_cd_param(
path_dy,
...,
cfg_file = find_dy_cd_cfg(path_dy),
par_file = file.path(path_dy, "dyresm3p1.par")
)Arguments
- path_dy
filepath; directory containing the DYRESM-CAEDYM configuration (the
dy_cdmodel directory).- ...
named parameter/value pairs to set, e.g.
Kw = 0.5,max_layer_thickness = 2,eta_S = 0.5. See Details for accepted names.- cfg_file
filepath; the
<lakename>.cfgfile to edit. Defaults to the one found inpath_dyviafind_dy_cd_cfg().- par_file
filepath; the
dyresm3p1.parfile to edit. Defaults todyresm3p1.parinpath_dy.
Details
Setting Kw also updates the PAR line of caedym3p1.bio when that
file is present, mirroring build_aeme()'s own behaviour so a BGC run
stays consistent.
Accepted names:
<lakename>.cfgstart_date,sim_days,run_caedym,output_interval,Kw,min_layer_thickness,max_layer_thickness,timestepdyresm3p1.pardrag_coef,albedo,emissivity,crit_wind_speed,output_time,bubbler_entrain_coef,plume_entrain_coef,eta_K,eta_P,eta_S,eff_surf_area_coef,bbl_dissip_coef,vert_mix_coef