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

WPS compile error in WSL windows 10

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member

After successfully compiling WRF and generating Ndown.exe and other executables, configured WPS for serial using gfortran. Then I tried to compile WPS in Windows subsystem for linux and encountered a error message " ../../configure.wps:104: recipe for target 'module_stringutil.o' failed
make[1]: [module_stringutil.o] Error 1 (ignored)"

files are attached herewith

Can Someone help me to solve this issue?



  • compile_wps.log
    178 KB · Views: 45
  • configure.wps
    3.3 KB · Views: 40
  • WPS_complie.png
    165.6 KB · Views: 1,038
  • configure_wps.log
    3.3 KB · Views: 42
The first error in your compilation log suggests that this might be a problem with symbolic links:
gfortran  -ffree-form -O -fconvert=big-endian -frecord-marker=4 -c module_stringutil.f90 -I/home/glejin/Projects/COAWST/WPS/../WRF/external/io_netcdf -I/home/glejin/Projects/COAWST/WPS/../WRF/external/io_grib_share -I/home/glejin/Projects/COAWST/WPS/../WRF/external/io_grib1 -I/home/glejin/Projects/COAWST/WPS/../WRF/external/io_int -I/home/glejin/Projects/COAWST/WPS/../WRF/inc -I/home/glejin/Softwares/Library/include

Error: Invalid character in name at (1)
If I list the geogrid/src directory, module_stringutil.F is a symbolic link to ../../ungrib/src/module_stringutil.F"
-rw-r--r--  1 duda  mmm    2539 Oct  3  2019 Makefile
-rw-r--r--  1 duda  mmm    5860 Oct  3  2019 bitarray_module.F
-rw-r--r--  1 duda  mmm    1767 Oct  3  2019 cio.c
-rw-r--r--  1 duda  mmm    1262 Oct  3  2019 constants_module.F
-rw-r--r--  1 duda  mmm    5417 Oct  3  2019 geogrid.F
-rw-r--r--  1 duda  mmm   25584 Oct  3  2019 gridinfo_module.F
-rw-r--r--  1 duda  mmm    4360 Oct  3  2019 hash_module.F
-rw-r--r--  1 duda  mmm   62681 Oct  3  2019 interp_module.F
-rw-r--r--  1 duda  mmm   10183 Oct  3  2019 list_module.F
-rw-r--r--  1 duda  mmm   32192 Oct  3  2019 llxy_module.F
-rw-r--r--  1 duda  mmm    1829 Oct  3  2019 misc_definitions_module.F
-rw-r--r--  1 duda  mmm   12222 Oct  3  2019 module_debug.F
-rw-r--r--  1 duda  mmm   75615 May  5 10:59 module_map_utils.F
lrwxr-xr-x  1 duda  mmm      36 Oct  3  2019 module_stringutil.F -> ../../ungrib/src/module_stringutil.F
-rw-r--r--  1 duda  mmm   70346 Oct  3  2019 output_module.F
-rw-r--r--  1 duda  mmm   35296 Oct  3  2019 parallel_module.F
-rw-r--r--  1 duda  mmm   41186 Oct  3  2019 proc_point_module.F
-rw-r--r--  1 duda  mmm  103773 Jun 30 10:34 process_tile_module.F
-rw-r--r--  1 duda  mmm    6266 Oct  3  2019 queue_module.F
-rw-r--r--  1 duda  mmm    3885 Oct  3  2019 read_geogrid.c
-rw-r--r--  1 duda  mmm   19475 Oct  3  2019 smooth_module.F
-rw-r--r--  1 duda  mmm  150310 Oct  3  2019 source_data_module.F
-rw-r--r--  1 duda  mmm     801 Oct  3  2019 wrf_debug.F
-rw-r--r--  1 duda  mmm    4008 Oct  3  2019 write_geogrid.c
Can you verify that this symbolic link is correct in your copy of the WPS code?

When I tried to generate symbolic link it shows failiure as this file is already exits in the /ungrib/src

I am using COAWST for WRF.

"ln: failed to create symbolic link '/home/glejin/Projects/COAWST/WPS/ungrib/src/module_stringutil.F': File exists"

Thank you for your reply,

the issue was with "module_stringutil.F" file in "geogrid/src " directory,.

just replaced the file with file from "/ungrib/src/module_stringutil.F" and it works fine

But still has the problem with generation of "*.exe" and found that only "geogrid.exe -> geogrid/src/geogrid.exe" available in the dir



  • comp_updated_wps.log
    167.7 KB · Views: 43
It looks like most of the errors in your compilation log are due to problems with symbolic links. For example, the first error that I can see when compiling ungrib is:
debug_cio.c:1:1: error: expected identifier or ‘(’ before ‘.’ token
Makefile:95: recipe for target 'debug_cio.o' failed
and I've noted that the "debug_cio.c" file in the ungrib/src directory is a symbolic link to "../../geogrid/src/cio.c":
lrwxr-xr-x  1 duda  mmm      23 Oct  3  2019 debug_cio.c -> ../../geogrid/src/cio.c

I've never used WSL in Windows 10, but it may be worth seeing whether there's a way to resolve the general issue of symbolic links not working in that environment, as we do tend to use symbolic links throughout various components of the WRF modeling system.
Now I Could successfully generate "*.exe" files such as "geogrid.exe, ungrib.exe, and metgrid.exe" after compiling WRF and WPS in windows subsystem for linux.

As you mentioned the problem was with symbolic links. there is no symbolic links between files in different directories instead have same files in the directories. But the files have only the path to the original file like " ../../metgrid/src/gridinfo_module.F" in the linked files. This has created problem in WSL and need to replace this file with original file (Compilation log attached).

I am using COAWST instruction to compile WRF and WPS and found that the plotfmt.exe, and plotgrid.exe utility executables are not generated. The utility executables generated during the compilation are

util/g1print.exe -> ../ungrib/src/g1print.exe
util/g2print.exe -> ../ungrib/src/g2print.exe
util/rd_intermediate.exe -> src/rd_intermediate.exe
util/mod_levs.exe -> src/mod_levs.exe
util/avg_tsfc.exe -> src/avg_tsfc.exe
util/calc_ecmwf_p.exe -> src/calc_ecmwf_p.exe
util/height_ukmo.exe -> src/height_ukmo.exe
util/int2nc.exe -> src/int2nc.exe

Please let me know if have done any thing wrong during my compilation and how I can fix it?
Thank you,



  • comp_final.log
    103.8 KB · Views: 45
  • config_final.log
    3.3 KB · Views: 36
  • gridinfo_module.F
    35 bytes · Views: 39
The plotfmt.exe and plotgrids.exe programs require the NCAR Graphics library, which is no longer being actively developed. As a replacement for the functionality of these programs, you could instead use int2nc.exe, which converts intermediate-format files to NetCDF format, and plotgrids.ncl, which is an NCL script for plotting domain configurations described in your namelist.wps file.