Skip to content

Commit

Permalink
correct prepending inputdir to CFC_BC_file
Browse files Browse the repository at this point in the history
  • Loading branch information
klindsay28 committed Aug 23, 2021
1 parent bc19819 commit fa96ae3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,9 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
"internal BC generation (TODO).", default=" ", do_not_log=.true.)
if ((len_trim(CS%CFC_BC_file) > 0) .and. (scan(CS%CFC_BC_file,'/') == 0)) then
! Add the directory if CFC_BC_file is not already a complete path.
CS%CFC_BC_file = trim(slasher(CS%inputdir))//trim(CS%CFC_BC_file)
CS%CFC_BC_file = trim(CS%inputdir) // trim(CS%CFC_BC_file)
endif
if (len_trim(CS%CFC_BC_file) > 0) then
call get_param(param_file, mdl, "CFC11_VARIABLE", CS%cfc11_var_name, &
"The name of the variable representing CFC-11 in "//&
"CFC_BC_FILE.", default="CFC_11", do_not_log=.true.)
Expand Down
8 changes: 7 additions & 1 deletion src/tracer/MOM_CFC_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function register_CFC_cap(HI, GV, param_file, CS, tr_Reg, restart_CS)
real :: a11_dflt(4), a12_dflt(4) ! Default values of the various coefficients
real :: d11_dflt(4), d12_dflt(4) ! In the expressions for the solubility and
real :: e11_dflt(3), e12_dflt(3) ! Schmidt numbers.
character(len=48) :: dummy ! Dummy variable to store params that need to be logged here.
character(len=200) :: dummy ! Dummy variable to store params that need to be logged here.
logical :: register_CFC_cap
integer :: isd, ied, jsd, jed, nz, m

Expand Down Expand Up @@ -128,6 +128,12 @@ function register_CFC_cap(HI, GV, param_file, CS, tr_Reg, restart_CS)
"found (units must be parts per trillion), or an empty string for "//&
"internal BC generation (TODO).", default=" ")
if ((len_trim(dummy) > 0) .and. (scan(dummy,'/') == 0)) then
! Add the directory if dummy is not already a complete path.
call get_param(param_file, mdl, "INPUTDIR", inputdir, default=".")
dummy = trim(slasher(inputdir))//trim(dummy)
call log_param(param_file, mdl, "INPUTDIR/CFC_IC_FILE", dummy)
endif
if (len_trim(dummy) > 0) then
call get_param(param_file, mdl, "CFC11_VARIABLE", dummy, &
"The name of the variable representing CFC-11 in "//&
"CFC_BC_FILE.", default="CFC_11")
Expand Down

0 comments on commit fa96ae3

Please sign in to comment.