Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing a compilation failure due to incorrect calling of "random_seed…
…" in g3 wrf-model#294 TYPE: bug fix KEYWORDS: compilation, gfortran, cumulus, g3 SOURCE: internal DESCRIPTION OF CHANGES: There is an incorrect implementation of the intrinsic fortran function random_seed in the G3 scheme (cu_physics=5). The current code assumes that the random seed vector fed to the random_seed function is of size 12, but this is not standardized, nor required by the fortran standard. The newest version of gfortran (7.1.0) uses 33 elements in its seed vector, so trying to feed it a 12-element vector causes a compilation failure. The correct procedure is to call random_seed(size=X), which will give the correct seed vector size as X. X can then be used to allocate the correct size for the seed vector. This fix should not impact any results. Per Georg Grell, this code is unused in the current scheme. LIST OF MODIFIED FILES: M phys/module_cu_g3.F TESTS CONDUCTED: WTF passed. WRF now compiles and runs for gfortran 7.1.0 on Cheyenne. Fix applied for WRFPLUS (which initiated this investigation) also compiles successfully.
- Loading branch information