include file: PERIOD_BDY_EM_MOIST.inc 2,4
!STARTOFREGISTRYGENERATEDINCLUDE 'inc/PERIOD_BDY_EM_MOIST.inc'
!
! WARNING This file is generated automatically by use_registry
! using the data base in the file named Registry.
! Do not edit.  Your changes to this file will be lost.
!
IF ( grid%comms( PERIOD_BDY_EM_MOIST ) == invalid_message_value .AND. (config_flags%periodic_x .OR. config_flags%periodic_y )) THEN
  CALL wrf_debug ( 50 , 'setting up period PERIOD_BDY_EM_MOIST' )
  CALL setup_period_rsl( grid )
  CALL rsl_create_message ( msg )
  if ( P_qv .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qv) , 3 , decomp , glen , llen )
  if ( P_qc .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qc) , 3 , decomp , glen , llen )
  if ( P_qr .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qr) , 3 , decomp , glen , llen )
  if ( P_qi .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qi) , 3 , decomp , glen , llen )
  if ( P_qs .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qs) , 3 , decomp , glen , llen )
  if ( P_qg .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_1 (grid%sm31,grid%sm32,grid%sm33,P_qg) , 3 , decomp , glen , llen )
  if ( P_qv .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qv) , 3 , decomp , glen , llen )
  if ( P_qc .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qc) , 3 , decomp , glen , llen )
  if ( P_qr .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qr) , 3 , decomp , glen , llen )
  if ( P_qi .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qi) , 3 , decomp , glen , llen )
  if ( P_qs .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qs) , 3 , decomp , glen , llen )
  if ( P_qg .GT. 1 ) CALL rsl_build_message ( msg, RSL_REAL_F90 , &
moist_2 (grid%sm31,grid%sm32,grid%sm33,P_qg) , 3 , decomp , glen , llen )
  CALL rsl_create_period ( grid%comms ( PERIOD_BDY_EM_MOIST ) )
  CALL rsl_describe_period ( grid%domdesc , grid%comms ( PERIOD_BDY_EM_MOIST ) , 3 , msg )
ENDIF
IF ( config_flags%periodic_x ) THEN
  CALL wrf_debug ( 50 , 'exchanging period PERIOD_BDY_EM_MOIST on x' )
  CALL rsl_exch_period ( grid%domdesc , grid%comms( PERIOD_BDY_EM_MOIST ) , x_period_flag )
END IF
IF ( config_flags%periodic_y ) THEN
  CALL wrf_debug ( 50 , 'exchanging period PERIOD_BDY_EM_MOIST on y' )
  CALL rsl_exch_period ( grid%domdesc , grid%comms( PERIOD_BDY_EM_MOIST ) , y_period_flag )
END IF
!ENDOFREGISTRYGENERATEDINCLUDE