NOAA-EMC / gfs-utils

Utility programs for global-workflow
0 stars 14 forks source link

Initialize gaussian_data in gaussian_sfcanl #71

Open CatherineThomas-NOAA opened 1 week ago

CatherineThomas-NOAA commented 1 week ago

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

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 commented 2 days ago

I approve this solution. Thanks for catching my bug.

CatherineThomas-NOAA commented 2 days ago

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