<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.cima.fcen.uba.ar/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guido.tiscornia</id>
	<title>Wikicima - Contribuciones del usuario [es]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.cima.fcen.uba.ar/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guido.tiscornia"/>
	<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php/Especial:Contribuciones/Guido.tiscornia"/>
	<updated>2026-11-04T15:06:02Z</updated>
	<subtitle>Contribuciones del usuario</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3853</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3853"/>
		<updated>2026-10-01T19:32:45Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Hydra, for this purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5. That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3852</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3852"/>
		<updated>2026-10-01T19:01:49Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Tools and links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5. That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3851</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3851"/>
		<updated>2026-10-01T19:01:26Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Pending */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5. That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3850</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3850"/>
		<updated>2026-10-01T19:00:14Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5. That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3849</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3849"/>
		<updated>2026-10-01T18:59:05Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Setting up a case */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5. That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3848</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3848"/>
		<updated>2026-10-01T18:56:38Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Build */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3847</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3847"/>
		<updated>2026-10-01T18:56:00Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Environment script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3846</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3846"/>
		<updated>2026-10-01T18:55:06Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (at the moment &amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials inside of PALM website, but the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
A practical tip: do not create the file by pasting a long &amp;lt;code&amp;gt;cat &amp;amp;gt; file &amp;amp;lt;&amp;amp;lt; EOF&amp;lt;/code&amp;gt; block into the SSH terminal. Lines can get mixed up and the file ends up broken without it being obvious. Use &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;vim&amp;lt;/code&amp;gt;, or upload it with &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, and check it with &amp;lt;code&amp;gt;cat -n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3845</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3845"/>
		<updated>2026-10-01T18:54:13Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Environment script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (&amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials, the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this, for example, as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
A practical tip: do not create the file by pasting a long &amp;lt;code&amp;gt;cat &amp;amp;gt; file &amp;amp;lt;&amp;amp;lt; EOF&amp;lt;/code&amp;gt; block into the SSH terminal. Lines can get mixed up and the file ends up broken without it being obvious. Use &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;vim&amp;lt;/code&amp;gt;, or upload it with &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, and check it with &amp;lt;code&amp;gt;cat -n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3844</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3844"/>
		<updated>2026-10-01T18:53:01Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Hydra, for this purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (&amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials, the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
A practical tip: do not create the file by pasting a long &amp;lt;code&amp;gt;cat &amp;amp;gt; file &amp;amp;lt;&amp;amp;lt; EOF&amp;lt;/code&amp;gt; block into the SSH terminal. Lines can get mixed up and the file ends up broken without it being obvious. Use &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;vim&amp;lt;/code&amp;gt;, or upload it with &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, and check it with &amp;lt;code&amp;gt;cat -n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3843</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3843"/>
		<updated>2026-10-01T18:52:25Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Hydra, for this purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 may be free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses mainly&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;~/salidas&amp;lt;/code&amp;gt; is an NFS mount and is the same location as &amp;lt;code&amp;gt;/nfsmounts/storage/scratch/&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;. PALM was installed there, in &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (&amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials, the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
A practical tip: do not create the file by pasting a long &amp;lt;code&amp;gt;cat &amp;amp;gt; file &amp;amp;lt;&amp;amp;lt; EOF&amp;lt;/code&amp;gt; block into the SSH terminal. Lines can get mixed up and the file ends up broken without it being obvious. Use &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;vim&amp;lt;/code&amp;gt;, or upload it with &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, and check it with &amp;lt;code&amp;gt;cat -n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3842</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3842"/>
		<updated>2026-10-01T18:50:07Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;, use your own Hydra username.&lt;br /&gt;
&lt;br /&gt;
Author: Guido Tiscornia (CIMA).&lt;br /&gt;
&lt;br /&gt;
== Starting point ==&lt;br /&gt;
&lt;br /&gt;
PALM was built with the system gfortran, the system NetCDF (4.9.0 C, 4.5.4 Fortran) and Intel MPI 2021.18, which in this build wraps gfortran. It was validated with &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt; (clean diff against the reference output), and urban cases were run in batch from 1 node up to 2 nodes (256 processes).&lt;br /&gt;
&lt;br /&gt;
The Intel compiler was not used. Hydra’s Intel environment has two oneAPI installations (2021.4.0 with &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; and 2026.0 with &amp;lt;code&amp;gt;ifx&amp;lt;/code&amp;gt;), and the MPICH &amp;lt;code&amp;gt;mpif90&amp;lt;/code&amp;gt; calls an &amp;lt;code&amp;gt;ifort&amp;lt;/code&amp;gt; that is not in the PATH. With a couple of patches a simple MPI “hello world” worked, but the PALM installer ended up producing a mixed build that failed at runtime with &amp;lt;code&amp;gt;undefined symbol: __netcdf_MOD_nf90_put_var...&amp;lt;/code&amp;gt;. After two attempts we switched to a pure gfortran build.&lt;br /&gt;
&lt;br /&gt;
== Hydra, for this purpose ==&lt;br /&gt;
&lt;br /&gt;
There is a single queue, &amp;lt;code&amp;gt;larga&amp;lt;/code&amp;gt;. The nodes (as of July 2026; check with &amp;lt;code&amp;gt;pbsnodes&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* 128 cores, nodes 90 to 97, about 132 GB: production. Usually 2 to 4 are free.&lt;br /&gt;
* 48 cores, nodes 61 to 76, about 132 GB: almost always free, good for tests.&lt;br /&gt;
* 24 and 40 cores, nodes 51 and 52, about 32 GB: used for undergraduate courses, do not use.&lt;br /&gt;
&lt;br /&gt;
Memory is not requested from PBS: the whole node is allocated. Walltimes of up to 7 days are accepted without problems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;~/salidas&amp;lt;/code&amp;gt; is an NFS mount and is the same location as &amp;lt;code&amp;gt;/nfsmounts/storage/scratch/&amp;amp;lt;user&amp;amp;gt;&amp;lt;/code&amp;gt;. PALM was installed there, in &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Download (&amp;lt;code&amp;gt;git clone&amp;lt;/code&amp;gt; asks for credentials, the tarball does not):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/salidas/palm/current_version &amp;amp;&amp;amp; cd ~/salidas/palm/current_version&lt;br /&gt;
wget https://gitlab.palm-model.org/releases/palm_model_system/-/archive/v24.04/palm_model_system-v24.04.tar.gz&lt;br /&gt;
tar -xzf palm_model_system-v24.04.tar.gz&lt;br /&gt;
mv palm_model_system-v24.04 palm_model_system&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Environment script ===&lt;br /&gt;
&lt;br /&gt;
Hydra’s default environment breaks PALM, so it has to be cleaned up. Save this as &amp;lt;code&amp;gt;~/cargar_entorno_palm.sh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# palm environment on hydra: system gfortran + system netcdf + intel mpi 2021.18&lt;br /&gt;
# use with: source ~/cargar_entorno_palm.sh  (source it, do not execute it)&lt;br /&gt;
&lt;br /&gt;
# remove intel&#039;s netcdf and mpich from ld_library_path&lt;br /&gt;
export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;netcdf/netcdf-4/intel&amp;quot; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# intel mpi runtime: needed on compute nodes, which start with an empty environment&lt;br /&gt;
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.18/lib:$LD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
# intel mpi 2021.18 first in the path, mpich removed&lt;br /&gt;
export PATH=/opt/intel/oneapi/mpi/2021.18/bin:$(echo $PATH | tr &#039;:&#039; &#039;\n&#039; \&lt;br /&gt;
    | grep -v &amp;quot;mpich&amp;quot; \&lt;br /&gt;
    | tr &#039;\n&#039; &#039;:&#039; | sed &#039;s/:$//&#039;)&lt;br /&gt;
&lt;br /&gt;
# palm executables&lt;br /&gt;
export PATH=/nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;mpif90 -&amp;gt; $(which mpif90)&amp;quot;&lt;br /&gt;
echo &amp;quot;wraps -&amp;gt; $(mpif90 -show 2&amp;gt;/dev/null | awk &#039;{print $1}&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It has to be sourced in every new terminal. After loading it, the second line must say &amp;lt;code&amp;gt;gfortran&amp;lt;/code&amp;gt;; if it does not, do not continue.&lt;br /&gt;
&lt;br /&gt;
A practical tip: do not create the file by pasting a long &amp;lt;code&amp;gt;cat &amp;amp;gt; file &amp;amp;lt;&amp;amp;lt; EOF&amp;lt;/code&amp;gt; block into the SSH terminal. Lines can get mixed up and the file ends up broken without it being obvious. Use &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;vim&amp;lt;/code&amp;gt;, or upload it with &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, and check it with &amp;lt;code&amp;gt;cat -n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
&lt;br /&gt;
With the environment loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm/current_version/palm_model_system&lt;br /&gt;
bash install -p ~/salidas/palm -s /usr -t /usr -x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; is the install prefix, &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; force the system NetCDF (otherwise autodetection picks Intel’s), and &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; cleans the previous build. When it finishes, the executables are in &amp;lt;code&amp;gt;~/salidas/palm/bin&amp;lt;/code&amp;gt; and the default configuration is &amp;lt;code&amp;gt;~/salidas/palm/.palm.config.default&amp;lt;/code&amp;gt;. RRTMG is linked in. Parallel NetCDF is not available on Hydra, but this does not matter much: the computation is parallel and only the file writing is serial.&lt;br /&gt;
&lt;br /&gt;
=== Interactive test ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
mkdir -p JOBS/example_cbl/INPUT&lt;br /&gt;
cp current_version/palm_model_system/packages/palm/model/tests/cases/example_cbl/INPUT/example_cbl_p3d JOBS/example_cbl/INPUT/&lt;br /&gt;
palmrun -r example_cbl -c default -a &amp;quot;d3#&amp;quot; -X 4 -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should end with &amp;lt;code&amp;gt;--&amp;amp;gt; palmrun finished&amp;lt;/code&amp;gt;. To validate, compare the RUN_CONTROL file against the case’s reference. On the login node, use few processes.&lt;br /&gt;
&lt;br /&gt;
== Batch mode ==&lt;br /&gt;
&lt;br /&gt;
PALM uses one configuration file per suffix, selected with &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. We work on a copy so the default one stays untouched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp ~/salidas/palm/.palm.config.default ~/salidas/palm/.palm.config.hydra&lt;br /&gt;
CFG=~/salidas/palm/.palm.config.hydra&lt;br /&gt;
sed -i &#039;s|^#%submit_command.*|%submit_command      qsub|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%defaultqueue.*|%defaultqueue        larga|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%memory.*|%memory              2000|&#039; $CFG&lt;br /&gt;
sed -i &#039;s|^#%login_init_cmd.*|%login_init_cmd       source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh|&#039; $CFG&lt;br /&gt;
grep -nE &#039;%submit_command|%defaultqueue|%memory|%login_init_cmd&#039; $CFG&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The block of PBS directives in the template already works on Hydra, and the &amp;lt;code&amp;gt;BDT:&amp;lt;/code&amp;gt; block (queue &amp;lt;code&amp;gt;dataq&amp;lt;/code&amp;gt;) is only used to transfer files from remote hosts, so it is left alone. &amp;lt;code&amp;gt;%memory&amp;lt;/code&amp;gt; is an internal PALM variable and never reaches PBS.&lt;br /&gt;
&lt;br /&gt;
The most important problem of this stage: compute nodes start with an empty environment, and without the Intel MPI runtime in &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; the job fails with &amp;lt;code&amp;gt;libmpi.so.12 =&amp;amp;gt; not found&amp;lt;/code&amp;gt;. That is why the script includes the runtime line and why it is loaded through &amp;lt;code&amp;gt;%login_init_cmd&amp;lt;/code&amp;gt;. To check this without wasting a real run, a small job that runs &amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; on the executable is enough:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#PBS -N diag_entorno&lt;br /&gt;
#PBS -l walltime=00:05:00&lt;br /&gt;
#PBS -l nodes=1:ppn=48&lt;br /&gt;
#PBS -o /nfsmounts/storage/scratch/&amp;lt;user&amp;gt;/palm/diag_entorno.log&lt;br /&gt;
#PBS -j oe&lt;br /&gt;
#PBS -q larga&lt;br /&gt;
&lt;br /&gt;
source /home/&amp;lt;user&amp;gt;/cargar_entorno_palm.sh&lt;br /&gt;
EXE=/home/&amp;lt;user&amp;gt;/salidas/palm/MAKE_DEPOSITORY_hydra/palm&lt;br /&gt;
if ldd $EXE | grep -q &amp;quot;not found&amp;quot;; then&lt;br /&gt;
    echo &amp;quot;PROBLEM:&amp;quot;; ldd $EXE | grep &amp;quot;not found&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;OK: all libraries resolve&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Submit it with &amp;lt;code&amp;gt;qsub&amp;lt;/code&amp;gt; and read the log. The executable in &amp;lt;code&amp;gt;MAKE_DEPOSITORY_hydra&amp;lt;/code&amp;gt; only exists after the first run with &amp;lt;code&amp;gt;-c hydra&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source ~/cargar_entorno_palm.sh&lt;br /&gt;
cd ~/salidas/palm&lt;br /&gt;
palmrun -r &amp;lt;case&amp;gt; -c hydra -a &amp;quot;d3#&amp;quot; -X 48 -T 48 -t 1800 -q larga -b -v -z&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; is the case, &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; the total number of processes, &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; the processes per node (nodes = X/T), &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; the walltime in seconds, &amp;lt;code&amp;gt;-b&amp;lt;/code&amp;gt; submits to the queue, and &amp;lt;code&amp;gt;-F&amp;lt;/code&amp;gt; generates the job script without submitting it, which is handy for inspecting it. &amp;lt;code&amp;gt;-a &amp;amp;quot;d3#&amp;amp;quot;&amp;lt;/code&amp;gt; is mandatory: without it &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; aborts with &amp;lt;code&amp;gt;no activation string list given&amp;lt;/code&amp;gt;. For two 128-core nodes use &amp;lt;code&amp;gt;-X 256 -T 128&amp;lt;/code&amp;gt;. To give each process more memory you can reserve whole nodes and use fewer cores per node, for example &amp;lt;code&amp;gt;-X 128 -T 64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each new configuration recompiles once into its own &amp;lt;code&amp;gt;MAKE_DEPOSITORY&amp;lt;/code&amp;gt;. The number PALM gives to its own runs (for example &amp;lt;code&amp;gt;case.650&amp;lt;/code&amp;gt;) is not the PBS job ID.&lt;br /&gt;
&lt;br /&gt;
== Setting up a case ==&lt;br /&gt;
&lt;br /&gt;
Each case lives in &amp;lt;code&amp;gt;~/salidas/palm/JOBS/&amp;amp;lt;case&amp;amp;gt;/INPUT/&amp;lt;/code&amp;gt;, with the namelist &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_p3d&amp;lt;/code&amp;gt; and, for urban cases, the static driver &amp;lt;code&amp;gt;&amp;amp;lt;case&amp;amp;gt;_static&amp;lt;/code&amp;gt; (without &amp;lt;code&amp;gt;.nc&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; is always called from &amp;lt;code&amp;gt;~/salidas/palm&amp;lt;/code&amp;gt;. Rules that caused problems:&lt;br /&gt;
&lt;br /&gt;
* Only &amp;lt;code&amp;gt;_p3d&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_static&amp;lt;/code&amp;gt; files go in &amp;lt;code&amp;gt;INPUT/&amp;lt;/code&amp;gt;. A backup there (for example &amp;lt;code&amp;gt;case_p3d.bak&amp;lt;/code&amp;gt;) makes the run abort with &amp;lt;code&amp;gt;wrong ending&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;nx+1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ny+1&amp;lt;/code&amp;gt; must factorize into 2, 3 and 5 (Temperton FFT). That is why 384 was used and not 400.&lt;br /&gt;
* PALM counts the maximum index (&amp;lt;code&amp;gt;nx = 383&amp;lt;/code&amp;gt; means 384 points), while GEO4PALM counts points. If they do not match, the error is &amp;lt;code&amp;gt;static driver: horizontal dimension ... does not match model dimension&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Always set &amp;lt;code&amp;gt;data_output_2d_on_each_pe = .FALSE.&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;amp;amp;runtime_parameters&amp;lt;/code&amp;gt;. With the default value, &amp;lt;code&amp;gt;combine_plot_fields&amp;lt;/code&amp;gt; breaks on NFS and outputs are lost.&lt;br /&gt;
* &amp;lt;code&amp;gt;_xy&amp;lt;/code&amp;gt; output needs &amp;lt;code&amp;gt;section_xy&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;section_xy = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The static driver must declare all five surface type variables, including &amp;lt;code&amp;gt;water_type&amp;lt;/code&amp;gt;, even if one is entirely fill values (otherwise error &amp;lt;code&amp;gt;DRV0011&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Minimal namelist used for the benchmark (derived from &amp;lt;code&amp;gt;example_cbl&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;initialization_parameters&lt;br /&gt;
    nx = 383, ny = 383, nz = 95,&lt;br /&gt;
    dx = 10.0, dy = 10.0, dz = 10.0,&lt;br /&gt;
    dz_stretch_level = 1225.0, dz_stretch_factor = 1.08,&lt;br /&gt;
    initializing_actions = &#039;set_constant_profiles&#039;,&lt;br /&gt;
    ug_surface = 0.0, vg_surface = 0.0, pt_surface = 300.0,&lt;br /&gt;
    pt_vertical_gradient = 0.0, 1.0,&lt;br /&gt;
    pt_vertical_gradient_level = 0.0, 800.0,&lt;br /&gt;
    surface_heatflux = 0.1, bc_pt_b = &#039;neumann&#039;,&lt;br /&gt;
    fft_method = &#039;temperton-algorithm&#039;,&lt;br /&gt;
/&lt;br /&gt;
&amp;amp;runtime_parameters&lt;br /&gt;
    end_time = 120.0,&lt;br /&gt;
    create_disturbances = .TRUE., dt_disturb = 150.0,&lt;br /&gt;
    disturbance_energy_limit = 0.01,&lt;br /&gt;
    data_output_2d_on_each_pe = .FALSE.,&lt;br /&gt;
    netcdf_data_format = 2, restart_data_format = &#039;mpi&#039;,&lt;br /&gt;
    dt_run_control = 0.0,&lt;br /&gt;
/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Monitoring and results ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qstat -u &amp;lt;user&amp;gt;                          # Q queued, R running, C completed&lt;br /&gt;
pbsnodes -l free                         # free nodes&lt;br /&gt;
env LD_LIBRARY_PATH= tail -15 ~/salidas/palm/tmp/&amp;lt;case&amp;gt;.&amp;lt;id&amp;gt;/RUN_CONTROL   # live progress&lt;br /&gt;
ls -lt ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/MONITORING/&lt;br /&gt;
env LD_LIBRARY_PATH= ncdump -h ~/salidas/palm/JOBS/&amp;lt;case&amp;gt;/OUTPUT/&amp;lt;case&amp;gt;_xy.000.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;env LD_LIBRARY_PATH=&amp;lt;/code&amp;gt; prefix is needed on Hydra because the system &amp;lt;code&amp;gt;ncdump&amp;lt;/code&amp;gt; clashes with the NetCDF library that PALM’s environment puts first (&amp;lt;code&amp;gt;undefined symbol: nc_reclaim_data&amp;lt;/code&amp;gt;). Output files get a suffix &amp;lt;code&amp;gt;.000&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.001&amp;lt;/code&amp;gt;, … per successful run. The &amp;lt;code&amp;gt;_cpu.NNN&amp;lt;/code&amp;gt; file is only written if the run finished normally, so it is a good way to confirm it reached the end. Always look at the actual contents (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncdump -h&amp;lt;/code&amp;gt;) before considering a run good.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
384×384×96 domain at 10 m, one simulated hour:&lt;br /&gt;
&lt;br /&gt;
* Bare solver (no city), 48 processes: 0.0807 µs per grid point and time step.&lt;br /&gt;
* With urban physics (urban surface, land surface, 3D radiation), 48 processes: 0.0961 µs, which is 19% more. About 3,170 s of wall time.&lt;br /&gt;
* With urban physics, 256 processes on 2 nodes: 0.2727 µs, about 8,870 s. This is slower than with 48.&lt;br /&gt;
&lt;br /&gt;
The cause is the pressure solver, which uses all-to-all communication and collapses when it crosses nodes. For domains of this size it is not worth adding cores without measuring first. The wall time of another domain can be estimated as unit cost × number of points × number of time steps, valid only for 1 node and 48 processes.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
* Test restart in batch (it failed in local interactive mode, because of the &amp;lt;code&amp;gt;palmrun&amp;lt;/code&amp;gt; script and not PALM).&lt;br /&gt;
* Scaling sweep with 96 and 128 processes inside a single node, and the multigrid solver.&lt;br /&gt;
* Nested domains and a real dynamic driver (WRF4PALM) on Hydra.&lt;br /&gt;
* Tell the administrators about the double oneAPI installation; there is no record that it has been fixed.&lt;br /&gt;
&lt;br /&gt;
== Tools and links ==&lt;br /&gt;
&lt;br /&gt;
* GEO4PALM, to build the static driver from global datasets. Its code needs patches to work with current libraries: use Miniforge/conda-forge, numpy below 2, and &amp;lt;code&amp;gt;pip --extra-index-url&amp;lt;/code&amp;gt; (not &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;). https://github.com/dongqi-DQ/GEO4PALM (confirm the exact URL from the WRF4PALM README).&lt;br /&gt;
* WRF4PALM, to build the dynamic driver from WRF output: https://github.com/dongqi-DQ/WRF4PALM&lt;br /&gt;
* &amp;lt;code&amp;gt;palm_csd&amp;lt;/code&amp;gt; (ships with PALM), &amp;lt;code&amp;gt;palmtest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;palmplot&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt; and Python (xarray, netCDF4, matplotlib with the &amp;lt;code&amp;gt;Agg&amp;lt;/code&amp;gt; backend) for looking at outputs. Pre- and post-processing were done on local machines.&lt;br /&gt;
&lt;br /&gt;
Documentation and downloads:&lt;br /&gt;
&lt;br /&gt;
* https://docs.palm-model.org/&lt;br /&gt;
* https://gitlab.palm-model.org/releases/palm_model_system&lt;br /&gt;
* Maronga et al. 2020, PALM 6.0 overview: https://gmd.copernicus.org/articles/13/1335/2020/&lt;br /&gt;
* Lin et al. 2021, WRF4PALM: https://doi.org/10.5194/gmd-14-2503-2021&lt;br /&gt;
* Lin et al. 2024, GEO4PALM: https://doi.org/10.5194/gmd-17-815-2024&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3841</id>
		<title>Página principal</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3841"/>
		<updated>2026-10-01T18:49:43Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Modelos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SCAD del CIMA (Cluster) ==&lt;br /&gt;
=== Reglamento de uso del SCAD del CIMA ===&lt;br /&gt;
Versión descargable: [[ Media:SCAD-Reglamento_de_uso.pdf‎ | SCAD-Reglamento_de_uso‎ ]]&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
*El siguiente reglamento puede ser modificado sin previo aviso y es responsabilidad de los usuarios mantenerse informados leyendo el mismo regularmente.&lt;br /&gt;
&lt;br /&gt;
*El SCAD del CIMA sólo se puede utilizar para realizar corridas de procesos en 	paralelo con fines de investigación científica&lt;br /&gt;
&lt;br /&gt;
*El SCAD es un recurso compartido por todos, por lo que debe usarse de forma RESPONSABLE y no se debe abusar del mismo&lt;br /&gt;
&lt;br /&gt;
==== De su uso ====&lt;br /&gt;
&lt;br /&gt;
*Está absolutamente prohibido navegar en internet o descargar archivos a través de los clusters. Sólo están permitidas las conexiones hacia los clusters a través de protocolos seguros (ssh, scp, etc.).&lt;br /&gt;
&lt;br /&gt;
*La administración de las corridas (jobs) en los clusters se realiza a través de un sistema de colas (pbs). Esta prohibido lanzar corridas fuera del sistema de colas&lt;br /&gt;
&lt;br /&gt;
*La cantidad de trabajos que pueden estar corriendo, depende de la cantidad y el tipo de nodos que hayan sido solicitados para cada una de las corridas.&lt;br /&gt;
&lt;br /&gt;
*Sólo se puede utilizar para corridas de código paralelizado. Bajo ningún concepto se debe usar el nodo principal para correr programas seriales (Ej: pre y post procesamiento de los datos).&lt;br /&gt;
&lt;br /&gt;
==== Almacenamiento ====&lt;br /&gt;
&lt;br /&gt;
*Todos los archivos de salida deben ser almacenados en el directorio  en el directorio de salidas de cada usuario ($HOME/salidas/). Los archivos pueden permanecer almacenados en este directorio durante un plazo máximo de 30 días al cabo de los cuales serán automáticamente eliminados.&lt;br /&gt;
&lt;br /&gt;
*Cada usuario contará con un “$HOME” de poco tamaño para almacenar archivos permanentes (Ej: Programas, códigos, etc)&lt;br /&gt;
&lt;br /&gt;
==== Agradecimiento ====&lt;br /&gt;
&lt;br /&gt;
*Toda publicación que haya utilizado recursos del SCAD del CIMA debe contener el siguiente agradecimiento:&lt;br /&gt;
  “Simulations were made with the high-performance computing clusters available at CIMA/UBA-CONICET, Argentina”&lt;br /&gt;
&lt;br /&gt;
=== Autoridades ===&lt;br /&gt;
;Comité Asesor Científico:&lt;br /&gt;
: Claudio Menendez&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
: Celeste Saulo&lt;br /&gt;
: Silvina Solman&lt;br /&gt;
: Pedro Flombaum (Director CIMA)&lt;br /&gt;
&lt;br /&gt;
;Coordinador:&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
&lt;br /&gt;
;Supervisor:&lt;br /&gt;
: Gabriel Vieytes&lt;br /&gt;
&lt;br /&gt;
=== Monitoreo ===&lt;br /&gt;
&lt;br /&gt;
Página de monitoreo y estadísticas del SCAD del CIMA &lt;br /&gt;
*&#039;&#039;&#039;&#039;&#039;   https://scad.cima.fcen.uba.ar/&lt;br /&gt;
&lt;br /&gt;
=== Solicitud de cuenta para uso del SCAD del CIMA ===&lt;br /&gt;
Para poder hacer uso de los cluster del SCAD del CIMA, es necesario solicitar la apertura de una cuenta personal enviando un mail a [mailto:soporte@cima.fcen.uba.ar soporte@cima.fcen.uba.ar].&lt;br /&gt;
&lt;br /&gt;
=== Guía de usuario del SCAD del CIMA ===&lt;br /&gt;
Acceso a la Guía de usuario haciendo click [[Guía de usuario del SCAD del CIMA | aquí]]&lt;br /&gt;
&lt;br /&gt;
=== Composición del SCAD del CIMA ===&lt;br /&gt;
Detalle de software y hardware que conforman el SCAD del cima haciendo click [[Composición del SCAD del CIMA | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
Links de referencia haciendo click [[Links | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== FAQ ===&lt;br /&gt;
Preguntas frecuentes haciendo click [[FAQ | aquí ]]&lt;br /&gt;
&lt;br /&gt;
== Datos ==&lt;br /&gt;
Acceso a [[papa-deimos]], servidor de almacenamiento y procesamiento de datos del CIMA compartido con el DCAO.&lt;br /&gt;
&lt;br /&gt;
De los datos disponibles en el clúster SCAD (hydra) para simular (forzantes para modelos cómo el WRF, ORCHIDEE, ...) aquí [[DatosSCADSimular]]&lt;br /&gt;
&lt;br /&gt;
Del grupo &amp;lt;B&amp;gt;ILLAPA&amp;lt;/B&amp;gt;: &#039;Mecanismos del clima regional y sus impactos&#039; descritos aquí [[DatosRCMSueloAtmosfera]]&lt;br /&gt;
&lt;br /&gt;
== Reanalysis ==&lt;br /&gt;
&#039;&#039;&#039;Copia de los archivos para uso interno del CIMA&#039;&#039;&#039;. Datos Disponibles via FTP y DODS(**) de:&lt;br /&gt;
NCEP Climate Forecast System Reanalysis (CFSR)&lt;br /&gt;
ds093.0: 6-hourly Products / Reanalysis  1980-2010(*) / https://rda.ucar.edu/datasets/ds093.0/index.html&lt;br /&gt;
&lt;br /&gt;
Para descargar los archivos via &#039;&#039;&#039;FTP&#039;&#039;&#039;:   ftp://usuario:password@datos.cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
Para abrir los archivos en forma remota &#039;&#039;&#039;DODS&#039;&#039;&#039;: http://gds.cima.fcen.uba.ar:9090/dods/ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Descripción y ayudas:&#039;&#039;&#039; https://www.cima.fcen.uba.ar/CFSR.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución horizontal&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Sudamerica: 0.5° x 0.5°  -  15°N a 65°S  y  30°W a 85°W       ( 110 x 160 Longitud/Latitud)&lt;br /&gt;
 &lt;br /&gt;
Global:     2.5° x 2.5°  -  90°N a 90°S  y   0°E a 357.5°E    ( 144 x  73 Longitud/Latitud) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución vertical&#039;&#039;&#039; en las variables de Nivel: 32 niveles de presión (mbar)&lt;br /&gt;
 &lt;br /&gt;
1000 975 950 925 900 875 850 825 800 775 750 700 650 600 550  500 450 400 350 300 250 225 200 175 150 125 100 70 50 30 20 10  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Período&#039;&#039;&#039; 31 Años : 1980/01/01 a 2010/12/31   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Frecuencia del Pronóstico&#039;&#039;&#039;:   0 6 12 18 h&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25 VARIABLES DE SUPERFICIE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6 VARIABLES DE PRESION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Modelos ==&lt;br /&gt;
&lt;br /&gt;
*[[CHIMERE]]&lt;br /&gt;
&lt;br /&gt;
*[[CESM]]&lt;br /&gt;
&lt;br /&gt;
*[[CROCO]]&lt;br /&gt;
&lt;br /&gt;
*[[ECCO]]&lt;br /&gt;
&lt;br /&gt;
*[[EMU]]&lt;br /&gt;
&lt;br /&gt;
*[[LMDZ]]&lt;br /&gt;
&lt;br /&gt;
*[[MARS]]&lt;br /&gt;
&lt;br /&gt;
*[[ORCHIDEE]]&lt;br /&gt;
&lt;br /&gt;
*[[PALM]]&lt;br /&gt;
&lt;br /&gt;
*[[RegIPSL]]&lt;br /&gt;
&lt;br /&gt;
*[[RCA]]&lt;br /&gt;
&lt;br /&gt;
*[[WRF]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--*[[CMAQ]]&lt;br /&gt;
&lt;br /&gt;
*[[SMOKE]]&lt;br /&gt;
&lt;br /&gt;
*[[IOAPI]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mapeo de datos de secuenciación ==&lt;br /&gt;
&lt;br /&gt;
* [[Mapeo de lecturas contra bases de datos de referencia]]&lt;br /&gt;
&lt;br /&gt;
== Documentación ==&lt;br /&gt;
*[[Redes avanzadas]]&lt;br /&gt;
&lt;br /&gt;
*[[Libros]]&lt;br /&gt;
&lt;br /&gt;
*[[Memoria Compartida (e.g.OpenMP)]]&lt;br /&gt;
&lt;br /&gt;
*[[anaconda]]&lt;br /&gt;
&lt;br /&gt;
*[[llaves ssh]]&lt;br /&gt;
&lt;br /&gt;
*[[entornos python]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración correo electrónico | Configuración correo electrónico (mail)]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración filtros webmail para avisos de vacaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[procesos zombies]]&lt;br /&gt;
&lt;br /&gt;
*[[parTUXza]]&lt;br /&gt;
&lt;br /&gt;
*[[Seguimiento simulaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[Spyder]]&lt;br /&gt;
&lt;br /&gt;
*[[Jupyter Notebook]]&lt;br /&gt;
&lt;br /&gt;
*[[Rstudio]]&lt;br /&gt;
&lt;br /&gt;
*[[Cambio de contraseña]]&lt;br /&gt;
&lt;br /&gt;
*[[VPN]]&lt;br /&gt;
&lt;br /&gt;
* [[Café programación]]&lt;br /&gt;
&lt;br /&gt;
== Reparaciones ==&lt;br /&gt;
*Documentación para ingreso de personal de service [[ Media:SEGUROS_CONTRAT_2016.pdf‎ | Seguros‎ ]]&lt;br /&gt;
&lt;br /&gt;
*[[Empresas para service de AA]]&lt;br /&gt;
&lt;br /&gt;
== Becarios ==&lt;br /&gt;
&lt;br /&gt;
== Programa pasajes OPTAR-FCEN ==&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
En la Sub seccion &#039;&#039;&#039;Viajes&#039;&#039;&#039; de la Sección Trámites de la web oficial de la FCEN-UBA → https://exactas.uba.ar/ van a encontrar la Normativa vigente, el Instructivo y la Planilla de Solicitud del &#039;&#039;&#039;Programa Reserva y Pago de Pasajes Aéreos - Convenio FCEN-OPTAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
En el Instructivo van a encontrar QUÉ se debe hacer para que el uso del programa sea &#039;&#039;exitoso&#039;&#039;, lo que viene a continuación son detalles clave a tener en cuenta pero no es la &#039;&#039;guía definitiva&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Repito, LEAN EL INSTRUCTIVO PARA NO OLVIDAR PASOS CLAVE. E.g.: Una vez realizado el viaje el área requirente deberá enviar los pases de embarque correspondientes, a fin de que se pueda dar por realizado el viaje.&lt;br /&gt;
&lt;br /&gt;
El programa puede ser utilizado tanto para que viaje gente de la FCEN como para que venga gente del extranjero a la FCEN -este último punto resulta clave por la evidente relación CIMA-Francia: para pasantías, para viajes de profesores invitades, autoridades IRD, etc.&lt;br /&gt;
&lt;br /&gt;
==== Puntos clave a tener en cuenta para solicitar presupuesto y compra de pasaje vía el Programa OPTAR-FCEN ====&lt;br /&gt;
&lt;br /&gt;
* la Planilla de Solicitud debe ser firmada por la Autoridad del Departamento, Instituto, Secretaria de quien viaja. En el caso del CIMA, la firma debe ser del Director del Instituto, en este caso el Prof. Pedro Flombaum&lt;br /&gt;
&lt;br /&gt;
* la solicitud debe enviarse a hacienda@de.fcen.uba.ar, rosana@de.fcen.uba.ar, y a sicyt@de.fcen.uba.ar &lt;br /&gt;
&lt;br /&gt;
* en el mail de solicitud debe ponerse en copia a la autoridad que firmó la planilla (en este caso el Prof. Flombaum)&lt;br /&gt;
&lt;br /&gt;
* junto a la planilla completa con la firma de la autoridad debe adjuntarse una carta de invitación/aceptación -u otro documento- que avale la actividad que se llevará a cabo en el marco de la solicitud del pasaje&lt;br /&gt;
&lt;br /&gt;
* en el cuerpo del correo se debe aclarar quién reintegrará el dinero a la facultad (la persona que viajará, el instituto al cual pertenece, institución que brinda becas, etc)&lt;br /&gt;
&lt;br /&gt;
* el mail &#039;&#039;debería&#039;&#039; ser enviado desde la secretaría del instituto o departamento. En caso de que se tenga poco tiempo para hacer la solicitud, el correo lo puede enviar quien solicita presupuesto y posterior compra del pasaje, para que sea la primera persona en enterarse de las novedades&lt;br /&gt;
&lt;br /&gt;
== Problemas habituales ==&lt;br /&gt;
* [[Phishing]]&lt;br /&gt;
&lt;br /&gt;
== Compras ==&lt;br /&gt;
* [[Especificaciones servidor]]&lt;br /&gt;
&lt;br /&gt;
== Direcciones de correo electrónico con dominio CIMA ==&lt;br /&gt;
=== ¿Quién debe tener una cuenta @cima.fcen.uba.ar? ===&lt;br /&gt;
* Todos los que tengan lugar de trabajo en el CIMA (investigadores, becaries, CPA, agentes externos).&lt;br /&gt;
* No incluye: pasantes temporales (estudiantes de grado, master, pasantes, visitantes). Salvo pedidos excepcionales que serán evaluados por el CD.&lt;br /&gt;
&lt;br /&gt;
=== ¿Cuándo corresponde dar de baja una dirección? === &lt;br /&gt;
* Las bajas se darán por jubilación, cambio de lugar de trabajo, finalización de doctorado (si no siguen en el CIMA)&lt;br /&gt;
Listas de correo&lt;br /&gt;
* Las listas de estamento correspondientes y a listas generales solo incluyen direcciones @cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
=== Acceso a servidores === &lt;br /&gt;
* Los colaboradores externos podrán tener acceso a los servidores para trabajar con un investigador o grupo del CIMA (se otorgará el permiso con la cuenta de mail que indique la persona interesada). El pedido de alta y baja tiene que ser hecho por el investigador responsable.&lt;br /&gt;
&lt;br /&gt;
== Logos CIMA e IFAECI ==&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.png‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en png ]]&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.jpg‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en jpg ]]&lt;br /&gt;
* CIMA Versión vectorial: [[ Media:logos-CIMA-UBA-CONICET.pdf‎ | Logos CIMA - versiones permitidas (principal y en gris o con fondo azul) - formato vectorial ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-01.png‎ | Logo IFAECI - con fondo azul en png ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-02.png‎ | Logo IFAECI - con fondo blanco en png ]]&lt;br /&gt;
* IFAECI tutelas: [[ Media:4tutelasIFAECI-logos-sept2024.png‎ | Banner con logos CNRS, CONICET, IRD y UBA - con fondo blanco en png ]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3840</id>
		<title>Página principal</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3840"/>
		<updated>2026-10-01T18:49:20Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Modelos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SCAD del CIMA (Cluster) ==&lt;br /&gt;
=== Reglamento de uso del SCAD del CIMA ===&lt;br /&gt;
Versión descargable: [[ Media:SCAD-Reglamento_de_uso.pdf‎ | SCAD-Reglamento_de_uso‎ ]]&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
*El siguiente reglamento puede ser modificado sin previo aviso y es responsabilidad de los usuarios mantenerse informados leyendo el mismo regularmente.&lt;br /&gt;
&lt;br /&gt;
*El SCAD del CIMA sólo se puede utilizar para realizar corridas de procesos en 	paralelo con fines de investigación científica&lt;br /&gt;
&lt;br /&gt;
*El SCAD es un recurso compartido por todos, por lo que debe usarse de forma RESPONSABLE y no se debe abusar del mismo&lt;br /&gt;
&lt;br /&gt;
==== De su uso ====&lt;br /&gt;
&lt;br /&gt;
*Está absolutamente prohibido navegar en internet o descargar archivos a través de los clusters. Sólo están permitidas las conexiones hacia los clusters a través de protocolos seguros (ssh, scp, etc.).&lt;br /&gt;
&lt;br /&gt;
*La administración de las corridas (jobs) en los clusters se realiza a través de un sistema de colas (pbs). Esta prohibido lanzar corridas fuera del sistema de colas&lt;br /&gt;
&lt;br /&gt;
*La cantidad de trabajos que pueden estar corriendo, depende de la cantidad y el tipo de nodos que hayan sido solicitados para cada una de las corridas.&lt;br /&gt;
&lt;br /&gt;
*Sólo se puede utilizar para corridas de código paralelizado. Bajo ningún concepto se debe usar el nodo principal para correr programas seriales (Ej: pre y post procesamiento de los datos).&lt;br /&gt;
&lt;br /&gt;
==== Almacenamiento ====&lt;br /&gt;
&lt;br /&gt;
*Todos los archivos de salida deben ser almacenados en el directorio  en el directorio de salidas de cada usuario ($HOME/salidas/). Los archivos pueden permanecer almacenados en este directorio durante un plazo máximo de 30 días al cabo de los cuales serán automáticamente eliminados.&lt;br /&gt;
&lt;br /&gt;
*Cada usuario contará con un “$HOME” de poco tamaño para almacenar archivos permanentes (Ej: Programas, códigos, etc)&lt;br /&gt;
&lt;br /&gt;
==== Agradecimiento ====&lt;br /&gt;
&lt;br /&gt;
*Toda publicación que haya utilizado recursos del SCAD del CIMA debe contener el siguiente agradecimiento:&lt;br /&gt;
  “Simulations were made with the high-performance computing clusters available at CIMA/UBA-CONICET, Argentina”&lt;br /&gt;
&lt;br /&gt;
=== Autoridades ===&lt;br /&gt;
;Comité Asesor Científico:&lt;br /&gt;
: Claudio Menendez&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
: Celeste Saulo&lt;br /&gt;
: Silvina Solman&lt;br /&gt;
: Pedro Flombaum (Director CIMA)&lt;br /&gt;
&lt;br /&gt;
;Coordinador:&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
&lt;br /&gt;
;Supervisor:&lt;br /&gt;
: Gabriel Vieytes&lt;br /&gt;
&lt;br /&gt;
=== Monitoreo ===&lt;br /&gt;
&lt;br /&gt;
Página de monitoreo y estadísticas del SCAD del CIMA &lt;br /&gt;
*&#039;&#039;&#039;&#039;&#039;   https://scad.cima.fcen.uba.ar/&lt;br /&gt;
&lt;br /&gt;
=== Solicitud de cuenta para uso del SCAD del CIMA ===&lt;br /&gt;
Para poder hacer uso de los cluster del SCAD del CIMA, es necesario solicitar la apertura de una cuenta personal enviando un mail a [mailto:soporte@cima.fcen.uba.ar soporte@cima.fcen.uba.ar].&lt;br /&gt;
&lt;br /&gt;
=== Guía de usuario del SCAD del CIMA ===&lt;br /&gt;
Acceso a la Guía de usuario haciendo click [[Guía de usuario del SCAD del CIMA | aquí]]&lt;br /&gt;
&lt;br /&gt;
=== Composición del SCAD del CIMA ===&lt;br /&gt;
Detalle de software y hardware que conforman el SCAD del cima haciendo click [[Composición del SCAD del CIMA | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
Links de referencia haciendo click [[Links | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== FAQ ===&lt;br /&gt;
Preguntas frecuentes haciendo click [[FAQ | aquí ]]&lt;br /&gt;
&lt;br /&gt;
== Datos ==&lt;br /&gt;
Acceso a [[papa-deimos]], servidor de almacenamiento y procesamiento de datos del CIMA compartido con el DCAO.&lt;br /&gt;
&lt;br /&gt;
De los datos disponibles en el clúster SCAD (hydra) para simular (forzantes para modelos cómo el WRF, ORCHIDEE, ...) aquí [[DatosSCADSimular]]&lt;br /&gt;
&lt;br /&gt;
Del grupo &amp;lt;B&amp;gt;ILLAPA&amp;lt;/B&amp;gt;: &#039;Mecanismos del clima regional y sus impactos&#039; descritos aquí [[DatosRCMSueloAtmosfera]]&lt;br /&gt;
&lt;br /&gt;
== Reanalysis ==&lt;br /&gt;
&#039;&#039;&#039;Copia de los archivos para uso interno del CIMA&#039;&#039;&#039;. Datos Disponibles via FTP y DODS(**) de:&lt;br /&gt;
NCEP Climate Forecast System Reanalysis (CFSR)&lt;br /&gt;
ds093.0: 6-hourly Products / Reanalysis  1980-2010(*) / https://rda.ucar.edu/datasets/ds093.0/index.html&lt;br /&gt;
&lt;br /&gt;
Para descargar los archivos via &#039;&#039;&#039;FTP&#039;&#039;&#039;:   ftp://usuario:password@datos.cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
Para abrir los archivos en forma remota &#039;&#039;&#039;DODS&#039;&#039;&#039;: http://gds.cima.fcen.uba.ar:9090/dods/ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Descripción y ayudas:&#039;&#039;&#039; https://www.cima.fcen.uba.ar/CFSR.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución horizontal&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Sudamerica: 0.5° x 0.5°  -  15°N a 65°S  y  30°W a 85°W       ( 110 x 160 Longitud/Latitud)&lt;br /&gt;
 &lt;br /&gt;
Global:     2.5° x 2.5°  -  90°N a 90°S  y   0°E a 357.5°E    ( 144 x  73 Longitud/Latitud) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución vertical&#039;&#039;&#039; en las variables de Nivel: 32 niveles de presión (mbar)&lt;br /&gt;
 &lt;br /&gt;
1000 975 950 925 900 875 850 825 800 775 750 700 650 600 550  500 450 400 350 300 250 225 200 175 150 125 100 70 50 30 20 10  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Período&#039;&#039;&#039; 31 Años : 1980/01/01 a 2010/12/31   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Frecuencia del Pronóstico&#039;&#039;&#039;:   0 6 12 18 h&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25 VARIABLES DE SUPERFICIE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6 VARIABLES DE PRESION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Modelos ==&lt;br /&gt;
&lt;br /&gt;
*[[CHIMERE]]&lt;br /&gt;
&lt;br /&gt;
*[[CESM]]&lt;br /&gt;
&lt;br /&gt;
*[[CROCO]]&lt;br /&gt;
&lt;br /&gt;
*[[ECCO]]&lt;br /&gt;
&lt;br /&gt;
*[[EMU]]&lt;br /&gt;
&lt;br /&gt;
*[[LMDZ]]&lt;br /&gt;
&lt;br /&gt;
*[[MARS]]&lt;br /&gt;
&lt;br /&gt;
*[[ORCHIDEE]]&lt;br /&gt;
&lt;br /&gt;
*[[PALM &amp;amp; PALM4U]]&lt;br /&gt;
&lt;br /&gt;
*[[RegIPSL]]&lt;br /&gt;
&lt;br /&gt;
*[[RCA]]&lt;br /&gt;
&lt;br /&gt;
*[[WRF]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--*[[CMAQ]]&lt;br /&gt;
&lt;br /&gt;
*[[SMOKE]]&lt;br /&gt;
&lt;br /&gt;
*[[IOAPI]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mapeo de datos de secuenciación ==&lt;br /&gt;
&lt;br /&gt;
* [[Mapeo de lecturas contra bases de datos de referencia]]&lt;br /&gt;
&lt;br /&gt;
== Documentación ==&lt;br /&gt;
*[[Redes avanzadas]]&lt;br /&gt;
&lt;br /&gt;
*[[Libros]]&lt;br /&gt;
&lt;br /&gt;
*[[Memoria Compartida (e.g.OpenMP)]]&lt;br /&gt;
&lt;br /&gt;
*[[anaconda]]&lt;br /&gt;
&lt;br /&gt;
*[[llaves ssh]]&lt;br /&gt;
&lt;br /&gt;
*[[entornos python]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración correo electrónico | Configuración correo electrónico (mail)]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración filtros webmail para avisos de vacaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[procesos zombies]]&lt;br /&gt;
&lt;br /&gt;
*[[parTUXza]]&lt;br /&gt;
&lt;br /&gt;
*[[Seguimiento simulaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[Spyder]]&lt;br /&gt;
&lt;br /&gt;
*[[Jupyter Notebook]]&lt;br /&gt;
&lt;br /&gt;
*[[Rstudio]]&lt;br /&gt;
&lt;br /&gt;
*[[Cambio de contraseña]]&lt;br /&gt;
&lt;br /&gt;
*[[VPN]]&lt;br /&gt;
&lt;br /&gt;
* [[Café programación]]&lt;br /&gt;
&lt;br /&gt;
== Reparaciones ==&lt;br /&gt;
*Documentación para ingreso de personal de service [[ Media:SEGUROS_CONTRAT_2016.pdf‎ | Seguros‎ ]]&lt;br /&gt;
&lt;br /&gt;
*[[Empresas para service de AA]]&lt;br /&gt;
&lt;br /&gt;
== Becarios ==&lt;br /&gt;
&lt;br /&gt;
== Programa pasajes OPTAR-FCEN ==&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
En la Sub seccion &#039;&#039;&#039;Viajes&#039;&#039;&#039; de la Sección Trámites de la web oficial de la FCEN-UBA → https://exactas.uba.ar/ van a encontrar la Normativa vigente, el Instructivo y la Planilla de Solicitud del &#039;&#039;&#039;Programa Reserva y Pago de Pasajes Aéreos - Convenio FCEN-OPTAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
En el Instructivo van a encontrar QUÉ se debe hacer para que el uso del programa sea &#039;&#039;exitoso&#039;&#039;, lo que viene a continuación son detalles clave a tener en cuenta pero no es la &#039;&#039;guía definitiva&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Repito, LEAN EL INSTRUCTIVO PARA NO OLVIDAR PASOS CLAVE. E.g.: Una vez realizado el viaje el área requirente deberá enviar los pases de embarque correspondientes, a fin de que se pueda dar por realizado el viaje.&lt;br /&gt;
&lt;br /&gt;
El programa puede ser utilizado tanto para que viaje gente de la FCEN como para que venga gente del extranjero a la FCEN -este último punto resulta clave por la evidente relación CIMA-Francia: para pasantías, para viajes de profesores invitades, autoridades IRD, etc.&lt;br /&gt;
&lt;br /&gt;
==== Puntos clave a tener en cuenta para solicitar presupuesto y compra de pasaje vía el Programa OPTAR-FCEN ====&lt;br /&gt;
&lt;br /&gt;
* la Planilla de Solicitud debe ser firmada por la Autoridad del Departamento, Instituto, Secretaria de quien viaja. En el caso del CIMA, la firma debe ser del Director del Instituto, en este caso el Prof. Pedro Flombaum&lt;br /&gt;
&lt;br /&gt;
* la solicitud debe enviarse a hacienda@de.fcen.uba.ar, rosana@de.fcen.uba.ar, y a sicyt@de.fcen.uba.ar &lt;br /&gt;
&lt;br /&gt;
* en el mail de solicitud debe ponerse en copia a la autoridad que firmó la planilla (en este caso el Prof. Flombaum)&lt;br /&gt;
&lt;br /&gt;
* junto a la planilla completa con la firma de la autoridad debe adjuntarse una carta de invitación/aceptación -u otro documento- que avale la actividad que se llevará a cabo en el marco de la solicitud del pasaje&lt;br /&gt;
&lt;br /&gt;
* en el cuerpo del correo se debe aclarar quién reintegrará el dinero a la facultad (la persona que viajará, el instituto al cual pertenece, institución que brinda becas, etc)&lt;br /&gt;
&lt;br /&gt;
* el mail &#039;&#039;debería&#039;&#039; ser enviado desde la secretaría del instituto o departamento. En caso de que se tenga poco tiempo para hacer la solicitud, el correo lo puede enviar quien solicita presupuesto y posterior compra del pasaje, para que sea la primera persona en enterarse de las novedades&lt;br /&gt;
&lt;br /&gt;
== Problemas habituales ==&lt;br /&gt;
* [[Phishing]]&lt;br /&gt;
&lt;br /&gt;
== Compras ==&lt;br /&gt;
* [[Especificaciones servidor]]&lt;br /&gt;
&lt;br /&gt;
== Direcciones de correo electrónico con dominio CIMA ==&lt;br /&gt;
=== ¿Quién debe tener una cuenta @cima.fcen.uba.ar? ===&lt;br /&gt;
* Todos los que tengan lugar de trabajo en el CIMA (investigadores, becaries, CPA, agentes externos).&lt;br /&gt;
* No incluye: pasantes temporales (estudiantes de grado, master, pasantes, visitantes). Salvo pedidos excepcionales que serán evaluados por el CD.&lt;br /&gt;
&lt;br /&gt;
=== ¿Cuándo corresponde dar de baja una dirección? === &lt;br /&gt;
* Las bajas se darán por jubilación, cambio de lugar de trabajo, finalización de doctorado (si no siguen en el CIMA)&lt;br /&gt;
Listas de correo&lt;br /&gt;
* Las listas de estamento correspondientes y a listas generales solo incluyen direcciones @cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
=== Acceso a servidores === &lt;br /&gt;
* Los colaboradores externos podrán tener acceso a los servidores para trabajar con un investigador o grupo del CIMA (se otorgará el permiso con la cuenta de mail que indique la persona interesada). El pedido de alta y baja tiene que ser hecho por el investigador responsable.&lt;br /&gt;
&lt;br /&gt;
== Logos CIMA e IFAECI ==&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.png‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en png ]]&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.jpg‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en jpg ]]&lt;br /&gt;
* CIMA Versión vectorial: [[ Media:logos-CIMA-UBA-CONICET.pdf‎ | Logos CIMA - versiones permitidas (principal y en gris o con fondo azul) - formato vectorial ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-01.png‎ | Logo IFAECI - con fondo azul en png ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-02.png‎ | Logo IFAECI - con fondo blanco en png ]]&lt;br /&gt;
* IFAECI tutelas: [[ Media:4tutelasIFAECI-logos-sept2024.png‎ | Banner con logos CNRS, CONICET, IRD y UBA - con fondo blanco en png ]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3839</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3839"/>
		<updated>2026-10-01T18:46:52Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PALM is a large-eddy simulation (LES) model for atmospheric and oceanic boundary-layer flows, developed mainly at the Institute of Meteorology and Climatology of Leibniz Universität Hannover. It is written in Fortran, parallelized with MPI, uses NetCDF for input and output, and is distributed as free software (GPLv3). Instead of parametrizing boundary-layer turbulence as a mesoscale model such as WRF does, PALM resolves the large eddies explicitly, which makes it suitable for simulations at the scale of meters. PALM-4U (PALM for urban applications) is the set of components that extend the model to cities: buildings are resolved explicitly on the grid, and dedicated modules handle the urban surface energy balance (urban surface model), soil and vegetation (land surface model), 3D shading and reflections between buildings (radiative transfer model), trees (plant canopy model) and human thermal comfort indices (biometeorology), among others. A PALM-4U simulation takes a static driver (a NetCDF file describing terrain, buildings, vegetation and surface types) and, optionally, a dynamic driver with boundary conditions taken from a larger-scale model, typically WRF. For a general description of the model system see Maronga et al. (2020), linked at the end.&lt;br /&gt;
&lt;br /&gt;
This page describes how PALM 24.04 was compiled and run on Hydra (PBS, queue larga), including the problems found along the way. It was tested between late June and early July 2026. Wherever you see &amp;lt;user&amp;gt;, use your own Hydra username.&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3838</id>
		<title>PALM</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=PALM&amp;diff=3838"/>
		<updated>2026-10-01T18:44:28Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: Página creada con «Prueba PALM»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Prueba PALM&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3837</id>
		<title>Página principal</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=P%C3%A1gina_principal&amp;diff=3837"/>
		<updated>2026-10-01T18:44:04Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Modelos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SCAD del CIMA (Cluster) ==&lt;br /&gt;
=== Reglamento de uso del SCAD del CIMA ===&lt;br /&gt;
Versión descargable: [[ Media:SCAD-Reglamento_de_uso.pdf‎ | SCAD-Reglamento_de_uso‎ ]]&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
*El siguiente reglamento puede ser modificado sin previo aviso y es responsabilidad de los usuarios mantenerse informados leyendo el mismo regularmente.&lt;br /&gt;
&lt;br /&gt;
*El SCAD del CIMA sólo se puede utilizar para realizar corridas de procesos en 	paralelo con fines de investigación científica&lt;br /&gt;
&lt;br /&gt;
*El SCAD es un recurso compartido por todos, por lo que debe usarse de forma RESPONSABLE y no se debe abusar del mismo&lt;br /&gt;
&lt;br /&gt;
==== De su uso ====&lt;br /&gt;
&lt;br /&gt;
*Está absolutamente prohibido navegar en internet o descargar archivos a través de los clusters. Sólo están permitidas las conexiones hacia los clusters a través de protocolos seguros (ssh, scp, etc.).&lt;br /&gt;
&lt;br /&gt;
*La administración de las corridas (jobs) en los clusters se realiza a través de un sistema de colas (pbs). Esta prohibido lanzar corridas fuera del sistema de colas&lt;br /&gt;
&lt;br /&gt;
*La cantidad de trabajos que pueden estar corriendo, depende de la cantidad y el tipo de nodos que hayan sido solicitados para cada una de las corridas.&lt;br /&gt;
&lt;br /&gt;
*Sólo se puede utilizar para corridas de código paralelizado. Bajo ningún concepto se debe usar el nodo principal para correr programas seriales (Ej: pre y post procesamiento de los datos).&lt;br /&gt;
&lt;br /&gt;
==== Almacenamiento ====&lt;br /&gt;
&lt;br /&gt;
*Todos los archivos de salida deben ser almacenados en el directorio  en el directorio de salidas de cada usuario ($HOME/salidas/). Los archivos pueden permanecer almacenados en este directorio durante un plazo máximo de 30 días al cabo de los cuales serán automáticamente eliminados.&lt;br /&gt;
&lt;br /&gt;
*Cada usuario contará con un “$HOME” de poco tamaño para almacenar archivos permanentes (Ej: Programas, códigos, etc)&lt;br /&gt;
&lt;br /&gt;
==== Agradecimiento ====&lt;br /&gt;
&lt;br /&gt;
*Toda publicación que haya utilizado recursos del SCAD del CIMA debe contener el siguiente agradecimiento:&lt;br /&gt;
  “Simulations were made with the high-performance computing clusters available at CIMA/UBA-CONICET, Argentina”&lt;br /&gt;
&lt;br /&gt;
=== Autoridades ===&lt;br /&gt;
;Comité Asesor Científico:&lt;br /&gt;
: Claudio Menendez&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
: Celeste Saulo&lt;br /&gt;
: Silvina Solman&lt;br /&gt;
: Pedro Flombaum (Director CIMA)&lt;br /&gt;
&lt;br /&gt;
;Coordinador:&lt;br /&gt;
: Juan Ruiz&lt;br /&gt;
&lt;br /&gt;
;Supervisor:&lt;br /&gt;
: Gabriel Vieytes&lt;br /&gt;
&lt;br /&gt;
=== Monitoreo ===&lt;br /&gt;
&lt;br /&gt;
Página de monitoreo y estadísticas del SCAD del CIMA &lt;br /&gt;
*&#039;&#039;&#039;&#039;&#039;   https://scad.cima.fcen.uba.ar/&lt;br /&gt;
&lt;br /&gt;
=== Solicitud de cuenta para uso del SCAD del CIMA ===&lt;br /&gt;
Para poder hacer uso de los cluster del SCAD del CIMA, es necesario solicitar la apertura de una cuenta personal enviando un mail a [mailto:soporte@cima.fcen.uba.ar soporte@cima.fcen.uba.ar].&lt;br /&gt;
&lt;br /&gt;
=== Guía de usuario del SCAD del CIMA ===&lt;br /&gt;
Acceso a la Guía de usuario haciendo click [[Guía de usuario del SCAD del CIMA | aquí]]&lt;br /&gt;
&lt;br /&gt;
=== Composición del SCAD del CIMA ===&lt;br /&gt;
Detalle de software y hardware que conforman el SCAD del cima haciendo click [[Composición del SCAD del CIMA | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
Links de referencia haciendo click [[Links | aquí ]]&lt;br /&gt;
&lt;br /&gt;
=== FAQ ===&lt;br /&gt;
Preguntas frecuentes haciendo click [[FAQ | aquí ]]&lt;br /&gt;
&lt;br /&gt;
== Datos ==&lt;br /&gt;
Acceso a [[papa-deimos]], servidor de almacenamiento y procesamiento de datos del CIMA compartido con el DCAO.&lt;br /&gt;
&lt;br /&gt;
De los datos disponibles en el clúster SCAD (hydra) para simular (forzantes para modelos cómo el WRF, ORCHIDEE, ...) aquí [[DatosSCADSimular]]&lt;br /&gt;
&lt;br /&gt;
Del grupo &amp;lt;B&amp;gt;ILLAPA&amp;lt;/B&amp;gt;: &#039;Mecanismos del clima regional y sus impactos&#039; descritos aquí [[DatosRCMSueloAtmosfera]]&lt;br /&gt;
&lt;br /&gt;
== Reanalysis ==&lt;br /&gt;
&#039;&#039;&#039;Copia de los archivos para uso interno del CIMA&#039;&#039;&#039;. Datos Disponibles via FTP y DODS(**) de:&lt;br /&gt;
NCEP Climate Forecast System Reanalysis (CFSR)&lt;br /&gt;
ds093.0: 6-hourly Products / Reanalysis  1980-2010(*) / https://rda.ucar.edu/datasets/ds093.0/index.html&lt;br /&gt;
&lt;br /&gt;
Para descargar los archivos via &#039;&#039;&#039;FTP&#039;&#039;&#039;:   ftp://usuario:password@datos.cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
Para abrir los archivos en forma remota &#039;&#039;&#039;DODS&#039;&#039;&#039;: http://gds.cima.fcen.uba.ar:9090/dods/ &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Descripción y ayudas:&#039;&#039;&#039; https://www.cima.fcen.uba.ar/CFSR.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución horizontal&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Sudamerica: 0.5° x 0.5°  -  15°N a 65°S  y  30°W a 85°W       ( 110 x 160 Longitud/Latitud)&lt;br /&gt;
 &lt;br /&gt;
Global:     2.5° x 2.5°  -  90°N a 90°S  y   0°E a 357.5°E    ( 144 x  73 Longitud/Latitud) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resolución vertical&#039;&#039;&#039; en las variables de Nivel: 32 niveles de presión (mbar)&lt;br /&gt;
 &lt;br /&gt;
1000 975 950 925 900 875 850 825 800 775 750 700 650 600 550  500 450 400 350 300 250 225 200 175 150 125 100 70 50 30 20 10  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Período&#039;&#039;&#039; 31 Años : 1980/01/01 a 2010/12/31   &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Frecuencia del Pronóstico&#039;&#039;&#039;:   0 6 12 18 h&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25 VARIABLES DE SUPERFICIE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6 VARIABLES DE PRESION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Modelos ==&lt;br /&gt;
&lt;br /&gt;
*[[CHIMERE]]&lt;br /&gt;
&lt;br /&gt;
*[[CESM]]&lt;br /&gt;
&lt;br /&gt;
*[[CROCO]]&lt;br /&gt;
&lt;br /&gt;
*[[ECCO]]&lt;br /&gt;
&lt;br /&gt;
*[[EMU]]&lt;br /&gt;
&lt;br /&gt;
*[[LMDZ]]&lt;br /&gt;
&lt;br /&gt;
*[[MARS]]&lt;br /&gt;
&lt;br /&gt;
*[[ORCHIDEE]]&lt;br /&gt;
&lt;br /&gt;
*[[PALM]]&lt;br /&gt;
&lt;br /&gt;
*[[RegIPSL]]&lt;br /&gt;
&lt;br /&gt;
*[[RCA]]&lt;br /&gt;
&lt;br /&gt;
*[[WRF]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--*[[CMAQ]]&lt;br /&gt;
&lt;br /&gt;
*[[SMOKE]]&lt;br /&gt;
&lt;br /&gt;
*[[IOAPI]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mapeo de datos de secuenciación ==&lt;br /&gt;
&lt;br /&gt;
* [[Mapeo de lecturas contra bases de datos de referencia]]&lt;br /&gt;
&lt;br /&gt;
== Documentación ==&lt;br /&gt;
*[[Redes avanzadas]]&lt;br /&gt;
&lt;br /&gt;
*[[Libros]]&lt;br /&gt;
&lt;br /&gt;
*[[Memoria Compartida (e.g.OpenMP)]]&lt;br /&gt;
&lt;br /&gt;
*[[anaconda]]&lt;br /&gt;
&lt;br /&gt;
*[[llaves ssh]]&lt;br /&gt;
&lt;br /&gt;
*[[entornos python]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración correo electrónico | Configuración correo electrónico (mail)]]&lt;br /&gt;
&lt;br /&gt;
*[[Configuración filtros webmail para avisos de vacaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[procesos zombies]]&lt;br /&gt;
&lt;br /&gt;
*[[parTUXza]]&lt;br /&gt;
&lt;br /&gt;
*[[Seguimiento simulaciones]]&lt;br /&gt;
&lt;br /&gt;
*[[Spyder]]&lt;br /&gt;
&lt;br /&gt;
*[[Jupyter Notebook]]&lt;br /&gt;
&lt;br /&gt;
*[[Rstudio]]&lt;br /&gt;
&lt;br /&gt;
*[[Cambio de contraseña]]&lt;br /&gt;
&lt;br /&gt;
*[[VPN]]&lt;br /&gt;
&lt;br /&gt;
* [[Café programación]]&lt;br /&gt;
&lt;br /&gt;
== Reparaciones ==&lt;br /&gt;
*Documentación para ingreso de personal de service [[ Media:SEGUROS_CONTRAT_2016.pdf‎ | Seguros‎ ]]&lt;br /&gt;
&lt;br /&gt;
*[[Empresas para service de AA]]&lt;br /&gt;
&lt;br /&gt;
== Becarios ==&lt;br /&gt;
&lt;br /&gt;
== Programa pasajes OPTAR-FCEN ==&lt;br /&gt;
&lt;br /&gt;
==== General ====&lt;br /&gt;
&lt;br /&gt;
En la Sub seccion &#039;&#039;&#039;Viajes&#039;&#039;&#039; de la Sección Trámites de la web oficial de la FCEN-UBA → https://exactas.uba.ar/ van a encontrar la Normativa vigente, el Instructivo y la Planilla de Solicitud del &#039;&#039;&#039;Programa Reserva y Pago de Pasajes Aéreos - Convenio FCEN-OPTAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
En el Instructivo van a encontrar QUÉ se debe hacer para que el uso del programa sea &#039;&#039;exitoso&#039;&#039;, lo que viene a continuación son detalles clave a tener en cuenta pero no es la &#039;&#039;guía definitiva&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Repito, LEAN EL INSTRUCTIVO PARA NO OLVIDAR PASOS CLAVE. E.g.: Una vez realizado el viaje el área requirente deberá enviar los pases de embarque correspondientes, a fin de que se pueda dar por realizado el viaje.&lt;br /&gt;
&lt;br /&gt;
El programa puede ser utilizado tanto para que viaje gente de la FCEN como para que venga gente del extranjero a la FCEN -este último punto resulta clave por la evidente relación CIMA-Francia: para pasantías, para viajes de profesores invitades, autoridades IRD, etc.&lt;br /&gt;
&lt;br /&gt;
==== Puntos clave a tener en cuenta para solicitar presupuesto y compra de pasaje vía el Programa OPTAR-FCEN ====&lt;br /&gt;
&lt;br /&gt;
* la Planilla de Solicitud debe ser firmada por la Autoridad del Departamento, Instituto, Secretaria de quien viaja. En el caso del CIMA, la firma debe ser del Director del Instituto, en este caso el Prof. Pedro Flombaum&lt;br /&gt;
&lt;br /&gt;
* la solicitud debe enviarse a hacienda@de.fcen.uba.ar, rosana@de.fcen.uba.ar, y a sicyt@de.fcen.uba.ar &lt;br /&gt;
&lt;br /&gt;
* en el mail de solicitud debe ponerse en copia a la autoridad que firmó la planilla (en este caso el Prof. Flombaum)&lt;br /&gt;
&lt;br /&gt;
* junto a la planilla completa con la firma de la autoridad debe adjuntarse una carta de invitación/aceptación -u otro documento- que avale la actividad que se llevará a cabo en el marco de la solicitud del pasaje&lt;br /&gt;
&lt;br /&gt;
* en el cuerpo del correo se debe aclarar quién reintegrará el dinero a la facultad (la persona que viajará, el instituto al cual pertenece, institución que brinda becas, etc)&lt;br /&gt;
&lt;br /&gt;
* el mail &#039;&#039;debería&#039;&#039; ser enviado desde la secretaría del instituto o departamento. En caso de que se tenga poco tiempo para hacer la solicitud, el correo lo puede enviar quien solicita presupuesto y posterior compra del pasaje, para que sea la primera persona en enterarse de las novedades&lt;br /&gt;
&lt;br /&gt;
== Problemas habituales ==&lt;br /&gt;
* [[Phishing]]&lt;br /&gt;
&lt;br /&gt;
== Compras ==&lt;br /&gt;
* [[Especificaciones servidor]]&lt;br /&gt;
&lt;br /&gt;
== Direcciones de correo electrónico con dominio CIMA ==&lt;br /&gt;
=== ¿Quién debe tener una cuenta @cima.fcen.uba.ar? ===&lt;br /&gt;
* Todos los que tengan lugar de trabajo en el CIMA (investigadores, becaries, CPA, agentes externos).&lt;br /&gt;
* No incluye: pasantes temporales (estudiantes de grado, master, pasantes, visitantes). Salvo pedidos excepcionales que serán evaluados por el CD.&lt;br /&gt;
&lt;br /&gt;
=== ¿Cuándo corresponde dar de baja una dirección? === &lt;br /&gt;
* Las bajas se darán por jubilación, cambio de lugar de trabajo, finalización de doctorado (si no siguen en el CIMA)&lt;br /&gt;
Listas de correo&lt;br /&gt;
* Las listas de estamento correspondientes y a listas generales solo incluyen direcciones @cima.fcen.uba.ar&lt;br /&gt;
&lt;br /&gt;
=== Acceso a servidores === &lt;br /&gt;
* Los colaboradores externos podrán tener acceso a los servidores para trabajar con un investigador o grupo del CIMA (se otorgará el permiso con la cuenta de mail que indique la persona interesada). El pedido de alta y baja tiene que ser hecho por el investigador responsable.&lt;br /&gt;
&lt;br /&gt;
== Logos CIMA e IFAECI ==&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.png‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en png ]]&lt;br /&gt;
* CIMA oficial: [[ Media:CIMA-CONICET-UBA.jpg‎ | Logo CIMA - versión principal para colocar sobre fondo blanco en jpg ]]&lt;br /&gt;
* CIMA Versión vectorial: [[ Media:logos-CIMA-UBA-CONICET.pdf‎ | Logos CIMA - versiones permitidas (principal y en gris o con fondo azul) - formato vectorial ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-01.png‎ | Logo IFAECI - con fondo azul en png ]]&lt;br /&gt;
* IFAECI: [[ Media:IFAECI-02.png‎ | Logo IFAECI - con fondo blanco en png ]]&lt;br /&gt;
* IFAECI tutelas: [[ Media:4tutelasIFAECI-logos-sept2024.png‎ | Banner con logos CNRS, CONICET, IRD y UBA - con fondo blanco en png ]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3556</id>
		<title>WRF</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3556"/>
		<updated>2025-06-24T15:21:15Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Unavailable variables when running metgrid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Model description =&lt;br /&gt;
Weather Research and Forecast model ([http://www2.mmm.ucar.edu/wrf/users/ WRF], Skamarock, 2008) is a limited area atmospheric model developed by a consortium of american institutions with contributions from the whole community. It is a non-hydrostatic primitive equations model used in a large variety of research areas.&lt;br /&gt;
&lt;br /&gt;
Techincal aspects of the model (v 4.0) are provided in this [http://www2.mmm.ucar.edu/wrf/users/docs/technote/v4_technote.pdf pdf]&lt;br /&gt;
&lt;br /&gt;
= WRF and CIMA = &lt;br /&gt;
CIMA has an HPC called &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; to perform high intensive modelling efforts with WRF.&lt;br /&gt;
&lt;br /&gt;
== hydra ==&lt;br /&gt;
The HPC is part of the Servicio Nacional de Cómputo de Alta Capacidad (SNCAD). &lt;br /&gt;
&lt;br /&gt;
It has been re-installed and re-sorted in Jan 2022 and it has been adapted to common configurations in other international research centers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Selection of compilers &amp;amp; libraries ===&lt;br /&gt;
&lt;br /&gt;
It does not have the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; software to manage compilers and libraries, but it does have an script which allows users to select the compiler. This is done at the terminal with the script &amp;lt;code&amp;gt;source /opt/load-libs.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example selecting intel 2021.4.0, mpich and netcdf 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ source /opt/load-libs.sh&lt;br /&gt;
&lt;br /&gt;
Available libraries:&lt;br /&gt;
1) INTEL 2021.4.0: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
2) INTEL 2021.4.0: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
3) GNU 10.2.1: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
4) GNU 10.2.1: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
0) Exit&lt;br /&gt;
Choose an option: 1&lt;br /&gt;
&lt;br /&gt;
The following libraries, compiled with Intel 2021.4.0 compilers, were loaded:&lt;br /&gt;
* MPICH 3.4.2&lt;br /&gt;
* NetCDF 4&lt;br /&gt;
* HDF5 1.10.5&lt;br /&gt;
* JASPER 2.0.33&lt;br /&gt;
&lt;br /&gt;
To change it please logout and login again.&lt;br /&gt;
&lt;br /&gt;
To load this libraries from within a script add this line to script:&lt;br /&gt;
source /opt/load-libs.sh 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Multiple different versions are available and pre-compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;, with the folloing structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/opt/wrf/WRF-{version}/{compiler}/{compiler-version}/{architecture}/{WRF/WPS}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Model (version 3.9.1) has already been compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For compilation using the gcc copmilers see here [[WRFgcc]]&lt;br /&gt;
&lt;br /&gt;
* From an instalation folder &amp;lt;code&amp;gt;[INSTALLDIR]&amp;lt;/code&amp;gt; (/share/WRF, in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;), creation of a folder structure&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[INSTALLDIR]/[WRFversion]/[compiler]/[compilation_kind]/ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* As example WRFv3.9.1 compiled with intel-compilers with distributed memory only&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /share/WRF/WRFV3.9.1/ifort/dmpar/&lt;br /&gt;
$ cd /share/WRF/WRFV3.9.1/ifort/dmpar/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Decompressing code source files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar xvfz ../../../WRFV3.9.1.1.TAR.gz &lt;br /&gt;
$ mv WRF WRFV3 &lt;br /&gt;
$ tar xvfz ../../../WPS.9.1.TAR.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of model (&amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going to the model source folder&lt;br /&gt;
&amp;lt;pre&amp;gt;cd WRFV3&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Declaration of location of netcdf libraries and large file support (&amp;gt; 2GB)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export NETCDF=&#039;/usr/local&#039;&lt;br /&gt;
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configuration of the compilation and picking up &amp;lt;code&amp;gt;INTEL (ifort/icc)&amp;lt;/code&amp;gt; and distributed memory (&amp;lt;code&amp;gt;dmpar&amp;lt;/code&amp;gt;) (option 15 and `basic&#039; 1)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Making a copy of the configuration file to make two modifications&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.wrf configure.ifort.dmpar.wrf&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Modifying the file &amp;lt;code&amp;gt;configure.ifort.dmpar.wrf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#DM_FC          =      mpif90 -f90=$(SFC) &lt;br /&gt;
#DM_CC          =      mpicc -cc=$(SCC) -DMPI2_SUPPORT&lt;br /&gt;
DM_FC          =      mpif90 &lt;br /&gt;
DM_CC          =      mpicc -DMPI2_SUPPORT&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Using the modified file&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.ifort.dmpar.wrf configure.wrf &lt;br /&gt;
$ ./compile em_real &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls main/*.exe&lt;br /&gt;
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
** And empty:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cat -n compile.log | grep Error&lt;br /&gt;
$ cat -n compile.log | grep undefined&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of the WRF-preprocessing (WPS: &amp;lt;code&amp;gt;geogrid.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ungrib.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;metgrid.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going there&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ../WPS&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configure and picking up 20 (&amp;lt;code&amp;gt;Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went right, one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls */*.exe&lt;br /&gt;
geogrid/geogrid.exe  util/avg_tsfc.exe      util/int2nc.exe &lt;br /&gt;
metgrid/metgrid.exe  util/calc_ecmwf_p.exe  util/mod_levs.exe&lt;br /&gt;
ungrib/g1print.exe   util/g1print.exe       util/rd_intermediate.exe&lt;br /&gt;
ungrib/g2print.exe   util/g2print.exe &lt;br /&gt;
ungrib/ungrib.exe    util/height_ukmo.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcings ==&lt;br /&gt;
&lt;br /&gt;
=== Atmospheric forcings ===&lt;br /&gt;
This will change once &amp;lt;code&amp;gt;papa-deimos&amp;lt;/code&amp;gt; is fully operational&lt;br /&gt;
&lt;br /&gt;
Provide the atmospheric conditions to the model at a given date.&lt;br /&gt;
&lt;br /&gt;
* There is a shared space called &amp;lt;code&amp;gt;/share&amp;lt;/code&amp;gt;&lt;br /&gt;
* At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all forcings are at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;ERA-Interim&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era-interim ERA-Interim] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Global monthly files at 0.75&amp;amp;deg; horizontal resolution and all time-steps: 00, 06, 12, 18 are labelled as:&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_pl[YYYY][MM]_[var1]-[var2].grib&amp;lt;/code&amp;gt;: pressure levels variables (all levels). &amp;lt;code&amp;gt;GRIB&amp;lt;/code&amp;gt; codes as:&lt;br /&gt;
**** 129: geopotential&lt;br /&gt;
**** 157: relative humidty&lt;br /&gt;
**** 130: Temperature&lt;br /&gt;
**** 131: u-wind&lt;br /&gt;
**** 132: v-wind&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_sfc[YYYY][MM].grib&amp;lt;/code&amp;gt;: all surface levels variables (step 0)&lt;br /&gt;
** To download data:&lt;br /&gt;
*** Generate files from ECMWF web-page [https://apps.ecmwf.int/auth/login/?back=http%3A%2F%2Fapps.ecmwf.int%2Fdatasets%2Fdata%2Finterim-full-daily%2Flevtype%253Dsfc%2F ERA-Interim]&lt;br /&gt;
*** Go to the folder in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** get the file (as link from ECMWF web-page (right bottom on `Download grib&#039;), as e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wget https://stream.ecmwf.int/data/atls05/data/data02/scratch/_mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Rename file according to its content&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mv _mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib ERAI_sfc201302.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;ERA5&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 ERA5] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA5/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;NCEP-NNRP1&#039;&lt;br /&gt;
** Thus, full [https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html NCEP-NNRP1] forcings are (&#039;&#039;&#039;NOTE: no land data!!!&#039;&#039;&#039;):&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/NCEP_NNRP/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Morphological forcings ===&lt;br /&gt;
Provide the geomorphological information for the domain of simulation: topography, land-use, vegetation-types, etc...&lt;br /&gt;
&lt;br /&gt;
* In WRF there is a huge amount of data ans sources at different resolutions. At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; everything is already there at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/GEOG/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* They are ready to be use&lt;br /&gt;
&lt;br /&gt;
= GENERIC Model use =&lt;br /&gt;
WRF has two main parts:&lt;br /&gt;
* &#039;&#039;WPS&#039;&#039;: Generation of the domain, initial and boundary condition: Runs 4 programs:&lt;br /&gt;
** &amp;lt;code&amp;gt;geogrid&amp;lt;/code&amp;gt;: domain generation&lt;br /&gt;
** &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt;: unpack atmospheric forcing \verb+grib+ files&lt;br /&gt;
** &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt;: horizontal interpolation of the unpacked atmospheric forcing files at the domain of simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;: generation of the initial and boundary conditions using \verb+metgrid+ output&lt;br /&gt;
* &#039;&#039;WRF&#039;&#039;: model it self: &amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all the code is already compiled at &amp;lt;code&amp;gt;/opt/wrf&amp;lt;/code&amp;gt; (with folders &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WRFV3&amp;lt;/code&amp;gt;)&lt;br /&gt;
As example WRFv4.3.3 compiled with intel-compilers with distributed and shared memory&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/wrf/WRF-4.3.3/intel/2021.4.0/dm+sm/WRF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IMPORTANT NOTES &lt;br /&gt;
|-&lt;br /&gt;
| * No simulation has to be run in the &amp;lt;CODE&amp;gt;$HOME&amp;lt;/CODE&amp;gt; directory, use &amp;lt;CODE&amp;gt;salidas/&amp;lt;/CODE&amp;gt; instead &lt;br /&gt;
|-&lt;br /&gt;
| * Always run all the components of the model using the queue &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendations:&#039;&#039;&#039;&lt;br /&gt;
* Do not run the WPS/WRF components at the same folder where the code resides. Always run it on another place and link the exectuables and the necessary files&lt;br /&gt;
* Split the execution of the model in 2 different places:&lt;br /&gt;
** Where the model components run&lt;br /&gt;
** Where the outputs of the model components are to be stored and kept&lt;br /&gt;
** For example&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFrunning:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/estudios/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFstorage:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/EXPS/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Inside &amp;lt;CODE&amp;gt;WRFrunning&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;WRFstorage&amp;lt;/CODE&amp;gt; || &amp;lt;CODE&amp;gt;geogrid/, ungrib/, metgrid/, run/, ...&amp;lt;/CODE&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Dimension the amount of nodes/cores/walltime accordingly to the needs of your simulations&lt;br /&gt;
* Make use of restarts, try to avoid to run simulations for more than a week&lt;br /&gt;
&lt;br /&gt;
== WPS ==&lt;br /&gt;
Let&#039;s assume that we work in a folder called &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt; (at users&#039; &amp;lt;code&amp;gt;${HOME}&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;) and we will work with a given WRF version located in &amp;lt;code&amp;gt;$WRFversion&amp;lt;/code&amp;gt;. As example, let&#039;s create a two nested domain of &#039;&#039;30 km&#039;&#039; for the entire South America and a second one of &#039;&#039;4.285 km&#039;&#039; for Córdoba mountain ranges (see the [[WRF/namelist.wps]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:CDXWRF_domain_test.png|frame|50px|WRF two domain configuration 30 and 4.285 km]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== geogrid === &lt;br /&gt;
&lt;br /&gt;
It is used to generate the domain&lt;br /&gt;
&lt;br /&gt;
* Create a folder for the geogrid section&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $WORKDIR&lt;br /&gt;
$ mkdir geogrid&lt;br /&gt;
$ cd geogrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link and copy all the necessary files (do not forget to add &amp;lt;code&amp;gt;opt_geogrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;&amp;amp;geogrid&amp;lt;/code&amp;gt; section) in the namelist!!):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/geogrid.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/GEOGRID.TBL.ARW ./GEOGRID.TBL&lt;br /&gt;
$ cp $WRFversion/WPS/geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain configuration is done via &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; (more information at: [https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/user_guide_V3.9/users_guide_chap3.html WPS user guide])&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hydra, the path to the &amp;lt;code&amp;gt;geographic data&amp;lt;/code&amp;gt;a has to be defined in the &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
 geog_data_path = &#039;/share/GEOG/&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is defined, run it (all the necessary &amp;lt;code&amp;gt;PBS script files&amp;lt;/code&amp;gt; are available in &amp;lt;code&amp;gt;/share/WRF&amp;lt;/code&amp;gt;, you only need to change amount of processes and users&#039;s email):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_geogrid_intel.pbs ./&lt;br /&gt;
$ qsub launch_geogrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This will create the domain files, one for each domain.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
geo_em.d[nn].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Some variables from the geogrid files:&lt;br /&gt;
** &amp;lt;code&amp;gt;LANDMASK&amp;lt;/code&amp;gt;: sea-land mask&lt;br /&gt;
** &amp;lt;code&amp;gt;XLAT_M&amp;lt;/code&amp;gt;: latitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;XLONG_M&amp;lt;/code&amp;gt;: longitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;HGT_M&amp;lt;/code&amp;gt;: orographical height&lt;br /&gt;
&lt;br /&gt;
The definition of the domain it is not a simple task and one needs to take into account a large amount of details, [[/DomainDefinition|here]] you can find a page with some indications&lt;br /&gt;
&lt;br /&gt;
=== ungrib ===&lt;br /&gt;
Prepare and unpack grib files from the GCM forcing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; In case atmospheric forcing data is not in GRIB format, and it is in standard netCDF format, user will need to use the [https://gitlab.in2p3.fr/ipsl/lmd/intro/regipsl/regipsl/-/wikis/Tools/nc2ps nc2wps] tool. Which is already compiled in: &amp;lt;code&amp;gt;/share/tools/RegIPSL/tools/nc2wps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ungrib &lt;br /&gt;
$ cd ungrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linking necessary files from compiled source&lt;br /&gt;
&amp;lt;pre stye=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/ungrib.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/link_grib.csh ./&lt;br /&gt;
$ cp ../geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the namelist &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; to set up the right period of simulation and frequency of forcing (you can also use nano, emacs, ...)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creation of a folder for the necessary GRIB files and linking the necessary files (eg. 4 files per month) from a folder with all the necesary data called $inDATA&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir GribDir&lt;br /&gt;
$ cd GribDir&lt;br /&gt;
$ ln -s $inDATA/*201212*.grib ./ &lt;br /&gt;
$ cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-link files for WRF with its own script&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
./link_grib.csh GribDir/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Should appear:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ls GRIBFILE.AA*&lt;br /&gt;
GRIBFILE.AAA  GRIBFILE.AAB  GRIBFILE.AAC  GRIBFILE.AAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to provide equivalences of the GRIB codes to the real variables. WRF comes with already defined GRIB equivalencies from different sources in folder &amp;lt;code&amp;gt;Variable_Tables&amp;lt;/code&amp;gt;. In this example we use ECMWF ERA-Interim at pressure levels, thus we link&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/Variable_Tables/Vtable.ERA-interim.pl ./Vtable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to take the domain file and get the right dates&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp ../geogrid/nameslist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Files can be unpacked using the PBS job file (user&#039;s email has to be changed and the output folder called &amp;lt;CODE&amp;gt;odir&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_ungrib_intel.pbs ./&lt;br /&gt;
$ vim launch_ungrib_intel.pbs&lt;br /&gt;
$ qsub launch_ungrib_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine, should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;FILE:[YYYY]-[MM]-[DD]_[HH]&amp;lt;/pre&amp;gt;&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail run_ungrib.log &lt;br /&gt;
(...) &lt;br /&gt;
********** &lt;br /&gt;
Done deleting temporary files. &lt;br /&gt;
********** &lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of ungrib.   ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== metgrid ===&lt;br /&gt;
Horizontal interpolation of atmospheric forcing data at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir metgrid &lt;br /&gt;
$ cd metgrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting necessary files (do not forget &amp;lt;code&amp;gt; opt_metgrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;&amp;amp;metgrid&amp;lt;/code&amp;gt; section in namelist !! to avoid: &amp;lt;code&amp;gt;ERROR: Could not open file METGRID.TBL&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/metgrid.exe ./ &lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/METGRID.TBL.ARW ./METGRID.TBL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; output&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/FILE* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the domains of simulation&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../geogrid/geo_em.d* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the namelist from &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; (to make sure we are using the same!)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the PBS (job queue script) to run the &amp;lt;code&amp;gt;metrid.exe&amp;lt;/code&amp;gt; (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;ungrib&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_metgrid_intel.pbs ./&lt;br /&gt;
$ vim launch_metgrid_intel.pbs&lt;br /&gt;
$ qsub launch_metgrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
met_em.d[nn].[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ tail run_metgrid.log&lt;br /&gt;
(...)&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of metgrid.  ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
Vertical interpolation of atmospheric forcing at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir run &lt;br /&gt;
$ cd run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link all the necessary files from WRF (it already links all the necessary to run the model)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WRF/run/* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove and copy the configuration file (&amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ rm namelist.input &lt;br /&gt;
$ cp $WRFversion/WRF/run/namelist.input ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the file and prepare the configuration for the run (re-adapt domain, physics, dates, output....). See an example for the two nested domain here [[WRF/namelist.input]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; If you are using the LCZ classification scheme, the following changes must be done in the &amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt; to properly simulate the domains with the data.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;physics&lt;br /&gt;
use_wudapt_lcz = 1&lt;br /&gt;
num_land_cat = 61 #If you chose to run geogrid directly from WPS v4.5 &lt;br /&gt;
num_land_cat = 41 #If you chose to use w2w&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using LCZs, it is recommended to use the urban parameterization options BEP or BEP+BEM (&amp;lt;code&amp;gt;sf_urban_physics = 2 or 3&amp;lt;/code&amp;gt;, respectively). In case you use SLUCM model (&amp;lt;code&amp;gt;sf_urban_physics = 1&amp;lt;/code&amp;gt;) the lowest model level has to be above the highest building height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Linking the &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt; generated files&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../metgrid/met_em.d*.nc ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the PBS job script for &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp /share/WRF/run_real.pbs ./&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Getting a bash script to run executables in hydra (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;metgrid&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_real_intel.pbs ./&lt;br /&gt;
$ vim launch_real_intel.pbs&lt;br /&gt;
$ qsub /share/WRF/launch_pbs.bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wrfbdy_d[nn]  wrfinput_d[nn]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfbdy_d01&amp;lt;/code&amp;gt;: Boundary conditions file (only for the first domain)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfinput_d[nn]&amp;lt;/code&amp;gt;: Initial conditions file for each domain&lt;br /&gt;
** &amp;lt;code&amp;gt;wrffdda_d[nn]&amp;lt;/code&amp;gt;: Nudging file [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrflowinp_d[nn]&amp;lt;/code&amp;gt;: File with updating (every time-step of the atmospheric forcing) surface characteristics [optional]&lt;br /&gt;
** And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ tail outreal/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
real_em: SUCCESS COMPLETE REAL_EM INIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WRF ==&lt;br /&gt;
* Simulation (look on [http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm\#_Description_of_Namelist description of namelist] for namelist configuration/specifications).&lt;br /&gt;
&lt;br /&gt;
* Getting the necessary PBS job (same folder for &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ cp /share/WRF/launch_wrf_intel.pbs ./&lt;br /&gt;
qsub launch_wrf_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;outwrf/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] outwrf/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: simulation output (at &amp;amp;eta;=(p-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;)/(p&amp;lt;sub&amp;gt;sfc&amp;lt;/sub&amp;gt;-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;) levels)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: restart file (to continue simulation)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfxtrm_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file with extremes from internal integration [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfpress_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file at vertical pressure levels [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;namelist.output_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: All the parameters used for the simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;stations&amp;lt;/code&amp;gt;: folder with the time-series files (&amp;lt;code&amp;gt;tslist&amp;lt;/code&amp;gt;)&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
tail outwrf/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
d01 [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] wrf: SUCCESS COMPLETE WRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* While &#039;&#039;running&#039;&#039; one can check the status on regarding on the &amp;lt;code&amp;gt;rsl.error.0000&amp;lt;/code&amp;gt; file, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
Timing for main: time [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] on domain  1:  3.86105 elapsed seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= WRF: known errors = &lt;br /&gt;
&lt;br /&gt;
== CFL ==&lt;br /&gt;
* But if something went &#039;&#039;wrong&#039;&#039;:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition CFL]: At &amp;lt;code&amp;gt;wrfout/[InitialDATE]-[EndDATE]/&amp;lt;/code&amp;gt; there are the files &amp;lt;code&amp;gt;rsl.[error/out].[nnnn]&amp;lt;/code&amp;gt; (two per cpu). Use to appear &amp;lt;code&amp;gt;SIGSEV segmentation fault&amp;lt;/code&amp;gt;, and to look different sources, usually &amp;lt;code&amp;gt;cfl&amp;lt;/code&amp;gt;. e.g. (usually look for the largest &amp;lt;code&amp;gt;rsl&amp;lt;/code&amp;gt; file (after the &amp;lt;code&amp;gt;0000&amp;lt;/code&amp;gt;); [&amp;lt;code&amp;gt;$ ls -rS rsl.error.*&amp;lt;/code&amp;gt;])&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wrfout/20121201000000-20121210000000/rsl.error.0009&lt;br /&gt;
(...) &lt;br /&gt;
d01 2012-12-01_01:30:00  33 points exceeded cfl=2 in domain d01 at time 2012-12-01_01:30:00 hours &lt;br /&gt;
d01 2012-12-01_01:30:00  MAX AT i,j,k:    100    94    21 vert_cfl,w,d(eta)=    5.897325    17.00738    3.2057911E-02&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NO working restart ==&lt;br /&gt;
Since a given version there is a need to include a new namelist parameter (in &amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) [[http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#restart WRF restart]] in order to make available the option to continue a simulation from a given restart&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
override_restart_timers                = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we want to get values at the output files at the time of the restart, you need to add at the (&amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) the parameter&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
write_hist_at_0h_rst                   = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting e_we and e_sn for nested domains ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ERROR: For nest 2, (e_we-s_we+1) must be one greater than an integer multiple of the parent_grid_ratio of &amp;quot;X&amp;quot;.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition of relation between e_we (it could be also e_sn) related to the parent_grid_ratio is not being accomplished. &lt;br /&gt;
&lt;br /&gt;
For nested domains, e_we and e_sn must be one greater than an integer multiple of the nest&#039;s parent_grid_ratio. This is to ensure that a nest always starts and ends on a parent grid point. (i.e., e_we=n*parent_grid_ratio+1 for some integer n).&lt;br /&gt;
&lt;br /&gt;
For example if parent_grid_ratio = 3, e_we could be 10 (or 13, 16, 19, etc).&lt;br /&gt;
This is because 10 - 1 = 9&lt;br /&gt;
And 9 % 3 = 0 (nine is multiple of 3)&lt;br /&gt;
&lt;br /&gt;
== Unavailable variables when running metgrid ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
2025-06-24 12:03:22.797 --- INFORM: Couldn&#039;t find ST010040 at level 200100.000000 to fill level 40.000000 of ST.&lt;br /&gt;
2025-06-24 12:03:22.797 --- INFORM: Couldn&#039;t find [VARIABLE] at level 200100.000000 to fill level 10.000000 of [VARIABLE].&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition not all of the necessary variables where found in the files generated by ungrib. A possible cause for this is that when generating the links of the ungrib input, not all the files (and so, variables) where selected. Be aware that running ungrib will still figure as &amp;quot;successful&amp;quot;, but only a few variables will have been processed. It is suggested taking a look in the ungrib.exe log where a table showing variables found are marked with an &amp;quot;X&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
For more additional information and further details visit [[WRFextras]]&lt;br /&gt;
&lt;br /&gt;
= WRF4L: Llu&amp;amp;iacute;s&#039; WRF work-flow management =&lt;br /&gt;
For information about Llu&amp;amp;iacute;&#039;s WRF work-flow management visit here [[WRF4L]]&lt;br /&gt;
&lt;br /&gt;
= WRF URBAN =&lt;br /&gt;
For information about urban simulation using WRF 4.5.0 or higher visit here [[WRF-URBAN]]&lt;br /&gt;
&lt;br /&gt;
= CDXWRF: WRF for CORDEX =&lt;br /&gt;
A new module developed in CIMA to attain CORDEX variable demands visit here [[CDXWRF]]&lt;br /&gt;
&lt;br /&gt;
= WRFles =&lt;br /&gt;
LES simulations with WRF model here [[WRFles]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3555</id>
		<title>WRF</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3555"/>
		<updated>2025-06-24T15:19:35Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* WRF: known errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Model description =&lt;br /&gt;
Weather Research and Forecast model ([http://www2.mmm.ucar.edu/wrf/users/ WRF], Skamarock, 2008) is a limited area atmospheric model developed by a consortium of american institutions with contributions from the whole community. It is a non-hydrostatic primitive equations model used in a large variety of research areas.&lt;br /&gt;
&lt;br /&gt;
Techincal aspects of the model (v 4.0) are provided in this [http://www2.mmm.ucar.edu/wrf/users/docs/technote/v4_technote.pdf pdf]&lt;br /&gt;
&lt;br /&gt;
= WRF and CIMA = &lt;br /&gt;
CIMA has an HPC called &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; to perform high intensive modelling efforts with WRF.&lt;br /&gt;
&lt;br /&gt;
== hydra ==&lt;br /&gt;
The HPC is part of the Servicio Nacional de Cómputo de Alta Capacidad (SNCAD). &lt;br /&gt;
&lt;br /&gt;
It has been re-installed and re-sorted in Jan 2022 and it has been adapted to common configurations in other international research centers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Selection of compilers &amp;amp; libraries ===&lt;br /&gt;
&lt;br /&gt;
It does not have the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; software to manage compilers and libraries, but it does have an script which allows users to select the compiler. This is done at the terminal with the script &amp;lt;code&amp;gt;source /opt/load-libs.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example selecting intel 2021.4.0, mpich and netcdf 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ source /opt/load-libs.sh&lt;br /&gt;
&lt;br /&gt;
Available libraries:&lt;br /&gt;
1) INTEL 2021.4.0: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
2) INTEL 2021.4.0: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
3) GNU 10.2.1: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
4) GNU 10.2.1: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
0) Exit&lt;br /&gt;
Choose an option: 1&lt;br /&gt;
&lt;br /&gt;
The following libraries, compiled with Intel 2021.4.0 compilers, were loaded:&lt;br /&gt;
* MPICH 3.4.2&lt;br /&gt;
* NetCDF 4&lt;br /&gt;
* HDF5 1.10.5&lt;br /&gt;
* JASPER 2.0.33&lt;br /&gt;
&lt;br /&gt;
To change it please logout and login again.&lt;br /&gt;
&lt;br /&gt;
To load this libraries from within a script add this line to script:&lt;br /&gt;
source /opt/load-libs.sh 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Multiple different versions are available and pre-compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;, with the folloing structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/opt/wrf/WRF-{version}/{compiler}/{compiler-version}/{architecture}/{WRF/WPS}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Model (version 3.9.1) has already been compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For compilation using the gcc copmilers see here [[WRFgcc]]&lt;br /&gt;
&lt;br /&gt;
* From an instalation folder &amp;lt;code&amp;gt;[INSTALLDIR]&amp;lt;/code&amp;gt; (/share/WRF, in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;), creation of a folder structure&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[INSTALLDIR]/[WRFversion]/[compiler]/[compilation_kind]/ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* As example WRFv3.9.1 compiled with intel-compilers with distributed memory only&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /share/WRF/WRFV3.9.1/ifort/dmpar/&lt;br /&gt;
$ cd /share/WRF/WRFV3.9.1/ifort/dmpar/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Decompressing code source files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar xvfz ../../../WRFV3.9.1.1.TAR.gz &lt;br /&gt;
$ mv WRF WRFV3 &lt;br /&gt;
$ tar xvfz ../../../WPS.9.1.TAR.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of model (&amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going to the model source folder&lt;br /&gt;
&amp;lt;pre&amp;gt;cd WRFV3&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Declaration of location of netcdf libraries and large file support (&amp;gt; 2GB)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export NETCDF=&#039;/usr/local&#039;&lt;br /&gt;
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configuration of the compilation and picking up &amp;lt;code&amp;gt;INTEL (ifort/icc)&amp;lt;/code&amp;gt; and distributed memory (&amp;lt;code&amp;gt;dmpar&amp;lt;/code&amp;gt;) (option 15 and `basic&#039; 1)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Making a copy of the configuration file to make two modifications&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.wrf configure.ifort.dmpar.wrf&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Modifying the file &amp;lt;code&amp;gt;configure.ifort.dmpar.wrf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#DM_FC          =      mpif90 -f90=$(SFC) &lt;br /&gt;
#DM_CC          =      mpicc -cc=$(SCC) -DMPI2_SUPPORT&lt;br /&gt;
DM_FC          =      mpif90 &lt;br /&gt;
DM_CC          =      mpicc -DMPI2_SUPPORT&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Using the modified file&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.ifort.dmpar.wrf configure.wrf &lt;br /&gt;
$ ./compile em_real &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls main/*.exe&lt;br /&gt;
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
** And empty:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cat -n compile.log | grep Error&lt;br /&gt;
$ cat -n compile.log | grep undefined&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of the WRF-preprocessing (WPS: &amp;lt;code&amp;gt;geogrid.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ungrib.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;metgrid.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going there&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ../WPS&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configure and picking up 20 (&amp;lt;code&amp;gt;Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went right, one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls */*.exe&lt;br /&gt;
geogrid/geogrid.exe  util/avg_tsfc.exe      util/int2nc.exe &lt;br /&gt;
metgrid/metgrid.exe  util/calc_ecmwf_p.exe  util/mod_levs.exe&lt;br /&gt;
ungrib/g1print.exe   util/g1print.exe       util/rd_intermediate.exe&lt;br /&gt;
ungrib/g2print.exe   util/g2print.exe &lt;br /&gt;
ungrib/ungrib.exe    util/height_ukmo.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcings ==&lt;br /&gt;
&lt;br /&gt;
=== Atmospheric forcings ===&lt;br /&gt;
This will change once &amp;lt;code&amp;gt;papa-deimos&amp;lt;/code&amp;gt; is fully operational&lt;br /&gt;
&lt;br /&gt;
Provide the atmospheric conditions to the model at a given date.&lt;br /&gt;
&lt;br /&gt;
* There is a shared space called &amp;lt;code&amp;gt;/share&amp;lt;/code&amp;gt;&lt;br /&gt;
* At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all forcings are at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;ERA-Interim&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era-interim ERA-Interim] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Global monthly files at 0.75&amp;amp;deg; horizontal resolution and all time-steps: 00, 06, 12, 18 are labelled as:&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_pl[YYYY][MM]_[var1]-[var2].grib&amp;lt;/code&amp;gt;: pressure levels variables (all levels). &amp;lt;code&amp;gt;GRIB&amp;lt;/code&amp;gt; codes as:&lt;br /&gt;
**** 129: geopotential&lt;br /&gt;
**** 157: relative humidty&lt;br /&gt;
**** 130: Temperature&lt;br /&gt;
**** 131: u-wind&lt;br /&gt;
**** 132: v-wind&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_sfc[YYYY][MM].grib&amp;lt;/code&amp;gt;: all surface levels variables (step 0)&lt;br /&gt;
** To download data:&lt;br /&gt;
*** Generate files from ECMWF web-page [https://apps.ecmwf.int/auth/login/?back=http%3A%2F%2Fapps.ecmwf.int%2Fdatasets%2Fdata%2Finterim-full-daily%2Flevtype%253Dsfc%2F ERA-Interim]&lt;br /&gt;
*** Go to the folder in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** get the file (as link from ECMWF web-page (right bottom on `Download grib&#039;), as e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wget https://stream.ecmwf.int/data/atls05/data/data02/scratch/_mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Rename file according to its content&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mv _mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib ERAI_sfc201302.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;ERA5&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 ERA5] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA5/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;NCEP-NNRP1&#039;&lt;br /&gt;
** Thus, full [https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html NCEP-NNRP1] forcings are (&#039;&#039;&#039;NOTE: no land data!!!&#039;&#039;&#039;):&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/NCEP_NNRP/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Morphological forcings ===&lt;br /&gt;
Provide the geomorphological information for the domain of simulation: topography, land-use, vegetation-types, etc...&lt;br /&gt;
&lt;br /&gt;
* In WRF there is a huge amount of data ans sources at different resolutions. At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; everything is already there at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/GEOG/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* They are ready to be use&lt;br /&gt;
&lt;br /&gt;
= GENERIC Model use =&lt;br /&gt;
WRF has two main parts:&lt;br /&gt;
* &#039;&#039;WPS&#039;&#039;: Generation of the domain, initial and boundary condition: Runs 4 programs:&lt;br /&gt;
** &amp;lt;code&amp;gt;geogrid&amp;lt;/code&amp;gt;: domain generation&lt;br /&gt;
** &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt;: unpack atmospheric forcing \verb+grib+ files&lt;br /&gt;
** &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt;: horizontal interpolation of the unpacked atmospheric forcing files at the domain of simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;: generation of the initial and boundary conditions using \verb+metgrid+ output&lt;br /&gt;
* &#039;&#039;WRF&#039;&#039;: model it self: &amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all the code is already compiled at &amp;lt;code&amp;gt;/opt/wrf&amp;lt;/code&amp;gt; (with folders &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WRFV3&amp;lt;/code&amp;gt;)&lt;br /&gt;
As example WRFv4.3.3 compiled with intel-compilers with distributed and shared memory&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/wrf/WRF-4.3.3/intel/2021.4.0/dm+sm/WRF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IMPORTANT NOTES &lt;br /&gt;
|-&lt;br /&gt;
| * No simulation has to be run in the &amp;lt;CODE&amp;gt;$HOME&amp;lt;/CODE&amp;gt; directory, use &amp;lt;CODE&amp;gt;salidas/&amp;lt;/CODE&amp;gt; instead &lt;br /&gt;
|-&lt;br /&gt;
| * Always run all the components of the model using the queue &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendations:&#039;&#039;&#039;&lt;br /&gt;
* Do not run the WPS/WRF components at the same folder where the code resides. Always run it on another place and link the exectuables and the necessary files&lt;br /&gt;
* Split the execution of the model in 2 different places:&lt;br /&gt;
** Where the model components run&lt;br /&gt;
** Where the outputs of the model components are to be stored and kept&lt;br /&gt;
** For example&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFrunning:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/estudios/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFstorage:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/EXPS/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Inside &amp;lt;CODE&amp;gt;WRFrunning&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;WRFstorage&amp;lt;/CODE&amp;gt; || &amp;lt;CODE&amp;gt;geogrid/, ungrib/, metgrid/, run/, ...&amp;lt;/CODE&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Dimension the amount of nodes/cores/walltime accordingly to the needs of your simulations&lt;br /&gt;
* Make use of restarts, try to avoid to run simulations for more than a week&lt;br /&gt;
&lt;br /&gt;
== WPS ==&lt;br /&gt;
Let&#039;s assume that we work in a folder called &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt; (at users&#039; &amp;lt;code&amp;gt;${HOME}&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;) and we will work with a given WRF version located in &amp;lt;code&amp;gt;$WRFversion&amp;lt;/code&amp;gt;. As example, let&#039;s create a two nested domain of &#039;&#039;30 km&#039;&#039; for the entire South America and a second one of &#039;&#039;4.285 km&#039;&#039; for Córdoba mountain ranges (see the [[WRF/namelist.wps]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:CDXWRF_domain_test.png|frame|50px|WRF two domain configuration 30 and 4.285 km]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== geogrid === &lt;br /&gt;
&lt;br /&gt;
It is used to generate the domain&lt;br /&gt;
&lt;br /&gt;
* Create a folder for the geogrid section&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $WORKDIR&lt;br /&gt;
$ mkdir geogrid&lt;br /&gt;
$ cd geogrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link and copy all the necessary files (do not forget to add &amp;lt;code&amp;gt;opt_geogrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;&amp;amp;geogrid&amp;lt;/code&amp;gt; section) in the namelist!!):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/geogrid.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/GEOGRID.TBL.ARW ./GEOGRID.TBL&lt;br /&gt;
$ cp $WRFversion/WPS/geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain configuration is done via &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; (more information at: [https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/user_guide_V3.9/users_guide_chap3.html WPS user guide])&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hydra, the path to the &amp;lt;code&amp;gt;geographic data&amp;lt;/code&amp;gt;a has to be defined in the &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
 geog_data_path = &#039;/share/GEOG/&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is defined, run it (all the necessary &amp;lt;code&amp;gt;PBS script files&amp;lt;/code&amp;gt; are available in &amp;lt;code&amp;gt;/share/WRF&amp;lt;/code&amp;gt;, you only need to change amount of processes and users&#039;s email):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_geogrid_intel.pbs ./&lt;br /&gt;
$ qsub launch_geogrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This will create the domain files, one for each domain.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
geo_em.d[nn].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Some variables from the geogrid files:&lt;br /&gt;
** &amp;lt;code&amp;gt;LANDMASK&amp;lt;/code&amp;gt;: sea-land mask&lt;br /&gt;
** &amp;lt;code&amp;gt;XLAT_M&amp;lt;/code&amp;gt;: latitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;XLONG_M&amp;lt;/code&amp;gt;: longitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;HGT_M&amp;lt;/code&amp;gt;: orographical height&lt;br /&gt;
&lt;br /&gt;
The definition of the domain it is not a simple task and one needs to take into account a large amount of details, [[/DomainDefinition|here]] you can find a page with some indications&lt;br /&gt;
&lt;br /&gt;
=== ungrib ===&lt;br /&gt;
Prepare and unpack grib files from the GCM forcing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; In case atmospheric forcing data is not in GRIB format, and it is in standard netCDF format, user will need to use the [https://gitlab.in2p3.fr/ipsl/lmd/intro/regipsl/regipsl/-/wikis/Tools/nc2ps nc2wps] tool. Which is already compiled in: &amp;lt;code&amp;gt;/share/tools/RegIPSL/tools/nc2wps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ungrib &lt;br /&gt;
$ cd ungrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linking necessary files from compiled source&lt;br /&gt;
&amp;lt;pre stye=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/ungrib.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/link_grib.csh ./&lt;br /&gt;
$ cp ../geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the namelist &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; to set up the right period of simulation and frequency of forcing (you can also use nano, emacs, ...)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creation of a folder for the necessary GRIB files and linking the necessary files (eg. 4 files per month) from a folder with all the necesary data called $inDATA&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir GribDir&lt;br /&gt;
$ cd GribDir&lt;br /&gt;
$ ln -s $inDATA/*201212*.grib ./ &lt;br /&gt;
$ cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-link files for WRF with its own script&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
./link_grib.csh GribDir/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Should appear:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ls GRIBFILE.AA*&lt;br /&gt;
GRIBFILE.AAA  GRIBFILE.AAB  GRIBFILE.AAC  GRIBFILE.AAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to provide equivalences of the GRIB codes to the real variables. WRF comes with already defined GRIB equivalencies from different sources in folder &amp;lt;code&amp;gt;Variable_Tables&amp;lt;/code&amp;gt;. In this example we use ECMWF ERA-Interim at pressure levels, thus we link&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/Variable_Tables/Vtable.ERA-interim.pl ./Vtable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to take the domain file and get the right dates&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp ../geogrid/nameslist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Files can be unpacked using the PBS job file (user&#039;s email has to be changed and the output folder called &amp;lt;CODE&amp;gt;odir&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_ungrib_intel.pbs ./&lt;br /&gt;
$ vim launch_ungrib_intel.pbs&lt;br /&gt;
$ qsub launch_ungrib_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine, should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;FILE:[YYYY]-[MM]-[DD]_[HH]&amp;lt;/pre&amp;gt;&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail run_ungrib.log &lt;br /&gt;
(...) &lt;br /&gt;
********** &lt;br /&gt;
Done deleting temporary files. &lt;br /&gt;
********** &lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of ungrib.   ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== metgrid ===&lt;br /&gt;
Horizontal interpolation of atmospheric forcing data at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir metgrid &lt;br /&gt;
$ cd metgrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting necessary files (do not forget &amp;lt;code&amp;gt; opt_metgrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;&amp;amp;metgrid&amp;lt;/code&amp;gt; section in namelist !! to avoid: &amp;lt;code&amp;gt;ERROR: Could not open file METGRID.TBL&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/metgrid.exe ./ &lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/METGRID.TBL.ARW ./METGRID.TBL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; output&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/FILE* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the domains of simulation&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../geogrid/geo_em.d* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the namelist from &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; (to make sure we are using the same!)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the PBS (job queue script) to run the &amp;lt;code&amp;gt;metrid.exe&amp;lt;/code&amp;gt; (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;ungrib&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_metgrid_intel.pbs ./&lt;br /&gt;
$ vim launch_metgrid_intel.pbs&lt;br /&gt;
$ qsub launch_metgrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
met_em.d[nn].[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ tail run_metgrid.log&lt;br /&gt;
(...)&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of metgrid.  ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
Vertical interpolation of atmospheric forcing at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir run &lt;br /&gt;
$ cd run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link all the necessary files from WRF (it already links all the necessary to run the model)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WRF/run/* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove and copy the configuration file (&amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ rm namelist.input &lt;br /&gt;
$ cp $WRFversion/WRF/run/namelist.input ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the file and prepare the configuration for the run (re-adapt domain, physics, dates, output....). See an example for the two nested domain here [[WRF/namelist.input]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; If you are using the LCZ classification scheme, the following changes must be done in the &amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt; to properly simulate the domains with the data.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;physics&lt;br /&gt;
use_wudapt_lcz = 1&lt;br /&gt;
num_land_cat = 61 #If you chose to run geogrid directly from WPS v4.5 &lt;br /&gt;
num_land_cat = 41 #If you chose to use w2w&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using LCZs, it is recommended to use the urban parameterization options BEP or BEP+BEM (&amp;lt;code&amp;gt;sf_urban_physics = 2 or 3&amp;lt;/code&amp;gt;, respectively). In case you use SLUCM model (&amp;lt;code&amp;gt;sf_urban_physics = 1&amp;lt;/code&amp;gt;) the lowest model level has to be above the highest building height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Linking the &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt; generated files&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../metgrid/met_em.d*.nc ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the PBS job script for &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp /share/WRF/run_real.pbs ./&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Getting a bash script to run executables in hydra (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;metgrid&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_real_intel.pbs ./&lt;br /&gt;
$ vim launch_real_intel.pbs&lt;br /&gt;
$ qsub /share/WRF/launch_pbs.bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wrfbdy_d[nn]  wrfinput_d[nn]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfbdy_d01&amp;lt;/code&amp;gt;: Boundary conditions file (only for the first domain)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfinput_d[nn]&amp;lt;/code&amp;gt;: Initial conditions file for each domain&lt;br /&gt;
** &amp;lt;code&amp;gt;wrffdda_d[nn]&amp;lt;/code&amp;gt;: Nudging file [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrflowinp_d[nn]&amp;lt;/code&amp;gt;: File with updating (every time-step of the atmospheric forcing) surface characteristics [optional]&lt;br /&gt;
** And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ tail outreal/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
real_em: SUCCESS COMPLETE REAL_EM INIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WRF ==&lt;br /&gt;
* Simulation (look on [http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm\#_Description_of_Namelist description of namelist] for namelist configuration/specifications).&lt;br /&gt;
&lt;br /&gt;
* Getting the necessary PBS job (same folder for &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ cp /share/WRF/launch_wrf_intel.pbs ./&lt;br /&gt;
qsub launch_wrf_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;outwrf/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] outwrf/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: simulation output (at &amp;amp;eta;=(p-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;)/(p&amp;lt;sub&amp;gt;sfc&amp;lt;/sub&amp;gt;-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;) levels)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: restart file (to continue simulation)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfxtrm_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file with extremes from internal integration [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfpress_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file at vertical pressure levels [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;namelist.output_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: All the parameters used for the simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;stations&amp;lt;/code&amp;gt;: folder with the time-series files (&amp;lt;code&amp;gt;tslist&amp;lt;/code&amp;gt;)&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
tail outwrf/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
d01 [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] wrf: SUCCESS COMPLETE WRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* While &#039;&#039;running&#039;&#039; one can check the status on regarding on the &amp;lt;code&amp;gt;rsl.error.0000&amp;lt;/code&amp;gt; file, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
Timing for main: time [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] on domain  1:  3.86105 elapsed seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= WRF: known errors = &lt;br /&gt;
&lt;br /&gt;
== CFL ==&lt;br /&gt;
* But if something went &#039;&#039;wrong&#039;&#039;:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition CFL]: At &amp;lt;code&amp;gt;wrfout/[InitialDATE]-[EndDATE]/&amp;lt;/code&amp;gt; there are the files &amp;lt;code&amp;gt;rsl.[error/out].[nnnn]&amp;lt;/code&amp;gt; (two per cpu). Use to appear &amp;lt;code&amp;gt;SIGSEV segmentation fault&amp;lt;/code&amp;gt;, and to look different sources, usually &amp;lt;code&amp;gt;cfl&amp;lt;/code&amp;gt;. e.g. (usually look for the largest &amp;lt;code&amp;gt;rsl&amp;lt;/code&amp;gt; file (after the &amp;lt;code&amp;gt;0000&amp;lt;/code&amp;gt;); [&amp;lt;code&amp;gt;$ ls -rS rsl.error.*&amp;lt;/code&amp;gt;])&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wrfout/20121201000000-20121210000000/rsl.error.0009&lt;br /&gt;
(...) &lt;br /&gt;
d01 2012-12-01_01:30:00  33 points exceeded cfl=2 in domain d01 at time 2012-12-01_01:30:00 hours &lt;br /&gt;
d01 2012-12-01_01:30:00  MAX AT i,j,k:    100    94    21 vert_cfl,w,d(eta)=    5.897325    17.00738    3.2057911E-02&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NO working restart ==&lt;br /&gt;
Since a given version there is a need to include a new namelist parameter (in &amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) [[http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#restart WRF restart]] in order to make available the option to continue a simulation from a given restart&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
override_restart_timers                = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we want to get values at the output files at the time of the restart, you need to add at the (&amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) the parameter&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
write_hist_at_0h_rst                   = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting e_we and e_sn for nested domains ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ERROR: For nest 2, (e_we-s_we+1) must be one greater than an integer multiple of the parent_grid_ratio of &amp;quot;X&amp;quot;.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition of relation between e_we (it could be also e_sn) related to the parent_grid_ratio is not being accomplished. &lt;br /&gt;
&lt;br /&gt;
For nested domains, e_we and e_sn must be one greater than an integer multiple of the nest&#039;s parent_grid_ratio. This is to ensure that a nest always starts and ends on a parent grid point. (i.e., e_we=n*parent_grid_ratio+1 for some integer n).&lt;br /&gt;
&lt;br /&gt;
For example if parent_grid_ratio = 3, e_we could be 10 (or 13, 16, 19, etc).&lt;br /&gt;
This is because 10 - 1 = 9&lt;br /&gt;
And 9 % 3 = 0 (nine is multiple of 3)&lt;br /&gt;
&lt;br /&gt;
== Unavailable variables when running metgrid ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
2025-06-24 12:03:22.797 --- INFORM: Couldn&#039;t find ST010040 at level 200100.000000 to fill level 40.000000 of ST.&lt;br /&gt;
2025-06-24 12:03:22.797 --- INFORM: Couldn&#039;t find [VARIABLE] at level 200100.000000 to fill level 10.000000 of [VARIABLE].&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition not all of the necessary variables where found in the files generated by ungrib. A possible cause for this is that when generating the links of the ungrib input, not all the files (and so, variables) where selected. Be aware that running ungrib will still figure as &amp;quot;succesfull&amp;quot;, but only a few variables will have been processed. It is suggested taking a look in the ungrib.exe log where a table showing variables found are marked with an &amp;quot;X&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
For more additional information and further details visit [[WRFextras]]&lt;br /&gt;
&lt;br /&gt;
= WRF4L: Llu&amp;amp;iacute;s&#039; WRF work-flow management =&lt;br /&gt;
For information about Llu&amp;amp;iacute;&#039;s WRF work-flow management visit here [[WRF4L]]&lt;br /&gt;
&lt;br /&gt;
= WRF URBAN =&lt;br /&gt;
For information about urban simulation using WRF 4.5.0 or higher visit here [[WRF-URBAN]]&lt;br /&gt;
&lt;br /&gt;
= CDXWRF: WRF for CORDEX =&lt;br /&gt;
A new module developed in CIMA to attain CORDEX variable demands visit here [[CDXWRF]]&lt;br /&gt;
&lt;br /&gt;
= WRFles =&lt;br /&gt;
LES simulations with WRF model here [[WRFles]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3540</id>
		<title>WRF</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3540"/>
		<updated>2025-06-10T17:02:55Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Relación entre valores celdas y dominions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Model description =&lt;br /&gt;
Weather Research and Forecast model ([http://www2.mmm.ucar.edu/wrf/users/ WRF], Skamarock, 2008) is a limited area atmospheric model developed by a consortium of american institutions with contributions from the whole community. It is a non-hydrostatic primitive equations model used in a large variety of research areas.&lt;br /&gt;
&lt;br /&gt;
Techincal aspects of the model (v 4.0) are provided in this [http://www2.mmm.ucar.edu/wrf/users/docs/technote/v4_technote.pdf pdf]&lt;br /&gt;
&lt;br /&gt;
= WRF and CIMA = &lt;br /&gt;
CIMA has an HPC called &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; to perform high intensive modelling efforts with WRF.&lt;br /&gt;
&lt;br /&gt;
== hydra ==&lt;br /&gt;
The HPC is part of the Servicio Nacional de Cómputo de Alta Capacidad (SNCAD). &lt;br /&gt;
&lt;br /&gt;
It has been re-installed and re-sorted in Jan 2022 and it has been adapted to common configurations in other international research centers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Selection of compilers &amp;amp; libraries ===&lt;br /&gt;
&lt;br /&gt;
It does not have the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; software to manage compilers and libraries, but it does have an script which allows users to select the compiler. This is done at the terminal with the script &amp;lt;code&amp;gt;source /opt/load-libs.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example selecting intel 2021.4.0, mpich and netcdf 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ source /opt/load-libs.sh&lt;br /&gt;
&lt;br /&gt;
Available libraries:&lt;br /&gt;
1) INTEL 2021.4.0: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
2) INTEL 2021.4.0: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
3) GNU 10.2.1: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
4) GNU 10.2.1: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
0) Exit&lt;br /&gt;
Choose an option: 1&lt;br /&gt;
&lt;br /&gt;
The following libraries, compiled with Intel 2021.4.0 compilers, were loaded:&lt;br /&gt;
* MPICH 3.4.2&lt;br /&gt;
* NetCDF 4&lt;br /&gt;
* HDF5 1.10.5&lt;br /&gt;
* JASPER 2.0.33&lt;br /&gt;
&lt;br /&gt;
To change it please logout and login again.&lt;br /&gt;
&lt;br /&gt;
To load this libraries from within a script add this line to script:&lt;br /&gt;
source /opt/load-libs.sh 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Multiple different versions are available and pre-compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;, with the folloing structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/opt/wrf/WRF-{version}/{compiler}/{compiler-version}/{architecture}/{WRF/WPS}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Model (version 3.9.1) has already been compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For compilation using the gcc copmilers see here [[WRFgcc]]&lt;br /&gt;
&lt;br /&gt;
* From an instalation folder &amp;lt;code&amp;gt;[INSTALLDIR]&amp;lt;/code&amp;gt; (/share/WRF, in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;), creation of a folder structure&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[INSTALLDIR]/[WRFversion]/[compiler]/[compilation_kind]/ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* As example WRFv3.9.1 compiled with intel-compilers with distributed memory only&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /share/WRF/WRFV3.9.1/ifort/dmpar/&lt;br /&gt;
$ cd /share/WRF/WRFV3.9.1/ifort/dmpar/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Decompressing code source files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar xvfz ../../../WRFV3.9.1.1.TAR.gz &lt;br /&gt;
$ mv WRF WRFV3 &lt;br /&gt;
$ tar xvfz ../../../WPS.9.1.TAR.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of model (&amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going to the model source folder&lt;br /&gt;
&amp;lt;pre&amp;gt;cd WRFV3&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Declaration of location of netcdf libraries and large file support (&amp;gt; 2GB)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export NETCDF=&#039;/usr/local&#039;&lt;br /&gt;
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configuration of the compilation and picking up &amp;lt;code&amp;gt;INTEL (ifort/icc)&amp;lt;/code&amp;gt; and distributed memory (&amp;lt;code&amp;gt;dmpar&amp;lt;/code&amp;gt;) (option 15 and `basic&#039; 1)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Making a copy of the configuration file to make two modifications&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.wrf configure.ifort.dmpar.wrf&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Modifying the file &amp;lt;code&amp;gt;configure.ifort.dmpar.wrf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#DM_FC          =      mpif90 -f90=$(SFC) &lt;br /&gt;
#DM_CC          =      mpicc -cc=$(SCC) -DMPI2_SUPPORT&lt;br /&gt;
DM_FC          =      mpif90 &lt;br /&gt;
DM_CC          =      mpicc -DMPI2_SUPPORT&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Using the modified file&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.ifort.dmpar.wrf configure.wrf &lt;br /&gt;
$ ./compile em_real &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls main/*.exe&lt;br /&gt;
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
** And empty:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cat -n compile.log | grep Error&lt;br /&gt;
$ cat -n compile.log | grep undefined&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of the WRF-preprocessing (WPS: &amp;lt;code&amp;gt;geogrid.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ungrib.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;metgrid.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going there&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ../WPS&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configure and picking up 20 (&amp;lt;code&amp;gt;Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went right, one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls */*.exe&lt;br /&gt;
geogrid/geogrid.exe  util/avg_tsfc.exe      util/int2nc.exe &lt;br /&gt;
metgrid/metgrid.exe  util/calc_ecmwf_p.exe  util/mod_levs.exe&lt;br /&gt;
ungrib/g1print.exe   util/g1print.exe       util/rd_intermediate.exe&lt;br /&gt;
ungrib/g2print.exe   util/g2print.exe &lt;br /&gt;
ungrib/ungrib.exe    util/height_ukmo.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcings ==&lt;br /&gt;
&lt;br /&gt;
=== Atmospheric forcings ===&lt;br /&gt;
This will change once &amp;lt;code&amp;gt;papa-deimos&amp;lt;/code&amp;gt; is fully operational&lt;br /&gt;
&lt;br /&gt;
Provide the atmospheric conditions to the model at a given date.&lt;br /&gt;
&lt;br /&gt;
* There is a shared space called &amp;lt;code&amp;gt;/share&amp;lt;/code&amp;gt;&lt;br /&gt;
* At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all forcings are at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;ERA-Interim&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era-interim ERA-Interim] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Global monthly files at 0.75&amp;amp;deg; horizontal resolution and all time-steps: 00, 06, 12, 18 are labelled as:&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_pl[YYYY][MM]_[var1]-[var2].grib&amp;lt;/code&amp;gt;: pressure levels variables (all levels). &amp;lt;code&amp;gt;GRIB&amp;lt;/code&amp;gt; codes as:&lt;br /&gt;
**** 129: geopotential&lt;br /&gt;
**** 157: relative humidty&lt;br /&gt;
**** 130: Temperature&lt;br /&gt;
**** 131: u-wind&lt;br /&gt;
**** 132: v-wind&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_sfc[YYYY][MM].grib&amp;lt;/code&amp;gt;: all surface levels variables (step 0)&lt;br /&gt;
** To download data:&lt;br /&gt;
*** Generate files from ECMWF web-page [https://apps.ecmwf.int/auth/login/?back=http%3A%2F%2Fapps.ecmwf.int%2Fdatasets%2Fdata%2Finterim-full-daily%2Flevtype%253Dsfc%2F ERA-Interim]&lt;br /&gt;
*** Go to the folder in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** get the file (as link from ECMWF web-page (right bottom on `Download grib&#039;), as e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wget https://stream.ecmwf.int/data/atls05/data/data02/scratch/_mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Rename file according to its content&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mv _mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib ERAI_sfc201302.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;ERA5&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 ERA5] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA5/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;NCEP-NNRP1&#039;&lt;br /&gt;
** Thus, full [https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html NCEP-NNRP1] forcings are (&#039;&#039;&#039;NOTE: no land data!!!&#039;&#039;&#039;):&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/NCEP_NNRP/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Morphological forcings ===&lt;br /&gt;
Provide the geomorphological information for the domain of simulation: topography, land-use, vegetation-types, etc...&lt;br /&gt;
&lt;br /&gt;
* In WRF there is a huge amount of data ans sources at different resolutions. At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; everything is already there at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/GEOG/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* They are ready to be use&lt;br /&gt;
&lt;br /&gt;
= GENERIC Model use =&lt;br /&gt;
WRF has two main parts:&lt;br /&gt;
* &#039;&#039;WPS&#039;&#039;: Generation of the domain, initial and boundary condition: Runs 4 programs:&lt;br /&gt;
** &amp;lt;code&amp;gt;geogrid&amp;lt;/code&amp;gt;: domain generation&lt;br /&gt;
** &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt;: unpack atmospheric forcing \verb+grib+ files&lt;br /&gt;
** &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt;: horizontal interpolation of the unpacked atmospheric forcing files at the domain of simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;: generation of the initial and boundary conditions using \verb+metgrid+ output&lt;br /&gt;
* &#039;&#039;WRF&#039;&#039;: model it self: &amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all the code is already compiled at &amp;lt;code&amp;gt;/opt/wrf&amp;lt;/code&amp;gt; (with folders &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WRFV3&amp;lt;/code&amp;gt;)&lt;br /&gt;
As example WRFv4.3.3 compiled with intel-compilers with distributed and shared memory&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/wrf/WRF-4.3.3/intel/2021.4.0/dm+sm/WRF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IMPORTANT NOTES &lt;br /&gt;
|-&lt;br /&gt;
| * No simulation has to be run in the &amp;lt;CODE&amp;gt;$HOME&amp;lt;/CODE&amp;gt; directory, use &amp;lt;CODE&amp;gt;salidas/&amp;lt;/CODE&amp;gt; instead &lt;br /&gt;
|-&lt;br /&gt;
| * Always run all the components of the model using the queue &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendations:&#039;&#039;&#039;&lt;br /&gt;
* Do not run the WPS/WRF components at the same folder where the code resides. Always run it on another place and link the exectuables and the necessary files&lt;br /&gt;
* Split the execution of the model in 2 different places:&lt;br /&gt;
** Where the model components run&lt;br /&gt;
** Where the outputs of the model components are to be stored and kept&lt;br /&gt;
** For example&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFrunning:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/estudios/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFstorage:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/EXPS/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Inside &amp;lt;CODE&amp;gt;WRFrunning&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;WRFstorage&amp;lt;/CODE&amp;gt; || &amp;lt;CODE&amp;gt;geogrid/, ungrib/, metgrid/, run/, ...&amp;lt;/CODE&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Dimension the amount of nodes/cores/walltime accordingly to the needs of your simulations&lt;br /&gt;
* Make use of restarts, try to avoid to run simulations for more than a week&lt;br /&gt;
&lt;br /&gt;
== WPS ==&lt;br /&gt;
Let&#039;s assume that we work in a folder called &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt; (at users&#039; &amp;lt;code&amp;gt;${HOME}&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;) and we will work with a given WRF version located in &amp;lt;code&amp;gt;$WRFversion&amp;lt;/code&amp;gt;. As example, let&#039;s create a two nested domain of &#039;&#039;30 km&#039;&#039; for the entire South America and a second one of &#039;&#039;4.285 km&#039;&#039; for Córdoba mountain ranges (see the [[WRF/namelist.wps]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:CDXWRF_domain_test.png|frame|50px|WRF two domain configuration 30 and 4.285 km]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== geogrid === &lt;br /&gt;
&lt;br /&gt;
It is used to generate the domain&lt;br /&gt;
&lt;br /&gt;
* Create a folder for the geogrid section&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $WORKDIR&lt;br /&gt;
$ mkdir geogrid&lt;br /&gt;
$ cd geogrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link and copy all the necessary files (do not forget to add &amp;lt;code&amp;gt;opt_geogrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;&amp;amp;geogrid&amp;lt;/code&amp;gt; section) in the namelist!!):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/geogrid.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/GEOGRID.TBL.ARW ./GEOGRID.TBL&lt;br /&gt;
$ cp $WRFversion/WPS/geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain configuration is done via &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; (more information at: [https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/user_guide_V3.9/users_guide_chap3.html WPS user guide])&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hydra, the path to the &amp;lt;code&amp;gt;geographic data&amp;lt;/code&amp;gt;a has to be defined in the &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
 geog_data_path = &#039;/share/GEOG/&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is defined, run it (all the necessary &amp;lt;code&amp;gt;PBS script files&amp;lt;/code&amp;gt; are available in &amp;lt;code&amp;gt;/share/WRF&amp;lt;/code&amp;gt;, you only need to change amount of processes and users&#039;s email):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_geogrid_intel.pbs ./&lt;br /&gt;
$ qsub launch_geogrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This will create the domain files, one for each domain.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
geo_em.d[nn].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Some variables from the geogrid files:&lt;br /&gt;
** &amp;lt;code&amp;gt;LANDMASK&amp;lt;/code&amp;gt;: sea-land mask&lt;br /&gt;
** &amp;lt;code&amp;gt;XLAT_M&amp;lt;/code&amp;gt;: latitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;XLONG_M&amp;lt;/code&amp;gt;: longitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;HGT_M&amp;lt;/code&amp;gt;: orographical height&lt;br /&gt;
&lt;br /&gt;
The definition of the domain it is not a simple task and one needs to take into account a large amount of details, [[/DomainDefinition|here]] you can find a page with some indications&lt;br /&gt;
&lt;br /&gt;
=== ungrib ===&lt;br /&gt;
Prepare and unpack grib files from the GCM forcing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; In case atmospheric forcing data is not in GRIB format, and it is in standard netCDF format, user will need to use the [https://gitlab.in2p3.fr/ipsl/lmd/intro/regipsl/regipsl/-/wikis/Tools/nc2ps nc2wps] tool. Which is already compiled in: &amp;lt;code&amp;gt;/share/tools/RegIPSL/tools/nc2wps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ungrib &lt;br /&gt;
$ cd ungrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linking necessary files from compiled source&lt;br /&gt;
&amp;lt;pre stye=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/ungrib.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/link_grib.csh ./&lt;br /&gt;
$ cp ../geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the namelist &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; to set up the right period of simulation and frequency of forcing (you can also use nano, emacs, ...)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creation of a folder for the necessary GRIB files and linking the necessary files (eg. 4 files per month) from a folder with all the necesary data called $inDATA&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir GribDir&lt;br /&gt;
$ cd GribDir&lt;br /&gt;
$ ln -s $inDATA/*201212*.grib ./ &lt;br /&gt;
$ cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-link files for WRF with its own script&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
./link_grib.csh GribDir/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Should appear:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ls GRIBFILE.AA*&lt;br /&gt;
GRIBFILE.AAA  GRIBFILE.AAB  GRIBFILE.AAC  GRIBFILE.AAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to provide equivalences of the GRIB codes to the real variables. WRF comes with already defined GRIB equivalencies from different sources in folder &amp;lt;code&amp;gt;Variable_Tables&amp;lt;/code&amp;gt;. In this example we use ECMWF ERA-Interim at pressure levels, thus we link&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/Variable_Tables/Vtable.ERA-interim.pl ./Vtable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to take the domain file and get the right dates&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp ../geogrid/nameslist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Files can be unpacked using the PBS job file (user&#039;s email has to be changed and the output folder called &amp;lt;CODE&amp;gt;odir&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_ungrib_intel.pbs ./&lt;br /&gt;
$ vim launch_ungrib_intel.pbs&lt;br /&gt;
$ qsub launch_ungrib_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine, should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;FILE:[YYYY]-[MM]-[DD]_[HH]&amp;lt;/pre&amp;gt;&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail run_ungrib.log &lt;br /&gt;
(...) &lt;br /&gt;
********** &lt;br /&gt;
Done deleting temporary files. &lt;br /&gt;
********** &lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of ungrib.   ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== metgrid ===&lt;br /&gt;
Horizontal interpolation of atmospheric forcing data at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir metgrid &lt;br /&gt;
$ cd metgrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting necessary files (do not forget &amp;lt;code&amp;gt; opt_metgrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;&amp;amp;metgrid&amp;lt;/code&amp;gt; section in namelist !! to avoid: &amp;lt;code&amp;gt;ERROR: Could not open file METGRID.TBL&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/metgrid.exe ./ &lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/METGRID.TBL.ARW ./METGRID.TBL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; output&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/FILE* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the domains of simulation&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../geogrid/geo_em.d* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the namelist from &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; (to make sure we are using the same!)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the PBS (job queue script) to run the &amp;lt;code&amp;gt;metrid.exe&amp;lt;/code&amp;gt; (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;ungrib&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_metgrid_intel.pbs ./&lt;br /&gt;
$ vim launch_metgrid_intel.pbs&lt;br /&gt;
$ qsub launch_metgrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
met_em.d[nn].[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ tail run_metgrid.log&lt;br /&gt;
(...)&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of metgrid.  ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
Vertical interpolation of atmospheric forcing at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir run &lt;br /&gt;
$ cd run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link all the necessary files from WRF (it already links all the necessary to run the model)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WRF/run/* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove and copy the configuration file (&amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ rm namelist.input &lt;br /&gt;
$ cp $WRFversion/WRF/run/namelist.input ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the file and prepare the configuration for the run (re-adapt domain, physics, dates, output....). See an example for the two nested domain here [[WRF/namelist.input]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; If you are using the LCZ classification scheme, the following changes must be done in the &amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt; to properly simulate the domains with the data.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;physics&lt;br /&gt;
use_wudapt_lcz = 1&lt;br /&gt;
num_land_cat = 61 #If you chose to run geogrid directly from WPS v4.5 &lt;br /&gt;
num_land_cat = 41 #If you chose to use w2w&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using LCZs, it is recommended to use the urban parameterization options BEP or BEP+BEM (&amp;lt;code&amp;gt;sf_urban_physics = 2 or 3&amp;lt;/code&amp;gt;, respectively). In case you use SLUCM model (&amp;lt;code&amp;gt;sf_urban_physics = 1&amp;lt;/code&amp;gt;) the lowest model level has to be above the highest building height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Linking the &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt; generated files&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../metgrid/met_em.d*.nc ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the PBS job script for &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp /share/WRF/run_real.pbs ./&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Getting a bash script to run executables in hydra (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;metgrid&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_real_intel.pbs ./&lt;br /&gt;
$ vim launch_real_intel.pbs&lt;br /&gt;
$ qsub /share/WRF/launch_pbs.bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wrfbdy_d[nn]  wrfinput_d[nn]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfbdy_d01&amp;lt;/code&amp;gt;: Boundary conditions file (only for the first domain)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfinput_d[nn]&amp;lt;/code&amp;gt;: Initial conditions file for each domain&lt;br /&gt;
** &amp;lt;code&amp;gt;wrffdda_d[nn]&amp;lt;/code&amp;gt;: Nudging file [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrflowinp_d[nn]&amp;lt;/code&amp;gt;: File with updating (every time-step of the atmospheric forcing) surface characteristics [optional]&lt;br /&gt;
** And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ tail outreal/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
real_em: SUCCESS COMPLETE REAL_EM INIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WRF ==&lt;br /&gt;
* Simulation (look on [http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm\#_Description_of_Namelist description of namelist] for namelist configuration/specifications).&lt;br /&gt;
&lt;br /&gt;
* Getting the necessary PBS job (same folder for &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ cp /share/WRF/launch_wrf_intel.pbs ./&lt;br /&gt;
qsub launch_wrf_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;outwrf/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] outwrf/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: simulation output (at &amp;amp;eta;=(p-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;)/(p&amp;lt;sub&amp;gt;sfc&amp;lt;/sub&amp;gt;-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;) levels)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: restart file (to continue simulation)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfxtrm_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file with extremes from internal integration [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfpress_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file at vertical pressure levels [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;namelist.output_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: All the parameters used for the simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;stations&amp;lt;/code&amp;gt;: folder with the time-series files (&amp;lt;code&amp;gt;tslist&amp;lt;/code&amp;gt;)&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
tail outwrf/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
d01 [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] wrf: SUCCESS COMPLETE WRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* While &#039;&#039;running&#039;&#039; one can check the status on regarding on the &amp;lt;code&amp;gt;rsl.error.0000&amp;lt;/code&amp;gt; file, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
Timing for main: time [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] on domain  1:  3.86105 elapsed seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= WRF: known errors = &lt;br /&gt;
&lt;br /&gt;
== CFL ==&lt;br /&gt;
* But if something went &#039;&#039;wrong&#039;&#039;:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition CFL]: At &amp;lt;code&amp;gt;wrfout/[InitialDATE]-[EndDATE]/&amp;lt;/code&amp;gt; there are the files &amp;lt;code&amp;gt;rsl.[error/out].[nnnn]&amp;lt;/code&amp;gt; (two per cpu). Use to appear &amp;lt;code&amp;gt;SIGSEV segmentation fault&amp;lt;/code&amp;gt;, and to look different sources, usually &amp;lt;code&amp;gt;cfl&amp;lt;/code&amp;gt;. e.g. (usually look for the largest &amp;lt;code&amp;gt;rsl&amp;lt;/code&amp;gt; file (after the &amp;lt;code&amp;gt;0000&amp;lt;/code&amp;gt;); [&amp;lt;code&amp;gt;$ ls -rS rsl.error.*&amp;lt;/code&amp;gt;])&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wrfout/20121201000000-20121210000000/rsl.error.0009&lt;br /&gt;
(...) &lt;br /&gt;
d01 2012-12-01_01:30:00  33 points exceeded cfl=2 in domain d01 at time 2012-12-01_01:30:00 hours &lt;br /&gt;
d01 2012-12-01_01:30:00  MAX AT i,j,k:    100    94    21 vert_cfl,w,d(eta)=    5.897325    17.00738    3.2057911E-02&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NO working restart ==&lt;br /&gt;
Since a given version there is a need to include a new namelist parameter (in &amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) [[http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#restart WRF restart]] in order to make available the option to continue a simulation from a given restart&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
override_restart_timers                = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we want to get values at the output files at the time of the restart, you need to add at the (&amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) the parameter&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
write_hist_at_0h_rst                   = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting e_we and e_sn for nested domains ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ERROR: For nest 2, (e_we-s_we+1) must be one greater than an integer multiple of the parent_grid_ratio of &amp;quot;X&amp;quot;.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition of relation between e_we (it could be also e_sn) related to the parent_grid_ratio is not being accomplished. &lt;br /&gt;
&lt;br /&gt;
For nested domains, e_we and e_sn must be one greater than an integer multiple of the nest&#039;s parent_grid_ratio. This is to ensure that a nest always starts and ends on a parent grid point. (i.e., e_we=n*parent_grid_ratio+1 for some integer n).&lt;br /&gt;
&lt;br /&gt;
For example if parent_grid_ratio = 3, e_we could be 10 (or 13, 16, 19, etc).&lt;br /&gt;
This is because 10 - 1 = 9&lt;br /&gt;
And 9 % 3 = 0 (nine is multiple of 3)&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
For more additional information and further details visit [[WRFextras]]&lt;br /&gt;
&lt;br /&gt;
= WRF4L: Llu&amp;amp;iacute;s&#039; WRF work-flow management =&lt;br /&gt;
For information about Llu&amp;amp;iacute;&#039;s WRF work-flow management visit here [[WRF4L]]&lt;br /&gt;
&lt;br /&gt;
= WRF URBAN =&lt;br /&gt;
For information about urban simulation using WRF 4.5.0 or higher visit here [[WRF-URBAN]]&lt;br /&gt;
&lt;br /&gt;
= CDXWRF: WRF for CORDEX =&lt;br /&gt;
A new module developed in CIMA to attain CORDEX variable demands visit here [[CDXWRF]]&lt;br /&gt;
&lt;br /&gt;
= WRFles =&lt;br /&gt;
LES simulations with WRF model here [[WRFles]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3539</id>
		<title>WRF</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3539"/>
		<updated>2025-06-10T16:03:22Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* Relación entre valores celdas y dominions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Model description =&lt;br /&gt;
Weather Research and Forecast model ([http://www2.mmm.ucar.edu/wrf/users/ WRF], Skamarock, 2008) is a limited area atmospheric model developed by a consortium of american institutions with contributions from the whole community. It is a non-hydrostatic primitive equations model used in a large variety of research areas.&lt;br /&gt;
&lt;br /&gt;
Techincal aspects of the model (v 4.0) are provided in this [http://www2.mmm.ucar.edu/wrf/users/docs/technote/v4_technote.pdf pdf]&lt;br /&gt;
&lt;br /&gt;
= WRF and CIMA = &lt;br /&gt;
CIMA has an HPC called &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; to perform high intensive modelling efforts with WRF.&lt;br /&gt;
&lt;br /&gt;
== hydra ==&lt;br /&gt;
The HPC is part of the Servicio Nacional de Cómputo de Alta Capacidad (SNCAD). &lt;br /&gt;
&lt;br /&gt;
It has been re-installed and re-sorted in Jan 2022 and it has been adapted to common configurations in other international research centers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Selection of compilers &amp;amp; libraries ===&lt;br /&gt;
&lt;br /&gt;
It does not have the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; software to manage compilers and libraries, but it does have an script which allows users to select the compiler. This is done at the terminal with the script &amp;lt;code&amp;gt;source /opt/load-libs.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example selecting intel 2021.4.0, mpich and netcdf 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ source /opt/load-libs.sh&lt;br /&gt;
&lt;br /&gt;
Available libraries:&lt;br /&gt;
1) INTEL 2021.4.0: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
2) INTEL 2021.4.0: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
3) GNU 10.2.1: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
4) GNU 10.2.1: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
0) Exit&lt;br /&gt;
Choose an option: 1&lt;br /&gt;
&lt;br /&gt;
The following libraries, compiled with Intel 2021.4.0 compilers, were loaded:&lt;br /&gt;
* MPICH 3.4.2&lt;br /&gt;
* NetCDF 4&lt;br /&gt;
* HDF5 1.10.5&lt;br /&gt;
* JASPER 2.0.33&lt;br /&gt;
&lt;br /&gt;
To change it please logout and login again.&lt;br /&gt;
&lt;br /&gt;
To load this libraries from within a script add this line to script:&lt;br /&gt;
source /opt/load-libs.sh 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Multiple different versions are available and pre-compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;, with the folloing structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/opt/wrf/WRF-{version}/{compiler}/{compiler-version}/{architecture}/{WRF/WPS}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Model (version 3.9.1) has already been compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For compilation using the gcc copmilers see here [[WRFgcc]]&lt;br /&gt;
&lt;br /&gt;
* From an instalation folder &amp;lt;code&amp;gt;[INSTALLDIR]&amp;lt;/code&amp;gt; (/share/WRF, in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;), creation of a folder structure&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[INSTALLDIR]/[WRFversion]/[compiler]/[compilation_kind]/ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* As example WRFv3.9.1 compiled with intel-compilers with distributed memory only&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /share/WRF/WRFV3.9.1/ifort/dmpar/&lt;br /&gt;
$ cd /share/WRF/WRFV3.9.1/ifort/dmpar/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Decompressing code source files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar xvfz ../../../WRFV3.9.1.1.TAR.gz &lt;br /&gt;
$ mv WRF WRFV3 &lt;br /&gt;
$ tar xvfz ../../../WPS.9.1.TAR.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of model (&amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going to the model source folder&lt;br /&gt;
&amp;lt;pre&amp;gt;cd WRFV3&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Declaration of location of netcdf libraries and large file support (&amp;gt; 2GB)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export NETCDF=&#039;/usr/local&#039;&lt;br /&gt;
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configuration of the compilation and picking up &amp;lt;code&amp;gt;INTEL (ifort/icc)&amp;lt;/code&amp;gt; and distributed memory (&amp;lt;code&amp;gt;dmpar&amp;lt;/code&amp;gt;) (option 15 and `basic&#039; 1)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Making a copy of the configuration file to make two modifications&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.wrf configure.ifort.dmpar.wrf&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Modifying the file &amp;lt;code&amp;gt;configure.ifort.dmpar.wrf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#DM_FC          =      mpif90 -f90=$(SFC) &lt;br /&gt;
#DM_CC          =      mpicc -cc=$(SCC) -DMPI2_SUPPORT&lt;br /&gt;
DM_FC          =      mpif90 &lt;br /&gt;
DM_CC          =      mpicc -DMPI2_SUPPORT&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Using the modified file&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.ifort.dmpar.wrf configure.wrf &lt;br /&gt;
$ ./compile em_real &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls main/*.exe&lt;br /&gt;
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
** And empty:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cat -n compile.log | grep Error&lt;br /&gt;
$ cat -n compile.log | grep undefined&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of the WRF-preprocessing (WPS: &amp;lt;code&amp;gt;geogrid.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ungrib.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;metgrid.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going there&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ../WPS&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configure and picking up 20 (&amp;lt;code&amp;gt;Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went right, one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls */*.exe&lt;br /&gt;
geogrid/geogrid.exe  util/avg_tsfc.exe      util/int2nc.exe &lt;br /&gt;
metgrid/metgrid.exe  util/calc_ecmwf_p.exe  util/mod_levs.exe&lt;br /&gt;
ungrib/g1print.exe   util/g1print.exe       util/rd_intermediate.exe&lt;br /&gt;
ungrib/g2print.exe   util/g2print.exe &lt;br /&gt;
ungrib/ungrib.exe    util/height_ukmo.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcings ==&lt;br /&gt;
&lt;br /&gt;
=== Atmospheric forcings ===&lt;br /&gt;
This will change once &amp;lt;code&amp;gt;papa-deimos&amp;lt;/code&amp;gt; is fully operational&lt;br /&gt;
&lt;br /&gt;
Provide the atmospheric conditions to the model at a given date.&lt;br /&gt;
&lt;br /&gt;
* There is a shared space called &amp;lt;code&amp;gt;/share&amp;lt;/code&amp;gt;&lt;br /&gt;
* At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all forcings are at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;ERA-Interim&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era-interim ERA-Interim] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Global monthly files at 0.75&amp;amp;deg; horizontal resolution and all time-steps: 00, 06, 12, 18 are labelled as:&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_pl[YYYY][MM]_[var1]-[var2].grib&amp;lt;/code&amp;gt;: pressure levels variables (all levels). &amp;lt;code&amp;gt;GRIB&amp;lt;/code&amp;gt; codes as:&lt;br /&gt;
**** 129: geopotential&lt;br /&gt;
**** 157: relative humidty&lt;br /&gt;
**** 130: Temperature&lt;br /&gt;
**** 131: u-wind&lt;br /&gt;
**** 132: v-wind&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_sfc[YYYY][MM].grib&amp;lt;/code&amp;gt;: all surface levels variables (step 0)&lt;br /&gt;
** To download data:&lt;br /&gt;
*** Generate files from ECMWF web-page [https://apps.ecmwf.int/auth/login/?back=http%3A%2F%2Fapps.ecmwf.int%2Fdatasets%2Fdata%2Finterim-full-daily%2Flevtype%253Dsfc%2F ERA-Interim]&lt;br /&gt;
*** Go to the folder in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** get the file (as link from ECMWF web-page (right bottom on `Download grib&#039;), as e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wget https://stream.ecmwf.int/data/atls05/data/data02/scratch/_mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Rename file according to its content&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mv _mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib ERAI_sfc201302.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;ERA5&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 ERA5] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA5/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;NCEP-NNRP1&#039;&lt;br /&gt;
** Thus, full [https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html NCEP-NNRP1] forcings are (&#039;&#039;&#039;NOTE: no land data!!!&#039;&#039;&#039;):&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/NCEP_NNRP/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Morphological forcings ===&lt;br /&gt;
Provide the geomorphological information for the domain of simulation: topography, land-use, vegetation-types, etc...&lt;br /&gt;
&lt;br /&gt;
* In WRF there is a huge amount of data ans sources at different resolutions. At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; everything is already there at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/GEOG/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* They are ready to be use&lt;br /&gt;
&lt;br /&gt;
= GENERIC Model use =&lt;br /&gt;
WRF has two main parts:&lt;br /&gt;
* &#039;&#039;WPS&#039;&#039;: Generation of the domain, initial and boundary condition: Runs 4 programs:&lt;br /&gt;
** &amp;lt;code&amp;gt;geogrid&amp;lt;/code&amp;gt;: domain generation&lt;br /&gt;
** &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt;: unpack atmospheric forcing \verb+grib+ files&lt;br /&gt;
** &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt;: horizontal interpolation of the unpacked atmospheric forcing files at the domain of simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;: generation of the initial and boundary conditions using \verb+metgrid+ output&lt;br /&gt;
* &#039;&#039;WRF&#039;&#039;: model it self: &amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all the code is already compiled at &amp;lt;code&amp;gt;/opt/wrf&amp;lt;/code&amp;gt; (with folders &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WRFV3&amp;lt;/code&amp;gt;)&lt;br /&gt;
As example WRFv4.3.3 compiled with intel-compilers with distributed and shared memory&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/wrf/WRF-4.3.3/intel/2021.4.0/dm+sm/WRF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IMPORTANT NOTES &lt;br /&gt;
|-&lt;br /&gt;
| * No simulation has to be run in the &amp;lt;CODE&amp;gt;$HOME&amp;lt;/CODE&amp;gt; directory, use &amp;lt;CODE&amp;gt;salidas/&amp;lt;/CODE&amp;gt; instead &lt;br /&gt;
|-&lt;br /&gt;
| * Always run all the components of the model using the queue &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendations:&#039;&#039;&#039;&lt;br /&gt;
* Do not run the WPS/WRF components at the same folder where the code resides. Always run it on another place and link the exectuables and the necessary files&lt;br /&gt;
* Split the execution of the model in 2 different places:&lt;br /&gt;
** Where the model components run&lt;br /&gt;
** Where the outputs of the model components are to be stored and kept&lt;br /&gt;
** For example&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFrunning:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/estudios/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFstorage:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/EXPS/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Inside &amp;lt;CODE&amp;gt;WRFrunning&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;WRFstorage&amp;lt;/CODE&amp;gt; || &amp;lt;CODE&amp;gt;geogrid/, ungrib/, metgrid/, run/, ...&amp;lt;/CODE&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Dimension the amount of nodes/cores/walltime accordingly to the needs of your simulations&lt;br /&gt;
* Make use of restarts, try to avoid to run simulations for more than a week&lt;br /&gt;
&lt;br /&gt;
== WPS ==&lt;br /&gt;
Let&#039;s assume that we work in a folder called &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt; (at users&#039; &amp;lt;code&amp;gt;${HOME}&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;) and we will work with a given WRF version located in &amp;lt;code&amp;gt;$WRFversion&amp;lt;/code&amp;gt;. As example, let&#039;s create a two nested domain of &#039;&#039;30 km&#039;&#039; for the entire South America and a second one of &#039;&#039;4.285 km&#039;&#039; for Córdoba mountain ranges (see the [[WRF/namelist.wps]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:CDXWRF_domain_test.png|frame|50px|WRF two domain configuration 30 and 4.285 km]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== geogrid === &lt;br /&gt;
&lt;br /&gt;
It is used to generate the domain&lt;br /&gt;
&lt;br /&gt;
* Create a folder for the geogrid section&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $WORKDIR&lt;br /&gt;
$ mkdir geogrid&lt;br /&gt;
$ cd geogrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link and copy all the necessary files (do not forget to add &amp;lt;code&amp;gt;opt_geogrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;&amp;amp;geogrid&amp;lt;/code&amp;gt; section) in the namelist!!):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/geogrid.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/GEOGRID.TBL.ARW ./GEOGRID.TBL&lt;br /&gt;
$ cp $WRFversion/WPS/geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain configuration is done via &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; (more information at: [https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/user_guide_V3.9/users_guide_chap3.html WPS user guide])&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hydra, the path to the &amp;lt;code&amp;gt;geographic data&amp;lt;/code&amp;gt;a has to be defined in the &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
 geog_data_path = &#039;/share/GEOG/&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is defined, run it (all the necessary &amp;lt;code&amp;gt;PBS script files&amp;lt;/code&amp;gt; are available in &amp;lt;code&amp;gt;/share/WRF&amp;lt;/code&amp;gt;, you only need to change amount of processes and users&#039;s email):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_geogrid_intel.pbs ./&lt;br /&gt;
$ qsub launch_geogrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This will create the domain files, one for each domain.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
geo_em.d[nn].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Some variables from the geogrid files:&lt;br /&gt;
** &amp;lt;code&amp;gt;LANDMASK&amp;lt;/code&amp;gt;: sea-land mask&lt;br /&gt;
** &amp;lt;code&amp;gt;XLAT_M&amp;lt;/code&amp;gt;: latitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;XLONG_M&amp;lt;/code&amp;gt;: longitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;HGT_M&amp;lt;/code&amp;gt;: orographical height&lt;br /&gt;
&lt;br /&gt;
The definition of the domain it is not a simple task and one needs to take into account a large amount of details, [[/DomainDefinition|here]] you can find a page with some indications&lt;br /&gt;
&lt;br /&gt;
=== ungrib ===&lt;br /&gt;
Prepare and unpack grib files from the GCM forcing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; In case atmospheric forcing data is not in GRIB format, and it is in standard netCDF format, user will need to use the [https://gitlab.in2p3.fr/ipsl/lmd/intro/regipsl/regipsl/-/wikis/Tools/nc2ps nc2wps] tool. Which is already compiled in: &amp;lt;code&amp;gt;/share/tools/RegIPSL/tools/nc2wps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ungrib &lt;br /&gt;
$ cd ungrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linking necessary files from compiled source&lt;br /&gt;
&amp;lt;pre stye=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/ungrib.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/link_grib.csh ./&lt;br /&gt;
$ cp ../geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the namelist &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; to set up the right period of simulation and frequency of forcing (you can also use nano, emacs, ...)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creation of a folder for the necessary GRIB files and linking the necessary files (eg. 4 files per month) from a folder with all the necesary data called $inDATA&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir GribDir&lt;br /&gt;
$ cd GribDir&lt;br /&gt;
$ ln -s $inDATA/*201212*.grib ./ &lt;br /&gt;
$ cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-link files for WRF with its own script&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
./link_grib.csh GribDir/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Should appear:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ls GRIBFILE.AA*&lt;br /&gt;
GRIBFILE.AAA  GRIBFILE.AAB  GRIBFILE.AAC  GRIBFILE.AAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to provide equivalences of the GRIB codes to the real variables. WRF comes with already defined GRIB equivalencies from different sources in folder &amp;lt;code&amp;gt;Variable_Tables&amp;lt;/code&amp;gt;. In this example we use ECMWF ERA-Interim at pressure levels, thus we link&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/Variable_Tables/Vtable.ERA-interim.pl ./Vtable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to take the domain file and get the right dates&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp ../geogrid/nameslist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Files can be unpacked using the PBS job file (user&#039;s email has to be changed and the output folder called &amp;lt;CODE&amp;gt;odir&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_ungrib_intel.pbs ./&lt;br /&gt;
$ vim launch_ungrib_intel.pbs&lt;br /&gt;
$ qsub launch_ungrib_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine, should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;FILE:[YYYY]-[MM]-[DD]_[HH]&amp;lt;/pre&amp;gt;&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail run_ungrib.log &lt;br /&gt;
(...) &lt;br /&gt;
********** &lt;br /&gt;
Done deleting temporary files. &lt;br /&gt;
********** &lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of ungrib.   ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== metgrid ===&lt;br /&gt;
Horizontal interpolation of atmospheric forcing data at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir metgrid &lt;br /&gt;
$ cd metgrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting necessary files (do not forget &amp;lt;code&amp;gt; opt_metgrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;&amp;amp;metgrid&amp;lt;/code&amp;gt; section in namelist !! to avoid: &amp;lt;code&amp;gt;ERROR: Could not open file METGRID.TBL&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/metgrid.exe ./ &lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/METGRID.TBL.ARW ./METGRID.TBL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; output&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/FILE* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the domains of simulation&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../geogrid/geo_em.d* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the namelist from &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; (to make sure we are using the same!)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the PBS (job queue script) to run the &amp;lt;code&amp;gt;metrid.exe&amp;lt;/code&amp;gt; (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;ungrib&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_metgrid_intel.pbs ./&lt;br /&gt;
$ vim launch_metgrid_intel.pbs&lt;br /&gt;
$ qsub launch_metgrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
met_em.d[nn].[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ tail run_metgrid.log&lt;br /&gt;
(...)&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of metgrid.  ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
Vertical interpolation of atmospheric forcing at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir run &lt;br /&gt;
$ cd run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link all the necessary files from WRF (it already links all the necessary to run the model)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WRF/run/* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove and copy the configuration file (&amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ rm namelist.input &lt;br /&gt;
$ cp $WRFversion/WRF/run/namelist.input ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the file and prepare the configuration for the run (re-adapt domain, physics, dates, output....). See an example for the two nested domain here [[WRF/namelist.input]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; If you are using the LCZ classification scheme, the following changes must be done in the &amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt; to properly simulate the domains with the data.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;physics&lt;br /&gt;
use_wudapt_lcz = 1&lt;br /&gt;
num_land_cat = 61 #If you chose to run geogrid directly from WPS v4.5 &lt;br /&gt;
num_land_cat = 41 #If you chose to use w2w&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using LCZs, it is recommended to use the urban parameterization options BEP or BEP+BEM (&amp;lt;code&amp;gt;sf_urban_physics = 2 or 3&amp;lt;/code&amp;gt;, respectively). In case you use SLUCM model (&amp;lt;code&amp;gt;sf_urban_physics = 1&amp;lt;/code&amp;gt;) the lowest model level has to be above the highest building height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Linking the &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt; generated files&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../metgrid/met_em.d*.nc ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the PBS job script for &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp /share/WRF/run_real.pbs ./&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Getting a bash script to run executables in hydra (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;metgrid&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_real_intel.pbs ./&lt;br /&gt;
$ vim launch_real_intel.pbs&lt;br /&gt;
$ qsub /share/WRF/launch_pbs.bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wrfbdy_d[nn]  wrfinput_d[nn]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfbdy_d01&amp;lt;/code&amp;gt;: Boundary conditions file (only for the first domain)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfinput_d[nn]&amp;lt;/code&amp;gt;: Initial conditions file for each domain&lt;br /&gt;
** &amp;lt;code&amp;gt;wrffdda_d[nn]&amp;lt;/code&amp;gt;: Nudging file [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrflowinp_d[nn]&amp;lt;/code&amp;gt;: File with updating (every time-step of the atmospheric forcing) surface characteristics [optional]&lt;br /&gt;
** And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ tail outreal/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
real_em: SUCCESS COMPLETE REAL_EM INIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WRF ==&lt;br /&gt;
* Simulation (look on [http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm\#_Description_of_Namelist description of namelist] for namelist configuration/specifications).&lt;br /&gt;
&lt;br /&gt;
* Getting the necessary PBS job (same folder for &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ cp /share/WRF/launch_wrf_intel.pbs ./&lt;br /&gt;
qsub launch_wrf_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;outwrf/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] outwrf/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: simulation output (at &amp;amp;eta;=(p-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;)/(p&amp;lt;sub&amp;gt;sfc&amp;lt;/sub&amp;gt;-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;) levels)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: restart file (to continue simulation)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfxtrm_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file with extremes from internal integration [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfpress_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file at vertical pressure levels [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;namelist.output_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: All the parameters used for the simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;stations&amp;lt;/code&amp;gt;: folder with the time-series files (&amp;lt;code&amp;gt;tslist&amp;lt;/code&amp;gt;)&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
tail outwrf/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
d01 [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] wrf: SUCCESS COMPLETE WRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* While &#039;&#039;running&#039;&#039; one can check the status on regarding on the &amp;lt;code&amp;gt;rsl.error.0000&amp;lt;/code&amp;gt; file, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
Timing for main: time [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] on domain  1:  3.86105 elapsed seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= WRF: known errors = &lt;br /&gt;
&lt;br /&gt;
== CFL ==&lt;br /&gt;
* But if something went &#039;&#039;wrong&#039;&#039;:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition CFL]: At &amp;lt;code&amp;gt;wrfout/[InitialDATE]-[EndDATE]/&amp;lt;/code&amp;gt; there are the files &amp;lt;code&amp;gt;rsl.[error/out].[nnnn]&amp;lt;/code&amp;gt; (two per cpu). Use to appear &amp;lt;code&amp;gt;SIGSEV segmentation fault&amp;lt;/code&amp;gt;, and to look different sources, usually &amp;lt;code&amp;gt;cfl&amp;lt;/code&amp;gt;. e.g. (usually look for the largest &amp;lt;code&amp;gt;rsl&amp;lt;/code&amp;gt; file (after the &amp;lt;code&amp;gt;0000&amp;lt;/code&amp;gt;); [&amp;lt;code&amp;gt;$ ls -rS rsl.error.*&amp;lt;/code&amp;gt;])&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wrfout/20121201000000-20121210000000/rsl.error.0009&lt;br /&gt;
(...) &lt;br /&gt;
d01 2012-12-01_01:30:00  33 points exceeded cfl=2 in domain d01 at time 2012-12-01_01:30:00 hours &lt;br /&gt;
d01 2012-12-01_01:30:00  MAX AT i,j,k:    100    94    21 vert_cfl,w,d(eta)=    5.897325    17.00738    3.2057911E-02&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NO working restart ==&lt;br /&gt;
Since a given version there is a need to include a new namelist parameter (in &amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) [[http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#restart WRF restart]] in order to make available the option to continue a simulation from a given restart&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
override_restart_timers                = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we want to get values at the output files at the time of the restart, you need to add at the (&amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) the parameter&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
write_hist_at_0h_rst                   = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relación entre valores celdas y dominions ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ERROR: For nest 2, (e_we-s_we+1) must be one greater than an integer multiple of the parent_grid_ratio of &amp;quot;X&amp;quot;.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This error indicates that condition of relation between e_we (it could be also e_sn) related to the parent_grid_ratio is not being accomplished. &lt;br /&gt;
&lt;br /&gt;
For nested domains, e_we and e_sn must be one greater than an integer multiple of the nest&#039;s parent_grid_ratio. This is to ensure that a nest always starts and ends on a parent grid point. (i.e., e_we=n*parent_grid_ratio+1 for some integer n).&lt;br /&gt;
&lt;br /&gt;
For example if parent_grid_ratio = 3, e_we could be 10 (or 13, 16, 19, etc).&lt;br /&gt;
This is because 10 - 1 = 9&lt;br /&gt;
And 9 % 3 = 0 (nine is multiple of 3)&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
For more additional information and further details visit [[WRFextras]]&lt;br /&gt;
&lt;br /&gt;
= WRF4L: Llu&amp;amp;iacute;s&#039; WRF work-flow management =&lt;br /&gt;
For information about Llu&amp;amp;iacute;&#039;s WRF work-flow management visit here [[WRF4L]]&lt;br /&gt;
&lt;br /&gt;
= WRF URBAN =&lt;br /&gt;
For information about urban simulation using WRF 4.5.0 or higher visit here [[WRF-URBAN]]&lt;br /&gt;
&lt;br /&gt;
= CDXWRF: WRF for CORDEX =&lt;br /&gt;
A new module developed in CIMA to attain CORDEX variable demands visit here [[CDXWRF]]&lt;br /&gt;
&lt;br /&gt;
= WRFles =&lt;br /&gt;
LES simulations with WRF model here [[WRFles]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
	<entry>
		<id>http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3538</id>
		<title>WRF</title>
		<link rel="alternate" type="text/html" href="http://wiki.cima.fcen.uba.ar/index.php?title=WRF&amp;diff=3538"/>
		<updated>2025-06-10T15:44:35Z</updated>

		<summary type="html">&lt;p&gt;Guido.tiscornia: /* WRF: known errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Model description =&lt;br /&gt;
Weather Research and Forecast model ([http://www2.mmm.ucar.edu/wrf/users/ WRF], Skamarock, 2008) is a limited area atmospheric model developed by a consortium of american institutions with contributions from the whole community. It is a non-hydrostatic primitive equations model used in a large variety of research areas.&lt;br /&gt;
&lt;br /&gt;
Techincal aspects of the model (v 4.0) are provided in this [http://www2.mmm.ucar.edu/wrf/users/docs/technote/v4_technote.pdf pdf]&lt;br /&gt;
&lt;br /&gt;
= WRF and CIMA = &lt;br /&gt;
CIMA has an HPC called &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; to perform high intensive modelling efforts with WRF.&lt;br /&gt;
&lt;br /&gt;
== hydra ==&lt;br /&gt;
The HPC is part of the Servicio Nacional de Cómputo de Alta Capacidad (SNCAD). &lt;br /&gt;
&lt;br /&gt;
It has been re-installed and re-sorted in Jan 2022 and it has been adapted to common configurations in other international research centers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Selection of compilers &amp;amp; libraries ===&lt;br /&gt;
&lt;br /&gt;
It does not have the &amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt; software to manage compilers and libraries, but it does have an script which allows users to select the compiler. This is done at the terminal with the script &amp;lt;code&amp;gt;source /opt/load-libs.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example selecting intel 2021.4.0, mpich and netcdf 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ source /opt/load-libs.sh&lt;br /&gt;
&lt;br /&gt;
Available libraries:&lt;br /&gt;
1) INTEL 2021.4.0: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
2) INTEL 2021.4.0: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
3) GNU 10.2.1: MPICH 3.4.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
4) GNU 10.2.1: OpenMPI 4.1.2, NetCDF 4, HDF5 1.10.5, JASPER 2.0.33&lt;br /&gt;
0) Exit&lt;br /&gt;
Choose an option: 1&lt;br /&gt;
&lt;br /&gt;
The following libraries, compiled with Intel 2021.4.0 compilers, were loaded:&lt;br /&gt;
* MPICH 3.4.2&lt;br /&gt;
* NetCDF 4&lt;br /&gt;
* HDF5 1.10.5&lt;br /&gt;
* JASPER 2.0.33&lt;br /&gt;
&lt;br /&gt;
To change it please logout and login again.&lt;br /&gt;
&lt;br /&gt;
To load this libraries from within a script add this line to script:&lt;br /&gt;
source /opt/load-libs.sh 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Multiple different versions are available and pre-compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;, with the folloing structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/opt/wrf/WRF-{version}/{compiler}/{compiler-version}/{architecture}/{WRF/WPS}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Model (version 3.9.1) has already been compiled in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For compilation using the gcc copmilers see here [[WRFgcc]]&lt;br /&gt;
&lt;br /&gt;
* From an instalation folder &amp;lt;code&amp;gt;[INSTALLDIR]&amp;lt;/code&amp;gt; (/share/WRF, in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;), creation of a folder structure&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[INSTALLDIR]/[WRFversion]/[compiler]/[compilation_kind]/ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* As example WRFv3.9.1 compiled with intel-compilers with distributed memory only&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir /share/WRF/WRFV3.9.1/ifort/dmpar/&lt;br /&gt;
$ cd /share/WRF/WRFV3.9.1/ifort/dmpar/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Decompressing code source files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tar xvfz ../../../WRFV3.9.1.1.TAR.gz &lt;br /&gt;
$ mv WRF WRFV3 &lt;br /&gt;
$ tar xvfz ../../../WPS.9.1.TAR.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of model (&amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going to the model source folder&lt;br /&gt;
&amp;lt;pre&amp;gt;cd WRFV3&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Declaration of location of netcdf libraries and large file support (&amp;gt; 2GB)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ export NETCDF=&#039;/usr/local&#039;&lt;br /&gt;
$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configuration of the compilation and picking up &amp;lt;code&amp;gt;INTEL (ifort/icc)&amp;lt;/code&amp;gt; and distributed memory (&amp;lt;code&amp;gt;dmpar&amp;lt;/code&amp;gt;) (option 15 and `basic&#039; 1)&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Making a copy of the configuration file to make two modifications&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.wrf configure.ifort.dmpar.wrf&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Modifying the file &amp;lt;code&amp;gt;configure.ifort.dmpar.wrf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#DM_FC          =      mpif90 -f90=$(SFC) &lt;br /&gt;
#DM_CC          =      mpicc -cc=$(SCC) -DMPI2_SUPPORT&lt;br /&gt;
DM_FC          =      mpif90 &lt;br /&gt;
DM_CC          =      mpicc -DMPI2_SUPPORT&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Using the modified file&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp configure.ifort.dmpar.wrf configure.wrf &lt;br /&gt;
$ ./compile em_real &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls main/*.exe&lt;br /&gt;
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
** And empty:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cat -n compile.log | grep Error&lt;br /&gt;
$ cat -n compile.log | grep undefined&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Compilation of the WRF-preprocessing (WPS: &amp;lt;code&amp;gt;geogrid.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ungrib.exe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;metgrid.exe&amp;lt;/code&amp;gt;)&lt;br /&gt;
** Going there&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ../WPS&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Running configure and picking up 20 (&amp;lt;code&amp;gt;Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If everything went right, one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls */*.exe&lt;br /&gt;
geogrid/geogrid.exe  util/avg_tsfc.exe      util/int2nc.exe &lt;br /&gt;
metgrid/metgrid.exe  util/calc_ecmwf_p.exe  util/mod_levs.exe&lt;br /&gt;
ungrib/g1print.exe   util/g1print.exe       util/rd_intermediate.exe&lt;br /&gt;
ungrib/g2print.exe   util/g2print.exe &lt;br /&gt;
ungrib/ungrib.exe    util/height_ukmo.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Forcings ==&lt;br /&gt;
&lt;br /&gt;
=== Atmospheric forcings ===&lt;br /&gt;
This will change once &amp;lt;code&amp;gt;papa-deimos&amp;lt;/code&amp;gt; is fully operational&lt;br /&gt;
&lt;br /&gt;
Provide the atmospheric conditions to the model at a given date.&lt;br /&gt;
&lt;br /&gt;
* There is a shared space called &amp;lt;code&amp;gt;/share&amp;lt;/code&amp;gt;&lt;br /&gt;
* At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all forcings are at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &#039;&#039;ERA-Interim&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era-interim ERA-Interim] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Global monthly files at 0.75&amp;amp;deg; horizontal resolution and all time-steps: 00, 06, 12, 18 are labelled as:&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_pl[YYYY][MM]_[var1]-[var2].grib&amp;lt;/code&amp;gt;: pressure levels variables (all levels). &amp;lt;code&amp;gt;GRIB&amp;lt;/code&amp;gt; codes as:&lt;br /&gt;
**** 129: geopotential&lt;br /&gt;
**** 157: relative humidty&lt;br /&gt;
**** 130: Temperature&lt;br /&gt;
**** 131: u-wind&lt;br /&gt;
**** 132: v-wind&lt;br /&gt;
*** &amp;lt;code&amp;gt;ERAI_sfc[YYYY][MM].grib&amp;lt;/code&amp;gt;: all surface levels variables (step 0)&lt;br /&gt;
** To download data:&lt;br /&gt;
*** Generate files from ECMWF web-page [https://apps.ecmwf.int/auth/login/?back=http%3A%2F%2Fapps.ecmwf.int%2Fdatasets%2Fdata%2Finterim-full-daily%2Flevtype%253Dsfc%2F ERA-Interim]&lt;br /&gt;
*** Go to the folder in &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /share/DATA/re-analysis/ERA-Interim/&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** get the file (as link from ECMWF web-page (right bottom on `Download grib&#039;), as e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wget https://stream.ecmwf.int/data/atls05/data/data02/scratch/_mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Rename file according to its content&lt;br /&gt;
&amp;lt;pre&amp;gt;$ mv _mars-atls05-a82bacafb5c306db76464bc7e824bb75-zn7P44.grib ERAI_sfc201302.grib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;ERA5&#039;&#039;&lt;br /&gt;
** Thus, part of [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 ERA5] forcings are:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/ERA5/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;NCEP-NNRP1&#039;&lt;br /&gt;
** Thus, full [https://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html NCEP-NNRP1] forcings are (&#039;&#039;&#039;NOTE: no land data!!!&#039;&#039;&#039;):&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/DATA/re-analysis/NCEP_NNRP/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Morphological forcings ===&lt;br /&gt;
Provide the geomorphological information for the domain of simulation: topography, land-use, vegetation-types, etc...&lt;br /&gt;
&lt;br /&gt;
* In WRF there is a huge amount of data ans sources at different resolutions. At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; everything is already there at:&lt;br /&gt;
&amp;lt;pre&amp;gt;/share/GEOG/&amp;lt;/pre&amp;gt;&lt;br /&gt;
* They are ready to be use&lt;br /&gt;
&lt;br /&gt;
= GENERIC Model use =&lt;br /&gt;
WRF has two main parts:&lt;br /&gt;
* &#039;&#039;WPS&#039;&#039;: Generation of the domain, initial and boundary condition: Runs 4 programs:&lt;br /&gt;
** &amp;lt;code&amp;gt;geogrid&amp;lt;/code&amp;gt;: domain generation&lt;br /&gt;
** &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt;: unpack atmospheric forcing \verb+grib+ files&lt;br /&gt;
** &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt;: horizontal interpolation of the unpacked atmospheric forcing files at the domain of simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;: generation of the initial and boundary conditions using \verb+metgrid+ output&lt;br /&gt;
* &#039;&#039;WRF&#039;&#039;: model it self: &amp;lt;code&amp;gt;wrf.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt; all the code is already compiled at &amp;lt;code&amp;gt;/opt/wrf&amp;lt;/code&amp;gt; (with folders &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WRFV3&amp;lt;/code&amp;gt;)&lt;br /&gt;
As example WRFv4.3.3 compiled with intel-compilers with distributed and shared memory&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/wrf/WRF-4.3.3/intel/2021.4.0/dm+sm/WRF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! IMPORTANT NOTES &lt;br /&gt;
|-&lt;br /&gt;
| * No simulation has to be run in the &amp;lt;CODE&amp;gt;$HOME&amp;lt;/CODE&amp;gt; directory, use &amp;lt;CODE&amp;gt;salidas/&amp;lt;/CODE&amp;gt; instead &lt;br /&gt;
|-&lt;br /&gt;
| * Always run all the components of the model using the queue &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendations:&#039;&#039;&#039;&lt;br /&gt;
* Do not run the WPS/WRF components at the same folder where the code resides. Always run it on another place and link the exectuables and the necessary files&lt;br /&gt;
* Split the execution of the model in 2 different places:&lt;br /&gt;
** Where the model components run&lt;br /&gt;
** Where the outputs of the model components are to be stored and kept&lt;br /&gt;
** For example&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFrunning:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/estudios/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;&#039;WRFstorage:&#039;&#039;&#039; || &amp;lt;CODE&amp;gt;salidas/EXPS/[ExperimentName]/[Simulation]&amp;lt;/CODE&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Inside &amp;lt;CODE&amp;gt;WRFrunning&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;WRFstorage&amp;lt;/CODE&amp;gt; || &amp;lt;CODE&amp;gt;geogrid/, ungrib/, metgrid/, run/, ...&amp;lt;/CODE&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Dimension the amount of nodes/cores/walltime accordingly to the needs of your simulations&lt;br /&gt;
* Make use of restarts, try to avoid to run simulations for more than a week&lt;br /&gt;
&lt;br /&gt;
== WPS ==&lt;br /&gt;
Let&#039;s assume that we work in a folder called &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt; (at users&#039; &amp;lt;code&amp;gt;${HOME}&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;hydra&amp;lt;/code&amp;gt;) and we will work with a given WRF version located in &amp;lt;code&amp;gt;$WRFversion&amp;lt;/code&amp;gt;. As example, let&#039;s create a two nested domain of &#039;&#039;30 km&#039;&#039; for the entire South America and a second one of &#039;&#039;4.285 km&#039;&#039; for Córdoba mountain ranges (see the [[WRF/namelist.wps]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[[File:CDXWRF_domain_test.png|frame|50px|WRF two domain configuration 30 and 4.285 km]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== geogrid === &lt;br /&gt;
&lt;br /&gt;
It is used to generate the domain&lt;br /&gt;
&lt;br /&gt;
* Create a folder for the geogrid section&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $WORKDIR&lt;br /&gt;
$ mkdir geogrid&lt;br /&gt;
$ cd geogrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link and copy all the necessary files (do not forget to add &amp;lt;code&amp;gt;opt_geogrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;&amp;amp;geogrid&amp;lt;/code&amp;gt; section) in the namelist!!):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/geogrid.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/geogrid/GEOGRID.TBL.ARW ./GEOGRID.TBL&lt;br /&gt;
$ cp $WRFversion/WPS/geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain configuration is done via &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; (more information at: [https://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/user_guide_V3.9/users_guide_chap3.html WPS user guide])&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hydra, the path to the &amp;lt;code&amp;gt;geographic data&amp;lt;/code&amp;gt;a has to be defined in the &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; as follows:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
 geog_data_path = &#039;/share/GEOG/&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is defined, run it (all the necessary &amp;lt;code&amp;gt;PBS script files&amp;lt;/code&amp;gt; are available in &amp;lt;code&amp;gt;/share/WRF&amp;lt;/code&amp;gt;, you only need to change amount of processes and users&#039;s email):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_geogrid_intel.pbs ./&lt;br /&gt;
$ qsub launch_geogrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This will create the domain files, one for each domain.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
geo_em.d[nn].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Some variables from the geogrid files:&lt;br /&gt;
** &amp;lt;code&amp;gt;LANDMASK&amp;lt;/code&amp;gt;: sea-land mask&lt;br /&gt;
** &amp;lt;code&amp;gt;XLAT_M&amp;lt;/code&amp;gt;: latitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;XLONG_M&amp;lt;/code&amp;gt;: longitude on mass point&lt;br /&gt;
** &amp;lt;code&amp;gt;HGT_M&amp;lt;/code&amp;gt;: orographical height&lt;br /&gt;
&lt;br /&gt;
The definition of the domain it is not a simple task and one needs to take into account a large amount of details, [[/DomainDefinition|here]] you can find a page with some indications&lt;br /&gt;
&lt;br /&gt;
=== ungrib ===&lt;br /&gt;
Prepare and unpack grib files from the GCM forcing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; In case atmospheric forcing data is not in GRIB format, and it is in standard netCDF format, user will need to use the [https://gitlab.in2p3.fr/ipsl/lmd/intro/regipsl/regipsl/-/wikis/Tools/nc2ps nc2wps] tool. Which is already compiled in: &amp;lt;code&amp;gt;/share/tools/RegIPSL/tools/nc2wps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ungrib &lt;br /&gt;
$ cd ungrib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linking necessary files from compiled source&lt;br /&gt;
&amp;lt;pre stye=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/ungrib.exe ./&lt;br /&gt;
$ ln -s $WRFversion/WPS/link_grib.csh ./&lt;br /&gt;
$ cp ../geogrid/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the namelist &amp;lt;code&amp;gt;namelist.wps&amp;lt;/code&amp;gt; to set up the right period of simulation and frequency of forcing (you can also use nano, emacs, ...)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.wps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Creation of a folder for the necessary GRIB files and linking the necessary files (eg. 4 files per month) from a folder with all the necesary data called $inDATA&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir GribDir&lt;br /&gt;
$ cd GribDir&lt;br /&gt;
$ ln -s $inDATA/*201212*.grib ./ &lt;br /&gt;
$ cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-link files for WRF with its own script&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
./link_grib.csh GribDir/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Should appear:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ls GRIBFILE.AA*&lt;br /&gt;
GRIBFILE.AAA  GRIBFILE.AAB  GRIBFILE.AAC  GRIBFILE.AAD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to provide equivalences of the GRIB codes to the real variables. WRF comes with already defined GRIB equivalencies from different sources in folder &amp;lt;code&amp;gt;Variable_Tables&amp;lt;/code&amp;gt;. In this example we use ECMWF ERA-Interim at pressure levels, thus we link&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/ungrib/Variable_Tables/Vtable.ERA-interim.pl ./Vtable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We need to take the domain file and get the right dates&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp ../geogrid/nameslist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Files can be unpacked using the PBS job file (user&#039;s email has to be changed and the output folder called &amp;lt;CODE&amp;gt;odir&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_ungrib_intel.pbs ./&lt;br /&gt;
$ vim launch_ungrib_intel.pbs&lt;br /&gt;
$ qsub launch_ungrib_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine, should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;FILE:[YYYY]-[MM]-[DD]_[HH]&amp;lt;/pre&amp;gt;&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail run_ungrib.log &lt;br /&gt;
(...) &lt;br /&gt;
********** &lt;br /&gt;
Done deleting temporary files. &lt;br /&gt;
********** &lt;br /&gt;
&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of ungrib.   ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== metgrid ===&lt;br /&gt;
Horizontal interpolation of atmospheric forcing data at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir metgrid &lt;br /&gt;
$ cd metgrid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting necessary files (do not forget &amp;lt;code&amp;gt; opt_metgrid_tbl_path = &#039;./&#039;&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;&amp;amp;metgrid&amp;lt;/code&amp;gt; section in namelist !! to avoid: &amp;lt;code&amp;gt;ERROR: Could not open file METGRID.TBL&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/metgrid.exe ./ &lt;br /&gt;
$ ln -s $WRFversion/WPS/metgrid/METGRID.TBL.ARW ./METGRID.TBL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; output&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/FILE* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the domains of simulation&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../geogrid/geo_em.d* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Link the namelist from &amp;lt;code&amp;gt;ungrib&amp;lt;/code&amp;gt; (to make sure we are using the same!)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../ungrib/namelist.wps ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the PBS (job queue script) to run the &amp;lt;code&amp;gt;metrid.exe&amp;lt;/code&amp;gt; (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;ungrib&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_metgrid_intel.pbs ./&lt;br /&gt;
$ vim launch_metgrid_intel.pbs&lt;br /&gt;
$ qsub launch_metgrid_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
met_em.d[nn].[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS].nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ tail run_metgrid.log&lt;br /&gt;
(...)&lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &lt;br /&gt;
!  Successful completion of metgrid.  ! &lt;br /&gt;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== real ===&lt;br /&gt;
Vertical interpolation of atmospheric forcing at the domain of simulation&lt;br /&gt;
&lt;br /&gt;
* Creation of the folder (from &amp;lt;code&amp;gt;$WORKDIR&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir run &lt;br /&gt;
$ cd run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link all the necessary files from WRF (it already links all the necessary to run the model)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s $WRFversion/WRF/run/* ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove and copy the configuration file (&amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ rm namelist.input &lt;br /&gt;
$ cp $WRFversion/WRF/run/namelist.input ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit the file and prepare the configuration for the run (re-adapt domain, physics, dates, output....). See an example for the two nested domain here [[WRF/namelist.input]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ vim namelist.input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;NOTE:&amp;lt;/B&amp;gt; If you are using the LCZ classification scheme, the following changes must be done in the &amp;lt;code&amp;gt;namelist.input&amp;lt;/code&amp;gt; to properly simulate the domains with the data.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;physics&lt;br /&gt;
use_wudapt_lcz = 1&lt;br /&gt;
num_land_cat = 61 #If you chose to run geogrid directly from WPS v4.5 &lt;br /&gt;
num_land_cat = 41 #If you chose to use w2w&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using LCZs, it is recommended to use the urban parameterization options BEP or BEP+BEM (&amp;lt;code&amp;gt;sf_urban_physics = 2 or 3&amp;lt;/code&amp;gt;, respectively). In case you use SLUCM model (&amp;lt;code&amp;gt;sf_urban_physics = 1&amp;lt;/code&amp;gt;) the lowest model level has to be above the highest building height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Linking the &amp;lt;code&amp;gt;metgrid&amp;lt;/code&amp;gt; generated files&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ln -s ../metgrid/met_em.d*.nc ./&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Getting the PBS job script for &amp;lt;code&amp;gt;real.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cp /share/WRF/run_real.pbs ./&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Getting a bash script to run executables in hydra (remember to edit the user&#039;s email in the pbs job and the input/output folders called &amp;lt;CODE&amp;gt;idir, odir&amp;lt;/CODE&amp;gt;; idir: output of &amp;lt;CODE&amp;gt;metgrid&amp;lt;/CODE&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cp /share/tools/workflows/direct/WRF/hydra/launch_real_intel.pbs ./&lt;br /&gt;
$ vim launch_real_intel.pbs&lt;br /&gt;
$ qsub /share/WRF/launch_pbs.bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wrfbdy_d[nn]  wrfinput_d[nn]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfbdy_d01&amp;lt;/code&amp;gt;: Boundary conditions file (only for the first domain)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfinput_d[nn]&amp;lt;/code&amp;gt;: Initial conditions file for each domain&lt;br /&gt;
** &amp;lt;code&amp;gt;wrffdda_d[nn]&amp;lt;/code&amp;gt;: Nudging file [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrflowinp_d[nn]&amp;lt;/code&amp;gt;: File with updating (every time-step of the atmospheric forcing) surface characteristics [optional]&lt;br /&gt;
** And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ tail outreal/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
real_em: SUCCESS COMPLETE REAL_EM INIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WRF ==&lt;br /&gt;
* Simulation (look on [http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm\#_Description_of_Namelist description of namelist] for namelist configuration/specifications).&lt;br /&gt;
&lt;br /&gt;
* Getting the necessary PBS job (same folder for &amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt;)&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;$ cp /share/WRF/launch_wrf_intel.pbs ./&lt;br /&gt;
qsub launch_wrf_intel.pbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything went fine one should have (the basic ones):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;outwrf/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] outwrf/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]  ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfout_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: simulation output (at &amp;amp;eta;=(p-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;)/(p&amp;lt;sub&amp;gt;sfc&amp;lt;/sub&amp;gt;-p&amp;lt;sub&amp;gt;top&amp;lt;/sub&amp;gt;) levels)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfrst_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: restart file (to continue simulation)&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfxtrm_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file with extremes from internal integration [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;wrfout/wrfpress_d[nn]_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: file at vertical pressure levels [optional]&lt;br /&gt;
** &amp;lt;code&amp;gt;namelist.output_[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS]&amp;lt;/code&amp;gt;: All the parameters used for the simulation&lt;br /&gt;
** &amp;lt;code&amp;gt;stations&amp;lt;/code&amp;gt;: folder with the time-series files (&amp;lt;code&amp;gt;tslist&amp;lt;/code&amp;gt;)&lt;br /&gt;
* And...&lt;br /&gt;
&amp;lt;pre style=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
tail outwrf/rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
d01 [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] wrf: SUCCESS COMPLETE WRF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* While &#039;&#039;running&#039;&#039; one can check the status on regarding on the &amp;lt;code&amp;gt;rsl.error.0000&amp;lt;/code&amp;gt; file, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ tail rsl.error.0000&lt;br /&gt;
(...)&lt;br /&gt;
Timing for main: time [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] on domain  1:  3.86105 elapsed seconds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= WRF: known errors = &lt;br /&gt;
&lt;br /&gt;
== CFL ==&lt;br /&gt;
* But if something went &#039;&#039;wrong&#039;&#039;:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition CFL]: At &amp;lt;code&amp;gt;wrfout/[InitialDATE]-[EndDATE]/&amp;lt;/code&amp;gt; there are the files &amp;lt;code&amp;gt;rsl.[error/out].[nnnn]&amp;lt;/code&amp;gt; (two per cpu). Use to appear &amp;lt;code&amp;gt;SIGSEV segmentation fault&amp;lt;/code&amp;gt;, and to look different sources, usually &amp;lt;code&amp;gt;cfl&amp;lt;/code&amp;gt;. e.g. (usually look for the largest &amp;lt;code&amp;gt;rsl&amp;lt;/code&amp;gt; file (after the &amp;lt;code&amp;gt;0000&amp;lt;/code&amp;gt;); [&amp;lt;code&amp;gt;$ ls -rS rsl.error.*&amp;lt;/code&amp;gt;])&lt;br /&gt;
&amp;lt;pre&amp;gt;$ wrfout/20121201000000-20121210000000/rsl.error.0009&lt;br /&gt;
(...) &lt;br /&gt;
d01 2012-12-01_01:30:00  33 points exceeded cfl=2 in domain d01 at time 2012-12-01_01:30:00 hours &lt;br /&gt;
d01 2012-12-01_01:30:00  MAX AT i,j,k:    100    94    21 vert_cfl,w,d(eta)=    5.897325    17.00738    3.2057911E-02&lt;br /&gt;
(...)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NO working restart ==&lt;br /&gt;
Since a given version there is a need to include a new namelist parameter (in &amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) [[http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#restart WRF restart]] in order to make available the option to continue a simulation from a given restart&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
override_restart_timers                = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we want to get values at the output files at the time of the restart, you need to add at the (&amp;lt;code&amp;gt;&amp;amp;time_control&amp;lt;/code&amp;gt; section) the parameter&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
write_hist_at_0h_rst                   = .true.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relación entre valores celdas y dominions ==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
ERROR: For nest 2, (e_we-s_we+1) must be one greater than an integer multiple of the parent_grid_ratio of 5.&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Additional information =&lt;br /&gt;
For more additional information and further details visit [[WRFextras]]&lt;br /&gt;
&lt;br /&gt;
= WRF4L: Llu&amp;amp;iacute;s&#039; WRF work-flow management =&lt;br /&gt;
For information about Llu&amp;amp;iacute;&#039;s WRF work-flow management visit here [[WRF4L]]&lt;br /&gt;
&lt;br /&gt;
= WRF URBAN =&lt;br /&gt;
For information about urban simulation using WRF 4.5.0 or higher visit here [[WRF-URBAN]]&lt;br /&gt;
&lt;br /&gt;
= CDXWRF: WRF for CORDEX =&lt;br /&gt;
A new module developed in CIMA to attain CORDEX variable demands visit here [[CDXWRF]]&lt;br /&gt;
&lt;br /&gt;
= WRFles =&lt;br /&gt;
LES simulations with WRF model here [[WRFles]]&lt;/div&gt;</summary>
		<author><name>Guido.tiscornia</name></author>
	</entry>
</feed>