3.5.3 Definition of user-defined subdomains

By default, the values of the timeseries quantities 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 user_init. 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:

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:

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_regions1. 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:  $Id: chapter_3.5.3.html 555 2010-09-07 07:32:53Z boeske $