Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2020/07/28/Installing-WRF-4.2.1-on-Ubuntu-LTS-20.04 #4

Open
utterances-bot opened this issue Jun 25, 2021 · 26 comments
Open

2020/07/28/Installing-WRF-4.2.1-on-Ubuntu-LTS-20.04 #4

utterances-bot opened this issue Jun 25, 2021 · 26 comments

Comments

@utterances-bot
Copy link

Installing WRF 4.2.1 on Ubuntu LTS 20.04 - Pratiman Homepage

This is Pratiman webpage with some blogs.

https://pratiman-91.github.io/2020/07/28/Installing-WRF-4.2.1-on-Ubuntu-LTS-20.04.html

Copy link

Very usefull.

Copy link

You chose, Installing the WPS: Enter selection [1-40] : 1 .
What is the difference with option 1 and option 3? On some websites this option is 3.

  1. Linux x86_64, gfortran (serial)
  2. Linux x86_64, gfortran (serial_NO_GRIB2)
  3. Linux x86_64, gfortran (dmpar)

Does it change WRF run speed?

Copy link
Owner

No, it does not affect WRF run speed. The WPS program ungrib do serial operations, while geogrid and metgrid may be run in parallel mode. However, in my experience, the time required to complete a serial or parallel job is almost similar unless you are using a large domain. You can choose either option.

Copy link

pHking1 commented Apr 1, 2022

Very useful. Thanks

Copy link

I was getting a lot of undefined references. How to solve that?

@pratiman-91
Copy link
Owner

I was getting a lot of undefined references. How to solve that?

What kind of undefined references?

@saiprasanna12
Copy link

wrf_io.f undefined reference to nf_inq_vartype
This is one of many undefined references

@pratiman-91
Copy link
Owner

wrf_io.f undefined reference to nf_inq_vartype

It seems like there is something wrong with your NetCDF installation.

@saiprasanna12
Copy link

saiprasanna12 commented Apr 20, 2022 via email

@pratiman-91
Copy link
Owner

pratiman-91 commented Apr 20, 2022

How do I solve that error in NETCDF installation?

I am not sure. Without any error logs. I cannot help.

@saiprasanna12
Copy link

saiprasanna12 commented Apr 20, 2022 via email

Copy link

Hi there,

I successfully installed WRF-4.3.3 in my linux machine. However, I`ve not succeed in built the ungrib.exe file during WPS-4.3.1 compilation. I followed all recommendations posted here, especially that related to the WRF_LIB edition.

So, I would appreciate if somebody guide me on to fix this problem.

@pratiman-91
Copy link
Owner

Hi there,

I successfully installed WRF-4.3.3 in my linux machine. However, I`ve not succeed in built the ungrib.exe file during WPS-4.3.1 compilation. I followed all recommendations posted here, especially that related to the WRF_LIB edition.

So, I would appreciate if somebody guide me on to fix this problem.

What is the error during the compilation of WPS?

Copy link

Hi,

some of the errors I find were:

/usr/bin/ld: cannot find -lg2_4: No such file or directory
/usr/bin/ld: cannot find -ljasper: No such file or directory

dec_jpeg2000.c:5:10: fatal error: jasper/jasper.h: No such file or directory
5 | #include "jasper/jasper.h"

/usr/bin/ld: cannot find -lg2_4: No such file or directory
/usr/bin/ld: cannot find -ljasper: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: [Makefile:41: g2print.exe] Error 1 (ignored)

Copy link

Hi.
Many thanks for the tutorial. I’ve successfully compiled the WPS, and I’ve got the executables.
However, i'm getting the follow error when a run ungrib.exe

./ungrib.exe
./ungrib.exe: error while loading shared libraries: libjasper.so.4: cannot open shared object file: No such file or directory

Maybe it’s a problem with environment variables, but I guess they are set

echo $JASPERLIB
/opt/jasper-1.900.29/lib/
echo $JASPERINC
/opt/jasper-1.900.29/include/

I would really appreciate if you could give me some hint.
Thank you

Copy link
Owner

@Tiagofcr

For running WPS, you have to add LD_LIBRARY_PATH into your .bashrc.

  1. Open your ~/.bashrc in nano or any other text editor of your choice.
  2. Add this line at the end of the file:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/jasper-1.900.29/lib/
  3. Write and Save edits and then Exit.
  4. Now, in your terminal:
    source ~/.bashrc

Now try to run it. It should work.

Copy link
Owner

@ilms2012

It is my guess that either your jasper compilation is incomplete or you are providing wrong paths for jasper while compiling WPS.

wget https://www.ece.uvic.ca/~frodo/jasper/software/jasper-1.900.29.tar.gz
tar xvf jasper-1.900.29.tar.gz 
cd jasper-1.900.29/
./configure --prefix=/opt/jasper-1.900.29
make
sudo make install

check the library path in the environment

cd WPS-4.2/

export WRF_DIR=../WRF-4.2.1/
export JASPERLIB=/opt/jasper-1.900.29/lib/
export JASPERINC=/opt/jasper-1.900.29/include/

Copy link

/usr/bin/ld: could not find -lwrfio_nf: No such file or directory
Does anyone know how to fix this error?

@pratiman-91
Copy link
Owner

@Vitortenorio33

/usr/bin/ld: could not find -lwrfio_nf: No such file or directory Does anyone know how to fix this error?

Just a wild guess, try to recompile without changing anything.
Sometimes it works.

Copy link

tobioye commented Aug 25, 2022

@Vitortenorio33 @pratiman-91 did the recommendation work for you as it didn't work for mine or is there an alternative approach to solve the error?

reference:
"/usr/bin/ld: could not find -lwrfio_nf: No such file or directory Does anyone know how to fix this error?"

@pratiman-91
Copy link
Owner

@Vitortenorio33 @pratiman-91 did the recommendation work for you as it didn't work for mine or is there an alternative approach to solve the error?

reference:
"/usr/bin/ld: could not find -lwrfio_nf: No such file or directory Does anyone know how to fix this error?"

I am unable to replicate this in my system. Just a guess, something is wrong with netcdf linking or installation. Hope it helps!

@Bekele-EMI
Copy link

Dear all, How are you? When I configure the WRF Model on my laptop,I get the error tail -f compile.log /bin/rm -f namelist.input ; cp ../test/em_real/namelist.input . ) Problems building executables, look for errors in the build log .Please help me.

@liltwizzy02
Copy link

The issue occurs with gfortran 10 and later. i’ll suggest you use a lower version. gfortran 9 installs without the error. (recommended)

Alternatively, you can modify the Makefile, arch/config.defaults and configure files and recompile to solve the error.
for reference: wrf-model/WRF#1251

Copy link

taguemfo commented Mar 3, 2023

Hello everyone, I installed version 4.2.1 of WRF with gfortran without problem but i cannot compile the WPS 4.2. he refuses to take out the metgrid.exe file. does anyone know why?

Here is one of the errors:
Fatal Error: Cannot read module file ‘netcdf.mod’ opened at (1), because it was created by a different version of GNU Fortran compilation terminated.

Copy link
Owner

@taguemfo You have to recompile the netcdf with same compiler that you used to compile WRF.

Copy link

Problems building executables, look for errors in the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests