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

ww3_prnc.F90: SQRT of a negative number #608

Open
MatthewMasarik-NOAA opened this issue Feb 10, 2022 · 0 comments
Open

ww3_prnc.F90: SQRT of a negative number #608

MatthewMasarik-NOAA opened this issue Feb 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@MatthewMasarik-NOAA
Copy link
Collaborator

Describe the bug
During the execution of program W3PRNC in the regtest ww3_ufs1.2 negative values are passed into the SQRT() function.

To Reproduce
Execute the following run_test taken from the matrix12 script generated from regtests/bin/matrix_ncep.

./bin/run_test -b slurm -o all -c hera.intel -S -T -s MPI_OMPH -w work_a -m grdset_a -f -p srun -n 140  -t 4 ../model12 ww3_ufs1.2

This bug was identified by hard-coding the UFS debug compile options into model/bin/cmplr.env

optc="$optc -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays -link_mpi=dbg_mt"

Expected behavior
If you hard-code WW3 to use the UFS debug compile options shown above, the run will terminate with a forrtl: error (65): floating invalid. If you submit the test as is with no modifications the run will complete normally, no indication of the issue.

Screenshots
ww3_prnc.F90: The problematic line is shown commented out below, with write statements of the variable (A3) directly above.
Screenshot from 2022-02-10 15-39-09

ww3_prnc_glox_10m_wind.out: Output from the wind log file showing the result of the inserted write statements.
Screenshot from 2022-02-10 15-36-26

Additional context
In this test (ww3_ufs1.2) the negative values occur during the wind interpolation section. There were 27 values of A3(NX,NY) flagged as negative.

@MatthewMasarik-NOAA MatthewMasarik-NOAA added the bug Something isn't working label Feb 10, 2022
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

No branches or pull requests

1 participant