Skip to content

Add more RH outputs #1322

Open

Description

@djk2120

Sam Rabin: Note that the thinking on this issue evolved from this first post; see discussion further in thread.

RH_LEAF is identified as 'fractional humidity at leaf surface'

avgflag='A', long_name='fractional humidity at leaf surface', &

But in the SMS (use_hydrstress=.false.) Ball-Berry code, it looks like RH_LEAF is first set as the sunlit rh_leaf, but then will be rewritten by shaded rh_leaf if there is a shaded leaf phase of the canopy. This seems like a bug.
RH_LEAF is not populated with SMS-Medlyn or PHS.

I would suggest addressing this issue when unifying the PHS and SMS code and checking for any other leaf-level variables that may be inconsistently populated.

In the mean time, I wanted to document the issue for users who may be looking at RH_LEAF.

Activity

  1. added
    bugsomething is working incorrectly
    on Apr 5, 2021
  2. wwieder commented on Apr 6, 2021

    @wwieder
    Contributor

    Thanks for noting this, @djk2120. A few followup questions:

    • Can you post the part of the code where RH_LEAF should be updated (I'm assuming in PhotosynthesisMod)?
    • Is this simply a diagnostic output, or is the variable subsequently used (incorrectly) later in the code?
    • In the short term should we clarify the long_name or RH_LEAF to clarify it's only accurate for PHS?
  3. djk2120 commented on Apr 6, 2021

    @djk2120
    ContributorAuthor
  4. heroldn commented on Apr 20, 2021

    @heroldn

    Yes thanks @djk2120, I was literally writing a forum post then thought to look here.

    You said that leaf temperature can vary between sunlit and shaded but I'm having trouble seeing it in the code (looking at PHS=off). Line 1711 references esat_tv which doesn't look like it varies for sun/shade. I'm interested in this because I'm trying to figure out which variables have sun/shade versions and which don't.

    And actually, when I look at the two calls to Photosynthesis in CanopyFluxesMod.F90 it looks like esat_tv (which should be the 4th variable passed) is svpts - which does not look like temperature at all(???). I assume I'm reading the code incorrectly!

  5. heroldn commented on Apr 20, 2021

    @heroldn

    It also looks like from line 1763 that rh_leaf (or its sun/shade equivalents to be) should have unique values for each canopy level and thus be two dimensional - referenced as e.g. rh_leaf_sun(p,iv). Would you agree?

  6. djk2120 commented on Apr 20, 2021

    @djk2120
    ContributorAuthor
  7. heroldn commented on Apr 20, 2021

    @heroldn

    So to confirm, if I wanted to write out canopy-averaged sun or shade rh_leaf would I need to correct this to properly record each canopy layer, then send it to the appropriate hist_addfld function? I think that's what I would have to do, that's how other canopy level variables are treated.

    And do you have an opinion on my previous comment or should I post those as new potential issues/questions?

  8. djk2120 commented on Apr 20, 2021

    @djk2120
    ContributorAuthor
  9. heroldn commented on Apr 20, 2021

    @heroldn

    Ah I didn't know that only one layer gets used, thanks.
    And re the bug in this issue, thanks but I've set up rh_leaf_sun_ln and rh_leaf_sha_ln to store local noon versions of rh_leaf, essentially mimicking how gs_mol_sun_ln gets recorded. And so in that vein, for the sake of consistency, I'll also make my rh_leaf variables 2D (p,iv).

  10. djk2120 commented on Apr 20, 2021

    @djk2120
    ContributorAuthor

    Replying to

    You said that leaf temperature can vary between sunlit and shaded but I'm having trouble seeing it in the code (looking at PHS=off).

    Thanks for checking this. It looks like I misspoke, and that rh_can (L1661) should be identical for sunlit and shaded leaves.
    In that case the functional input to ball-berry would be the same for shaded/sunlit.

    Later rh_leaf is calculated (L1764) which accounts for the differing sunlit vs shaded stomatal conductances.

    So I would say it might make sense to add rh_can to the history file. And then consider adding rh_leaf_sun and rh_leaf_sha. However as rh_leaf has no impact on the calculation of g_s, maybe it's better to write out only rh_can.

    Replying to:

    And actually, when I look at the two calls to Photosynthesis in CanopyFluxesMod.F90 ...

    These look fine to me. CanopyFluxes is passing in saturation vapor pressure, and Photosynthesis is expecting saturation vapor pressure. They are just using different names for the same variable (svpts/esat_tv)

  11. heroldn commented on Apr 21, 2021

    @heroldn

    These look fine to me. CanopyFluxes is passing in saturation vapor pressure, and Photosynthesis is expecting saturation vapor pressure. They are just using different names for the same variable (svpts/esat_tv)

    Ah yes I completely misread esat_tv.

    Later rh_leaf is calculated (L1764) which accounts for the differing sunlit vs shaded stomatal conductances.

    So I would say it might make sense to add rh_can to the history file. And then consider adding rh_leaf_sun and rh_leaf_sha. However as rh_leaf has no impact on the calculation of g_s, maybe it's better to write out only rh_can.

    Yes looks like rh_leaf is only used as a diagnostic check near the end of the routine. But that's good advice, I'll actually write out the vapor pressures which will let me back out rh_can in post processing.

  12. wwieder commented on Nov 4, 2021

    @wwieder
    Contributor

    @djk2120 is this issue being corrected? Should we correct it for a CTSM5.1 release?

  13. added this to the ctsm5.1.0 milestone on Nov 4, 2021
  14. modified the milestones: ctsm5.1.0, CESM3 on Apr 20, 2024
  15. wwieder commented on Jul 17, 2025

    @wwieder
    Contributor

    Sorry, has this been fixed, or does it need to be before the release?

  16. added
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    on Jul 17, 2025
  17. removed
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    on Jul 31, 2025
  18. samsrabin commented on Jul 31, 2025

    @samsrabin
    Member

    From @djk2120 here, it sounds like the issue now is just:

    So I would say it might make sense to add rh_can to the history file. And then consider adding rh_leaf_sun and rh_leaf_sha. However as rh_leaf has no impact on the calculation of g_s, maybe it's better to write out only rh_can.

    I'll change the title to reflect this.

    It probably doesn't need to happen before release, but also wouldn't be difficult.

  19. removed
    bugsomething is working incorrectly
    on Jul 31, 2025
  20. changed the title [-]RH_LEAF not specifically designated as corresponding to sunlit or shaded canopy[/-] [+]Add more RH outputs[/+] on Jul 31, 2025
  21. added
    priority: lowBackground task that doesn't need to be done right away.
    on Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowBackground task that doesn't need to be done right away.

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions