33 USE m_mctworld,
ONLY : mctworld_clean => clean
38#if defined SWAN_COUPLING || defined REFDIF_COUPLING
44#if defined PIO_LIB && defined DISTRIBUTE
52 logical,
save :: first
54 integer :: mycolor, mycomm, myerror, mykey, nnodes
55 integer :: ng, provided, required
57 real(r4) :: couplingtime
66 required=mpi_thread_multiple
67 CALL mpi_init_thread (required, provided, myerror)
68 IF (myerror.ne.0)
THEN
69 print
'(/,a)',
' ROMS: Unable to initialize multi-threaded MPI'
73 CALL mpi_init (myerror)
74 IF (myerror.ne.0)
THEN
75 print
'(/,a)',
' ROMS: Unable to initialize MPI'
83 CALL mpi_comm_size (mpi_comm_world, nnodes, myerror)
84 CALL mpi_comm_rank (mpi_comm_world,
myrank, myerror)
120 CALL mpi_comm_split (mpi_comm_world, mycolor, mykey, mycomm, &
127#if defined SWAN_COUPLING
128 IF (mycolor.eq.
wavid)
THEN
131 CALL swan_run (couplingtime)
134#elif defined REFDIF_COUPLING
135 IF (mycolor.eq.
wavid)
THEN
137 CALL refdif_initialize (mycomm)
143 IF (mycolor.eq.
atmid)
THEN
148 CALL module_wrf_top_wrf_init (mycomm)
149 CALL module_wrf_top_wrf_run (couplingtime)
150 CALL module_wrf_top_wrf_finalize
153 IF (mycolor.eq.
ocnid)
THEN
166#if defined PIO_LIB && defined DISTRIBUTE
169#if defined SWAN_COUPLING || defined REFDIF_COUPLING
170 CALL finalize_ocn2wav_coupling
173 CALL finalize_ocn2atm_coupling
181 CALL mpi_barrier (mpi_comm_world, myerror)
182 CALL mctworld_clean ()
183 CALL mpi_finalize (myerror)
type(t_integer), dimension(:), allocatable pets
integer, dimension(:), allocatable nthreads
character(len=256), dimension(:), allocatable inpname
subroutine allocate_coupler(nnodes)
real(r8), dimension(:,:), allocatable timeinterval
integer, dimension(:), allocatable ntimes
real(dp), dimension(:), allocatable dt
subroutine, public roms_finalize
subroutine, public roms_run(runinterval)
subroutine, public roms_initialize(first, mpicomm)
subroutine, public finalize_pio
subroutine read_couplepar(model)