Version 5 (modified by suehring, 14 years ago) (diff) |
---|
Programming user-defined code extensions usually requires exact knowledge of the internal structure of PALM. Appropriate explanations in chapter 2.0? and the technical documentation are usually not sufficient 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 necessary\\
Changes of the standard model code by the user should be avoided whenever possible and are reserved to the developer-group of PALM. The corrections, revisions and extensions of the model accomplished by this group are published in the technical/numerical documentation and the accordingly updated source files are accessible to the users (see chapter 5.1?).
However, the user frequently may feel the need to make extensions of the model code for his/her own simulations. For this purpose, a set of interfaces is available, which can be used to add user-defined code to the model. This chapter describes the programming of such user-defined code extensions.
The integration of user-defined code occurs in the form of subroutine calls, which are made at a set of places in the model code, by default. These subroutines have pre-defined names, which must not be changed by the user. Their basic versions are a component of the standard model code and can be found in the source code files user_***.f90. The basic versions accomplish nearly no actions, thus they are pure templates, which can be extended by the 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 (file user_init.f90):
SUBROUTINE user_init !------------------------------------------------------------------------------ ! ! ! Description: ! ----------- ! Execution of user-defined initializing actions !------------------------------------------------------------------------------ ! USE control_parameters USE user IMPLICIT NONE ! !-- Here the user defined initializing actions follow: END SUBROUTINE user_init
Attachments (6)
- User-Code main page Buttons.pptx (30.0 KB) - added by scharf 6 years ago.
- button_compiling.png (33.4 KB) - added by scharf 6 years ago.
- button_domains.png (23.7 KB) - added by scharf 6 years ago.
- button_input.png (32.2 KB) - added by scharf 6 years ago.
- button_interfaces.png (22.0 KB) - added by scharf 6 years ago.
- button_output.png (19.9 KB) - added by scharf 6 years ago.
Download all attachments as: .zip