Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ state logical just_read_auxinput4 - misc - - r "we_jus
state logical just_read_boundary - misc - - r "we_just_d01_LBC" "1=BOUNDARY ALARM RINGING, 0=NO BOUNDARY ALARM" "-"
state real mf_fft - misc - - r "mf_fft" "Mass point map factor at equatorward FFT filter location" ""
state real p_top - misc - - irh "p_top" "PRESSURE TOP OF THE MODEL" "Pa"
state logical got_var_sso - misc - - i02r "got_var_sso" "whether VAR_SSO was included in WPS output (beginning V3.4)" ""

#BSINGH - Adding all these variables for CuP scheme[any var before t00]
state real lat_ll_t - dyn_em - - ir "lat_ll_t" "latitude lower left, temp point" "degrees"
Expand Down
15 changes: 15 additions & 0 deletions dyn_em/module_initialize_real.F
Original file line number Diff line number Diff line change
Expand Up @@ -3776,6 +3776,21 @@ SUBROUTINE init_domain_rk ( grid &
! CALL wrf_debug ( 0 , ' DONE routine to add snow in high mountain peaks')
!+---+-----------------------------------------------------------------+

! checking whether var_sso exists in the domain
! if so, we set got_var_sso flag to true. This is later used in external/RSL_LITE/module_dm.F
! to check for this, when the topo_wind option is used.
grid%got_var_sso = .FALSE.
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
IF(grid%var_sso(i,j) .NE. 0) THEN
grid%got_var_sso = .true.
ENDIF
END DO
END DO
#if ( defined(DM_PARALLEL) && ! defined(STUBMPI) )
grid%got_var_sso = wrf_dm_lor_logical ( grid%got_var_sso )
#endif

#ifdef DM_PARALLEL
# include "HALO_EM_INIT_1.inc"
Expand Down
4 changes: 4 additions & 0 deletions dyn_em/start_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ SUBROUTINE start_domain_em ( grid, allowed_to_read &
! here we check to see if the boundary conditions are set properly

CALL boundary_condition_check( config_flags, bdyzone, error, grid%id )
! make sure that topo_wind option has var_sso data available
IF ((config_flags%topo_wind .EQ. 1) .AND. (.NOT. grid%got_var_sso)) THEN
CALL wrf_error_fatal ("topo_wind requires VAR_SSO data")
ENDIF

!kludge - need to stop CG from resetting precip and phys tendencies to zero
! when we are in here due to a nest being spawned, we want to still
Expand Down
31 changes: 31 additions & 0 deletions external/RSL_LITE/module_dm.F
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,37 @@ INTEGER FUNCTION wrf_dm_bxor_integer ( inval )
#endif
END FUNCTION wrf_dm_bxor_integer


LOGICAL FUNCTION wrf_dm_lor_logical ( inval )
IMPLICIT NONE
#ifndef STUBMPI
LOGICAL inval, retval
INTEGER comm, ierr
CALL wrf_get_dm_communicator(comm)
CALL mpi_allreduce ( inval, retval , 1, MPI_LOGICAL, MPI_LAND, comm, ierr )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkavulich @kkeene44
This line should be MPI_LOR not MPI_LAND. This is in the newly manufactured function wrf_dm_lor_logical.

wrf_dm_lor_logical = retval
#else
LOGICAL inval
wrf_dm_lor_logical = inval
#endif
END FUNCTION wrf_dm_lor_logical


LOGICAL FUNCTION wrf_dm_land_logical ( inval )
IMPLICIT NONE
#ifndef STUBMPI
LOGICAL inval, retval
INTEGER comm, ierr
CALL wrf_get_dm_communicator(comm)
CALL mpi_allreduce ( inval, retval , 1, MPI_LOGICAL, MPI_LAND, comm, ierr )
wrf_dm_land_logical = retval
#else
LOGICAL inval
wrf_dm_land_logical = inval
#endif
END FUNCTION wrf_dm_land_logical


SUBROUTINE wrf_dm_maxval_real ( val, idex, jdex )
# ifndef STUBMPI
use mpi
Expand Down