Skip to content

Commit

Permalink
Resolve uninitialized variable issues in surface_driver (#1681)
Browse files Browse the repository at this point in the history
TYPE: bug-fix
KEYWORDS: surface driver, uninitialized variables

SOURCE: internal, reported by CWB, Taiwan

DESCRIPTION OF CHANGES:
Problem:
Several variables showed up as used while uninitialized

Solution:
PXLSM does not need to compute sea-ice weighted PBLH. FH and FM in seaice wrapper calls to sfclay, sfclayrev need to be initialized for use in sea-ice weighting.

LIST OF MODIFIED FILES:
M phys/module_surface_driver.F

TESTS CONDUCTED:
The Jenkins tests have passed.
  • Loading branch information
dudhia authored Mar 15, 2022
1 parent 179fd33 commit c394ff0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion phys/module_surface_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,6 @@ SUBROUTINE surface_driver( &
!save old tsk_ice
tsk_save(i,j) = tsk(i,j)
tsk(i,j) = ( tsk(i,j) * XICE(i,j) ) + ( (1.0-XICE(i,j)) * TSK_SEA(i,j) )
pblh(i,j) = ( pblh(i,j) * XICE(i,j) ) + ( (1.0-XICE(i,j)) * PBLH_SEA(i,j) )
ENDIF
ENDDO
ENDDO
Expand Down Expand Up @@ -6018,6 +6017,8 @@ SUBROUTINE sfclayrev_seaice_wrapper(U3D,V3D,T3D,QV3D,P3D,dz8w, &
MOL_HOLD(its:ite,jts:jte) = MOL(its:ite,jts:jte)
PSIH_HOLD(its:ite,jts:jte) = PSIH(its:ite,jts:jte)
PSIM_HOLD(its:ite,jts:jte) = PSIM(its:ite,jts:jte)
FH_HOLD(its:ite,jts:jte) = FH(its:ite,jts:jte)
FM_HOLD(its:ite,jts:jte) = FM(its:ite,jts:jte)
QFX_HOLD(its:ite,jts:jte) = QFX(its:ite,jts:jte)
QGH_HOLD(its:ite,jts:jte) = QGH(its:ite,jts:jte)
REGIME_HOLD(its:ite,jts:jte) = REGIME(its:ite,jts:jte)
Expand Down Expand Up @@ -6446,6 +6447,8 @@ SUBROUTINE sfclay_seaice_wrapper(U3D,V3D,T3D,QV3D,P3D,dz8w, &
MOL_HOLD(its:ite,jts:jte) = MOL(its:ite,jts:jte)
PSIH_HOLD(its:ite,jts:jte) = PSIH(its:ite,jts:jte)
PSIM_HOLD(its:ite,jts:jte) = PSIM(its:ite,jts:jte)
FH_HOLD(its:ite,jts:jte) = FH(its:ite,jts:jte)
FM_HOLD(its:ite,jts:jte) = FM(its:ite,jts:jte)
QFX_HOLD(its:ite,jts:jte) = QFX(its:ite,jts:jte)
QGH_HOLD(its:ite,jts:jte) = QGH(its:ite,jts:jte)
REGIME_HOLD(its:ite,jts:jte) = REGIME(its:ite,jts:jte)
Expand Down

0 comments on commit c394ff0

Please sign in to comment.