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

Error in ungrib.exe

CalmTide

New member
Hello, I am trying to run ungrib.exe and encountered the error below:

(base) jamiu@jamiu-OMEN-by-HP-Laptop-15-ce0xx:~/Build_WRF/WPS/ungrib$ ./ungrib.exe
./ungrib.exe: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory


I have re-installed my libpng but the error persist. Kindly help.

Thanks
 
Hello, I am trying to run ungrib.exe and encountered the error below:

(base) jamiu@jamiu-OMEN-by-HP-Laptop-15-ce0xx:~/Build_WRF/WPS/ungrib$ ./ungrib.exe
./ungrib.exe: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory


I have re-installed my libpng but the error persist. Kindly help.

Thanks
Did you remember to export the locations of the files to path and ld library parh
 
Thanks for your response, Williams.
Yes, I linked all the necessary files and library according to the User's guide. Take a look at my fnl and other files linked in the image below.
However, i noticed something. Softlinked.exe files (I mean, ln -sf ..) don't usually work on my system. What i do some times is to copy the executable to the linking directory. What could be the cause for that. It could be the reason I'm having this issue.
Thank you
1000113661.png
 
Bash:
#running ungrib with maximum limit of 2 cores
#linking GFS data files to grib
#linking Vtable for GFS to WRF/run vtable
ln -sf ungrib/Variable_Tables/Vtable.GFS ./Vtable
./link_grib.csh $WRFROOT/GFS/
./ungrib.exe

not sure if this will help you but this is what I do for my GFS run.


Bash:
#setting environment for WRF model to run
export LD_LIBRARY_PATH=/home/workhorse/WRF/Libs/NETCDF/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/workhorse/WRF/Libs/grib2/lib:$LD_LIBRARY_PATH
export PATH=/home/workhorse/WRF/Libs/MPICH/bin:$PATH
export PATH=/home/workhorse/WRF/Libs/grib2/lib:$PATH
 
I think you may need to add the directory containing the 'libpng12.so.0' file to your LD_LIBRARY_PATH environment variable. i.e. (in c-shell):
setenv LD_LIBRARY_PATH /full_path_to_your_libpng_lib:$LD_LIBRARY_PATH
 
Bash:
#running ungrib with maximum limit of 2 cores
#linking GFS data files to grib
#linking Vtable for GFS to WRF/run vtable
ln -sf ungrib/Variable_Tables/Vtable.GFS ./Vtable
./link_grib.csh $WRFROOT/GFS/
./ungrib.exe

not sure if this will help you but this is what I do for my GFS run.


Bash:
#setting environment for WRF model to run
export LD_LIBRARY_PATH=/home/workhorse/WRF/Libs/NETCDF/lib:$LD_LIBRARY_PATH
exyport LD_LIBRARY_PATH=/home/workhorse/WRF/Libs/grib2/lib:$LD_LIBRARY_PATH
export PATH=/home/workhorse/WRF/Libs/MPICH/bin:$PATH
export PATH=/home/workhorse/WRF/Libs/grib2/lib:$PATH
Thank you for the guidance, Williams. I'll implement your instructions and feed you back
 
I think you may need to add the directory containing the 'libpng12.so.0' file to your LD_LIBRARY_PATH environment variable. i.e. (in c-shell):
setenv LD_LIBRARY_PATH /full_path_to_your_libpng_lib:$LD_LIBRARY_PATH
Thanks so much, Ming.
Do I have to reinstall the libpng library after adding the path as you suggested?
 
I have implemented the suggested solutions yet it did not work.
I went back to the config. file of the library "libpng" attached and discovered an error.
It's the key reason I can't run ungrib.exe. Kindly check it for me.
Thanks and regards
 

Attachments

  • Screenshot from 2024-08-23 14-06-26.png
    Screenshot from 2024-08-23 14-06-26.png
    86.9 KB · Views: 7
  • config.log
    9.3 KB · Views: 1
Last edited:
Thanks everyone for your guides. I reinstalled libpng library yet it did not work.
I reinstalled mpich then libpng to the end according to the installation guide.
Now I can link files successfully and run all WPS programs
 
Thanks everyone for your guides. I reinstalled libpng library yet it did not work.
I reinstalled mpich then libpng to the end according to the installation guide.
Now I can link files successfully and run all WPS programs
great news that you got it to work
 
Top