|
| 1 | +!> @brief This module exposes a single higher-order routine whose purpose is to register an exchange with |
| 2 | +!! the simulation. The routine accepts procedure pointers to exchange-scoped registration routines. This |
| 3 | +!! could be done in ExchangeFactory (indeed, the latter maps exchange acronyms to registration routines), |
| 4 | +!! but we do registration here to keep ExchangeFactory minimal since editing template files is annoying. |
1 | 5 | module ExchangeRegistrarModule
|
2 | 6 | use KindModule, only: I4B, LGP
|
3 | 7 | use ConstantsModule, only: LINELENGTH
|
4 |
| - use ListsModule, only: basemodellist |
5 | 8 | use SimVariablesModule, only: iout, model_names, model_loc_idx
|
6 | 9 | use ArrayHandlersModule, only: ifind
|
7 | 10 | use SimModule, only: store_error
|
@@ -46,6 +49,7 @@ subroutine register_virtual_exchange( &
|
46 | 49 |
|
47 | 50 | contains
|
48 | 51 |
|
| 52 | + !> @brief Register an exchange with the simulation. |
49 | 53 | subroutine register_exchange( &
|
50 | 54 | register_actual, &
|
51 | 55 | register_virtual, &
|
@@ -99,7 +103,8 @@ subroutine register_exchange( &
|
99 | 103 | ' will be created to connect model ', model1_id, &
|
100 | 104 | ' with model ', model2_id
|
101 | 105 |
|
102 |
| - ! check if models are of the same type |
| 106 | + ! check if models are the same type |
| 107 | + ! todo: factor out a routine? can we expect exg name format to stay consistent? |
103 | 108 | same_type = exchange_name(1:3) == exchange_name(5:7)
|
104 | 109 |
|
105 | 110 | ! an actual exchange should be registered if the models
|
|
0 commit comments