Skip to content

CAM computes enthalpy to send to BLOM#2

Open
mvertens wants to merge 6 commits into
NorESMhub:noresmfrom
mvertens:feature/cam_computes_enthalpy
Open

CAM computes enthalpy to send to BLOM#2
mvertens wants to merge 6 commits into
NorESMhub:noresmfrom
mvertens:feature/cam_computes_enthalpy

Conversation

@mvertens
Copy link
Copy Markdown

@mvertens mvertens commented Oct 9, 2025

Description of changes

New routine schemes/conservation_adjust/dme_adjust/dme_adjust_camnor.F90 that is needed to enable the changes introduced from Thomas Toniazzo.

Specific notes

Issues Fixed:

Are changes expected to change answers? (specify if BFB, different at roundoff, more substantial)

Any User Interface Changes (namelist or namelist defaults changes)?

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

List all automated tests that failed, as well as an explanation for why they weren't fixed:

Copy link
Copy Markdown

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

This is basically okay but could use some cleanup. Suggested cleanup PR coming to this branch.

!
!---------------------------Local workspace-----------------------------
!
integer :: i,k,m ! Longitude, level indices
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In new code, it would be nice to use multi-character variable names.


!---------------------------Local workspace-----------------------------

integer :: i,k,m, ixq ! Longitude, level indices
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same issue with single-digit variable names.

Comment on lines +487 to +488
tot_water(:ncol,1) = qini(:ncol,k)+liqini(:ncol,k)+iceini(:ncol,k) !initial total H2O
tot_water(:ncol,2) = 0.0_r8
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This would be clearer as two separate work arrays, tot_water_init and tot_water_present.

real(r8) :: condcp(pcols,pver) ! species-increment-weighted cp
real(r8) :: pint_old(pcols,pver+1) ! work array
real(r8) :: dummy(pcols,pver) ! work array
integer :: is_invalid(pcols)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This should be a logical, maybe has_dcwat would be clearer..

@mvertens mvertens marked this pull request as ready for review October 20, 2025 19:53
@mvertens mvertens requested a review from gold2718 October 20, 2025 19:54
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.

2 participants