Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Problems building the executables while compiling em_real wrf v4.5.2


New member
Hello every one
I need your help please
On Ubuntu 22.04.4 LTS OS I'm trying to compile em-real from wrf v4.5.2 with dmpar GNU (gfortran/gcc)
Following This page I managed to complete the system environment tests
and i successfuly built the libraries using:
I successfuly went through the Library compatibility tests
But when i run ./compile em-real i get problems building the executables in my compile.log
I appreciate your Help
Thank You


  • compile.log
    977.5 KB · Views: 2
  • configure wrf.txt
    21 KB · Views: 2
Last edited:
Did you also install HDF5, and use that to build netcdf? The errors you're seeing :

/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_def_var_chunking_':
nf_nc4.F90:(.text+0x608d): undefined reference to `nc_def_var_chunking_ints'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_inq_var_chunking_':
nf_nc4.F90:(.text+0x6430): undefined reference to `nc_inq_var_chunking_ints'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_def_var_szip_':
nf_nc4.F90:(.text+0x66e3): undefined reference to `nc_def_var_szip'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_chunk_cache_':
nf_nc4.F90:(.text+0x7094): undefined reference to `nc_set_chunk_cache_ints'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_chunk_cache_':
nf_nc4.F90:(.text+0x70cd): undefined reference to `nc_get_chunk_cache_ints'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_var_chunk_cache_':
nf_nc4.F90:(.text+0x7161): undefined reference to `nc_set_var_chunk_cache_ints'
/usr/bin/ld: /home/hamada/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_var_chunk_cache_':
nf_nc4.F90:(.text+0x71bc): undefined reference to `nc_get_var_chunk_cache_ints'
collect2: error: ld returned 1 exit status
Command exited with non-zero status 1
0.10user 0.03system 0:00.14elapsed 99%CPU (0avgtext+0avgdata 19900maxresident)k
808inputs+2632outputs (0major+17065minor)pagefaults 0swaps
make[2]: [makefile:45: diffwrf] Error 1 (ignored)
make[2]: Leaving directory '/home/hamada/Build_WRF/v4.5.2/WRFV4.5.2/external/io_netcdf'

are related to netCDF, but I'm not certain yet what the issue is. I'm not sure if it will help, but take a look at this previous post where the user shared what helped them when they ran into a similar error.

If that's not helpul, can you issue the following two commands and attach those *.txt files?

echo $NETCDF >& netcdf.txt

echo $PATH >& path.txt