By default, the values of the time series (saved in local file PLOTTS_DATA) and the horizontally averaged vertical profiles (saved in local files PLOT1D_DATA and LIST_PROFIL) always refer to the total model domain. Independently, up to 9 time series or profiles for different user-defined subdomains can be computed and plotted additionally. Steering in principle is done via the initialization parameter statistic_regions.
The exact definition of these subdomains has to be made by the user within the user-defined subroutine init_user. The subdomains are defined with a mask array named rmask, which has to be given the value 1.0 for all horizontal grid points belonging to the user-defined subdomain and the value 0.0, where grid points do not belong to the user-defined subdomain. In the model rmask is declared as:
REAL :: rmask (nys-1:nyn+1,nxl-1,nxr+1,0:9) .
The first two indices are the grid point indices in y and x-direction. With parallel model runs nxl, nxr, nys and nyn are the array bounds of the respective subdomain (don't confuse this with the user-defined subdomain!) on the respective processor. With runs on one processor nys = nxl = 0 and nxr = nx and nyn = ny. The third index determines the user-defined subdomain. The total model domain carries the index 0, the user-defined subdomains have the values 1 to 9.
The following example should illustrate this. Two subdomains are defined by the user. The first is determined by all grid points which lie within a circle whose center is equal to the (horizontal) center of the model domain and whose diameter is equal to half of the total horizontal domain size (square total domain assumed). The second subdomain should be defined by all points outside of this domain. This may be obtained by the following lines of code in user_init:
USE
grid_variables
USE indices
USE statistics
.
.
.
disc_center_x = dx * (nx + 1)/2
disc_center_y = dy * (ny + 1)/2
disc_radius = 0.5 * disc_center_x
DO i = nxl-1, nxr+1
x = i * dx
DO j = nys-1, nyn+1
y = j * dy
radial_distance = SQRT( ( x - disc_center_x )**2 + &
( y - disc_center_y )**2 )
IF ( radial_distance
> disc_radius ) THEN
rmask(j,i,1) = 0.0
rmask(j,i,2) = 1.0
ELSE
rmask(j,i,1) = 1.0
rmask(j,i,2) = 0.0
ENDIF
ENDDO
ENDDO
The module statistics must be used,
because it contains rmask
and the modules grid_variables
and indices are
necessary in this example, because grid spacing and indices are used.
All array elements of rmask
(rmask(:,:,:)) are preset
by the model with 1.0. In no case this assignment must be
changed for the total domain (rmask(:,:,0))!
Computations and output for the user-defined subdomains only take place
if
the user sets statistic_regions
≥ 1. Beyond that, names for the user-defined subdomains can be
assigned
via the initialization parameter region.
Output of the names of the selected user-defined subdomains happens in
the local files HEADER
and RUN_CONTROL
within the user-defined subroutine user_header.
Last change: 15/04/05 (SR)