15 INTEGER,
PARAMETER :: pd = 12
16 INTEGER,
PARAMETER :: rd = 307
18 INTEGER,
PARAMETER :: dp = selected_real_kind(pd,rd)
19 INTEGER,
PARAMETER :: wp = dp
21 INTEGER,
PARAMETER :: no_of_fields = 8
22 INTEGER,
PARAMETER :: max_char_length = 132
24 INTEGER,
PARAMETER :: nbr_cells = 2
25 INTEGER,
PARAMETER :: nbr_vertices = 4
27 REAL(wp),
PARAMETER :: yac_rad = 0.017453292519943295769_wp
29 CHARACTER(LEN=max_char_length) :: field_name(no_of_fields)
30 CHARACTER(LEN=max_char_length) :: yaml_filename
31 CHARACTER(LEN=max_char_length) :: grid_name
32 CHARACTER(LEN=max_char_length) :: comp_name
34 INTEGER :: i, igrid, ierror
37 INTEGER :: cell_point_ids(2)
38 INTEGER :: grid_ids(2)
40 INTEGER :: glb_index(nbr_cells)
41 INTEGER :: cell_core_mask(nbr_cells)
42 INTEGER :: nbr_vertices_per_cell
44 REAL(wp),
ALLOCATABLE :: buffer_lon(:)
45 REAL(wp),
ALLOCATABLE :: buffer_lat(:)
46 INTEGER,
ALLOCATABLE :: cell_to_vertex(:,:)
48 INTEGER,
ALLOCATABLE :: cell_mask(:)
49 INTEGER,
ALLOCATABLE :: field_id(:)
51 INTEGER :: local_comm, npes, rank
53 CALL mpi_init (ierror)
57 yaml_filename =
"toy_dummy.yaml"
62 comp_name =
"dummy_io"
67 CALL mpi_comm_rank ( local_comm, rank, ierror )
68 CALL mpi_comm_size ( local_comm, npes, ierror )
70 WRITE ( 6 , * ) trim(comp_name),
" rank ", rank,
": local size is ", npes
77 IF ( igrid == 1 )
THEN
78 grid_name =
"ocean_grid"
80 grid_name =
"atmos_grid"
83 ALLOCATE(buffer_lon(nbr_vertices))
84 ALLOCATE(buffer_lat(nbr_vertices))
85 ALLOCATE(cell_to_vertex(3,nbr_cells))
87 nbr_vertices_per_cell = 3
101 buffer_lon(1) = 0.0 * yac_rad
102 buffer_lon(2) = -1.0 * yac_rad
103 buffer_lon(3) = 1.0 * yac_rad
104 buffer_lon(4) = 0.0 * yac_rad
105 buffer_lat(1) = 1.0 * yac_rad
106 buffer_lat(2) = 0.0 * yac_rad
107 buffer_lat(3) = 0.0 * yac_rad
108 buffer_lat(4) = -1.0 * yac_rad
111 cell_to_vertex(1,1) = 1
112 cell_to_vertex(2,1) = 2
113 cell_to_vertex(3,1) = 3
114 cell_to_vertex(1,2) = 2
115 cell_to_vertex(2,2) = 4
116 cell_to_vertex(3,2) = 3
123 & nbr_vertices_per_cell, &
133 cell_core_mask(i) = 1
147 buffer_lon(1) = 0.0 * yac_rad
148 buffer_lon(2) = 0.0 * yac_rad
149 buffer_lat(1) = 0.5 * yac_rad
150 buffer_lat(2) = -0.5 * yac_rad
158 & cell_point_ids(igrid) )
160 DEALLOCATE (buffer_lon, buffer_lat, cell_to_vertex)
163 ALLOCATE(cell_mask(nbr_cells))
170 & cell_point_ids(igrid) )
172 DEALLOCATE (cell_mask)
176 field_name(1) =
"atmos_out1"
177 field_name(2) =
"atmos_out2"
178 field_name(3) =
"atmos_out3"
179 field_name(4) =
"atmos_out4"
181 field_name(5) =
"ocean_out1"
182 field_name(6) =
"ocean_out2"
183 field_name(7) =
"ocean_out3"
184 field_name(8) =
"ocean_out4"
186 ALLOCATE(field_id(no_of_fields))
190 DO i = 1, no_of_fields-4
194 & cell_point_ids(2), &
204 DO i = no_of_fields-3, no_of_fields
208 & cell_point_ids(1), &
220 CALL mpi_finalize (ierror)
226 CHARACTER(LEN=max_char_length) :: configFilename
228 CHARACTER(LEN=max_char_length) :: arg
230 LOGICAL :: skip_arg = .false.
232 DO i = 1, command_argument_count()
234 IF (.NOT. skip_arg)
THEN
236 CALL get_command_argument(i, arg)
241 IF (i == command_argument_count())
THEN
242 print
'(2a, /)',
'missing parameter for command-line option: ', arg
243 print
'(a, /)',
'command-line options:'
244 print
'(a)',
' -c configFilename'
247 CALL get_command_argument(i+1, configfilename)
252 print
'(2a, /)',
'unrecognised command-line option: ', arg
253 print
'(a, /)',
'command-line options:'
254 print
'(a)',
' -c configFilename'
Fortran interface for the definition of coupling fields using default masks.
Fortran interface for the definition of grids.
Fortran interface for the definition of points.
Fortran interface for invoking the end of the definition phase.
Fortran interface for the coupler termination.
Fortran interface for getting back a local MPI communicator.
Fortran interface for the reading of configuration files.
Fortran interface for the setting of a grid core masks.
Fortran interface for the setting of grid global ids.
Fortran interface for the setting of default pointset masks.
static void parse_arguments(int argc, char **argv, enum experiment_type *experiment)