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

bug: test_interpolate_range incorrectly outputting an integer type for various interp_test variables #487

Closed
achauphan opened this issue May 31, 2023 · 2 comments · Fixed by #504
Assignees
Labels
Bug Something isn't working psi possible student issue

Comments

@achauphan
Copy link
Contributor

🐛 Your bug may already be reported!
Please search on the issue tracker before creating a new issue.

Describe the bug

test_interpolate_range function in test_interpolate_threed_sphere.f90 attempts to output an integer type for the following interp_test variables which are all defined as real(r8):

  • interp_test_dlon
  • interp_test_dlat
  • interp_test_dvert
  1. List the steps someone needs to take to reproduce the bug.
    Run test 5 of model_mod_check
  2. What was the expected outcome?
    The output for test 5 of model_mod_check correctly outputting the values of the three interp_test variables
  3. What actually happened?
    model_mod_check crashes after attempting to output.

Error Message

Please provide any error messages.

At line 124 of file /DART/models/model_mod_tools/test_interpolate_threed_sphere.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Expected INTEGER for item 2 in formatted transfer, got REAL
(A,I2)
   ^

Which model(s) are you working with?

A new pathological testing model.

Screenshots

If applicable, add screenshots to help explain your problem.
The culprit lines of code:

if ((interp_test_dlon < 0.0_r8) .or. (interp_test_dlat < 0.0_r8)) then
   if ( do_output() ) then
      write(*,'(A)')    'Skipping the rigorous interpolation test because one of'
      write(*,'(A)')    'interp_test_dlon,interp_test_dlat are < 0.0'
      write(*,'(A,I2)') 'interp_test_dlon  = ',interp_test_dlon
      write(*,'(A,I2)') 'interp_test_dlat  = ',interp_test_dlat
      write(*,'(A,I2)') 'interp_test_dvert = ',interp_test_dvert
   endif
   return
endif

Version of DART

Which version of DART are you using?
You can find the version using git describe --tags
v10.5.5-159-g27b5a675c

Have you modified the DART code?

Yes/No
If your code changes are available on GitHub, please provide the repository.
Yes
To reproduce, take the following commit from the panda_models branch:
achauphan@8ed5a96

Build information

Please describe:

  1. The machine you are running on (e.g. windows laptop, NCAR supercomputer Cheyenne).
    Ubuntu WSL2 environment on a Windows 11 Laptop
  2. The compiler you are using (e.g. gnu, intel).
    gnu
@hkershaw-brown hkershaw-brown added the psi possible student issue label Jun 13, 2023
@hkershaw-brown
Copy link
Member

write(*,'(A,I2)') 'interp_test_dlon = ',interp_test_dlon

@hkershaw-brown hkershaw-brown added the Bug Something isn't working label Jun 26, 2023
@hkershaw-brown
Copy link
Member

@achauphan which version of gfortran are you seeing this with?

gfortran --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working psi possible student issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants