Skip to content

Commit

Permalink
added potential evaporation to offline output, changed checks range, … (
Browse files Browse the repository at this point in the history
#346)

# CABLE

Thank you for submitting a pull request to the CABLE Project.

## Description

This PR adds the potential evaporation diagnostic (`canopy%epot`) to
fluxes section of the cable output.
A minor correction to the diagnostic has also been applied - which could
lead to impacts in the coupled model (via `%wetfac_cs` and JULES
variable `resft`) - and the checks_ranges updated.

Fixes #335

## Type of change

Please delete options that are not relevant.

- [x] Bug fix
- [x] additional output

## Checklist

- [x] The new content is accessible and located in the appropriate
section.
- [ ] I have checked that links are valid and point to the intended
content.
- [ ] I have checked my code/text and corrected any misspellings

Please add a reviewer when ready for review.


<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--346.org.readthedocs.build/en/346/

<!-- readthedocs-preview cable end -->
  • Loading branch information
ccarouge authored Aug 6, 2024
2 parents c47f09d + e53699f commit e6be17c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/offline/cable.nml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
output%params = .TRUE. ! input parameters used to produce run
output%patch = .TRUE. ! write per patch
output%balances = .TRUE. ! energy and water balances
check%ranges = 0 ! variable ranges, input and output
check%ranges = 0 ! variable ranges, input and output
check%energy_bal = .TRUE. ! energy balance
check%mass_bal = .TRUE. ! water/mass balance
verbose = .TRUE. ! write details of every grid cell init and params to log?
Expand Down
2 changes: 1 addition & 1 deletion src/offline/cable_checks.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ MODULE cable_checks_module
ESoil = [-0.0015, 0.0015], &
TVeg = [-0.0003, 0.0003], &
ECanop = [-0.0003, 0.0003], &
PotEvap = [-0.0006, 0.0006], &
PotEvap = [-0.005, 0.005], & !note should encompass Evap
ACond = [0.0, 1.0], &
SoilWet = [-0.4, 1.2], &
Albedo = [0.0, 1.0], &
Expand Down
1 change: 1 addition & 0 deletions src/offline/cable_iovars.F90
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ SUBROUTINE set_group_output_values
output%Qsb = .TRUE.
output%Evap = .TRUE.
output%ECanop = .TRUE.
output%PotEvap = .TRUE.
output%TVeg = .TRUE.
output%ESoil = .TRUE.
output%HVeg = .TRUE.
Expand Down
11 changes: 10 additions & 1 deletion src/offline/cable_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ MODULE cable_output_module
Qmom, Qle, Qh, Qg, NEE, SWnet, &
LWnet, SoilMoist, SoilTemp, Albedo, &
visAlbedo, nirAlbedo, SoilMoistIce, &
Qs, Qsb, Evap, BaresoilT, SWE, SnowT, &
Qs, Qsb, Evap, PotEvap, BaresoilT, SWE, SnowT, &
RadT, VegT, Ebal, Wbal, AutoResp, RootResp, &
StemResp, LeafResp, HeteroResp, GPP, NPP, LAI, &
ECanop, TVeg, ESoil, CanopInt, SnowDepth, &
Expand Down Expand Up @@ -549,6 +549,13 @@ SUBROUTINE open_output_file(dels, soil, veg, bgc, rough, met)
ALLOCATE(out%Evap(mp))
out%Evap = 0.0 ! initialise
END IF
IF(output%PotEvap) THEN
CALL define_ovar(ncid_out, ovid%PotEvap,'PotEvap', 'kg/m^2/s', &
'Potential evaporation', patchout%PotEvap, 'dummy', &
xID, yID, zID, landID, patchID, tID)
ALLOCATE(out%PotEvap(mp))
out%PotEvap = 0.0 ! initialise
END IF
IF(output%ECanop) THEN
CALL define_ovar(ncid_out, ovid%Ecanop, 'ECanop', 'kg/m^2/s', &
'Wet canopy evaporation', patchout%ECanop, 'dummy', &
Expand Down Expand Up @@ -1732,6 +1739,8 @@ SUBROUTINE write_output(dels, ktau, met, canopy, casaflux, casapool, casamet, ss
CALL generate_out_write_acc(output%Qsb, ovid%Qsb, 'Qsb', out%Qsb, REAL(ssnow%rnof2/dels, 4), ranges%Qsb, patchout%Qsb, out_settings)
! Evap: total evapotranspiration [kg/m^2/s]
CALL generate_out_write_acc(output%Evap, ovid%Evap, 'Evap', out%Evap, REAL(canopy%fe/air%rlam, 4), ranges%Evap, patchout%Evap, out_settings)
! PotEVap: potential evapotranspiration [kg/m^2/s]
CALL generate_out_write_acc(output%PotEvap, ovid%PotEvap, 'PotEvap', out%PotEvap, REAL(canopy%epot/dels, 4), ranges%PotEvap, patchout%PotEvap, out_settings)
! ECanop: interception evaporation [kg/m^2/s]
CALL generate_out_write_acc(output%ECanop, ovid%ECanop, 'ECanop', out%ECanop, REAL(canopy%fevw/air%rlam, 4), ranges%ECanop, patchout%ECanop, out_settings)
! TVeg: vegetation transpiration [kg/m^2/s]
Expand Down
4 changes: 4 additions & 0 deletions src/science/canopy/cable_canopy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,10 @@ SUBROUTINE define_canopy(bal,rad,rough,air,met,dels,ssnow,soil,veg, canopy,clima

ENDDO

! INH #335 - we don't need to weight components of %epot by %transd
! however coupled model uses %wetfac_cs so overwrite here before testing in ACCESS
canopy%epot = (canopy%fevw_pot + ssnow%potev/ssnow%cls) * dels/air%rlam

CALL update_zetar( mp, iterplus, NITER, canopy%zetar, iter, nrb, CVONK, CGRAV, CCAPP, &
CLAI_THRESH, CZETmul, CZETPOS, CZETNEG, &
cable_user%soil_struc, air%rho, met%tk, met%fsd, &
Expand Down

0 comments on commit e6be17c

Please sign in to comment.