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

set is_allocated in all horiz_interp_type_new routines #1538

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Jun 3, 2024

Description
Sets the is_allocated field as well as the method_type within horiz_interp_types when called from any of the method specific horiz_interp_new routines. This should prevent reallocation errors as described in the issue below.

Also adds some calls to the unit test to test this functionality and renames one of the CPP macros to make more sense.

Fixes #1533

How Has This Been Tested?
make distcheck with oneapi 2024.01 on amd box

Checklist:

  • 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
  • New check tests, if applicable, are included
  • make distcheck passes

@rem1776 rem1776 marked this pull request as draft June 3, 2024 19:16
@rem1776 rem1776 marked this pull request as ready for review June 3, 2024 19:48
Comment on lines 987 to 989
!! for bicubic set up
real(HI_TEST_KIND_), allocatable :: lon_src_1d(:), lat_src_1d(:)
real(HI_TEST_KIND_), allocatable :: lon_dst_1d(:), lat_dst_1d(:)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should have doxygen documentation instead of just a comment above

@@ -36,7 +36,7 @@ module horiz_interp_spherical_mod
use fms_mod, only : write_version_number
use fms_mod, only : check_nml_error
use constants_mod, only : pi
use horiz_interp_type_mod, only : horiz_interp_type, stats
use horiz_interp_type_mod, only : horiz_interp_type, stats, SPHERICA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we do not include the trailing L other than to limit the variable name to 8 characters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No as far as I can tell that's the only reason it's cut off. I checked if there was anything else used in FMS named spherical but there's not.

Should we update it to add the L?

@rem1776
Copy link
Contributor Author

rem1776 commented Jun 27, 2024

@thomas-robinson @bensonr This should be ready now, I updated the SPHERICA to SPHERICAL. I noticed that the interpolation method values were made public in the libFMS.F90 file so I also removed them from there as well since they should only be internal.

@rem1776 rem1776 merged commit 7d8aa21 into NOAA-GFDL:main Jun 28, 2024
26 of 28 checks passed
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.

Issue with horiz_interp
3 participants