= Masked data output = [[TracNav(doc/app/datatoc|nocollapse)]] 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--data_output_masks data_output_masks], user-defined quantities can be output with [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#user_parameters--data_output_masks_user data_output_masks_user] (see also [[../userint/output|User-defined output quantities]]).\\\\ Terrain-following masked output allows to output masked quantities at a specified height above the surface. == Output steering == The [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime-parameters runtime parameters] that are listed below steer the output of those quantities that have been set via [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--data_output_masks data_output_masks] and/or [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#user_parameters--data_output_masks_user data_output_masks_user]:[=#list] \\\\ ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_x mask_x] ||all x-coordinates of mask locations (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_y mask_y] ||all y-coordinates of mask locations (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_z mask_z] ||all z-coordinates of mask locations (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_x_loop mask_x_loop] ||loop begin, end and stride for x-coordinates of mask locations for masks (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_y_loop mask_y_loop] ||loop begin, end and stride for y-coordinates of mask locations for masks (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_z_loop mask_z_loop] ||loop begin, end and stride for z-coordinates of mask locations for masks (in multiples of mask scale) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_k_over_surface 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. \\\\ ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_x mask_scale_x] ||scaling length for masked data output in x-direction || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_y mask_scale_y] ||scaling length for masked data output in y-direction || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_z 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. \\\\ ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask dt_domask] ||temporal interval at which instantaneous masked data shall be output (in s) || ||[https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_data_output_av dt_data_output_av]. The length of the averaging interval is controlled by [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--averaging_interval 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 [../iofiles#DATA_MASK_01_NETCDF DATA_MASK_01_NETCDF], time averaged data to file [../iofiles#DATA_MASK_01_AV_NETCDF DATA_MASK_01_AV_NETCDF].\\ Instantaneous data of '''mask 2''' are output to file [../iofiles#DATA_MASK_02_NETCDF DATA_MASK_02_NETCDF], time averaged data to file [../iofiles#DATA_MASK_02_AV_NETCDF DATA_MASK_02_AV_NETCDF].\\ Instantaneous data of '''mask 3''' are output to file [../iofiles#DATA_MASK_02_NETCDF DATA_MASK_03_NETCDF], time averaged data to file [../iofiles#DATA_MASK_02_AV_NETCDF 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 [../examples/cbl example_cbl run] with a model domain size of 2000m x 2000m x 2000m and a resolution of 50.0m. * [#a1.Outputofonemask 1. Output of one mask] * [#a2.Outputoftwodifferentmasks 2. Output of two different masks] * [#a3.Outputofthreedifferentmasks 3. Output of three different masks] * [#a4.Outputofthreedifferentmaskswithscalinglength 4. Output of three different masks with scaling length] * [#a5.Outputoffourdifferentmaskswithuser-definedquantities 5. Output of four different masks with user-defined quantities] * [#a6.Outputofterrain-followingmask 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_x mask_x], [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_y mask_y], [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_z mask_z] or [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_x_loop mask_x_loop], [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_y_loop mask_y_loop], [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_z_loop mask_z_loop] are not set, all gridpoints along the corresponding direction are output.\\ Output is done at time intervals given by [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_data_output dt_data_output], as [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask skip_time_domask]) for both masks and is done every 10 minutes for '''mask 1''' and every 30 minutes for '''mask 2''' (see [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask dt_domask]). \\\\ === [=#E3]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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask skip_time_domask]) for '''mask 2''' and '''3'''. It is done every 30 minutes for '''mask 1''' and at time intervals of [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_data_output dt_data_output] for '''mask 2''' and '''3''' (see [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask dt_domask]). \\\\ === 4. Output of three different masks with scaling length=== '''Mask 1''', '''2''' and '''3''' as in [#E3 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask skip_time_domask]) for '''mask 2''' and '''3'''. It is done every 30 minutes for '''mask 1''' and at time intervals of [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_data_output dt_data_output] for '''mask 2''' and '''3''' (see [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask dt_domask]).\\\\ Since [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_x mask_scale_x] and [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_y mask_scale_y] are assigned, the parameters for steering the mask locations along x- and y-direction (here [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_x mask_x] and [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_y mask_y]) has to be given in multiples of [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_x mask_scale_x] and [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--mask_scale_y 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask skip_time_domask]) for '''mask 2, 3''' and '''4'''. It is done every 30 minutes for '''mask 1''' and at time intervals of [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_data_output dt_data_output] for '''mask 2, 3''' and '''4''' (see [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask 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 [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--skip_time_domask skip_time_domask]) for both masks and is done every 10 minutes for '''mask 1''' and every 30 minutes for '''mask 2''' (see [https://docs.palm-model.org/latest/Reference/LES_Model/Namelists/#runtime_parameters--dt_domask dt_domask]).