Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/science/canopy/cable_canopy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ SUBROUTINE define_canopy(bal,rad,rough,air,met,dels,ssnow,soil,veg, canopy,clima
! AERODYNAMIC PROPERTIES: friction velocity us, thence turbulent
! resistances rt0, rt1 (elements of dispersion matrix):
! See CSIRO SCAM, Raupach et al 1997, eq. 3.46:
CALL comp_friction_vel(canopy%us, iter, mp, CVONK, CUMIN, CPI_C, &
canopy%zetar, rough%zref_uv, rough%zref_tq, &
rough%z0m, met%ua )
CALL comp_friction_vel( canopy%us, mp, CVONK, CUMIN, CPI_C, &
canopy%zetar(:,iter), rough%zref_uv, &
rough%zref_tq, rough%z0m, met%ua )

! E.Kowalczyk 2014
IF (cable_user%l_new_roughness_soil) &
Expand Down
9 changes: 4 additions & 5 deletions src/science/canopy/cbl_friction_vel.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MODULE cbl_friction_vel_module

CONTAINS

SUBROUTINE comp_friction_vel(friction_vel, iter, mp, CVONK, CUMIN, CPI_C, &
SUBROUTINE comp_friction_vel(friction_vel, mp, CVONK, CUMIN, CPI_C, &
zetar, zref_uv, zref_tq, z0m, ua )
!*## Purpose
!
Expand Down Expand Up @@ -69,14 +69,13 @@ SUBROUTINE comp_friction_vel(friction_vel, iter, mp, CVONK, CUMIN, CPI_C, &

INTEGER, INTENT(IN) :: mp !! size of cable vector of land points (-)
REAL, INTENT(OUT) :: friction_vel(mp) !! friction velocity (ms\(^{-1}\))
INTEGER, INTENT(IN) :: iter !! MO iteration counter (-)
! physical constants
REAL, INTENT(IN) :: CVONK !! von Karman constant (-)
REAL, INTENT(IN):: CUMIN !! minimum value of wind speed (ms\(^{-1}\))
! maths & other constants
REAL, INTENT(IN) :: CPI_C !! \(\pi\) (-)

REAL, INTENT(IN) :: zetar(mp,iter) !! stability parameter - see [[update_zetar]] `canopy%zetar` (-)
REAL, INTENT(IN) :: zetar(mp) !! stability parameter - see [[update_zetar]] `canopy%zetar` (-)
REAL, INTENT(IN) :: zref_uv(mp) !! reference height for wind `rough%zref_uv` (m)
REAL, INTENT(IN) :: zref_tq(mp) !! reference height for temperature and humidity `rough%zref_tq` (m)
REAL, INTENT(IN) :: z0m(mp) !! roughness length `rough%z0m` (m)
Expand All @@ -91,13 +90,13 @@ SUBROUTINE comp_friction_vel(friction_vel, iter, mp, CVONK, CUMIN, CPI_C, &
! but zetar based on rough%zref_tq - changes to ensure consistency
!NB no RSL incorporated here

psim_1 = psim( zetar(:,iter) * zref_uv/zref_tq, mp, CPI_C )
psim_1 = psim( zetar(:) * zref_uv/zref_tq, mp, CPI_C )

!rescale = CVONK * MAX( ua, SPREAD(CUMIN,1,mp ) )
rescale = CVONK * MAX( ua, CUMIN )
z_eff = zref_uv / z0m

psim_arg = zetar(:,iter) * z0m / zref_tq
psim_arg = zetar(:) * z0m / zref_tq
psim_2 = psim( psim_arg, mp, CPI_C )

lower_limit = rescale / ( LOG(z_eff) - psim_1 + psim_2 )
Expand Down
6 changes: 3 additions & 3 deletions src/science/casa-cnp/biogeochem_casa.F90
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the changes for cable_runtime%esm15 come separately? There is no link with the iter stuff in cbl_friction_vel.F90

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah don't know how these got mixed up. I'm sure there was another PR with this stuff in

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange - I went to revert it, it didn't like that - so I just compared it to another local version of the file and the change wasn't even there. I pushed - it refreshed GH - and the change is gone. Of course I could've done it yesterday and just forgotten about it

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SUBROUTINE biogeochem(ktau,dels,idoY,LALLOC,veg,soil,casabiome,casapool,casaflux
nleaf2met,nleaf2str,nroot2met,nroot2str,nwood2cwd, &
pleaf2met,pleaf2str,proot2met,proot2str,pwood2cwd)
USE cable_def_types_mod
USE cable_common_module, ONLY : cable_runtime, cable_user
USE cable_common_module, ONLY : cable_user
USE casadimension
USE casa_cnp_module
USE casa_inout_module, ONLY : casa_cnpflux
Expand Down Expand Up @@ -52,8 +52,8 @@ SUBROUTINE biogeochem(ktau,dels,idoY,LALLOC,veg,soil,casabiome,casapool,casaflux
! zero annual sums
IF (idoy==1) CALL casa_cnpflux(casaflux,casapool,casabal,.TRUE.)

IF (cable_user%PHENOLOGY_SWITCH.EQ.'MODIS' .OR. cable_runtime%esm15 ) THEN
CALL phenology(idoy,veg,phen)
IF (cable_user%PHENOLOGY_SWITCH.EQ.'MODIS' ) THEN
CALL phenology(idoy,veg,phen)
ENDIF
CALL avgsoil(veg,soil,casamet)

Expand Down