Skip to content

Commit

Permalink
Bugfix: uninitialized variable CS%Henyey_IGW_background_new
Browse files Browse the repository at this point in the history
- Reported by @nicjhan in issue #149.
- There was no get_param() for the parameter HENYEY_IGW_BACKGROUND_NEW.
  - I added one and made it mutually exclusive with HENYEY_IGW_BACKGROUND.
  - It would appear we have not been using the new Henyey scheme!
- This did change the MOM_parameter_doc.all files.
- No answer changes.
  • Loading branch information
adcroft committed Apr 28, 2015
1 parent c11e836 commit 719c885
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2471,6 +2471,14 @@ subroutine set_diffusivity_init(Time, G, param_file, diag, CS, diag_to_Z_CSp)
"If true, use a latitude-dependent scaling for the near \n"//&
"surface background diffusivity, as described in \n"//&
"Harrison & Hallberg, JPO 2008.", default=.false.)
call get_param(param_file, mod, "HENYEY_IGW_BACKGROUND_NEW", &
CS%Henyey_IGW_background_new, &
"If true, use a better latitude-dependent scaling for the\n"//&
"background diffusivity, as described in \n"//&
"Harrison & Hallberg, JPO 2008.", default=.false.)
if (CS%Henyey_IGW_background .and. CS%Henyey_IGW_background_new) call MOM_error(FATAL, &
"set_diffusivity_init: HENYEY_IGW_BACKGROUND and HENYEY_IGW_BACKGROUND_NEW "// &
"are mutually exclusive. Set only one or none.")
if (CS%Henyey_IGW_background) &
call get_param(param_file, mod, "HENYEY_N0_2OMEGA", CS%N0_2Omega, &
"The ratio of the typical Buoyancy frequency to twice \n"//&
Expand Down

0 comments on commit 719c885

Please sign in to comment.