Skip to content

Commit

Permalink
Bugfix: uninitialized variable CS%Decay_scale_factor_lee
Browse files Browse the repository at this point in the history
- Reported by @nicjhan in issue #149.
- The get_param() that set this parameter was inside an if-block so
  the parameter was not always set.
  - I set it to a nonsense value to make sure it is NOT used
    unintentionally.
- No answer changes.
  • Loading branch information
adcroft committed Apr 28, 2015
1 parent 73bc292 commit c11e836
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2760,6 +2760,8 @@ subroutine set_diffusivity_init(Time, G, param_file, diag, CS, diag_to_Z_CSp)
'Lee wave Driven Turbulent Kinetic Energy', 'Watt meter-2')
CS%id_Kd_Niku = register_diag_field('ocean_model','Kd_Nikurashin',diag%axesTi,Time, &
'Lee Wave Driven Diffusivity', 'meter2 sec-1')
else
CS%Decay_scale_factor_lee = -9.e99 ! This should never be used if CS%Lee_wave_dissipation = False
endif

CS%id_TKE_itidal = register_diag_field('ocean_model','TKE_itidal',diag%axesT1,Time, &
Expand Down

0 comments on commit c11e836

Please sign in to comment.