Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to improve WRF-CTSM coupling #1355

Merged
merged 14 commits into from
Mar 5, 2021
Merged
29 changes: 27 additions & 2 deletions phys/module_surface_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,8 @@ SUBROUTINE surface_driver( &
CPM, &
CHS2, &
CQS2

! CTSM local variable
REAL, DIMENSION( ims:ime , jms:jme ) :: xland_ctsm
! SSIB local variables
REAL ZDIFF
REAL, DIMENSION( ims:ime , jms:jme ) :: XICE_save
Expand Down Expand Up @@ -3895,6 +3896,19 @@ SUBROUTINE surface_driver( &


!------------------------------------------------------------------
!For WRF-CTSM simulations, we would like the land model (CTSM)
! to handle inland lake points.
! Here, we are making ctsm_xland to include lake points, so that
! CTSM can handle it.
DO j=j_start(ij),j_end(ij)
DO i=i_start(ij),i_end(ij)
xland_ctsm (i,j) = xland (i,j)
IF (lakemask(i,j).EQ.1.) THEN
xland_ctsm (i,j) = 1
ENDIF
ENDDO
ENDDO

IF ( FRACTIONAL_SEAICE == 1) THEN
! The fields passed to LSM need to represent the full ice values, not
! the fractional values. Convert ALBEDO and EMISS from the blended value
Expand Down Expand Up @@ -3942,7 +3956,7 @@ SUBROUTINE surface_driver( &

! general information
dt = dt, &
xland = xland, &
xland = xland_ctsm, &
xice = xice, &
xice_threshold = xice_threshold, &

Expand Down Expand Up @@ -4045,6 +4059,17 @@ SUBROUTINE surface_driver( &

ENDIF

DO j=j_start(ij),j_end(ij)
DO i=i_start(ij),i_end(ij)
CHKLOWQ(I,J)= 1.0
SFCEVP(I,J)= SFCEVP(I,J) + QFX(I,J)*DTBL
!SFCEXC(I,J)= CHS(I,J)
IF(PRESENT(ACHFX))ACHFX(I,J)=ACHFX(I,J) + HFX(I,J)*DT
IF(PRESENT(ACLHF))ACLHF(I,J)=ACLHF(I,J) + LH(I,J)*DT
IF(PRESENT(ACGRDFLX))ACGRDFLX(I,J)=ACGRDFLX(I,J) + GRDFLX(I,J)*DT
ENDDO
ENDDO

#endif

CASE (SSIBSCHEME)
Expand Down
5 changes: 5 additions & 0 deletions share/module_soil_pre.F
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ SUBROUTINE adjust_for_seaice_post ( xice , landmask , tsk_old , tsk , ivgtyp , v

CASE ( SLABSCHEME )

#ifdef WRF_USE_CTSM
CASE ( LSMSCHEME , NOAHMPSCHEME , CLMSCHEME, CTSMSCHEME, SSIBSCHEME ) !mchen add for ssib
#else
CASE ( LSMSCHEME , NOAHMPSCHEME , CLMSCHEME, SSIBSCHEME ) !mchen add for ssib
#endif

DO j = jts , MIN(jde-1,jte)
DO i = its , MIN(ide-1,ite)
IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE
Expand Down