Main candidate from NCAR (04/21/2021)#1381
Conversation
…n_code_LBD Delete forgotten code
* Also reducing line lenghts > 120
Fixes inconsistency in the calculation of tendency due to lateral diffusion
See https://arxiv.org/abs/2004.06278. Not an exact reproduction of "squares" because Fortran doesn't have a uint64 type, and not all compilers provide integers with > 64 bits...
…_diff Adds mask2dT checker to avoid calling boundary_k_range at land points
Added a counter-based PRNG to MOM_random
Remove an omp parallel do directive due to thread-unsafe cpu_clock
This patch fixes a sign bug, in both MCT and NUOPC, when accounting for the latent heat from fprec and frunnoff. Following MOM6's definition, both fprec and frunoff are > 0 into the ocean. Therefore, the latent heat associated with these terms should be negative.
* Fixes latent heat contribution from fprec and frunoff (MCT and NUOPC)
…ndidate_2021-02-19 Fix LBD module after merging main candidate 2021 02 19
Merge main candidate 2021-02-19
Add med2mod_areacor and move where area correction is applied
Sync with main to bring in new file layout
|
@kshedstrom, @jiandewang, @abozec (or @awallcraft): please review/test this PR. |
|
@gustavo-marques https://github.com/NOAA-GFDL/MOM6/pull/1381/files#diff-68076a5015442fbab97fced84c6d2c139c715798d26b7e0fe0c542bab0b3c1d6R467-R478 |
|
@jiandewang, thanks for catching that. |
|
I approve this PR. |
| call ESMF_VMGet(vm, pet=localPet, peCount=localPeCount, rc=rc) | ||
| if (ChkErr(rc,__LINE__,u_FILE_u)) return | ||
|
|
||
| if(localPeCount == 1) then |
There was a problem hiding this comment.
The two instances of retrieving the attribute 'nthreads' are failing for EMC. They will need "isPresent,isSet" conditionals added. Thanks.
|
@gustavo-marques This still isn't working for EMC. We need to use the isPresent,isSet conditionals to optionally retrieve the config variable. I've tested the following change for our configuration on Gaea: Please check the logic and make sure it is what you intend. Thanks. |
|
@DeniseWorthen, sorry for breaking your tests, and thank you for suggesting a solution. I will add your changes and run them by Jim Edwards since he implemented the threading option in NUOPC. |
|
@gustavo-marques I will run UFS RT with your updated code, but may take some time as we ran out of CPU quota at this moment, job turnover rate is extremely low. |
|
@gustavo-marques: by adding !$ call omp_set_num_threads(nthrds) in the cap code, does it mean part of cap will be running with OMP or something else ? we don't have a clear idea here, can you explain ? The updated code passed UFS RT, thanks for @DeniseWorthen and @gustavo-marques |
|
@jiandewang, these (or any) OpenMP directives are effective only if you explicitly enable OpenMP at compile time. Unless you compile with OpenMP, these directives (!$) are merely regarded as comments, and so will not affect your model. If you are compiling with OpenMP, on the other hand, the directive you refer to does the following: "Instead of using the default number of threads, the directive sets the number of threads to the value received from NUOPC_CompAttributeGet call. Also mentioned @jedwards4b, if he likes to add more. |
@alperaltuntas thanks for the explanation, did you get identical results from different threading # ? |
|
GFDL Gaea regression (internal): https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/12566 ✔️ |
|
@jiandewang Yes, the number of threads doesn't change the results. |
|
@sanAkel Did you want to review this PR? The number of non-NUOPC changes is very small so I would not expect any issues. Otherwise, I will go ahead and merge this if there's no objection. (I will redirect it to |
@marshallward Thanks for checking. I think I will take a pass on this one. Though I am a bit confused by "(I will redirect it to |
The PR was misdirected to the |
Got it, Thanks @marshallward. Once you have
We will update GEOS-ESM. |
|
This PR has now been added to |
Summary
Many improvements in the lateral boundary diffusion module
Adds a new counter-based random number generator
Fixes a minor bug in the neutral diffusion module (only applies when NDIFF_INTERIOR_ONLY = True)
Fixes sign bug in the latent heat contribution from frozen precipitation and frozen runoff (MCT and NUOPC caps)
Adds option to apply an are flux correction in the NUOPC cap
Adds support for threading in the NUOPC cap
This PR does not change the MOM6-examples answers (w.r.t. branch main at 1a420f2) when using the intel/19.0.5 compiler. It also does not add new MOM input flags or diagnostics.