ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
302 stars 307 forks source link

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

Closed wwieder closed 4 years ago

wwieder commented 4 years ago

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. https://github.com/ESCOMP/CTSM/blob/384c726fa74e5a16ae15f6b40aad3e5d63b19d07/src/biogeochem/CNPhenologyMod.F90#L1122

ekluzek commented 4 years ago

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?

billsacks commented 4 years ago

@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 commented 4 years ago

To further complicate matters I would assume that off of this is historically based on the older 10-layer (3.5m) soil scheme. It's obviously working well enough with the new 20-layer, variable depth implementation, so maybe that should be our initial target depth to avoid changing answers?

I don't think having this be a thick layer is necessarily a problem, but I'd assume that the 3rd layer was chosen because it responds relatively quickly to changes in the surface, without some of the rapid drying/wetting or freeze/thaw that may occur in upper horizons? That is, we want the soil to respond- but not too quickly.

On Mon, Mar 30, 2020 at 2:29 PM Bill Sacks notifications@github.com wrote:

@ekluzek https://github.com/ekluzek @wwieder https://github.com/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 https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESCOMP/CTSM/issues/952#issuecomment-606231525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5IWJD6P7JWJVB3HVO4MZTRKD6MJANCNFSM4LWVC5UQ .

-- Will Wieder Project Scientist CGD, NCAR 303-497-1352

ekluzek commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

I like your logic, Bill. I'm assuming we'd put this in a parameter file regardless, so we can test / change the model behavior as needed?

On Mon, Mar 30, 2020 at 2:58 PM Bill Sacks notifications@github.com wrote:

@wwieder https://github.com/wwieder @ekluzek https://github.com/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 https://github.com/wwieder let me know if you feel differently, though.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESCOMP/CTSM/issues/952#issuecomment-606245931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5IWJA7HXYQ3337DHXCAN3RKEBW5ANCNFSM4LWVC5UQ .

-- Will Wieder Project Scientist CGD, NCAR 303-497-1352

billsacks commented 4 years ago

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

billsacks commented 4 years ago

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:

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 commented 4 years ago

This makes sense to me