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

Initializing tracers to fix the FP issue for some tracers in debug mo… #147

Merged
merged 4 commits into from
Oct 6, 2021

Conversation

JosephMouallem
Copy link
Contributor

Initializing tracers to fix the FP issue for some tracers in debug mode triggered in remap_scalar

Fixes #
Fixes a crash triggered in hafs debug mode on some nests.

How Has This Been Tested?

Tested on Orion under HAFS

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

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

Just want to mention that dev/emc was updated, maybe we need to sync this PR before merging.

@bensonr
Copy link
Contributor

bensonr commented Sep 23, 2021

@junwang-noaa - while it is desirable to sync prior to a merge, it isn't a requirement when they aren't touching the same files.

@laurenchilutti
Copy link
Contributor

@DusanJovic-NOAA @junwang-noaa Could you please review this again as changes were made following your original approval?

@laurenchilutti laurenchilutti merged commit 6ce60a0 into NOAA-GFDL:dev/emc Oct 6, 2021
laurenchilutti pushed a commit that referenced this pull request Oct 6, 2021
#147)

* Initializing tracers to fix the FP issue for some tracers in debug mode triggered in remap_scalar

* remove duplicate code and fix lstatus on all grids depending on gfs_data and gfs_data.tile1

Co-authored-by: Joseph Mouallen <j3mouall@uwaterloo.ca>
@climbfuji
Copy link

@bensonr @JosephMouallem @junwang-noaa @DusanJovic-NOAA @laurenchilutti @XiaqiongZhou-NOAA I think this PR wrecks havoc when Thompson microphysics is used. I noticed that after updating the GFDL_atmos_cubed_sphere submodule pointer in my PR ufs-community/ufs-weather-model#850 to include #146, #147, #148, all regression tests using Thompson MP have different answers. The reason is that after the adiabatic init, i.e. before the first time physics get called, the number concentrations ice_nc and rain_nc the fourth-last and third-last indices in the tracer arrays have nonsense values.

#148 and #146 have nothing to do with these tracers (or their associattedd mass mixing ratios) and are not responsible for the problem.

I believe that the problem is that this PR #147 sets those tracers (and especially missing ice and rain mass mixing ratios) to -999 instead of zero. This may be correct to indicate that they are missing, but the original initialization in GFS_typedefs.F90 is to set them to zero, and the CCPP physics logic relies on them being zero and not -999 (not only for those two tracers, but many variables - this is not something CCPP invented, in general it used to be the case beforehand already).

Thompson MP at initialization computes number concentrations from mass concentrations, and the logic doesn't know about those -999s. See attached screenshot.

Screen Shot 2021-10-10 at 8 28 02 PM

So, the submodule pointer update to include #147 (and by this also #148) need to be put on hold until the necessary changes are made to the logic in either fv3atm or ccpp-physics (it is not clear to me on this late Sunday evening during my holidays what the best place is).

@bensonr
Copy link
Contributor

bensonr commented Oct 11, 2021

@climbfuji @JosephMouallem @XiaqiongZhou-NOAA @laurenchilutti @junwang-noaa - thanks for reminding me why I didn't include that line originally when the master branch was merged into dev/emc back in August. I believe I know how to fix the issue for both Thompson MP and the nesting issue that precipitated this fix in dev/emc. I'll let you know the results of my tests on Tuesday.

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.

6 participants