CTSM icon indicating copy to clipboard operation
CTSM copied to clipboard

Implementation of irrigation stream file

Open YiYaoVUB opened this issue 2 years ago • 6 comments

Description of changes

In this pull request, we added the irrigation stream file where you can customize the irrigation-related parameters. Before: Most of the irrigation-related parameters apply to all crops and all gridcells. You just need to set them in user namelist files After: Now you can give different values to irrigation-related files for different crops and different gridcells.

Specific notes

Please note that this pull request is replacing the pull request #2026

Contributors other than yourself, if any: @swensosc @samsrabin

CTSM Issues Fixed (include github issue #): #2026 It does not only fix the issue but also grants users more flexibility. In next steps, a default irrigation stream files or its generation tools may be given

Are answers expected to change (and if so in what way)?

Any User Interface Changes (namelist or namelist defaults changes)? yes. in the namelist we can add if use_irrigation_stream is true or wrong

Testing performed, if any: (List what testing you did to show your changes worked as expected) (This can be manual testing or running of the different test suites) (Documentation on system testing is here: https://github.com/ESCOMP/ctsm/wiki/System-Testing-Guide) (aux_clm on cheyenne for intel/gnu and izumi for intel/gnu/nag/pgi is the standard for tags on master)

NOTE: Be sure to check your coding style against the standard (https://github.com/ESCOMP/ctsm/wiki/CTSM-coding-guidelines) and review the list of common problems to watch out for (https://github.com/ESCOMP/CTSM/wiki/List-of-common-problems).

YiYaoVUB avatar Aug 14 '23 13:08 YiYaoVUB

Some additional things upon further inspection/testing/discussion with @swensosc (some of which solve issues that predate this PR):

  • [ ] In QflxH2osfcSurf(), move the setting of qflx_h2osfc_surf(c)= 0._r8 to in front of the if loop.
  • [ ] Get rid of sprinkler and drip names; just use above/below canopy, for consistency and disambiguation.
  • [ ] sfc_irrig_rate_patch should probably just be irrig_rate_patch
  • [ ] To improve code readability, try to minimize the number of places that things are set. E.g. sfc_irrig_rate_patch should not be set in both IrrigationMod and IrrigationStreamMod.
  • [ ] Where things are in column loops, change them to patch loops followed by p2c() calls. This will allow flexibility in case we ever have multiple irrigated PFTs on a single column, at the cost of more memory usage.
  • [ ] Add option, set on stream file, to prevent drainage for irrigated crops.
  • [x] ~~Unit testing: Get test_irrigation.pf to compile.~~ Done with 6a4de49.
  • [ ] Unit testing: Get test_irrigation_suite to pass.
  • [ ] Add new unit tests?
  • [ ] Add system testing.

samsrabin avatar Aug 18 '23 19:08 samsrabin

Sorry Sam I may close it accidently.

YiYaoVUB avatar Aug 20 '23 09:08 YiYaoVUB

I think the "crop_fsat_equals_zero" reduces runoff for crop, so that only infiltration excess runoff occurs when it is active.

On Sun, Aug 20, 2023 at 3:15 AM YiYaoVUB @.***> wrote:

@.**** commented on this pull request.

In src/biogeophys/IrrigationMod.F90 https://github.com/ESCOMP/CTSM/pull/2102#discussion_r1299342307:

@@ -235,6 +244,9 @@ module IrrigationMod integer, parameter, public :: irrig_method_drip = 1 ! Sprinkler is applied directly to canopy integer, parameter, public :: irrig_method_sprinkler = 2

  • ! Flood is applied to soil surface
  • !(currently, the only difference between drip and flood is the target soil water, which can be implemented in Irrigation stream files. We leave it here in case future changes)

Yes it is true but I am still wondering in the future, the drip irrigation shall be re-designed. In the current version of the code, the drip irrigation would also cause many runoff, which is not very realistic. Just some thoughts: like applying water into the soil directly?

— Reply to this email directly, view it on GitHub https://github.com/ESCOMP/CTSM/pull/2102#discussion_r1299342307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGRN57H4ERFB3RYFRECRSGDXWHITRANCNFSM6AAAAAA3PXECCU . You are receiving this because you were mentioned.Message ID: @.***>

swensosc avatar Aug 21 '23 13:08 swensosc

my comment seems to have been placed at the bottom of the discussion, but it was: I think the "crop_fsat_equals_zero" reduces runoff for crop, so that only infiltration excess runoff occurs when it is active. So basically, I think our treatment of runoff can be handled separately from the treatment of irrigation method.

On Tue, Aug 22, 2023 at 9:53 AM Sam Rabin @.***> wrote:

@.**** commented on this pull request.

In src/biogeophys/IrrigationMod.F90 https://github.com/ESCOMP/CTSM/pull/2102#discussion_r1301857260:

@@ -235,6 +244,9 @@ module IrrigationMod integer, parameter, public :: irrig_method_drip = 1 ! Sprinkler is applied directly to canopy integer, parameter, public :: irrig_method_sprinkler = 2

  • ! Flood is applied to soil surface
  • !(currently, the only difference between drip and flood is the target soil water, which can be implemented in Irrigation stream files. We leave it here in case future changes)

Good point—there might eventually be a true "drip" irrigation that's distinct from a below-canopy sprinkler. @swensosc https://github.com/swensosc, what do you think?

— Reply to this email directly, view it on GitHub https://github.com/ESCOMP/CTSM/pull/2102#discussion_r1301857260, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGRN57CWECHIG5I23IEFWYTXWTIW3ANCNFSM6AAAAAA3PXECCU . You are receiving this because you were mentioned.Message ID: @.***>

swensosc avatar Aug 22 '23 15:08 swensosc

There is more work to be done here. So I'm changing it to a draft. It's still important that just helps us to see what is ready to go now and what is a work in progress.

ekluzek avatar Jan 19 '24 18:01 ekluzek

Note that, currently, the following CFTs are being merged into rice:

rice: ['cassava', 'cocoa', 'coffee', 'groundnuts', 'oilpalm', 'rice']

This may need to change once rice receives paddy irrigation.

samsrabin avatar Sep 08 '25 14:09 samsrabin