Skip to content

Commit 0624b70

Browse files
authored
Merge pull request #421 from mpaiao/mpaiao-pr-202511hotfix
Re-ordering definition of a few parameters in ed_params.f90
2 parents b9e07a1 + ee5adbd commit 0624b70

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ jobs:
3636
docker:
3737
runs-on: ubuntu-latest
3838
permissions:
39+
contents: read
3940
packages: write
41+
attestations: write
42+
id-token: write
4043

4144
strategy:
4245
fail-fast: false

ED/build/make/include.mk.macosx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
#----- Define make (gnu make works best). -------------------------------------------------#
8-
MAKE=/usr/local/bin/make
8+
MAKE=$(HOMEBREW_PREFIX)/bin/make
99
#------------------------------------------------------------------------------------------#
1010

1111
#----- Libraries. -------------------------------------------------------------------------#
@@ -20,8 +20,8 @@ BASE=$(ED_ROOT)/build/
2020
# libraries compiled with the same compiler you set for F_COMP and C_COMP. You may still #
2121
# be able to compile without HDF5 but it will not run. #
2222
#------------------------------------------------------------------------------------------#
23-
ZLIB_PATH=/usr/local
24-
HDF5_PATH=/usr/local
23+
ZLIB_PATH=$(HOMEBREW_PREFIX)
24+
HDF5_PATH=$(HOMEBREW_PREFIX)
2525
HDF5_INCS=-I$(HDF5_PATH)/include
2626
HDF5C_INCS=$(HDF5_INCS)
2727
HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl
@@ -51,9 +51,9 @@ USE_INTERF=1
5151
#################################### COMPILER SETTINGS #####################################
5252
CMACH=MAC_OS_X
5353
FC_TYPE=GNU
54-
F_COMP=/usr/local/bin/gfortran-14
55-
C_COMP=/usr/local/bin/gcc-14
56-
LOADER=/usr/local/bin/gfortran-14
54+
F_COMP=$(HOMEBREW_PREFIX)/bin/gfortran-15
55+
C_COMP=$(HOMEBREW_PREFIX)/bin/gcc-15
56+
LOADER=$(HOMEBREW_PREFIX)/bin/gfortran-15
5757
LIBS=
5858
MOD_EXT=mod
5959
############################################################################################

ED/src/init/ed_params.f90

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6096,10 +6096,7 @@ subroutine init_can_air_params()
60966096
, onesixth & ! intent(in)
60976097
, vonk ! ! intent(in)
60986098
use pft_coms , only : hgt_min ! ! intent(in)
6099-
use rk4_coms , only : tiny_offset ! ! intent(in)
6100-
use canopy_air_coms, only : psim8 & ! function
6101-
, psih8 & ! function
6102-
, ugbmin & ! intent(inout)
6099+
use canopy_air_coms, only : ugbmin & ! intent(inout)
61036100
, ubmin & ! intent(inout)
61046101
, ustmin & ! intent(inout)
61056102
, gamm & ! intent(inout)
@@ -6182,8 +6179,6 @@ subroutine init_can_air_params()
61826179
, zetac_shi & ! intent(out)
61836180
, zetac_umi16 & ! intent(out)
61846181
, zetac_uhi13 & ! intent(out)
6185-
, psimc_um & ! intent(out)
6186-
, psihc_uh & ! intent(out)
61876182
, zd98_a & ! intent(out)
61886183
, zd98_b & ! intent(out)
61896184
, zd98_emax & ! intent(out)
@@ -6216,8 +6211,6 @@ subroutine init_can_air_params()
62166211
, zetac_shi8 & ! intent(out)
62176212
, zetac_umi168 & ! intent(out)
62186213
, zetac_uhi138 & ! intent(out)
6219-
, psimc_um8 & ! intent(out)
6220-
, psihc_uh8 & ! intent(out)
62216214
, zd98_a8 & ! intent(out)
62226215
, zd98_b8 & ! intent(out)
62236216
, zd98_emax8 & ! intent(out)
@@ -6613,16 +6606,6 @@ subroutine init_can_air_params()
66136606
zetac_uhi138 = dble(zetac_uhi13 )
66146607
!---------------------------------------------------------------------------------------!
66156608

6616-
!---------------------------------------------------------------------------------------!
6617-
! Initialise these values with dummies, it will be updated after we define the !
6618-
! functions. !
6619-
!---------------------------------------------------------------------------------------!
6620-
psimc_um8 = psim8(zetac_um8,.false.)
6621-
psimc_um = sngloff(psimc_um8,tiny_offset)
6622-
psihc_uh8 = psih8(zetac_uh8,.false.)
6623-
psihc_uh = sngloff(psihc_uh8,tiny_offset)
6624-
!---------------------------------------------------------------------------------------!
6625-
66266609
return
66276610
end subroutine init_can_air_params
66286611
!==========================================================================================!
@@ -7660,7 +7643,9 @@ subroutine init_derived_params_after_xml()
76607643
, collatz ! ! function
76617644
use plant_hydro , only : psi2rwc & ! function
76627645
, rwc2psi ! ! function
7663-
use canopy_air_coms , only : ustmin & ! intent(in)
7646+
use canopy_air_coms , only : psim8 & ! function
7647+
, psih8 & ! function
7648+
, ustmin & ! intent(in)
76647649
, ugbmin & ! intent(in)
76657650
, ubmin & ! intent(in)
76667651
, gamm & ! intent(in)
@@ -7671,6 +7656,8 @@ subroutine init_derived_params_after_xml()
76717656
, leaf_drywhc & ! intent(in)
76727657
, veg_height_min & ! intent(in)
76737658
, minimum_canopy_depth & ! intent(in)
7659+
, zetac_um8 & ! intent(in)
7660+
, zetac_uh8 & ! intent(in)
76747661
, ustmin8 & ! intent(out)
76757662
, ugbmin8 & ! intent(out)
76767663
, ubmin8 & ! intent(out)
@@ -7679,8 +7666,13 @@ subroutine init_derived_params_after_xml()
76797666
, ribmax8 & ! intent(out)
76807667
, tprandtl8 & ! intent(out)
76817668
, veg_height_min8 & ! intent(out)
7682-
, minimum_canopy_depth8 ! ! intent(out)
7683-
use rk4_coms , only : rk4leaf_drywhc & ! intent(out)
7669+
, minimum_canopy_depth8 & ! intent(out)
7670+
, psimc_um & ! intent(out)
7671+
, psihc_uh & ! intent(out)
7672+
, psimc_um8 & ! intent(out)
7673+
, psihc_uh8 ! ! intent(out)
7674+
use rk4_coms , only : tiny_offset & ! intent(in)
7675+
, rk4leaf_drywhc & ! intent(out)
76847676
, rk4leaf_maxwhc & ! intent(out)
76857677
, rk4min_veg_lwater ! ! intent(out)
76867678
implicit none
@@ -9172,6 +9164,19 @@ subroutine init_derived_params_after_xml()
91729164
rk4min_veg_lwater = -rk4leaf_drywhc ! Minimum leaf water mass [kg/m2leaf]
91739165
!---------------------------------------------------------------------------------------!
91749166

9167+
9168+
9169+
!---------------------------------------------------------------------------------------!
9170+
! Initialise these function-dependent parameters only after the single- and double- !
9171+
! precision parameters that may be read from either the atmospheric model namelist or !
9172+
! XML are already defined. !
9173+
!---------------------------------------------------------------------------------------!
9174+
psimc_um8 = psim8(zetac_um8,.false.)
9175+
psimc_um = sngloff(psimc_um8,tiny_offset)
9176+
psihc_uh8 = psih8(zetac_uh8,.false.)
9177+
psihc_uh = sngloff(psihc_uh8,tiny_offset)
9178+
!---------------------------------------------------------------------------------------!
9179+
91759180
return
91769181
end subroutine init_derived_params_after_xml
91779182
!==========================================================================================!

0 commit comments

Comments
 (0)