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

488 merge canopy developments from am3 #489

Merged
merged 29 commits into from
Nov 27, 2024

Conversation

JhanSrbinovsky
Copy link
Collaborator

@JhanSrbinovsky JhanSrbinovsky commented Nov 26, 2024

CABLE

Thank you for submitting a pull request to the CABLE Project.

Description

Please include a brief summary of the change and list the issues that are fixed.
Please also include relevant motivation and context.

You can link issues by using a supported keyword in the pull request's description or in a commit message:

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix
  • New or updated documentation

Checklist

  • The new content is accessible and located in the appropriate section.
  • I have checked that links are valid and point to the intended content.
  • I have checked my code/text and corrected any misspellings

Please add a reviewer when ready for review.


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

JhanSrbinovsky and others added 25 commits November 26, 2024 16:26
cable_surface_type_namelist - which will be implemented here as well at
a later date
off and ICE density used that has changed as well
Co-authored-by: Claire Carouge <ccarouge@users.noreply.github.com>
Co-authored-by: Claire Carouge <ccarouge@users.noreply.github.com>
@JhanSrbinovsky JhanSrbinovsky added this to the ESM1.6 FastTrack milestone Nov 26, 2024
@JhanSrbinovsky JhanSrbinovsky self-assigned this Nov 26, 2024
@JhanSrbinovsky JhanSrbinovsky linked an issue Nov 26, 2024 that may be closed by this pull request
capitalized as automatically triggers -fpp compilation flag AND every
other files is F90 AND every JULES file is F90
CMakeLists.txt Outdated
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AM3 implementation of init_wetfac crept in. Although f90 should be
capitalized as automatically triggers -fpp compilation flag AND every
other files is F90 AND every JULES file is F90

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AM3 version treatment of conversion (assuming 1e3 corresponds to units)

  ! Calculate dewfall: from negative lh wet canopy + neg. lh dry canopy:
  canopy%dewmm = - (MIN(0.0,canopy%fevw) + MIN(0.0_r_2,canopy%fevc)) * &
       dels / air%rlam

and cansto

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AM3 had neater interface. The explicit REAL typecasting is perhaps unnecessary as it is handled here that was used in AM3 - HOWEVER continued removal of r_2 is advantageous. As argued a million times, REAL(selected_real_kind) does not change CPU hardeware. it's either a 32,64,128 bit machine. All values of selected_real_kind fall into their nearest bin (being either 32,64,128 bit etc). Here r_2 defaults to double. In the UM everything is compiled as -i8, -r8 so r_2 is meaningless and only causes complications in development/refactoring especially when TYPES/kinds dont match up. Additionally the UKMO discouraged us from using r_2, special KINDs. However they have since adopted them themselves. Having many different KINDs on either side of the interface is problematic. Last I spoke with them they were uncertain of what this would all look like with LFRic. At any rate it is easier if we just lay off the r_2 for the moment and re-implement a consistent approach at a later date when we know better what is happening.

@@ -369,15 +381,8 @@ SUBROUTINE dryLeaf( dels, rad, rough, air, met, &
rdx(i,2) = rdx(i,2) * &
(0.5 - 0.05*LOG(jtomol*1.0e6*rad%qcan(i,1,2)))

!$ xleuning(i,1) = ( fwsoil(i) / ( csx(i,1) - co2cp3 ) ) &
!$ * ( veg%a1gs(i) / ( 1.0 + dsx(i)/veg%d0gs(i)))
!$ xleuning(i,2) = ( fwsoil(i) / ( csx(i,2) - co2cp3 ) ) &
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This commenting style has lead to issues in some UM builds. Its redundant code anyway

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This has just had the f90 capitalised

@JhanSrbinovsky
Copy link
Collaborator Author

@ccarouge - There is still the soilsnow stuff to go in. Fortunately it looks pretty good porting back to AM3. There is an issue around dewmm & canto that I mentioned here, and 1 other, all in cable_canopy

@ccarouge
Copy link
Member

@JhanSrbinovsky Have you tested these changes in benchcab? What's the effect on the results?

@JhanSrbinovsky
Copy link
Collaborator Author

@JhanSrbinovsky Have you tested these changes in benchcab? What's the effect on the results?

2024-11-27 13:32:16,679 - INFO - benchcab.benchcab.py:391 - 0 failed, 20 passed

@JhanSrbinovsky
Copy link
Collaborator Author

@ccarouge

Copy link
Member

@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.

All good then.

@JhanSrbinovsky JhanSrbinovsky merged commit 960970d into main Nov 27, 2024
7 checks passed
@JhanSrbinovsky JhanSrbinovsky deleted the 488-merge-canopy-developments-from-am3 branch November 27, 2024 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge canopy developments from AM3
2 participants