Index: /palm/trunk/DOC/app/chapter_3.5.1.html
===================================================================
--- /palm/trunk/DOC/app/chapter_3.5.1.html	(revision 211)
+++ /palm/trunk/DOC/app/chapter_3.5.1.html	(revision 212)
@@ -13,12 +13,13 @@
 the
 names and possible arguments of the subroutines involved as well as
-actions which can be accomplished in these subroutines. <br>
+actions which can be accomplished in these subroutines. The respective
+name of a source code files is the&nbsp;subroutine name followed by "<span style="font-family: Courier New,Courier,monospace;">.f90</span>". Exception: the file containing the module<span style="font-family: Courier New,Courier,monospace;"> user </span>has the name <span style="font-family: Courier New,Courier,monospace;">user_module.f90</span>.<br>
 &nbsp; </p>
 <table style="width: 100%;" border="1" cellpadding="2" cellspacing="4"> <col width="211"> <col width="117"> <col width="862"> <tbody> <tr><td width="211"> <p><font size="4"><b>Call
 location</b></font></p> </td> <td width="117"> <p><font size="4"><b>Subroutine
 name and
-argument</b></font></p> </td> <td style="width: 862px;"> <p><font size="4"><b>Possible
-actions</b></font></p> </td> </tr> <tr><td>---</td><td><span style="font-family: monospace;"><a name="user"></a>MODULE
-user</span></td><td>All
+argument(s)</b></font></p> </td> <td style="width: 862px;"> <p><font size="4"><b>Possible
+actions</b></font></p> </td> </tr> <tr><td style="vertical-align: top;">---</td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user"></a>MODULE
+user</span></td><td style="vertical-align: top;">All
 user-defined variables which are used outside the respective local
 scopes of the user-defined subroutines have to be declared here.</td></tr><tr valign="top"> <td width="211"> <p>End
@@ -81,8 +82,11 @@
 within the category &ldquo;initialisation&rdquo;.</p><p>See
 also <tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a href="#user_init_3d_model">user_init_3d_model</a>.</font></font></tt></p>
-</td> </tr> <tr><td><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
+</td> </tr> <tr><td style="vertical-align: top;">End of <span style="font-family: Courier New,Courier,monospace;">read_3d_binary.f90</span></td><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_read_restart_data"></a>user_read_<br>restart_data( nxlc, nxlf,nxl_on_file, nxrc, nxrf, nxr_on_file, nync, nynf,nyn_on_file, nysc, nysf, nys_on_file, tmp_2d, tmp_3d )</font></font></tt></td><td style="vertical-align: top;">Reading of user-defined 2d- and 3d-arrays from the restart file.<br><br>In
+case of restart runs, user-defined quantities may have to be read from
+the restart file generated by the previous run. These quantities must
+have been output by the user in the previous run using routine <a href="#user_last_actions"><span style="font-family: Courier New,Courier,monospace;">user_last_actions</span></a>.<br><br>For usage, see example contained in <span style="font-family: Courier New,Courier,monospace;">read_3d_binary.f90</span> and <span style="font-family: Courier New,Courier,monospace;">user_last_actions.f90</span>.</td></tr><tr><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
 case of <tt><font style="font-size: 10pt;" size="2">SELECT
 CASE( TRIM(canopy_mode) ) </font></tt>command in the
-middle&nbsp;of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td><a name="user_init_plant_canopy"></a><code>user_init_plant_canopy</code></td><td>User-defined initilisation of the plant canopy model.<br><br>Here, the user can define the two three-dimensional arrays <code>lad_s and cdc </code>that
+middle&nbsp;of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td style="vertical-align: top;"><a name="user_init_plant_canopy"></a><code>user_init_plant_canopy</code></td><td style="vertical-align: top;">User-defined initilisation of the plant canopy model.<br><br>Here, the user can define the two three-dimensional arrays <code>lad_s and cdc </code>that
 stand for the leaf area density and the canopy drag coefficient. By
 this, the user can configure a&nbsp;plant canopy. This requires
@@ -206,5 +210,5 @@
 in the CASE
 structure of <tt><font style="font-size: 10pt;" size="2">user_actions_ij</font></tt>!</p> </td>
-</tr> <tr><td style="vertical-align: top;"><code>SUBROUTINE preprocess_spectra</code> in <code>calc_spectra.f90</code>, and <code>data_output_spectra.f90</code></td><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_spectra"></a>user_spectra</font></font></tt></td><td style="vertical-align: top;"><p><a href="chapter_3.5.4.html#spectra">Spectra of user-defined
+</tr> <tr><td style="vertical-align: top;"><code>SUBROUTINE preprocess_spectra</code> in <code>calc_spectra.f90</code>, and <code>data_output_spectra.f90</code></td><td style="vertical-align: top;"><p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_spectra"></a>user_spectra</font></font></tt></p></td><td style="vertical-align: top;"><p><a href="chapter_3.5.4.html#spectra">Spectra of user-defined
 quantities</a> can be computed here.</p>The
 routine contains some simple examples (as comment lines) in order to
@@ -224,5 +228,5 @@
 profiles
 are further processed (e.g. temporally averaged), like the standard profiles, in <tt><font style="font-size: 10pt;" size="2">flow_statistics</font></tt>.</p> </td>
-</tr> <tr><td style="vertical-align: top;">End
+</tr> <tr><td style="vertical-align: top;">Middle of <span style="font-family: Courier New,Courier,monospace;">advec_particles.f90</span>, after particle reflection from walls.</td><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_advec_particles"></a>user_advec_<br>particles</font></font></tt></td><td style="vertical-align: top;">User-defined actions after the calculation of the new particle position.</td></tr><tr><td style="vertical-align: top;">End
 of <span style="font-family: monospace;">check_parameters.f90</span>
 where 2d/3d output quantities are checked</td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_check_data_output"></a>user_check_data_<br>output(
@@ -318,5 +322,5 @@
 creating user-defined output quantities.</td></tr><tr valign="top"> <td width="211"> <p>End
 of <tt><font style="font-size: 10pt;" size="2">palm.f90</font></tt></p>
-</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_last_action"></a>user_last_</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">action</font></font></tt></p>
+</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_last_action"></a>user_last_</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">actions</font></font></tt></p>
 </td> <td width="862"> <p>User-defined
 actions which are to be executed at the end
@@ -332,5 +336,5 @@
 within the category &ldquo;last actions&rdquo; (the time
 necessary for <tt><font style="font-size: 10pt;" size="2">close_files</font></tt> is included).</p>
-</td> </tr> </tbody></table><hr>
+</td> </tr><tr><td style="vertical-align: top;">Not called in the default PALM code</td><td style="vertical-align: top;"><p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_additional_routines"></a>user_additional_</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><span style="font-family: Cumberland,monospace;">routines</span></p></td><td style="vertical-align: top;">This routine may contain additional routines defined by the user to be called from other user interface routines.</td></tr> </tbody></table><hr>
 <p style="line-height: 100%;"><br><font color="#000080"><font color="#000080"><a href="chapter_3.5.html"><font color="#000080"><img src="left.gif" name="Grafik1" align="bottom" border="2" height="32" width="32"></font></a><a href="index.html"><font color="#000080"><img src="up.gif" name="Grafik2" align="bottom" border="2" height="32" width="32"></font></a><a href="chapter_3.5.2.html"><font color="#000080"><img src="right.gif" name="Grafik3" align="bottom" border="2" height="32" width="32"></font></a></font></font></p><p style="line-height: 100%;"><i>Last
 change: </i>$Id$</p>
Index: /palm/trunk/DOC/app/chapter_3.5.2.html
===================================================================
--- /palm/trunk/DOC/app/chapter_3.5.2.html	(revision 211)
+++ /palm/trunk/DOC/app/chapter_3.5.2.html	(revision 212)
@@ -1,6 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html><head>
-<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM
-chapter 3.5.2</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;13321506"> <meta name="CHANGED" content="20041112;14455666"> <meta name="KEYWORDS" content="parallel LES model"> <style>
+<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.5.2</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;13321506"> <meta name="CHANGED" content="20041112;14455666"> <meta name="KEYWORDS" content="parallel LES model"> <style>
 <!--
 @page { size: 21cm 29.7cm }
@@ -16,5 +15,5 @@
 parameters. The declaration of user-defined parameters takes place in
 the user-defined module <tt><font style="font-size: 10pt;" size="2">user</font></tt>
-(located at the beginning of the file <tt><font style="font-size: 10pt;" size="2">user_interface.f90</font></tt>).
+(file <tt><font style="font-size: 10pt;" size="2">user_module.f90</font></tt>).
 This module must be declared in all relevant user-defined routines via
 a USE statement, in order to make the parameters available. </p>
Index: /palm/trunk/DOC/app/chapter_3.5.4.html
===================================================================
--- /palm/trunk/DOC/app/chapter_3.5.4.html	(revision 211)
+++ /palm/trunk/DOC/app/chapter_3.5.4.html	(revision 212)
@@ -27,5 +27,5 @@
 following five parts of&nbsp;this chapter explains step-by-step how
 to modify/extend the
-default file user_interface.f90 in order to generate the respective
+respective default user interface subroutines in order to generate the respective
 output:<br><ol><li>(horizontally averaged) <a href="chapter_3.5.4.html#vertical_profiles">vertical profiles</a>,&nbsp;</li><li><a href="chapter_3.5.4.html#time_series">time series</a>,&nbsp;</li><li><a href="chapter_3.5.4.html#2D_and_3D">2d cross
 section</a> or <a href="chapter_3.5.4.html#2D_and_3D">3d
@@ -305,6 +305,17 @@
 'u2_av&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 ';&nbsp; WRITE ( 14 )&nbsp; u2_av</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
-ENDIF</span><br><br>Otherwise, the calculated
-time-average may be wrong.</li></ol><br><h4><a name="dvrp"></a>4. Output of user-defined DVRP objects</h4>This
+ENDIF</span><br><br>Otherwise,
+the calculated
+time-average may be wrong. In the restart run, this quantity has to be
+read from the restart file by including the following code in
+subroutine <a href="chapter_3.5.1.html#user_read_restart_data"><span style="font-family: monospace;">user_read_restart_data</span></a>:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; IF ( initializing_actions == 'read_restart_data' )&nbsp; THEN<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; READ ( 13 )&nbsp; field_char<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO&nbsp; WHILE ( TRIM( field_char ) /= '*** end user ***' )<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT CASE ( TRIM( field_char ) )<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CASE ( 'u2_av' )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF ( .NOT. ALLOCATED( u2_av ) ) THEN<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDIF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; READ ( 13 )&nbsp; tmp_3d<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+u2_av(:,nysc-1:nync+1,nxlc-1:nxrc+1) = &amp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+tmp_3d(:,nysf-1:nynf+1,nxlf-1:nxrf+1)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CASE DEFAULT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+PRINT*, '+++ user_init: unknown variable named "', &amp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+TRIM( field_char ), '" found in'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+PRINT*,
+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+data from prior run on PE ', myid<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CALL local_stop<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END SELECT<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; READ ( 13 )&nbsp; field_char<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDDO<br>&nbsp;&nbsp;&nbsp; ENDIF<br></span></li></ol><h4><a name="dvrp"></a>4. Output of user-defined DVRP objects</h4>This
 example shows the output of the
 quantity "square of the u-component", <span style="font-style: italic;">u<sup>2</sup></span>.
Index: /palm/trunk/DOC/app/chapter_3.5.5.html
===================================================================
--- /palm/trunk/DOC/app/chapter_3.5.5.html	(revision 211)
+++ /palm/trunk/DOC/app/chapter_3.5.5.html	(revision 212)
@@ -1,6 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html><head>
-<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM
-chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <meta name="KEYWORDS" content="parallel LES model"> <style>
+<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <meta name="KEYWORDS" content="parallel LES model"> <style>
 <!--
 @page { size: 21cm 29.7cm }
@@ -12,23 +11,23 @@
 </font></h3><p style="line-height: 100%;">Users
 can add their own (modified) user-interface to a PALM-run by carrying
-out the following steps:</p><ol><li>Copy the default
-(empty) user-interface (file<span style="font-family: Courier New,Courier,monospace;">
-user_interface.f90</span>) to a directory of your choice, e.g.:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
+out the following steps:</p><ol><li>Copy the appropriate default
+(empty) user-interface&nbsp;files<span style="font-family: Courier New,Courier,monospace;">
+user_***.f90</span> to a directory of your choice, e.g.:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
 &nbsp;cd ~/palm/current_version</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;">&nbsp;
 &nbsp;mkdir -p USER_CODE/example</span><br style="font-family: Courier New,Courier,monospace;"><span style="font-family: Courier New,Courier,monospace;">&nbsp;
-&nbsp;cp trunk/SOURCE/user_interface.f90&nbsp;
-USER_CODE/example/user_example.f90</span><br></li><li>Set
+&nbsp;cp trunk/SOURCE/user_***.f90&nbsp;
+USER_CODE/example<br><br><span style="font-family: Times New Roman,Times,serif; font-weight: bold;">Attention: do not change the filenames!</span><br></span><br></li><li>Set
 an additional path in the configuration file<span style="font-family: Courier New,Courier,monospace;">
 .mrun.config </span>to allow <span style="font-weight: bold;">mrun
-</span>to find and include this file:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
+</span>to find and include these files:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
 &nbsp;%add_source_path&nbsp;&nbsp;
 $base_directory/USER_CODE/$fname</span><br><br>The
 default configuration file (<span style="font-family: Courier New,Courier,monospace;">trunk/SCRIPTS/.mrun.config.default</span>)
-already includes this setting.</li><li>Modify the interface
-routines according to your needs.</li><li>Start a PALM run
+already includes this setting.<br></li><li>Modify the interface
+routines according to your needs.<br></li><li>Start a PALM run
 by executing<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp;
-&nbsp;mrun -d example ...</span><br><br>The file<span style="font-family: Courier New,Courier,monospace;">
-user_example.f90 </span>will be automatically compiled within
-the job and will replace PALM&lsquo;s default user-interface.<br></li></ol>The
+&nbsp;mrun -d example ...</span><br><br>The files<span style="font-family: Courier New,Courier,monospace;">
+user_***.f90 </span>will be automatically compiled within
+the job and will replace the respective PALM&lsquo;s default user-interface routines.<br></li></ol>The
 above method with including<span style="font-family: Courier New,Courier,monospace;"> $fname </span>in
 the additional source path allows to use different user-interfaces for
@@ -39,6 +38,11 @@
 &ldquo;<span style="font-family: Courier New,Courier,monospace;">-d
 abcd</span>&ldquo;, &ldquo;<span style="font-family: Courier New,Courier,monospace;">-d cdef</span>&ldquo;,
-etc.<br><br><span style="font-weight: bold;">The
-modified user-interface file cannot be pre-compiled by using mbuild!</span><br><br>While
+etc.<br><br>If the user wants to add additional routines, he/she can a) put them into the default user-interface file <span style="font-family: Courier New,Courier,monospace;">user_additional_routines.f90</span>
+or b) can create new files in the additional source directory. These
+files must have names different from the default PALM source code
+files. In case of b), the user must also copy the default makefile into
+the additional source directory:<br><br><span style="font-family: Courier New,Courier,monospace;">&nbsp; &nbsp;cp trunk/SOURCE/Makefile&nbsp;
+USER_CODE/example</span><br><br>The makefile must be modified appropriately followinf the "make"-rules in order to allow the new files to be compiled.<br><br><span style="font-weight: bold;">The
+modified user-interface files cannot be pre-compiled by using mbuild!</span><br><br>While
 programming user-defined code,
 errors are frequently made. Possible ways of error
Index: /palm/trunk/DOC/app/chapter_3.5.html
===================================================================
--- /palm/trunk/DOC/app/chapter_3.5.html	(revision 211)
+++ /palm/trunk/DOC/app/chapter_3.5.html	(revision 212)
@@ -16,8 +16,7 @@
 2.0</a> and the technical documentation are usually not
 sufficient
-and must be supplemented by the rigorous study of the source code of
-the model. Programming experiences with FORTRAN95 and if necessary
+and must be supplemented by a rigorous study of the model's source code. Programming experiences with FORTRAN95 and if necessary
 experiences with the parallelization tool MPI are absolutely
-neccessary! </p>
+necessary! </p>
 <p style="line-height: 100%;">Changes of the standard
 model code by the
@@ -43,6 +42,6 @@
 pre-defined names, which must not be changed by the user. Their basic
 versions are a component of the standard model
-code and they are all included in the source code file
-<tt><font style="font-size: 10pt;" size="2">user_interface.f90</font></tt><font style="font-size: 10pt;" size="2">.</font>
+code and can be found in the source code files
+<tt><font style="font-size: 10pt;" size="2">user_***.f90</font></tt><font style="font-size: 10pt;" size="2">.</font>
 <font color="#000000">The</font> basic versions
 accomplish nearly no
@@ -50,5 +49,5 @@
 user as required. Actions which are already accomplished in these
 basic versions by default should not be changed. Here is an example
-of such a basic version: </p>
+of such a basic version (file <span style="font-family: Courier New,Courier,monospace;">user_init.f90</span>): </p>
 <p style="line-height: 100%;">&nbsp; </p>
 <pre style="line-height: 100%;"><font color="#000000"><font style="font-size: 10pt;" size="2">SUBROUTINE user_init</font></font><br><br><font color="#000000"><font style="font-size: 10pt;" size="2">!------------------------------------------------------------------------------</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">!</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">!</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">! Description:</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">! -----------</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">! Execution of user-defined initializing actions</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">!------------------------------------------------------------------------------</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">!</font></font><br><br><font color="#000000"> <font style="font-size: 10pt;" size="2">USE control_parameters</font></font><br><font color="#000000"> <font style="font-size: 10pt;" size="2">USE user</font></font><br><br><font color="#000000"> <font style="font-size: 10pt;" size="2">IMPLICIT NONE</font></font><br><br><font color="#000000"><font style="font-size: 10pt;" size="2">!</font></font><br><font color="#000000"><font style="font-size: 10pt;" size="2">!-- Here the user defined initializing actions follow:</font></font><br><br><br><font color="#000000"><font style="font-size: 10pt;" size="2">END SUBROUTINE user_init</font></font></pre><p style="line-height: 100%;">The communication (handling of
@@ -67,9 +66,8 @@
 appears in the example
 above. This is a
-user-defined module (it is located at
-the beginning of the file <tt><font style="font-size: 10pt;" size="2">user_interface.f90</font></tt>)
+user-defined module (it can be found in file <tt><font style="font-size: 10pt;" size="2">user_module.f90</font></tt>)
 and can be used for communication between the user-defined routines. In
 this module own variables can be declared as desired. It
-is not used outside of the user code. </p>
+is not used (and should not be used!) outside of the user code. </p>
 <p style="line-height: 100%;">A very typical request of
 users is the
@@ -79,10 +77,7 @@
 for calculating and output of such quantities (see <a href="chapter_3.5.4.html">3.5.4</a>).</p><p style="line-height: 100%;">As already mentioned, the
 contents of
-the file <tt><font style="font-size: 10pt;" size="2">user_interface.f90</font></tt>
-can be used as a basis for extensions. However the file should not be
-manipulated directly (it is anyway write protected by default), but it
-should be
-copied to another file. User write permits for this new file must be
-declared by means of the unix command <tt><font style="font-size: 10pt;" size="2">chmod</font></tt>.
+the files <tt><font style="font-size: 10pt;" size="2">user_***.f90</font></tt>
+can be used as a basis for extensions. However these files should not be
+manipulated directly. Instead, a copy should be used.
 </p>
 <p style="line-height: 100%;">The following sections
Index: /palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 211)
+++ /palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 212)
@@ -42,3 +42,5 @@
 dwdy, dvdx and dwdx. (production_e)
 
-combine_plot_fields, header, production_e
+Bugfix in calculating k index in case of oceans runs. (sort_particles)
+
+advec_particles, combine_plot_fields, header, production_e
Index: /palm/trunk/SOURCE/advec_particles.f90
===================================================================
--- /palm/trunk/SOURCE/advec_particles.f90	(revision 211)
+++ /palm/trunk/SOURCE/advec_particles.f90	(revision 212)
@@ -4,4 +4,5 @@
 ! Actual revisions:
 ! -----------------
+! Bugfix in calculating k index in case of oceans runs (sort_particles)
 ! TEST: PRINT statements on unit 9 (commented out)
 !
@@ -1875,5 +1876,5 @@
 
 !
-!--    User-defined actions after the evaluation of the new particle position
+!--    User-defined actions after the calculation of the new particle position
        CALL user_advec_particles
 
@@ -3890,5 +3891,5 @@
        i = ( particles(n)%x + 0.5 * dx ) * ddx
        j = ( particles(n)%y + 0.5 * dy ) * ddy
-       k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1
+       k = particles(n)%z / dz + 1 + offset_ocean_nzt
            ! only exact if equidistant
 
@@ -3925,5 +3926,5 @@
        i = ( particles(n)%x + 0.5 * dx ) * ddx
        j = ( particles(n)%y + 0.5 * dy ) * ddy
-       k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1
+       k = particles(n)%z / dz + 1 + offset_ocean_nzt
            ! only exact if equidistant
 
