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 compiling wrf module_surface driver

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.

fipoucat

Member
Hi there,


I am having long lasting issue compiling wrf using gfortran and gcc, all module are compiled except module_surface_driver. This is casing error generating exe files. Hope help from the list solve the problem shown below:

/Users/sarr/work/WRF03u/tools/standard.exe module_surface_driver.bb | cpp -P -nostdinc -xassembler-with-cpp -traditional-cpp > module_surface_driver.f90
rm -f module_surface_driver.G module_surface_driver.bb
time mpif90 -o module_surface_driver.o -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -I../dyn_em -I../dyn_nmm -I/Users/sarr/work/WRF03u/external/esmf_time_f90 -I/Users/sarr/work/WRF03u/main -I/Users/sarr/work/WRF03u/external/io_netcdf -I/Users/sarr/work/WRF03u/external/io_int -I/Users/sarr/work/WRF03u/frame -I/Users/sarr/work/WRF03u/share -I/Users/sarr/work/WRF03u/phys -I/Users/sarr/work/WRF03u/wrftladj -I/Users/sarr/work/WRF03u/chem -I/Users/sarr/work/WRF03u/inc -I/Users/sarr/work/Build_WRF/LIBS/netcdf/include module_surface_driver.f90
module_surface_driver.f90:2429:28:

,RS,XLAIDYN)
1
Error: Type mismatch in argument 'ua_phys' at (1); passed REAL(4) to LOGICAL(4)
module_surface_driver.f90:2527:27:

th_phy,rho,p_phy,ust, &
1
Error: Dummy argument 'p_phy' with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)
0.74 real 0.61 user 0.10 sys
make[3]: [../configure.wrf:348: module_surface_driver.o] Error 1 (ignored)
rm -f module_fr_fire_driver.o
sed -e "s/^\!.*'.*//" -e "s/^ *\!.*'.*/

kind regards
 
Hi,
Can you attach your full compile log, along with your configure.wrf file?

Thanks,
Kelly
 
Hi,
It looks like you may have modified some of the WRF code, and now you are getting errors based on those modifications. If that's the case, perhaps you can compare your original code with the modified code to try to track down the problem. If you obtained this code from someone else and you don't need these modifications, then perhaps you should grab the pristine v4.0.3 code again and start with a clean version.
 
A few modification have been done, compile with intel compiler (access to that server no longer avaible and trying to port on my computer, but having this problem with gnu compilers.
 
Hi,
The problem is that it seems like you have made modifications to some of the WRF source code. For instance, the first error in the compile log shows errors in phys/module_surface_driver.f90 (which means the change was actually made in the module_surface_driver.F file):

Code:
module_surface_driver.f90:2429:28:

                 ,RS,XLAIDYN)
                            1
Error: Type mismatch in argument 'ua_phys' at (1); passed REAL(4) to LOGICAL(4)
module_surface_driver.f90:2527:27:

                 th_phy,rho,p_phy,ust,                           &
                           1
Error: Dummy argument 'p_phy' with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)

Did you make changes to that file? If you aren't sure, can you attach the module_surface_driver.F file?

Thanks,
Kelly
 
Please find attached the file with modifications compiling with Intel.
 

Attachments

  • module_surface_driver1.F
    344.4 KB · Views: 49
Hi,
There are 68 modifications to that file, from the pristine version of 4.0.3 (attached). Unfortunately we are only able to support the code that we release, as we do not have the resources to debug user-modified code. You will need to figure out what you have changed that is causing the compiling errors. You can use the file I attached for comparison. When you are modifying files, we recommend making small incremental changes and verifying that they compile before putting more changes in. This helps to prevent problems like this. If necessary, perhaps you can start over with the clean, pristine version of the code and modify it one small bit at a time until you run into a compiling error - then you will know where the problem originates.
 

Attachments

  • module_surface_driver.F
    350.9 KB · Views: 50
Ok, then going towards give up on specific needs. It only targets FASDAS and should be like below!

!
! FASDAS
!
- ,SDA_HFX, SDA_QFX, HFX_BOTH, QFX_BOTH, QNORM, fasdas &
+ ,SDA_HFX=SDA_HFX, SDA_QFX=SDA_QFX, HFX_BOTH=HFX_BOTH &
+ ,QFX_BOTH=QFX_BOTH, QNORM=QNORM, fasdas=fasdas &
!
 
Top