!WRF:MEDIATION_LAYER
!

SUBROUTINE init_modules 5,26
 USE module_configure
 USE module_driver_constants
 USE module_domain
 USE module_machine
 USE module_nesting
 USE module_sm
 USE module_timing
 USE module_tiles
 USE module_io_wrf
 USE module_io
 USE module_start
#ifdef DM_PARALLEL
 USE module_ext_quilt
 USE module_dm
#endif
#ifdef INTIO
 USE module_ext_internal
#endif

#if defined(QUILT) && ! defined(DM_PARALLEL)
-----------------------------------------------------------------
--- This is an intentional Fortran syntax error.  You must    ---
--- have -DDM_PARALLEL in configure.wrf if -DQUILT is there.  ---
-----------------------------------------------------------------
#endif

 CALL init_module_configure
 CALL init_module_driver_constants
 CALL init_module_domain
 CALL init_module_machine
#ifdef INTIO
 CALL init_module_ext_internal ! must be called before quilt
#ifdef DM_PARALLEL
 CALL init_module_ext_quilt    !! this *must* be called before init_module_dm
 CALL init_module_dm
#endif
#endif
 CALL init_module_nesting
 CALL init_module_sm
 CALL init_module_timing
 CALL init_module_tiles
 CALL init_module_io_wrf
 CALL init_module_io
 CALL init_module_start
END SUBROUTINE init_modules