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

BUGFIX: WRF CHEM TOOLS

  • Thread starter Deleted member 3607
  • Start date
D

Deleted member 3607

Guest
Good afternoon everyone,

With the latest Ubuntu 22.04 release we saw the change of the standard installation of gfotran/gcc/g++ from version 9 to version 11.

This has caused some errors to come up when installing the WRFCHEM Tools in terminal output (Below).

"Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make: *** [Makefile:40: bio_emiss.o] Error 1"

The fix to this is to add the flag -std=legacy to FFLAGS & FCFLAGS.

https://www.scivision.dev/gcc-gfortran-std-legacy/

This command allows FORTRAN to use old commands and syntax and changes it from a fatal error to just a warning. It should be noted that with gfortran/gcc/g++ version 10 the new flag called -fallow-argument-mismatch was added that does a similar job.

https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

However, this flag is only available to version 10 and above. For older version of gfortran/gcc/g++ this flag will toss an error.

It is my recommendation that the flag -std=legacy be added to the following WRFCHEM Tools so that any version of gfortran/gcc/g++ can work.

I have installed and tested all the installations of the WRFCHEM Tools on Ubuntu 22.04 and the only ones that create errors are:

megan_bio_emiss
EPA Anthropocentric Emissions
Anthropocentric Emissions

megan_bio_emiss
When calling the command: /make_util megan_bio_emiss, you will get the error listed above.
The fix to this is to edit lines 8 & 10 in the makefile from:

FFLAGS = --g -> FFLAGS = --g -std=legacy

EPA Anthropocentric Emissions & Anthropocentric Emissions
Both of these tools use the same command.
When calling the command ./make_anthro, you will get the error listed above.
The fix to this is to edit lines 8 & 10 in the makefile from:

FFLAGS = --g -> FFLAGS = --g -std=legacy

It is my hope that these changes will be added and be implemented by UCAR/NCAR. If you have any scripts or tools that install these tool-kits you will need to change them in order for them to work on Ubuntu 22.04.

To edit Makefile in command line utilize:
sed -i '8s/FFLAGS = --g/FFLAGS = --g -std=legacy/' Makefile
sed -i '10s/FFLAGS = --g/FFLAGS = --g -std=legacy/' Makefile

Regards,
Will
 
Top