Run PALM Locally: Interactive Guide
Run PALM Locally: Interactive Guide
group
Institute of Meteorology and Climatology, Leibniz Universität Hannover
PALM steering
Preface
Definitions
▪ Local host: The computer that you are currently sitting at or are logged in via
your terminal (ssh).
▪ Remote host: Any computer with a batch system, that you have ssh access to,
but are not logged in now.
▪ Batch mode: Automatic processing of commands contained in a batch file, not
interactively.
JOBS
Must be created after installation
HOME
Files for steering, job monitoring,
data output, user code
palm
MAKE_DEPOSITORY_*
current_version
Pre-compiled code
In case of several PALM versions that Working directory generated by palmbuild
are used simultaneously it is beneficial of PALM user
to use the release number, e.g., 23.04
bin
INPUT
▪ Grid parameters (computational grid / processor grid):
▪ grid spacing, number of grid points, etc.
▪ Initialization parameters:
▪ initial profiles, restart run, main run (following pre-run)
▪ Output parameters:
▪ 1d, 2d, 3d output, output intervals, etc.
▪ Physical parameters:
▪ latitude, angular velocity of the earth, etc.
▪ Parameters for embedded modules (wind turbine model, land surface model,
Lagrangian particle model, etc.)
INPUT
▪ Written in FORTRAN-NAMELIST
run_x_p3d (<run identifier>_p3d) syntax
&initiaization_parameters nx = 39, ny = 39, nz = 40,
dx = 50.0, dy = 50.0, dz = 50.0, ▪ Read in by PALM
dz_stretch_level = 1200.0,
fft_method = 'temperton-algorithm',
▪ Two NAMELIST groups mandatory:
initializing_actions = 'set_constant_profiles', &initialization_parameters
ug_surface = 0.0, vg_surface = 0.0,
pt_vertical_gradient = 0.0, 1.0, and
pt_vertical_gradient_level = 0.0, 800.0,
surface_heatflux = 0.1, bc_pt_b = 'neumann', &runtime_parameters
topography = 'read_from_file', /
dt_dopr = 900.0,
▪ Never use TAB’s for alignment
averaging_interval_pr = 600.0, dt_averaging_input_pr = 10.0,
data_output_pr = '#theta', 'w"theta"', 'w*theta*', 'wtheta',
'w*2', ‚theta*2', /
Otherwise strange errors may appear!
&initialization_parameters
&runtime_parameters
&...
INPUT
run_x_topo (<run_identifier>_topo)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0 ▪ ASCII file with 2D
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 topography height
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
information (in meters above
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40
0 0 0
40 40 0 0 0 0 0 0 0 0 0 0
ground).
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
▪ Such a file will be used e.g.
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 in the exercise E3 on
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 Wednesday.
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 ▪ Not suitable for complex
0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
topography. Instead, a static
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
40 40
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
driver file in NetCDF format
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 must be used (see lecture
„static & dynamic driver” and
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
E3).
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RUN ITER. HH:MM:SS.SS DT(E) UMAX VMAX WMAX U* W* THETA* Z_I ENERG. DISTENERG DIVOLD DIVNEW UMAX(KJ
---------------------------------------------------------------------------------------------------------------------------------------------------
0 0 00:00:00.00 20.0000A -0.2131D -0.2288D 0.1182 0.000 1.38 0.000E+00 800. 0.104E-02 0.103E-02 0.597E-03 0.867E-13 7 7
0 1 00:00:20.00 20.0000A -0.2125 -0.2273 0.1172 0.009 0.69 -0.131E+02 100. 0.103E-02 0.102E-02 0.570E-05 0.411E-15 7 7
0 2 00:00:40.00 20.0000A -0.2117 -0.2252 0.1162 0.009 0.69 -0.132E+02 100. 0.102E-02 0.102E-02 0.939E-05 0.413E-15 7 7
0 3 00:01:00.00 20.0000A -0.2106 -0.2227 0.1152 0.009 0.69 -0.132E+02 100. 0.101E-02 0.101E-02 0.131E-04 0.417E-15 7 7
...
run_x_cpu (<run identifier>_cpu .*, * = three digit number starting at 000) MONITORING
PALM 23.04 run: example_cbl.00 host: default 31-07-23 14:56:25
-----------
gridpoints (x/y/z): 40 * 40 * 40
▪ Contains information about the CPU
nr of timesteps: 263
cpu time per grid point and timestep: 0.45511 * 10**-6 s requirements of single parts of the
----------------------------------------------------------------------
program.
place: mean counts min max rms
JOBS
HOME
Files for steering, job monitoring,
data output, user code
palm
MAKE_DEPOSITORY_*
current_version
Pre-compiled code
Working directory generated by palmbuild
of PALM user
bin
.palm.config.<ci>
#
%base_directory
%base_data
%source_path
/home/raasch/palm/current_version
/home/raasch/palm/current_version/JOBS
/home/raasch/palm/current_version/trunk/packages/palm/model/src
▪ Created during automatic installation.
%user_source_path /home/raasch/palm/current_version/JOBS/$run_identifier/USER_CODE
%fast_io_catalog
%restart_data_path
/localdata/raasch
/localdata/raasch ▪ Computer- and software-specific
%output_data_path /home/raasch/palm/current_version/JOBS
%local_jobcatalog
#%remote_jobcatalog
/home/raasch/job_queue
<path/to/directory>
configuration.
#
%local_ip 127.0.0.1
%local_username
#
raasch ▪ Variables are interpreted by palmrun
%compiler_name mpif90
%compiler_name_ser ifort script.
%cpp_options -cpp -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION
-DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__fftw -D__netcdf
%make_options
%compiler_options
-j 4
-fpe0 -O3 -xHost -fp-model source -ftz -fno-alias ... ▪ <ci> can be an arbitrary string.
-I /<path_to>/fftw/3.3.4/include ...
-L/<path_to>/fftw/3.3.4/lib64 -lfftw3 ...
%linker_options -openmp -fpe0 -O3 -xHost -fp-model source -ftz -fno-alias ...
-I /<path_to>/fftw/3.3.4/include ... ▪ One individually named file per
-L/<path_to>/fftw/3.3.4/lib64 -lfftw3 ...
%hostfile
%execute_command
auto
mpiexec -machinefile hostfile -n {{MPI_TASKS}} palm
environment in that PALM shall be
#
#---------------------------------------------------------------------------- executed (compiler options, computer,
# INPUT-commands, executed before running PALM - lines must start with "IC:"
#----------------------------------------------------------------------------
#IC:
software).
#
#----------------------------------------------------------------------------
# ERROR-commands - executed when program terminates abnormally
#----------------------------------------------------------------------------
▪ Documentation available at:
EC:[[ \$locat = execution ]] && cat RUN_CONTROL
EC:[[ \$locat = execution ]] && cat PARTICLE_INFOS/*
# https://palm.muk.uni-
#----------------------------------------------------------------------------
# OUTPUT-commands - executed when program terminates normally
#----------------------------------------------------------------------------
hannover.de/trac/wiki/doc/app/palm_config
#
# Combine 1D- and 3D-profile output (these files are not usable for plotting)
OC:[[ -f LIST_PROFIL_1D ]] && cat LIST_PROFIL_1D >> LIST_PROFILE
OC:[[ -f LIST_PROFIL ]] && cat LIST_PROFIL >> LIST_PROFILE
#
# Combine all particle information files
OC:[[ -f PARTICLE_INFOS/_0000 ]] && cat PARTICLE_INFOS/* >> PARTICLE_INFO
.palm.iofiles
#
#---------------------------------------------------------------------------------------------
# List of input-files
#---------------------------------------------------------------------------------------------
▪ A default file in folder
PARIN
PARIN
in:tr
in:tr
d3#
d3r
$base_data/$run_identifier/INPUT
$base_data/$run_identifier/INPUT
_p3d*
_p3dr*
palm_model_system-
PARIN
NAVIGATION_DATA
in:tr
inopt:tr
pcr $base_data/$run_identifier/INPUT
d3#:d3r $base_data/$run_identifier/INPUT
_pcr*
_nav*
*/packages/palm/model/share/c
TOPOGRAPHY_DATA inopt:tr d3#:d3r $base_data/$run_identifier/INPUT _topo*
... onfig is used (contains a
DATA_1D_PR_NETCDF inopt prr $output_data_path/$run_identifier/OUTPUT _pr* nc
DATA_1D_TS_NETCDF
DATA_1D_PTS_NETCDF
inopt
inopt
tsr
ptsr
$output_data_path/$run_identifier/OUTPUT _ts*
$output_data_path/$run_identifier/OUTPUT _pts*
nc
nc
maximum of six columns)
DATA_2D_XY_NETCDF inopt xyr $output_data_path/$run_identifier/OUTPUT _xy* nc
DATA_2D_XY_NETCDF
DATA_2D_XY_AV_NETCDF
inopt
inopt
xyr
xyr
$output_data_path/$run_identifier/OUTPUT _xy*
$output_data_path/$run_identifier/OUTPUT _av_xy*
nc
nc
▪ Definition of input/output files and
...
#
paths, interpreted by palmrun
#---------------------------------------------------------------------------------------------
# List of output-files script (column 1, 4-6)
#---------------------------------------------------------------------------------------------
BINOUT* out:lnpe restart $restart_data_path/$run_identifier/RESTART _d3d
PARTICLE_RESTART_DATA_OUT* out:lnpe prt#:prtr $restart_data_path/$run_identifier/RESTART _rprt ▪ Activation strings (column 3) are
SVFOUT*
#
out:lnpe svfout $restart_data_path/$run_identifier/SVF _svf
given with palmrun option -a
RUN_CONTROL* out:tr d3#:pcr $output_data_path/$run_identifier/MONITORING _rc
RUN_CONTROL*
HEADER*
out:tra d3r
out:tr d3#:pcr
$output_data_path/$run_identifier/MONITORING _rc
$output_data_path/$run_identifier/MONITORING _header ▪ Only one .palm.iofiles file
HEADER* out:tra d3r $output_data_path/$run_identifier/MONITORING _header
CPU_MEASURES*
CPU_MEASURES*
out:tr d3#:pcr
out:tra d3r
$output_data_path/$run_identifier/MONITORING _cpu
$output_data_path/$run_identifier/MONITORING _cpu
required. Path variable
PARTICLE_INFO*
PARTICLE_INFO*
out:tr pt#
out:tra ptr
$output_data_path/$run_identifier/MONITORING _prt_info
$output_data_path/$run_identifier/MONITORING _prt_info
base_data can be individually
LIST_PROFIL*
#
out:tr * $output_data_path/$run_identifier/MONITORING _list_pr
set in .palm.config.<ci>,
DATA_1D_PR_NETCDF* out:tr * $output_data_path/$run_identifier/OUTPUT _pr nc
DATA_1D_SP_NETCDF* out:tr * $output_data_path/$run_identifier/OUTPUT _sp nc and run_identifier equals
DATA_1D_TS_NETCDF* out:tr * $output_data_path/$run_identifier/OUTPUT _ts nc
DATA_1D_PTS_NETCDF
DATA_2D_XY_NETCDF*
out:tr
out:tr
*
*
$output_data_path/$run_identifier/OUTPUT _pts
$output_data_path/$run_identifier/OUTPUT _xy
nc
nc
the run-identifier name given with
DATA_2D_XY_AV_NETCDF*
...
out:tr * $output_data_path/$run_identifier/OUTPUT _av_xy nc
palmrun option -r (next slide)
Documentation available at: https://palm.muk.uni-
hannover.de/trac/wiki/doc/app/palm_iofiles
▪ palmrun ...
▪ Important options for interactive run on local PC:
▪ -a "d3#"
(activation string, possible strings listed in .palm.iofiles)
▪ -r <run_identifier>
(e.g. run_x, taken as base file/directory name of all data files of this run)
▪ -c <configuration_identifier>
(as in configuration file name .palm.config.<ci>)
▪ -X <number of processor cores (PEs) to be used>
▪ For batch mode and remote jobs, additional options are available, see palmrun
documentation:
▪ -b (run in batch mode)
▪ -q <name of batch-job queue>
▪ -t <CPU time (in seconds)>
▪ -T <number of mpi tasks to be started on one node of the computer>
palmrun ? lists all available options
run_x_ts.<cyclenumber>.nc
copy to rename to where <cyclenumber> is a 3 digit number
Final filename (e.g.): ~/palm/current_version/JOBS/run_x/OUTPUT/run_x_ts.000.nc
6. Delete temporary directory (prevented by palmrun option "-B").
Folder SOURCES_FOR_RUN_run_x is not deleted, remains available for restart runs.
PALM online:
https://palm.muk.uni-hannover.de