3 | | 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. |
4 | | |
5 | | 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: |
| 3 | By default, the values of the timeseries quantities and the horizontally averaged vertical profiles (saved in local files [../../iofiles#PLOT1D_DATA PLOT1D_DATA] and [../../iofiles#LIST_PROFIL 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 [../../inipar#statistic_regions statistic_regions].\\\\ |
| 4 | 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: |
13 | | USE grid_variables |
14 | | USE indices |
15 | | USE statistics |
16 | | . |
17 | | . |
18 | | . |
19 | | disc_center_x = dx * (nx + 1)/2 |
20 | | disc_center_y = dy * (ny + 1)/2 |
21 | | disc_radius = 0.5 * disc_center_x |
22 | | DO i = nxl-1, nxr+1 |
23 | | x = i * dx |
24 | | DO j = nys-1, nyn+1 |
25 | | y = j * dy |
26 | | radial_distance = SQRT( ( x - disc_center_x )**2 + & |
27 | | ( y - disc_center_y )**2 ) |
28 | | IF ( radial_distance > disc_radius ) THEN |
29 | | rmask(j,i,1) = 0.0 |
30 | | rmask(j,i,2) = 1.0 |
31 | | ELSE |
32 | | rmask(j,i,1) = 1.0 |
33 | | rmask(j,i,2) = 0.0 |
34 | | ENDIF |
35 | | ENDDO |
| 11 | USE grid_variables |
| 12 | USE indices |
| 13 | USE statistics |
| 14 | . |
| 15 | . |
| 16 | . |
| 17 | disc_center_x = dx * (nx + 1)/2 |
| 18 | disc_center_y = dy * (ny + 1)/2 |
| 19 | disc_radius = 0.5 * disc_center_x |
| 20 | DO i = nxl-1, nxr+1 |
| 21 | x = i * dx |
| 22 | DO j = nys-1, nyn+1 |
| 23 | y = j * dy |
| 24 | radial_distance = SQRT( ( x - disc_center_x )**2 + & |
| 25 | ( y - disc_center_y )**2 ) |
| 26 | IF ( radial_distance > disc_radius ) THEN |
| 27 | rmask(j,i,1) = 0.0 |
| 28 | rmask(j,i,2) = 1.0 |
| 29 | ELSE |
| 30 | rmask(j,i,1) = 1.0 |
| 31 | rmask(j,i,2) = 0.0 |
| 32 | ENDIF |
38 | | 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 [../../inipar#statistic_regions statistic_regions] ≥ ''1''. Beyond that, names for the user-defined subdomains can be assigned via the initialization parameter [../../userpar#region region]. Output of the names of the selected user-defined subdomains happens in the local files [../../iofiles#HEADER HEADER] and [../../iofiles#RUN_CONTROL RUN_CONTROL] within the user-defined subroutine [../int#user_header user_header]. |
| 36 | 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 [../../inipar#statistic_regions statistic_regions] ≥ ''1''. Beyond that, names for the user-defined subdomains can be assigned via the initialization parameter [../../userpar#region region]. Output of the names of the selected user-defined subdomains happens in the local files [../../iofiles#HEADER HEADER] and [../../iofiles#RUN_CONTROL RUN_CONTROL] within the user-defined subroutine [../int#user_header user_header]. |