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

Disconnect MOM_random from FMS/random #1300

Merged
merged 2 commits into from
Jan 27, 2021
Merged

Disconnect MOM_random from FMS/random #1300

merged 2 commits into from
Jan 27, 2021

Conversation

adcroft
Copy link
Collaborator

@adcroft adcroft commented Jan 26, 2021

The random number generator was not really infrastructure code but shared code. Since we are making MOM6 agnostic to the version of infrastructure it seemed simplest to copy the subset of the Mersenne Twister code we use into MOM_random. Moving forward we are expecting a state-free random number generator that will eventually displace the Mersenne Twister.

adcroft and others added 2 commits January 26, 2021 18:11
The random number generator is not really infrastructure code but
was shared code. Since we are trying to make MOM6 agnostic to the
infrastructure it seemed simplest to copy the subset of the Mersenne
Twister code we use into MOM_random. Moving forward we are expecting
a state-free random number generater that will eventually displace
the Mersenne Twister.
@Hallberg-NOAA
Copy link
Collaborator

This PR has passed the pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/11946 .

Copy link
Collaborator

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

I agree that importing the MersenneTwister code into MOM_random.F90 is the right thing to do.

@Hallberg-NOAA Hallberg-NOAA merged commit d6fa98b into mom-ocean:dev/gfdl Jan 27, 2021
@jwdGFDL
Copy link

jwdGFDL commented Jan 27, 2021 via email

@adcroft
Copy link
Collaborator Author

adcroft commented Jan 27, 2021

Yes, we recognize that we need to use the same types as the framework compatibility, and shared code to avoid redundancy. The random module was not being used in conjunction with any other part of the coupled system but for an interior process that is not yet in regular use. As mentioned in the PR, we have a stateless RNG coming soon and we plan to phase out our use of the Mersenne Twister which uses significant memory the way we've been needing to use it - I think we were using it in a way it was intended.

@adcroft adcroft deleted the disconnect-random branch March 2, 2021 19:49
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.

3 participants