ROMS
Loading...
Searching...
No Matches
mct_coupler.h
Go to the documentation of this file.
1#include "cppdefs.h"
3
4#if defined MODEL_COUPLING && defined MCT_LIB
5!
6!git $Id$
7!==================================================== John C. Warner ===
8! Copyright (c) 2002-2025 The ROMS Group Hernan G. Arango !
9! Licensed under a MIT/X style license !
10! See License_ROMS.md !
11!=======================================================================
12! !
13! This module is used to communicate and exchange data between !
14! ROMS and other coupled model(s) via the Model Coupling !
15! Toolkit (MCT), developed at the Argonne National Laboratory. !
16! !
17!=======================================================================
18!
19! Component Model Registry.
20!
21 USE m_mctworld, ONLY : mctworld_init => init
22 USE m_mctworld, ONLY : mctworld_clean => clean
23!
24! Domain Decomposition Descriptor DataType and associated methods.
25!
26 USE m_globalsegmap, ONLY : globalsegmap
27 USE m_globalsegmap, ONLY : globalsegmap_init => init
28 USE m_globalsegmap, ONLY : globalsegmap_lsize => lsize
29 USE m_globalsegmap, ONLY : globalsegmap_clean => clean
30 USE m_globalsegmap, ONLY : globalsegmap_ordpnts => orderedpoints
31!
32! Field Storage DataType and associated methods.
33!
34 USE m_attrvect, ONLY : attrvect
35 USE m_attrvect, ONLY : attrvect_init => init
36 USE m_attrvect, ONLY : attrvect_zero => zero
37 USE m_attrvect, ONLY : attrvect_lsize => lsize
38 USE m_attrvect, ONLY : attrvect_clean => clean
39 USE m_attrvect, ONLY : attrvect_importrattr => importrattr
40 USE m_attrvect, ONLY : attrvect_exportrattr => exportrattr
41!
42! Intercomponent communications scheduler.
43!
44 USE m_router, ONLY : router
45 USE m_router, ONLY : router_init => init
46 USE m_router, ONLY : router_clean => clean
47!
48! Intercomponent transfer.
49!
50 USE m_transfer, ONLY: mct_send => send
51 USE m_transfer, ONLY: mct_recv => recv
52!
53! Sparse Matrix DataType and associated methods.
54!
55 USE m_sparsematrix, ONLY : sparsematrix
56 USE m_sparsematrix, ONLY : sparsematrix_init => init
57 USE m_sparsematrix, ONLY : sparsematrix_importgrowind => &
58 & importglobalrowindices
59 USE m_sparsematrix, ONLY : sparsematrix_importgcolind => &
60 & importglobalcolumnindices
61 USE m_sparsematrix, ONLY : sparsematrix_importmatrixelts => &
62 & importmatrixelements
63 USE m_sparsematrixplus, ONLY : sparsematrixplus
64 USE m_sparsematrixplus, ONLY : sparsematrixplus_init => init
65 USE m_sparsematrixplus, ONLY : sparsematrixplus_clean => clean
66!
67! Decompose matrix by row.
68!
69 USE m_sparsematrixplus, ONLY : xonly
70!
71! Matrix-Vector multiply methods.
72!
73 USE m_matattrvectmul, ONLY : mct_matvecmul => smatavmult
74!
75 implicit none
76!
77 PRIVATE
78
79# ifdef SWAN_COUPLING
80 PUBLIC :: initialize_ocn2wav_coupling
81 PUBLIC :: ocn2wav_coupling
82 PUBLIC :: finalize_ocn2wav_coupling
83# endif
84# ifdef WRF_COUPLING
85 PUBLIC :: initialize_ocn2atm_coupling
86 PUBLIC :: ocn2atm_coupling
87 PUBLIC :: finalize_ocn2atm_coupling
88# endif
89!
90! Declarations.
91!
92# ifdef SWAN_COUPLING
93 TYPE(attrvect) :: wav2ocn_av ! AttrVect variables
94 TYPE(attrvect) :: ocn2wav_av
95 TYPE(router) :: romstoswan ! Router variables
96# endif
97# ifdef WRF_COUPLING
98 TYPE(attrvect) :: atm2ocn_av ! AttrVect variables
99 TYPE(attrvect) :: ocn2atm_av
100 TYPE(router) :: romstowrf ! Router variables
101# endif
102 TYPE(globalsegmap) :: gsmaproms ! GloabalSegMap variables
103
104 CONTAINS
105/*
106************************************************************************
107* include model specific communication routines.
108************************************************************************
109*/
110
111# ifdef SWAN_COUPLING
112# include "mct_roms_swan.h"
113# endif
114# ifdef REFDIF_COUPLING
115# include "mct_roms_refdif.h"
116# endif
117# ifdef WRF_COUPLING
118# include "mct_roms_wrf.h"
119# endif
120
121#endif
122 END MODULE mct_coupler_mod
type(router) romstowrf
type(attrvect) wav2ocn_av
Definition mct_coupler.h:93
type(globalsegmap) gsmaproms
type(attrvect) ocn2atm_av
Definition mct_coupler.h:99
type(attrvect) ocn2wav_av
Definition mct_coupler.h:94
type(router) romstoswan
Definition mct_coupler.h:95
type(attrvect) atm2ocn_av
Definition mct_coupler.h:98