= User interface = PALM offers a flexible interface that allows for adding user-specific calculations and code extensions. Also, the data output of user-defined quantities, such as 2-D/3-D data as well as time series, vertical profiles and spectra can be accomplished in a convenient manner. The implementation of such user-defined code is realized in the form of subroutine calls, which are made at several places in the model code. These subroutines have predefined names. Some of the entry points for the subroutine calls are shown in Fig. 13 in Sect. [wiki:/doc/tec/general general code structure]. Their basic versions are a part of the default model code and labeled as '''''user_*.f90'''''. These basic versions perform no actions and thus act as pure templates. For example, the subroutine '''''user_init.f90''''' reads {{{ #!Latex \begin{verbatim} SUBROUTINE user_init USE control_parameters USE user IMPLICIT NONE ! !-- Here the user defined initialization !-- follow: END SUBROUTINE user_init \end{verbatim} }}} and can be extended according to the needs of the user. By default, quantities in the time series and horizontally averaged vertical profile data output always refer to the total model domain (see also Sect. [wiki:/doc/tec/data data handling]). The user interface, however, allows for defining up to 9 user-defined (horizontal) subdomains for which the output of time series and profiles is automatically added to the output data. Besides the output of profiles and time series for user-defined horizontal domains, PALM offers a~very flexible masked data output, controlled by a set of '''''NAMELIST''''' parameters. This feature allows to output quantities at different mask locations, e.g., 3-D volume data or 2-D cross sections of arbitrary extension within the model domain, 0-D or 1-D data at any positions and of any amount.