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

Initialize gaussian_data in gaussian_sfcanl #71

Closed
CatherineThomas-NOAA opened this issue Jun 24, 2024 · 5 comments · Fixed by #73
Closed

Initialize gaussian_data in gaussian_sfcanl #71

CatherineThomas-NOAA opened this issue Jun 24, 2024 · 5 comments · Fixed by #73
Assignees
Labels
bug Something isn't working

Comments

@CatherineThomas-NOAA
Copy link

What is wrong?

In the gaussian_sfcanl utility, the variable gaussian_data is used before it is initialized to zero (Line 273):

  gaussian_data%vfrac(row(i))  = gaussian_data%vfrac(row(i)) + s(i)*tile_data%vfrac(col(i))

Sometimes the resulting values are unreasonable (for example 1E+200).

What should have happened?

The gaussian_data variable should be initialized to zero after allocation.

What machines are impacted?

All or N/A

Steps to reproduce

  • Clone and build the global-workflow
  • Run the WCDA CI test at C48mx500 resolution
  • Examine the gaussian sfcanl nc file and ncdump variable veg

Additional information

More details are in global-workflow issue #2669.

Do you have a proposed solution?

The gaussian_data variable should be initialized to zero after allocation.

@GeorgeGayno-NOAA
Copy link
Contributor

I approve this solution. Thanks for catching my bug.

@GeorgeGayno-NOAA GeorgeGayno-NOAA self-assigned this Jun 28, 2024
@CatherineThomas-NOAA
Copy link
Author

@GeorgeGayno-NOAA: Here is a RUNDIR for my C48 test on Hera:

/scratch1/NCEPDEV/da/Catherine.Thomas/git/global-workflow/c48test/TMP/RUNDIRS/c48test/analcalc.410225

Let me know if you need me to run anything else.

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/gfs-utils that referenced this issue Jul 1, 2024
@GeorgeGayno-NOAA
Copy link
Contributor

Case set up on Hera: /scratch1/NCEPDEV/da/George.Gayno/global-workflow.git/gaussian_sfcanl

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/gfs-utils that referenced this issue Jul 10, 2024
@GeorgeGayno-NOAA
Copy link
Contributor

GeorgeGayno-NOAA commented Jul 10, 2024

Started another test branch. Added some compiler options (576a55c) that will initialize variables to a very large value that will hopefully cause a run time failure.

The test case was rerun using the new branch. A floating overflow was detected:

 - WRITE VARIABLE alnsf
forrtl: error (72): floating overflow
Image              PC                Routine            Line        Source
gaussian_sfcanl.x  00000000004423FB  Unknown               Unknown  Unknown
libpthread-2.28.s  000014CE08968CF0  Unknown               Unknown  Unknown
gaussian_sfcanl.x  0000000000433B37  get_netcdf_var_           915  gaussian_sfcanl.f90
gaussian_sfcanl.x  000000000042C4CE  write_sfc_data_ne         888  gaussian_sfcanl.f90
gaussian_sfcanl.x  0000000000412A14  MAIN__                    374  gaussian_sfcanl.f90

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/gfs-utils that referenced this issue Jul 10, 2024
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/gfs-utils that referenced this issue Jul 10, 2024
@GeorgeGayno-NOAA
Copy link
Contributor

All variables were initialized to zero (289d090) and the test case was re-run. It completed normally:

 - WRITE VARIABLE zc

 - NORMAL TERMINATION


     ENDING DATE-TIME    JUL 10,2024  15:47:24.617  192  WEN   2460502
     PROGRAM GAUSSIAN_SFCANL HAS ENDED.

GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/gfs-utils that referenced this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants