Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix WRFDA stand-alone da_rad_diags.exe build with GNU Fortran 11 (#1605)
TYPE: bug fix KEYWORDS: WRFDA, da_rad_diags.exe, gfortran-11 SOURCE: Jamie Bresch (NCAR) DESCRIPTION OF CHANGES: Problem: On MacOS with GNU Fortran (Homebrew GCC 11.1.0_1) 11.1.0, the stand-alone utility da_rad_diags.exe does not build. The error messages: ``` gfortran -c -O2 -ftree-vectorize -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -fallow-invalid-boz -fdefault-real-8 -I/usr/local/include da_rad_diags.f da_rad_diags.f:1804:28: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'nproc' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:36: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'instid' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:49: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'file_prefix' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:61: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'start_date' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:71: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'end_date' in namelist 'record1' at (1) must be declared before the namelist is declared. da_rad_diags.f:1804:84: 1804 | namelist /record1/ nproc, instid, file_prefix, start_date, end_date, cycle_period | 1 Error: Symbol 'cycle_period' in namelist 'record1' at (1) must be declared before the namelist is declared. make[1]: [da_rad_diags.o] Error 1 (ignored) ``` Solution: Move the namelist statement after variable declarations, then the code builds. LIST OF MODIFIED FILES: M var/da/da_monitor/da_rad_diags.f90 TESTS CONDUCTED: 1. da_rad_diags.exe is generated after the fix. RELEASE NOTE: N/A (it is probably not worth mentioning)
- Loading branch information