Skip to content

Conversation

@peverwhee
Copy link
Collaborator

@peverwhee peverwhee commented Aug 26, 2025

  1. Allow duplicate standard names from the Subcycle object (duplicate loop variables)
  2. Allow nested subcycles to have the same iteration length (iterator name now changes for nested loops of the same length)
  3. Also cleans up an error message in suite_objects.F90 for variable transforms (add subroutine name instead of standard name to output)

User interface changes?: No

closes #677

Testing:

  • Modified var_compatibility_test to more extensively test subcycles (fail without the source mods in this PR)

- Also tests subcycles:
- Nested subcycles
- A subcycle with dynamic iteration length (defined by a standard name) and a subcycle with fixed/integer iteration length
- Multiple ubcycles with same standard name defining the iteration length
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Multiple ubcycles with same standard name defining the iteration length
- Multiple subcycles with same standard name defining the iteration length

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed!

real(kind_phys), parameter :: effrl_expected = 5.0E-5 ! 50 microns, in meter
real(kind_phys), parameter :: effri_expected = 7.5E-5 ! 75 microns, in meter
real(kind_phys), parameter :: effrs_expected = 5.1E-4 ! 510 microns, in meter
real(kind_phys), parameter :: effrs_expected = 5.2E-4 ! 520 microns, in meter
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, why this change? Is every subcycle adding 10 microns?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

correct, I modified the SDF to do a total of 4 subcycles (2 nested within 2) rather than 2.

Actually, now that I look at it, I don't understand it! The effr_calc_run subroutine that is run 4 times instead of 2 adds 10.0 / 6.0 microns each iteration, which doesn't add up either with my mods or the existing expectation... I shall look into this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nevermind, it used to be doing 3*2 = 6 subcycles, so adding 10/6 6 times for a total of 10 microns.

With my updates, it's now doing 322 = 12 subcycles, so adding 20 microns.

So all is OK

@peverwhee peverwhee requested a review from climbfuji August 26, 2025 17:59
Copy link
Collaborator

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

I wonder if all the behavior is being checked.

@peverwhee peverwhee requested a review from gold2718 August 26, 2025 22:06
Copy link
Collaborator

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

Thanks for adding the check!

@dustinswales
Copy link
Member

@mkavulich This one has been approved and is ready to merge.

@climbfuji
Copy link
Collaborator

@mkavulich This has three approvals, can we merge please?

@mkavulich mkavulich merged commit 5b195f5 into NCAR:develop Sep 15, 2025
19 checks passed
@peverwhee peverwhee deleted the allow-repeat-subcycle-vars branch November 18, 2025 23:41
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.

5 participants