Skip to content

Commit

Permalink
Fix declaration for QSFC to INOUT variable (#1791)
Browse files Browse the repository at this point in the history
TYPE: bug fix, no effect

KEYWORDS: sfclay, sfclayrev, qsfc

SOURCE: Reported by Laura Fowler, NCAR/MMM, internal

DESCRIPTION OF CHANGES:
Problem:
QSFC variable in sfclay and sfclayrev modules was declared as an OUT variable, but it is only calculated conditionally. For some grid points, it takes the input value. This has caused compilation issue in MPAS.

Solution:
Change the declaration for QSFC from OUT to INOUT variable.

LIST OF MODIFIED FILES: 
M     phys/module_sf_sfclay.F
M     phys/module_sf_sfclayrev.F

TESTS CONDUCTED: 
1. It fixed the compilation problem in MPAS.
2. The Jenkins tests have passed.
  • Loading branch information
weiwangncar committed Dec 16, 2022
1 parent 49f99a2 commit 4b94b9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions phys/module_sf_sfclay.F
Expand Up @@ -138,14 +138,12 @@ SUBROUTINE SFCLAY(U3D,V3D,T3D,QV3D,P3D,dz8w, &
XLAND, &
TSK
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: REGIME, &
HFX, &
QFX, &
LH, &
MOL,RMOL
!m the following 5 are change to memory size
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: GZ1OZ0,WSPD,BR, &
Expand Down Expand Up @@ -326,13 +324,12 @@ SUBROUTINE SFCLAY1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, &
REAL, DIMENSION( ims:ime ) , &
INTENT(INOUT) :: &
QGH
QSFC,QGH
REAL, DIMENSION( ims:ime ) , &
INTENT(OUT) :: U10,V10, &
TH2,T2,Q2,QSFC,LH
TH2,T2,Q2,LH
REAL, INTENT(IN ) :: CP,G,ROVCP,R,XLV
REAL, DIMENSION( its:ite ), INTENT(IN ) :: DX
Expand Down
9 changes: 4 additions & 5 deletions phys/module_sf_sfclayrev.F
Expand Up @@ -143,15 +143,14 @@ SUBROUTINE SFCLAYREV(U3D,V3D,T3D,QV3D,P3D,dz8w, &
V10, &
TH2, &
T2, &
Q2, &
QSFC
Q2
!
REAL, DIMENSION( ims:ime, jms:jme ) , &
INTENT(INOUT) :: REGIME, &
HFX, &
QFX, &
LH, &
QSFC, &
MOL,RMOL
!m the following 5 are change to memory size
!
Expand Down Expand Up @@ -320,11 +319,11 @@ SUBROUTINE SFCLAYREV1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, &
REAL, DIMENSION( ims:ime ) , &
INTENT(INOUT) :: &
QGH
QSFC,QGH
REAL, DIMENSION( ims:ime ) , &
INTENT(OUT) :: U10,V10, &
TH2,T2,Q2,QSFC,LH
TH2,T2,Q2,LH
REAL, INTENT(IN ) :: CP,G,ROVCP,R,XLV,DX
Expand Down

0 comments on commit 4b94b9c

Please sign in to comment.