-std=legacy Syntax Standard
Symptom
The following error is reported during compilation:
Error: Actual argument contains too few elements for dummy argument 'wgrd' (1/4) at (1) /home/wubingcheng/wrf/comGSIv3.7_EnKFv1.3/src/setuplight.f90:822:47: 822 | call get_ij(mm1,dlat-one,dlon,light_ij,my_head%wij(1)) subroutine get_ij(mm1,obs_lat,obs_lon,jgrd,wgrd,jjlat,jjlon) // Definition of this interface.
Cause
GFortran supports the following standards: F95, F2003, F2008, F2018, GNU, and Legacy. By default, the -std option is set to the latest GNU standard, which has strict requirements on Fortran layout. The number of input parameters is inconsistent with that defined in the interface in the latest standard. As a result, an error is reported.
Procedure
You can supplement and align parameters, but the workload is heavy. Try to use the -std=legacy compilation option, which indicates that the F77 syntax standard is followed and thus the error can be avoided.
Parent topic: Common Problems (Syntax Differences)