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

Replace cable_gw_hydro.F90 with its new version #231

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

rkutteh
Copy link
Collaborator

@rkutteh rkutteh commented Apr 7, 2024

CABLE ground water hydrology work of Mengyuan Mu

This pull request is part of integrating the ground water hydrology work of Mengyuan Mu into CABLE, which will take place in a sequence of pull requests. The actual integration project itself was completed back in September 2023. The current work involves just a gradual merge into the main branch.

Fixes #230

Description

  1. cable_gw_hydro.F90 is replaced by its new version (drop-in replacement)
  2. Dependencies are introduced in src/offline/cable_parameters.F90, src/offline/cable_define_types.F90, src/science/soilsnow/cbl_thermal.F90, and src/util/cable_common.F90 in order for the code to compile successfully (confirmed)
  3. PLEASE do not delete any of my in-code comments (tagged rk4417) for now. Once the integration of the ground water hydrology work is complete and its functionality is confirmed to reproduce the results obtained already outside of the repo, I will clean-up all of my comments in a single pull request. Deleting any of my comments now will just make it much more difficult for me to track down and fix any issues that might arise during this process.

📚 Documentation preview 📚: https://cable--231.org.readthedocs.build/en/231/

@rkutteh rkutteh added the GWH Ground water hydrology integration work label Apr 7, 2024
@rkutteh rkutteh requested a review from ccarouge April 7, 2024 11:31
@rkutteh rkutteh self-assigned this Apr 7, 2024
@rkutteh rkutteh linked an issue Apr 7, 2024 that may be closed by this pull request
@ccarouge
Copy link
Collaborator

ccarouge commented Apr 9, 2024

@rkutteh I have seen this but I think it is going to take some time. I believe I have to test it against the main version because there are things in there that can change the results without the groundwater on.

@rkutteh
Copy link
Collaborator Author

rkutteh commented Apr 9, 2024 via email

@ccarouge ccarouge added the priority:high High priority issues that should be included in the next release. label May 2, 2024
Copy link
Collaborator

@ccarouge ccarouge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have finally finished reviewing this. I have a few minor comments, mainly about the documentation and comments as these won't change the results.

There could be a lot more to change but I know there will be some cleanup done once everything is in and we can check the results. And this is "legacy" code we bring in so we can't be too strict.

@@ -24,10 +28,12 @@ SUBROUTINE snow_processes_soil_thermal(dels,ssnow,soil,veg,canopy,met,bal,snowml
TYPE(veg_parameter_type), INTENT(INOUT) :: veg
TYPE(met_type), INTENT(INOUT) :: met ! all met forcing
TYPE (balances_type), INTENT(INOUT) :: bal
REAL, DIMENSION(:), INTENT(INOUT) :: snowmlt

REAL, DIMENSION(mp) :: snowmlt !track snow melt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An annoying requirement from the JULES/UM coding standard:

Suggested change
REAL, DIMENSION(mp) :: snowmlt !track snow melt
REAL. :: snowmlt(mp) !track snow melt

I know there are plenty of these to clean up but may as well starting by not adding new ones :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccarouge A couple of remarks regarding the requested change:

  1. Is the dot in " REAL. " a typo or is it some new syntax I am not aware of ?
  2. I realize that the requirement of JULES/UM is a must, but I think it is worth noting that this is not considered good coding practice, as attaching the dimension to the array name is the "old" way of declaring arrays and including the "DIMENSION" attribute in the declaration is the recommended "new" way. I think it is a good idea to double check that this is really what they want so we don't have a repetition of what happened earlier regarding breaking up the modules into smaller ones.

I am happy to commit the suggestion once I hear back regarding the mysterious "dot"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dot was indeed a typo. But on reflection, I would leave it as is.

src/science/gw_hydro/cable_gw_hydro.F90 Outdated Show resolved Hide resolved
src/science/gw_hydro/cable_gw_hydro.F90 Show resolved Hide resolved
src/science/gw_hydro/cable_gw_hydro.F90 Outdated Show resolved Hide resolved
src/science/gw_hydro/cable_gw_hydro.F90 Outdated Show resolved Hide resolved
src/science/gw_hydro/cable_gw_hydro.F90 Outdated Show resolved Hide resolved
src/offline/cable_parameters.F90 Outdated Show resolved Hide resolved
src/offline/cable_parameters.F90 Outdated Show resolved Hide resolved
@rkutteh rkutteh requested a review from ccarouge July 25, 2024 08:38
@rkutteh
Copy link
Collaborator Author

rkutteh commented Aug 26, 2024

@ccarouge I have resolved the 4 conflicts. I am ready to merge when permitted, so I can then proceed with working on the next pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GWH Ground water hydrology integration work priority:high High priority issues that should be included in the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace cable_gw_hydro.F90 with its new version
2 participants