Skip to content

Commit

Permalink
Remove personal comments
Browse files Browse the repository at this point in the history
- I have marked my changes in the src-code with !NWa to indicate
  which change was introduced by me. However, this is what git
  is for, so it is not necessary. As a good practice, I have
  removed these comments.
  • Loading branch information
niklaswr committed Mar 27, 2023
1 parent f79cf56 commit c6afa9c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bldsva/intf_oas3/clm3_5/tsmp/Biogeophysics1Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,13 @@ subroutine Biogeophysics1(lbg, ubg, lbc, ubc, lbp, ubp, &
real(r8) :: psit !negative potential of soil
real(r8) :: hr !relative humidity
real(r8) :: wx !partial volume of ice and water of surface layer
!NWa
!NOTE: Arrays can start from arbitrary index...
! So in CLM the distributed arraies (over diff. CPUs) does take the index
! from the original array.
! original_array(0:10) --> array1(0:5) and array(6:10)
! The Uper and lower index bound is stored in `lbg`, `ubg`, etc.
real(r8) :: tmp_displacement_max(lbg:ubg) !helper var
real(r8) :: tmp_displacement !helper var
!NWa
!------------------------------------------------------------------------------

! Assign local pointers to derived type members (gridcell-level)
Expand Down Expand Up @@ -408,7 +406,7 @@ subroutine Biogeophysics1(lbg, ubg, lbc, ubc, lbp, ubp, &

end do

! NWa change forc_hgt = forc_hgt + z0m + displa at PFT level
! Change forc_hgt = forc_hgt + z0m + displa at PFT level
! forc_hgt is send from COSMO to CLM via fix value. In fully coupled mode, this
! fix value can conflict with the actual canopy height, showing up as CLM error
! with the message:
Expand All @@ -419,7 +417,6 @@ subroutine Biogeophysics1(lbg, ubg, lbc, ubc, lbp, ubp, &
! calculated for each pft present, and second the maximum displacement is taken
! to correct the forc_hgt. This way we do not run into above error.
! However, keep in mind that this correction is still a workaround.
! NWa Do not forget to allocate below variables
tmp_displacement = 0._r8 ! scalar
tmp_displacement_max = 0._r8 ! same shape as forc_hgt
!
Expand Down Expand Up @@ -462,11 +459,9 @@ subroutine Biogeophysics1(lbg, ubg, lbc, ubc, lbp, ubp, &

! Update forc_hgt on grid lvl
forc_hgt_u(g) = forc_hgt_u(g) + tmp_displacement_max(g)
!write(6,*)'DEBUG: forc_hgt_u(g)', forc_hgt_u(g)
forc_hgt_t(g) = forc_hgt_t(g) + tmp_displacement_max(g)
forc_hgt_q(g) = forc_hgt_q(g) + tmp_displacement_max(g)
end do
!! NWR

end subroutine Biogeophysics1

Expand Down

0 comments on commit c6afa9c

Please sign in to comment.