Skip to content

Commit

Permalink
add facility to RETURN when there are zero land pts
Browse files Browse the repository at this point in the history
  • Loading branch information
JhanSrbinovsky committed Aug 28, 2024
1 parent b611912 commit 55eaa5b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,16 @@ SUBROUTINE cable_explicit_driver( row_length, rows, land_pts, ntiles,npft, &

integer :: j


LOGICAL, SAVE :: zero_points_warning= .true.

IF( land_pts == 0 ) THEN
IF( zero_points_warning ) THEN
WRITE(6,*) "Reached CABLE implicit "
" even though zero land_points on processor ", knode_gl
END IF
zero_points_warning = .FALSE.
RETURN
END IF

!--- initialize cable_runtime% switches
cable_runtime%um = .TRUE.
Expand Down
11 changes: 11 additions & 0 deletions src/coupled/ESM1.5/CABLEfilesFromESM1.5/cable_hyd_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ SUBROUTINE cable_hyd_driver( SNOW_TILE, LYING_SNOW, SURF_ROFF, SUB_SURF_ROFF, &
REAL :: miss =0.
REAL, POINTER :: TFRZ

LOGICAL, SAVE :: zero_points_warning= .true.

IF( um1%land_pts == 0 ) THEN
IF( zero_points_warning ) THEN
WRITE(6,*) "Reached CABLE implicit "
" even though zero land_points on processor ", knode_gl
END IF
zero_points_warning = .FALSE.
RETURN
END IF

TFRZ => PHYS%TFRZ

SNOW_TILE= UNPACK(ssnow%snowd, um1%L_TILE_PTS, miss)
Expand Down
10 changes: 10 additions & 0 deletions src/coupled/ESM1.5/CABLEfilesFromESM1.5/cable_implicit_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,17 @@ subroutine cable_implicit_driver( LS_RAIN, CON_RAIN, LS_SNOW, CONV_SNOW, &
INTEGER, PARAMETER :: loy = 365 !fudge for ESM1.5
INTEGER, PARAMETER :: lalloc = 0 !fudge for ESM1.5 0 => call POP N/A
TYPE(POP_TYPE) :: POP
LOGICAL, SAVE :: zero_points_warning= .true.

IF( um1%land_pts == 0 ) THEN
IF( zero_points_warning ) THEN
WRITE(6,*) "Reached CABLE implicit "
" even though zero land_points on processor ", knode_gl
END IF
zero_points_warning = .FALSE.
RETURN
END IF

TFRZ => PHYS%TFRZ

! FLAGS def. specific call to CABLE from UM
Expand Down
11 changes: 11 additions & 0 deletions src/coupled/ESM1.5/CABLEfilesFromESM1.5/cable_rad_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ SUBROUTINE cable_rad_driver( &
REAL :: xphi1(mp) ! leaf angle parmameter 1
REAL :: xphi2(mp) ! leaf angle parmameter 2

LOGICAL, SAVE :: zero_points_warning= .true.

IF( um1%land_pts == 0 ) THEN
IF( zero_points_warning ) THEN
WRITE(6,*) "Reached CABLE implicit "
" even though zero land_points on processor ", knode_gl
END IF
zero_points_warning = .FALSE.
RETURN
END IF

!CALL init_active_tile_mask_cbl(l_tile_pts, um1%land_pts, um1%ntiles, um1%tile_frac )

!jhan:check that these are reset after call done
Expand Down

0 comments on commit 55eaa5b

Please sign in to comment.