From eff0422eac2792b3bf20cbf62bc14d7647063003 Mon Sep 17 00:00:00 2001 From: Kelly Werner Date: Fri, 10 Jul 2020 10:47:55 -0600 Subject: [PATCH] Replace "derf()" with standard "erf()" in SBM MP scheme (#1183) TYPE: bug fix KEYWORDS: PGI, compile, mp_SBM_polar_radar, phys, erf, derf SOURCE: Bart Brashers (Ramboll) DESCRIPTION OF CHANGES: A fortran function (DErF) was being used in the module_mp_SBM_polar_radar file. This was causing a compiling fail for PGI (tested with versions 19.10.0 on user's machine and 19.3 on Cheyenne). According to this article: https://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/DErF-Intrinsic.html the DErF function is archaic. Modifying this function to ErF corrects the problem and allows the PGI compiler to build the WRF executable from source. LIST OF MODIFIED FILES: M phys/module_mp_SBM_polar_radar.F TESTS CONDUCTED: Verified that code does not compile in original state, but does with the modified code when using the PGI compiler. Reggie should be OK. RELEASE NOTE: A minor modification has been introduced into the SBM Polar Radar microphysics code to allow the WRF code to build with PGI compilers. The nonstandard derf() intrinsic has been replaced by the 2008 standard compliant erf() intrinsic. --- phys/module_mp_SBM_polar_radar.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/module_mp_SBM_polar_radar.F b/phys/module_mp_SBM_polar_radar.F index 4ee029a45a..4f94129271 100644 --- a/phys/module_mp_SBM_polar_radar.F +++ b/phys/module_mp_SBM_polar_radar.F @@ -1534,7 +1534,7 @@ subroutine calc_dc_wet_snow & (1.0d0-(1.0d0-fract_volume_water)*ratc)) ! new change 18.01.09 (start) if(fract_volume_water.gt.1.0d-10) then - t=derf((1.0d0-fract_volume_water)/fract_volume_water-0.2d0) + t=erf((1.0d0-fract_volume_water)/fract_volume_water-0.2d0) else t=1.0d0 endif