From 232b65daa62f6d97dbe6f1b76447863eb9065d8b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 2 Aug 2024 10:56:15 -0600 Subject: [PATCH] Add parameter to change restoring time scale name Most use cases don't include restoring for MARBL tracers, but when that feature is enabled and the time scale is read from a file the user can specify what variable to read from the netCDF file (default is I_TAU to match naming convention in MOM6, but some test cases are based on POP files and will need to read RTAU) --- src/tracer/MARBL_tracers.F90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tracer/MARBL_tracers.F90 b/src/tracer/MARBL_tracers.F90 index f85da118e6..9c856fef85 100644 --- a/src/tracer/MARBL_tracers.F90 +++ b/src/tracer/MARBL_tracers.F90 @@ -158,6 +158,7 @@ module MARBL_tracers character(len=200) :: restoring_file !< name of [netCDF] file containing tracer restoring data type(remapping_CS) :: restoring_remapCS !< Remapping parameters and work arrays for tracer restoring / timescale character(len=200) :: restoring_I_tau_file !< name of [netCDF] file containing inverse restoring timescale + character(len=200) :: restoring_I_tau_var_name !< name of field containing inverse restoring timescale character(len=35) :: marbl_settings_file !< name of [text] file containing MARBL settings real :: bot_flux_mix_thickness !< for bottom flux -> tendency conversion, assume uniform mixing over @@ -732,8 +733,12 @@ function register_MARBL_tracers(HI, GV, US, param_file, CS, tr_Reg, restart_CS, call get_param(param_file, mdl, "MARBL_TRACER_RESTORING_I_TAU_FILE", & CS%restoring_I_tau_file, & "File containing the inverse timescale for restoring MARBL tracers") + call get_param(param_file, mdl, "MARBL_TRACER_RESTORING_I_TAU_VAR_NAME", & + CS%restoring_I_tau_var_name, & + "Field containing the inverse timescale for restoring MARBL tracers", & + default="I_TAU") ! Set up array for thicknesses in restoring timescale file - call read_Z_edges(CS%restoring_I_tau_file, "I_TAU", CS%restoring_timescale_z_edges, & + call read_Z_edges(CS%restoring_I_tau_file, CS%restoring_I_tau_var_name, CS%restoring_timescale_z_edges, & CS%restoring_timescale_nz, restoring_timescale_has_edges, & restoring_timescale_use_missing, restoring_timescale_missing, scale=US%m_to_Z) allocate(CS%restoring_timescale_dz(CS%restoring_timescale_nz))