Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change hard coded soil layers in phenology to use a target depth #952

Closed
wwieder opened this issue Mar 30, 2020 · 9 comments · Fixed by #963
Closed

Change hard coded soil layers in phenology to use a target depth #952

wwieder opened this issue Mar 30, 2020 · 9 comments · Fixed by #963
Assignees
Labels
enhancement new capability or improved behavior of existing capability

Comments

@wwieder
Copy link
Contributor

wwieder commented Mar 30, 2020

parts of the phenology code use soil temperature and moisture as triggers, which will not work as intended for new CTSM capabilities to reduce soil layer dimensions.

if (stress_decid(ivt(p)) == 1._r8) then

@ekluzek
Copy link
Collaborator

ekluzek commented Mar 30, 2020

We should figure out the right depth from zsoi in CNPhenologyInit. What exactly is the criteria in terms of depth? If you have an especially thick layer is that a problem?

@ekluzek ekluzek self-assigned this Mar 30, 2020
@ekluzek ekluzek added the enhancement new capability or improved behavior of existing capability label Mar 30, 2020
@billsacks
Copy link
Member

@ekluzek @wwieder - based on discussions Thursday, I said I would take on the generalization of code like this to pick an appropriate layer. I was planning to look at this sometime this week, though haven't done anything on it yet. @ekluzek if you want to take this on, I don't object, but I also know you have a lot on your plate. Just let me know what you prefer.

@wwieder
Copy link
Contributor Author

wwieder commented Mar 30, 2020 via email

@ekluzek
Copy link
Collaborator

ekluzek commented Mar 30, 2020

@billsacks I'm not likely to get to it anytime soon. So you should plan on this. I do want to resolve at least some of the scientific questions surrounding this on our Wednesday meeting with Leah though. Although @wwieder just responded above. If the only criteria is the soil depth that should be easy to find. But, if the real intent is to find the depth that responds in a given time-period that's more difficult. And as part of that I wonder how well this will work for low number of soil layers? If you get a shallow soil layer -- but that soil layer is really thick does that really give you what you want?

@billsacks billsacks assigned billsacks and unassigned ekluzek Mar 30, 2020
@billsacks
Copy link
Member

@wwieder @ekluzek I propose that, as a first cut at this, I do something simple: use the current midpoint of the 3rd layer as the target depth, without having any other logic to do fancy things like avoiding the top layer, avoiding too-thick layers, etc. If it's needed scientifically, more complexity could be added here later.

If I did the calculations right, it looks like in CLM4.5 the 3rd layer had a midpoint of 6.2 cm, whereas in CLM5.0 the 3rd layer has a midpoint of 9 cm. So I propose using 9 cm as the target depth here. For the 4-layer NWP configuration, note that this would end up using the top layer (which has a thickness of 10 cm).

There are two obvious options for how to choose the actual layer based on the target depth:

  1. Layer whose midpoint is closest to the target depth

  2. Layer containing the target depth

As an example, imagine we have a target depth of 11 cm with the NWP configuration, whose top 2 layers have thickness of 10 cm and 30 cm, respectively - and so have mid-points of 5 cm and 25 cm. With option (1) we'd go with layer 1, whereas with option (2) we'd go with layer 2.

I'm thinking of going with (2), because this seems consistent with the model assumption that properties are constant within a layer. So, if someone asks you for the temperature at 11 cm in the NWP configuration, it feels like the answer would be the temperature in layer 2.

@wwieder let me know if you feel differently, though.

@wwieder
Copy link
Contributor Author

wwieder commented Mar 30, 2020 via email

@billsacks
Copy link
Member

@wwieder sure, I can pull this out into the parameter file.

@billsacks billsacks changed the title hard coded soil layers Change hard coded soil layers in phenology to use a target depth Apr 2, 2020
@billsacks
Copy link
Member

Here are the zsoi and zisoi values for the top few layers in CLM45 and CLM50:

CLM45:

zsoi   7.1006354171935350E-003   2.7925000415316870E-002   6.2258573936546040E-002  0.11886506690014327       0.21219339590896316
zisoi:    0.0000000000000000        1.7512817916255204E-002   4.5091787175931458E-002   9.0561820418344652E-002  0.16552923140455322       0.28912959650683373

CLM50:

zsoi   1.0000000000000000E-002   4.0000000000000001E-002   8.9999999999999997E-002  0.16000000000000000       0.26000000000000001
zisoi:    0.0000000000000000        2.0000000000000000E-002   5.9999999999999998E-002  0.12000000000000000       0.20000000000000001       0.32000000000000001

To stick with level 3 in CLM45 and CLM50, I'll need the target depth to be:

  • CLM45: between 4.6 cm - 9.0 cm
  • CLM50: between 6 cm - 12 cm

In order to use the same target depth for both CLM45 and CLM50, and not be too close to the boundary for either, I'm planning to use a target depth of 8.0 cm.

@wwieder
Copy link
Contributor Author

wwieder commented Apr 2, 2020

This makes sense to me

billsacks added a commit that referenced this issue Apr 6, 2020
Change hard-coded soil layers in phenology to use a target depth

Adds infrastructure for finding the soil layer containing a given depth
(covered by unit tests).

In phenology code, replaces hard-coded level 3 with a target soil
depth. This value is read from the parameter file. The default value is
set in a way that is bit-for-bit for standard CLM45 and CLM50
configurations, but this will change answers for non-SP configurations
using the NWP soil layer structure or non-standard soil layer
structures.

This is important for the sake of supporting flexible soil layers, as in
the NWP configuration.

Also, some cleanup of the CNPhenology parameter reading code.

Resolves #952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability
Projects
Status: Done (non release/external)
Development

Successfully merging a pull request may close this issue.

3 participants