Masked data output
TracNav
Data handling/visualization
This feature allows to output quantities at different mask locations, i.e. arbitrary subsets of the total model domain. Subsets can be 3d volumes, 2d cross sections, or even 0d or 1d data at any positions and of any amount.
NetCDF4 parallel I/O is not available for masked data output.
Default quantities (instantaneous and time averaged) are declared with the parameter data_output_masks, user-defined quantities can be output with data_output_masks_user (see also User-defined output quantities).
Terrain-following masked output allows to output masked quantities at a specified height above the surface.
Output steering
The runtime parameters that are listed below steer the output of those quantities that have been set via data_output_masks and/or data_output_masks_user:
mask_x | all x-coordinates of mask locations (in multiples of mask scale) |
mask_y | all y-coordinates of mask locations (in multiples of mask scale) |
mask_z | all z-coordinates of mask locations (in multiples of mask scale) |
mask_x_loop | loop begin, end and stride for x-coordinates of mask locations for masks (in multiples of mask scale) |
mask_y_loop | loop begin, end and stride for y-coordinates of mask locations for masks (in multiples of mask scale) |
mask_z_loop | loop begin, end and stride for z-coordinates of mask locations for masks (in multiples of mask scale) |
mask_k_over_surface | vertical grid index above a surface to use for terrain-following masked output |
These parameters define the masks. Each mask can be steered with a separate set of x-, y- and z-parameters. By default all gridpoints along the respective direction are output.
mask_scale_x | scaling length for masked data output in x-direction |
mask_scale_y | scaling length for masked data output in y-direction |
mask_scale_z | scaling length for masked data output in z-direction |
The scaling lengths can be used to scale the parameters which defines the masks (mask_x, mask_y, mask_z, mask_x_loop, mask_y_loop or mask_z_loop). The scaling lengths apply for all masks.
dt_domask | temporal interval at which instantaneous masked data shall be output (in s) |
skip_time_domask | no output of masked data before this interval has passed (in s) |
The time intervals of the output times for each mask are determined with dt_domask. An individual time interval for output of temporally averaged data can be assigned via parameter dt_data_output_av. The length of the averaging interval is controlled by averaging_interval. So far, no particular parameters are available for steering the time averaged output of each of the masks separately.
An unlimited amount of different masks can be defined. Each mask is output to one separate local file:
Instantaneous data of mask 1 are output to file DATA_MASK_01_NETCDF, time averaged data to file DATA_MASK_01_AV_NETCDF.
Instantaneous data of mask 2 are output to file DATA_MASK_02_NETCDF, time averaged data to file DATA_MASK_02_AV_NETCDF.
Instantaneous data of mask 3 are output to file DATA_MASK_03_NETCDF, time averaged data to file DATA_MASK_03_AV_NETCDF.
...
By default 50 different masks can be assigned. The amount of masks is steered with max_masks (=50 by default), which can only be manually changed in the source code file modules.f90. If more than 50 masks are desired, max_masks has to be changed to the corresponding value.
Examples
The following examples are given for the example_cbl run with a model domain size of 2000m x 2000m x 2000m and a resolution of 50.0m.
- 1. Output of one mask
- 2. Output of two different masks
- 3. Output of three different masks
- 4. Output of three different masks with scaling length
- 5. Output of four different masks with user-defined quantities
- 6. Output of terrain-following mask
1. Output of one mask
Mask 1: 3d volume data with an extension of 500m x 200m x 2000m from x = 0m to x = 500m, from y = 800m to y = 1000m and from the bottom to the top of the model domain. Output of instantaneous data of the three wind components.
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'u','v','w', mask_x_loop(1,:) = 0., 500. ,50. , mask_y_loop(1,:) = 800., 1000., 50. ,/
If mask_x, mask_y, mask_z or mask_x_loop, mask_y_loop, mask_z_loop are not set, all gridpoints along the corresponding direction are output.
Output is done at time intervals given by dt_data_output, as dt_domask has not been set in this example.
2. Output of two different masks
Mask 1: xy cross section from x = 500m to x = 1000m and from y = 1000m to 2000m at heights 0m, 50m, 100m, 500m, 1000m and 1200m. Output of instantaneous and time averaged data of the three wind components.
Mask 2: Every second gridpoint in all directions. Output of instantaneous data of the potential temperature.
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'u','v','w','u_av','v_av','w_av', data_output_masks(2,:) = 'theta', mask_x_loop(1,:) = 500.,1000.,50. , mask_y_loop(1,:) = 1000.,2000.,50. , mask_z(1,:) = 0.,50.,100.,500.,1000.,1200., mask_x_loop(2,:) = 0.,2000.,100., mask_y_loop(2,:) = 0.,2000.,100., mask_z_loop(2,:) = 0.,2000.,100., dt_domask = 600.,1800., skip_time_domask = 3600.,3600.,/
Output starts after 1h simulated time (see skip_time_domask) for both masks and is done every 10 minutes for mask 1 and every 30 minutes for mask 2 (see dt_domask).
3. Output of three different masks
Mask 1: 1d data along x-direction at y = 50m, 200m, 500m and 1000m and every fifth grid point in z-dircetion. Output of instantaneous data of the w-velocity component.
Mask 2: Output of the potential temperature at position x = 0m, y = 500m, z = 200m, 300m and 400m.
Mask 3: xz cross section at y = 400m, 450m, 600m. Output of time averaged data of the three wind components.
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'w', data_output_masks(2,:) = 'theta', data_output_masks(3,:) = 'u_av','v_av','w_av', mask_y(1,:) = 50., 200., 500., 1000., mask_z_loop(1,:) = 0.,2000.,250., mask_x(2,:) = 0., mask_y(2,:) = 500., mask_z_loop(2,:) = 200.,400.,100., mask_y(3,:) = 400., 450., 600., dt_domask = 1800., skip_time_domask = 0.,3600.,3600.,/
Output starts from the beginning for mask 1 and after 1h simulated time (see skip_time_domask) for mask 2 and 3. It is done every 30 minutes for mask 1 and at time intervals of dt_data_output for mask 2 and 3 (see dt_domask).
4. Output of three different masks with scaling length
Mask 1, 2 and 3 as in example 3
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'w', data_output_masks(2,:) = 'theta', data_output_masks(3,:) = 'u_av','v_av','w_av', mask_scale_x = 10.0, mask_scale_y = 10.0, mask_y(1,:) = 5., 20., 50., 100., mask_z_loop(1,:) = 0.,2000.,250., mask_x(2,:) = 0., mask_y(2,:) = 50., mask_z_loop(2,:) = 200.,400.,100., mask_y(3,:) = 40., 45., 60., dt_domask = 1800., skip_time_domask = 0.,3600.,3600.,/
Output starts from the beginning for mask 1 and after 1h simulated time (see skip_time_domask) for mask 2 and 3. It is done every 30 minutes for mask 1 and at time intervals of dt_data_output for mask 2 and 3 (see dt_domask).
Since mask_scale_x and mask_scale_y are assigned, the parameters for steering the mask locations along x- and y-direction (here mask_x and mask_y) has to be given in multiples of mask_scale_x and mask_scale_y.
5. Output of four different masks with user-defined quantities
Mask 1: 1d data along x-direction at y = 50m, 200m, 500m and 1000m and every fifth grid point in z-dircetion. Output of instantaneous data of the w-velocity component.
Mask 2: Output of the potential temperature at position x = 0m, y = 500m, z = 200m, 300m and 400m.
Mask 3: xz cross section at y = 400m, 450m, 600m. Output of time averaged data of the three wind components and the user-defined quantity u2.
Mask 4: xy cross section at z = 100m, 250m, 500m. Output of the user-defined quantity u2.
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'w', data_output_masks(2,:) = 'theta', data_output_masks(3,:) = 'u_av','v_av','w_av', mask_y(1,:) = 50., 200., 500., 1000., mask_z_loop(1,:) = 0.,2000.,250., mask_x(2,:) = 0., mask_y(2,:) = 500., mask_z_loop(2,:) = 200.,400.,100., mask_y(3,:) = 400., 450., 600., mask_z(4,:) = 100., 250., 500., dt_domask = 1800., skip_time_domask = 0.,3600.,3600.,/ &user_parameters data_output_masks_user(3,:) = 'u2', data_output_masks_user(4,:) = 'u2',
Output starts from the beginning for mask 1 and after 1h simulated time (see skip_time_domask) for mask 2, 3 and 4. It is done every 30 minutes for mask 1 and at time intervals of dt_data_output for mask 2, 3 and 4 (see dt_domask).
6. Output of terrain-following mask
Mask 1: xy cross section from x = 500m to x = 1000m and from y = 1000m to 2000m at the second, fith and tenth grid point above the surface. Output of instantaneous and time averaged data of the three wind components.
&initialization_parameters nx = 39, ny = 39, nz = 40, dx = 50.0, dy = 50.0, dz = 50.0, .../ &runtime_parameters ... data_output_masks(1,:) = 'u','v','w','u_av','v_av','w_av', mask_x_loop(1,:) = 500.,1000.,50. , mask_y_loop(1,:) = 1000.,2000.,50. , mask_k_over_surface(1,:) = 2, 5, 10, dt_domask = 600., skip_time_domask = 3600.,/
Output starts after 1h simulated time (see skip_time_domask) for both masks and is done every 10 minutes for mask 1 and every 30 minutes for mask 2 (see dt_domask).