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 on str_with_rc in module_wrf_error.F

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.

When I compiled wrf3.5 using gfortran 7.3.0, I got the following error
module_wrf_error.f90:131:26:

str_with_rc = TRIM(str
1
Error: Syntax error in argument list at (1)
0.01user 0.26system 0:00.30elapsed 91%CPU (0avgtext+0avgdata 7928maxresident)k
0inputs+16outputs (0major+14187minor)pagefaults 0swaps
make[2]: [module_wrf_error.o] Error 1 (ignored)

I searched the module_wrf_error.F in the frame directory and found the statement
str_with_rc = TRIM(str // rc_str)
However, after FORTRAN preprocessor processing, this statement became
str_with_rc = TRIM(str
" // rc_str)" was truncated. Do you have any ideas on this error? Thank you. I also attached my configure.wrf and compilation log file.
 

Attachments

  • configure.wrf
    20 KB · Views: 55
  • compile_em_real.log
    46.6 KB · Views: 54
Please type the command
sed -e "s/^\!.*'.*//" -e "s/^ *\!.*'.*//" module_wrf_error.F > module_wrf_error.G

Then look at the file module_wrf_error.G, and see whether the statement "str_with_rc = TRIM(str // rc_str)" is correct.

If it is correct, then please try to change the two lines in configure.wrf from:
139 TRADFLAG = -traditional
140 CPP = /lib/cpp -C -P

To this:

139 TRADFLAG = -traditional-cpp
140 CPP = /lib/cpp -P -nostdinc

Then rebuild WRF.
Please let me know whether this works.
 
Thank you, Dr. Chen. I followed your suggestions.
After using the command
sed -e "s/^\!.*'.*//" -e "s/^ *\!.*'.*//" module_wrf_error.F > module_wrf_error.G
The statement "str_with_rc = TRIM(str // rc_str)" is correct in the file module_wrf_error.G.

Then I changed the two lines 139 and 140. Then clean the compilation using
./clean -a
Then recompile it using the new configure.wrf file. Unfortunately the statement was still truncated. I attached the new configure.wrf and compile.log file for your reference. Thank you very much for your help.
 

Attachments

  • compile_em_real.log
    100.6 KB · Views: 57
  • configure.wrf
    20 KB · Views: 56
Now let's try to use the following two lines in configure.wrf

TRADFLAG = -traditional-cpp
CPP = /lib/cpp -P -traditional

Please let me know whether it works.
 
Top