Skip to content

Obsolescent and non-standard features in several physics modules #1270

@milancurcic

Description

@milancurcic

Describe the bug

I'm porting v4.2.1 to IBM Power9 with the XL compiler suite. During the process, I uncovered and fixed several obsolescent and non-standard features used in physics modules, specifically:

  • phys/module_cu_mskf.F: amax1 intrinsic (obsolescent in F2018) used and is given arguments of the wrong type.
  • phys/module_ra_goddard.F: Arguments of the wrong type passed to min and max intrinsics.
  • phys/module_mp_fast_sbm.F: amax1 intrinsic (obsolescent in F2018) used and is given arguments of the wrong type.
  • phys/module_dust_emis.F: Arguments of the wrong type passed to min and max intrinsics.
  • phys/module_cu_scalesas.F: Arguments of the wrong type passed to min intrinsic.
  • phys/module_mp_p3.F: Uses non-standard subroutine flush.
  • phys/module_shcu_deng.F: Uses non-standard subroutine flush.

The fixes were straightforward:

  • replacing amax1 with max;
  • explicitly casting literal constants to the real kind used by the other argument in min or max intrinsics;
  • replacing call flush() with the flush() statement.

Would you like a PR?

To Reproduce

Compile using IBM XL v16.1.1 on Power9.

Here's a small sample of the error message:

"module_cu_mskf.f90", line 1765.26: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "amax1".
"module_cu_mskf.f90", line 1766.27: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "amax1".
** module_cu_mp   === End of Compilation 1 ===

and similar for other modules.

Errors related to non-standard subroutine flush appear at the linking stage.

Expected behavior

WRF should compile. It compiles and runs after fixes.

Screenshots
n/a

Attachments
n/a

Additional context
n/a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions