Changes between Version 2 and Version 3 of doc/tec/general


Ignore:
Timestamp:
Jul 1, 2016 4:30:26 PM (9 years ago)
Author:
Giersch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/tec/general

    v2 v3  
    66
    77The source code is subdivided into a series of Fortran files. Most of them contain single subroutines only. These are called from the main
    8 PALM routine ('''''palm.f90''''') and wherever needed. Each file features a header, containing a description and its history of modifications. The data handling between the subroutines is usually realized via Fortran modules defined in a separate file ('''''modules.f90''''') instead of using parameter lists. The code contains several machine dependent segments, e.g., calls of routines from external libraries such as the Message Passing Interface (MPI, e.g., [#gropp1999 Gropp et al., 1999]), the Network Common Data Form (netCDF, see [http://www.unidata.ucar.edu/software/netcdf]) and the Fastest Fourier Transform in the West (FFTW, see [http://www.fftw.org]), and which may not be available on some machines. These segments are activated/deactivated using C-preprocessor directives, which allow to compile alternative parts of the code.
     8PALM routine ([source:palm/trunk/SOURCE/palm.f90 palm.f90]) and wherever needed. Each file features a header, containing a description and its history of modifications. The data handling between the subroutines is usually realized via Fortran modules defined in a separate file ([source:palm/trunk/SOURCE/modules.f90 modules.f90]) instead of using parameter lists. The code contains several machine dependent segments, e.g., calls of routines from external libraries such as the Message Passing Interface (MPI, e.g., [#gropp1999 Gropp et al., 1999]), the Network Common Data Form (netCDF, see [http://www.unidata.ucar.edu/software/netcdf]) and the Fastest Fourier Transform in the West (FFTW, see [http://www.fftw.org]), and which may not be available on some machines. These segments are activated/deactivated using C-preprocessor directives, which allow to compile alternative parts of the code.
    99
    1010Three-dimensional arrays of prognostic variables (''u ='' '''''u''''', ''v ='' '''''v''''', ''w ='' '''''w''''', ''θ ='' '''''pt''''', ''q'',,v,,'' ='' '''''q''''', ''s ='' '''''s''''', ''e ='' '''''e''''' and ''Sa ='' '''''sa''''' are stored at the last two time levels of the Runge-Kutta substeps. These arrays are declared as (e.g., the ''u''-wind component) '''''u(k, j, i)''''' on the respective subdomain of each processor, including ghost point layers '''''nbgp''''' ''= 3'' by default) for data exchange between the processors (see also Sect. [wiki:doc/tec/parallel parallelization and optimization]):
     
    4040[[Image(10.png, 600px, border=1)]]
    4141
    42 Figure 12: Simplified flowchart of PALM.
     42Figure 13: Simplified flowchart of PALM.
    4343
    4444At the beginning of the model run (hereafter referred to as "job"), the model setup is read from a Fortran '''''NAMELIST''''' file that is provided by the user, and optionally additional files for large-scale forcing and topography. PALM allows for conducting so-called restart jobs and job chains, where long-lasting model runs can be split into smaller ones. This does not only meet the requirements of most supercomputing systems, it also provides the user the opportunity to modify the setup between runs, or e.g., performing a set of parameter studies based on the same precursor run. For job chains, the current state of the model is saved as binary data at the end of the run and read as input for the subsequent restart run. After model initialization, possibly using a 1-D model precursor run (see Sect.
    4545[wiki:/doc/tec/1dmodel 1-D model for precursor runs]), the time integration loop is executed until a termination is initiated. The latter might be caused by either the fact, that the desired simulation time has been reached, or by the need to initiate a restart of the job chain. The latter can be the case when the current job is running out of CPU time, or when the user has manually forced arestart. PALM can be used on cache-optimized as well as on vector processors. Moreover, General Purpose Computing on Graphics Processing Units (GPGPU) can be
    4646used. Each machine architecture requires specially optimized code to be executed within computationally expensive loops of the prognostic
    47 equations. This is realized by a Fortran '''''INTERFACE''''' so that different code branches are executed in the '''''prognostic_equations.f90''''' subroutine.
     47equations. This is realized by a Fortran '''''INTERFACE''''' so that different code branches are executed in the [source:palm/trunk/SOURCE/prognostic_equations.f90 prognostic_equations.f90] subroutine.
    4848
    4949In most cases, the large computational grid with very large number of grid points does not allow for processing the raw model data in