Skip to content

Commit

Permalink
Merge pull request #3295 from jedwards4b/seq_flux_vars_init
Browse files Browse the repository at this point in the history
These variables should get reasonable initial values if the namelist isn't read.

Test suite: scripts_regression_tests.py had testing of SMS_Ld5.f09_g17.B1850G.cheyenne_intel.allactive-cism-test_coupling
Test baseline:
Test namelist changes:
Test status: bit for bit
Fixes #3294

User interface changes?:

Update gh-pages html (Y/N)?:

Code review:
  • Loading branch information
fischer-ncar authored Nov 9, 2019
2 parents 737cc73 + 6a086cb commit 5f494ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions driver-mct/main/seq_flux_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ module seq_flux_mct
real(r8),parameter :: const_deg2rad = const_pi/180.0_r8 ! deg to rads

! albedo reference variables - set via namelist
real(r8) :: seq_flux_mct_albdif ! albedo, diffuse
real(r8) :: seq_flux_mct_albdir ! albedo, direct
real(r8) :: seq_flux_mct_albdif = -1.0_r8 ! albedo, diffuse
real(r8) :: seq_flux_mct_albdir = -1.0_r8 ! albedo, direct
real(r8) :: seq_flux_atmocn_minwind ! minimum wind temperature for atmocn flux routines

! Coupler field indices
Expand Down Expand Up @@ -789,6 +789,9 @@ subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o )
update_alb = .false.

if (first_call) then
if (seq_flux_mct_albdif < 0 .or. seq_flux_mct_albdir < 0) then
call shr_sys_abort(trim(subname)//' ERROR seq_flux_mct_inparm namelist not initialized')
endif
index_xao_So_anidr = mct_aVect_indexRA(xao_o,'So_anidr')
index_xao_So_anidf = mct_aVect_indexRA(xao_o,'So_anidf')
index_xao_So_avsdr = mct_aVect_indexRA(xao_o,'So_avsdr')
Expand Down Expand Up @@ -899,7 +902,6 @@ subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o )
update_alb = .true.
endif ! nextsw_cday
end if ! flux_albav

!--- update current ifrad/ofrad values if albedo was updated

if (update_alb) then
Expand Down

0 comments on commit 5f494ca

Please sign in to comment.