!WRF:MEDIATION_LAYER
!

SUBROUTINE init_modules 9,28
 USE module_bc
 USE module_configure
 USE module_driver_constants
 USE module_model_constants
 USE module_domain
 USE module_machine
 USE module_nesting
 USE module_timing
 USE module_tiles
 USE module_io_wrf
 USE module_io
#ifdef DM_PARALLEL
 USE module_ext_quilt
 USE module_dm
#endif
#ifdef INTIO
 USE module_ext_internal
#endif

 CALL init_module_bc
 CALL init_module_configure
 CALL init_module_driver_constants
 CALL init_module_model_constants
 CALL init_module_domain
 CALL init_module_machine

#ifdef INTIO
 CALL init_module_ext_internal  !! must be called before quilt
#endif
#ifdef DM_PARALLEL
 CALL init_module_ext_quilt    !! this *must* be called before init_module_dm
 CALL init_module_dm
#endif
 CALL init_module_nesting
 CALL init_module_timing
 CALL init_module_tiles
 CALL init_module_io_wrf
 CALL init_module_io

! core specific initializations -- add new cores here
#if (EM_CORE == 1)
 CALL init_modules_em
#endif
#if (NMM_CORE == 1)
 CALL init_modules_nmm
#endif
#if (GRAPS_CORE == 1)
 CALL init_modules_graps
#endif
#if (COAMPS_CORE == 1)
 CALL init_modules_coamps
#endif
 
END SUBROUTINE init_modules