Skip to content
Snippets Groups Projects
Commit 04a4e258 authored by Stefano Serafin's avatar Stefano Serafin
Browse files

WRF.md, corrections to srvx1 configuration

parent ebe17ff9
No related branches found
No related tags found
No related merge requests found
...@@ -159,7 +159,7 @@ In most cases, precompiled libraries can be made available to the operating syst ...@@ -159,7 +159,7 @@ In most cases, precompiled libraries can be made available to the operating syst
SRVX1: SRVX1:
```sh ```sh
module load intel-parallel-studio/composer.2020.4-intel-20.0.4 openmpi/3.1.6-intel-20.0.4 netcdf-fortran/4.5.2-intel-20.0.4-MPI3.1.6 eccodes/2.19.1-intel-20.0.4-MPI3.1.6 module load intel-parallel-studio/composer.2020.4-intel-20.0.4 openmpi/3.1.6-intel-20.0.4 hdf5/1.10.7-intel-20.0.4-MPI3.1.6 netcdf-c/4.6.3-intel-20.0.4-MPI3.1.6 netcdf-fortran/4.5.2-intel-20.0.4-MPI3.1.6
``` ```
JET (GNU Fortran compiler): JET (GNU Fortran compiler):
...@@ -252,7 +252,7 @@ This build of WRF will use NETCDF4 with HDF5 compression ...@@ -252,7 +252,7 @@ This build of WRF will use NETCDF4 with HDF5 compression
***************************************************************************** *****************************************************************************
``` ```
But the configuration could also end with a message like this: But the configuration could also end with a message like this (it happens for instance on srvx1):
```sh ```sh
************************** W A R N I N G ************************************ ************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF NETCDF4 IO features are requested, but this installation of NetCDF
...@@ -272,10 +272,24 @@ Then re-run this configure script ...@@ -272,10 +272,24 @@ Then re-run this configure script
***************************************************************************** *****************************************************************************
``` ```
This is actually a misleading error message. The problem has nothing to do with NETCDF4 not being available, but with the operating system not knowing where the NETCDF libraries are. **NOTE: explain solution.** This is actually a misleading error message. The problem has nothing to do with NETCDF4 not being available, but with the operating system not detecting correctly all the dependencies of the NETCDF libraries. Solving this problem requires manually editing the configuration files (see below).
The configure script stores the model configuration to a file called `configure.wrf`. This is specific to the source code version, to the server where the source code is compiled, and to the software environment. If you a have a working `configure.wrf` file for a given source code/server/environment, back it up. The configure script stores the model configuration to a file called `configure.wrf`. This is specific to the source code version, to the server where the source code is compiled, and to the software environment. If you a have a working `configure.wrf` file for a given source code/server/environment, back it up.
To solve the NETCDF4 error on srvx1, these changes to `configure.wrf` are needed:
```sh
(base) [serafin@srvx1 WRF]$ diff configure.wrf configure.wrf.dmpar
98c98
< DEP_LIB_PATH = -L/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.4/netcdf-c-4.6.3-5netrylc3im76bqg4vlo2ck4qd3jmrdt/lib
---
> DEP_LIB_PATH = -L/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.4/netcdf-c-4.6.3-5netrylc3im76bqg4vlo2ck4qd3jmrdt/lib -L/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.4/hdf5-1.10.7-nj3ahzinbfiwe5tnteupbfmx4empgh6l/lib
122c122
< -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.4/netcdf-fortran-4.5.2-ktet7v73pc74qrx6yc3234zhfo573w23/lib -lnetcdff
---
> -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.4/netcdf-fortran-4.5.2-ktet7v73pc74qrx6yc3234zhfo573w23/lib -lhdf5 -lnetcdff -lnetcdf
```
The first file, `configure.wrf`, is the result of the (wrong) automatic configuration. The second file, `configure.wrf.dmpar` is the manually fixed one. In the latter, additional library link directives (`-lnetcdf` and `-lhdf5`) are added to the variable `LIB_EXTERNAL`, and the full paths to these extra libraries are added to the variable `DEP_LIB_PATH`.
#### Compile WRF #### Compile WRF
You always compile WRF for a specific model configuration. The ones we use most commonly are `em_les` (for large-eddy simulation), `em_quarter_ss` (for idealized mesoscale simulations), `em_real` (for real-case forecasts). So type either of the following, depending on what you want to get: You always compile WRF for a specific model configuration. The ones we use most commonly are `em_les` (for large-eddy simulation), `em_quarter_ss` (for idealized mesoscale simulations), `em_real` (for real-case forecasts). So type either of the following, depending on what you want to get:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment