Skip to content

Commit

Permalink
Add parameter to change restoring time scale name
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mnlevy1981 committed Aug 2, 2024
1 parent 8ba02c2 commit 232b65d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tracer/MARBL_tracers.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 232b65d

Please sign in to comment.