diff --git a/build/denali/gfortran/run_cmake_gfortran.sh b/build/denali/gfortran/run_cmake_gfortran.sh old mode 100644 new mode 100755 diff --git a/meson.build b/meson.build index 79f8d4f8..58f3bba6 100644 --- a/meson.build +++ b/meson.build @@ -140,6 +140,7 @@ elif fc_id == 'intel' # linux and macOS compile_args += ['-fpe0', # Activate all floating point exceptions '-fpp', + '-debug', '-no-heap-arrays', '-traceback', '-diag-disable:7416', # f2008 warning diff --git a/meson_options.txt b/meson_options.txt index 3ec33528..322c7153 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ # optimization_level 1: DEBUG; optimization_level 2: RELEASE -option('optimization_level', type : 'integer', min : 1, max : 2, value : 1) +option('optimization_level', type : 'integer', min : 1, max : 2, value : 2) option('swb_major_version', type : 'string', value : '"2"', description : 'project major version number') option('swb_minor_version', type : 'string', value : '"3"', description : 'project minor version number') -option('swb_patch_version', type : 'string', value : '"2"', description : 'project patch version number') -option('swb_version', type : 'string', value : 'v2.3.2-rc0', description : 'project version') +option('swb_patch_version', type : 'string', value : '"3"', description : 'project patch version number') +option('swb_version', type : 'string', value : 'v2.3.3-rc0', description : 'project version') diff --git a/src/actual_et__fao56__two_stage.F90 b/src/actual_et__fao56__two_stage.F90 index d6d13417..e9be9b59 100644 --- a/src/actual_et__fao56__two_stage.F90 +++ b/src/actual_et__fao56__two_stage.F90 @@ -164,7 +164,7 @@ end function calculate_evaporation_reduction_coefficient_Kr !> This function estimates the fraction of the ground covered by !> vegetation during the growing season !> @note Implemented as equation 76, FAO-56, Allen and others -elemental function calculate_fraction_exposed_and_wetted_soil_fc( landuse_index, Kcb, current_plant_height) result ( few ) +impure elemental function calculate_fraction_exposed_and_wetted_soil_fc( landuse_index, Kcb, current_plant_height) result ( few ) ! [ ARGUMENTS ] integer (c_int), intent(in) :: landuse_index @@ -180,9 +180,9 @@ elemental function calculate_fraction_exposed_and_wetted_soil_fc( landuse_index, real (c_double) :: denominator real (c_double) :: exponent - numerator = Kcb - KCB_l( KCB_MIN, landuse_index) + numerator = max(Kcb - KCB_l( KCB_MIN, landuse_index), 0.0_c_double) denominator = KCB_l( KCB_MID, landuse_index) - KCB_l( KCB_MIN, landuse_index) - exponent = 1.0 + 0.5 * current_plant_height * M_PER_FOOT + exponent = 1.0_c_double + 0.5_c_double * current_plant_height * M_PER_FOOT if( denominator > 0.0_c_double ) then fc = ( numerator / denominator ) ** exponent diff --git a/src/meson.build b/src/meson.build index 583bc29f..fa2e79c2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -151,7 +151,7 @@ if system == 'windows' ] else dependencies = [ - meson.get_compiler('cpp').find_library('netcdf') + meson.get_compiler('c').find_library('netcdf', dirs : ['/opt/cray/pe/netcdf/4.8.1.1/intel/19.1/lib']) ] endif diff --git a/src/model_domain.F90 b/src/model_domain.F90 index b2b99c48..e67be08d 100644 --- a/src/model_domain.F90 +++ b/src/model_domain.F90 @@ -3051,6 +3051,8 @@ subroutine model_dump_variables( this, unitnum, indx_start, indx_end ) enddo + flush(unit=unitnum) + end subroutine model_dump_variables !--------------------------------------------------------------------------------------------------