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 mersenne twister in CALWXT_BOURG.f with standard Fortran RNG #244

Merged
merged 4 commits into from
Dec 22, 2020
Merged

Replace mersenne twister in CALWXT_BOURG.f with standard Fortran RNG #244

merged 4 commits into from
Dec 22, 2020

Conversation

DusanJovic-NOAA
Copy link
Contributor

In applications like ufs, where different components are built using different precision of default reals, Mersenne twister from w3emc (which does not provide overloaded interfaces) can not be used. Replace it with standard Fortran RNG.

@WenMeng-NOAA
Copy link
Collaborator

@DusanJovic-NOAA Can you sync your branch with upstream/develop? After that, there might be additional changes in
sorc/ncep_post.fd/TIMEF.f due to "implicit none" implemented from the last commit. See the changes in my PR #243
https://github.com/NOAA-EMC/EMC_post/pull/243/files#diff-855a3040248e9ead99fee9508ae601a579e01a9aaf7a9cc9cc7b1ac051af0ee4

@WenMeng-NOAA
Copy link
Collaborator

@DusanJovic-NOAA
There is a residue bug from last UPP commit, Could you add the changes in sorc/ncep_post/TIMEF.f in your branch as:

  1. change
    real8 timef
    into
    real
    timef, etime
  2. change
    real8 rtc
    into
    real
    8 rtc,etime

Thanks!

@DusanJovic-NOAA
Copy link
Contributor Author

@DusanJovic-NOAA
There is a residue bug from last UPP commit, Could you add the changes in sorc/ncep_post/TIMEF.f in your branch as:

  1. change
    real_8 timef
    into
    real_ timef, etime
  2. change
    real_8 rtc
    into
    real_8 rtc,etime

Thanks!

I can add this. But ETIME is not standard Fortran function. Try to use only standard functions, for example SYSTEM_CLOCK().

@WenMeng-NOAA
Copy link
Collaborator

@DusanJovic-NOAA I might think TIMEF.f is an UPP legacy code. Could you add the upgrade in your branch too? Thanks!

@WenMeng-NOAA
Copy link
Collaborator

@DusanJovic-NOAA Will you update the file "VERSION" from 10.0.0 to 10.0.1?

Copy link
Contributor

@junwang-noaa junwang-noaa left a comment

Choose a reason for hiding this comment

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

The code changes look good to me, but we do not have any testing on the Fortran random number generator, so the impact of the changes to post products is unknown. As Hui-ya pointed out, a new method may come soon, so this may be some temporary fix.

@WenMeng-NOAA
Copy link
Collaborator

The UPP regression tests for GFS, GEFS, FV3/LAM, RAP, HRRR were conducted on WCOSS dell, cray and Hera. The precipitation types related fields will have changed results in GFS, GEFS, FV3/LAM products. With this PR merged in develop branch, if there might be scientific concerns from the developing model parallel run, I will provide model developers the guidance of switching back to mersenne twister in their standalone post run.

@WenMeng-NOAA WenMeng-NOAA linked an issue Dec 22, 2020 that may be closed by this pull request
@WenMeng-NOAA WenMeng-NOAA linked an issue Dec 22, 2020 that may be closed by this pull request
@WenMeng-NOAA WenMeng-NOAA linked an issue Dec 22, 2020 that may be closed by this pull request
@WenMeng-NOAA WenMeng-NOAA merged commit 194d4a1 into NOAA-EMC:develop Dec 22, 2020
@DusanJovic-NOAA DusanJovic-NOAA deleted the rng_calwxt_bourg branch December 22, 2020 18:33
EricJames-NOAA pushed a commit to EricJames-NOAA/UPP that referenced this pull request Dec 14, 2022
EricJames-NOAA pushed a commit to EricJames-NOAA/UPP that referenced this pull request Dec 14, 2022
* Changes for running EnKF updates

* Adding anavinfo for enkf

* Use variables for EnKF cores and walltime

* Cosmetic changes to exregional_run_enkf.sh, add some descriptions
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.

Mersenne Twister in in-line post
5 participants