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

Replace findloc() with user-defined find_index #136

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

marshallward
Copy link
Member

This patch replaces the instances of findloc() with a new function,
find_index. They should be functionally equivalent.

findloc() is a F2008 intrinsic which returns the index of the first
instance of a value in an array. Support is still spotty on some older
compilers in active use, so this function is the safer alternative.

@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #136 (d94237a) into dev/gfdl (37782eb) will not change coverage.
The diff coverage is n/a.

❗ Current head d94237a differs from pull request most recent head 636d220. Consider uploading reports for the commit 636d220 to get more accurate results

@@            Coverage Diff            @@
##           dev/gfdl     #136   +/-   ##
=========================================
  Coverage     33.45%   33.45%           
=========================================
  Files           262      262           
  Lines         71385    71385           
  Branches      13323    13323           
=========================================
  Hits          23884    23884           
  Misses        43029    43029           
  Partials       4472     4472           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37782eb...636d220. Read the comment docs.

@marshallward
Copy link
Member Author

This PR is required in order to switch the CI to the FMS2 infra (NOAA-GFDL/MOM6-examples#353).

Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

This patch replaces the instances of findloc() with a new function,
find_index.  They should be functionally equivalent.

findloc() is a F2008 intrinsic which returns the index of the first
instance of a value in an array.  Support is still spotty on some older
compilers in active use, so this function is the safer alternative.
@adcroft adcroft merged commit 1ad842c into NOAA-GFDL:dev/gfdl Jun 2, 2022
@marshallward
Copy link
Member Author

Sorry this PR was broken and does not even compile. Will submit a patch ASAP...

@adcroft
Copy link
Member

adcroft commented Jun 2, 2022

It did compile, and ran fine! https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/15675

@marshallward
Copy link
Member Author

marshallward commented Jun 2, 2022

Indeed, garbage commits to the FMS2 infra do not break the FMS1 build 🤣

@marshallward marshallward deleted the findloc_alt branch June 14, 2022 19:22
marshallward pushed a commit that referenced this pull request Sep 26, 2024
update to main 20240729 commit (gfdl-to-main-2024-05-31)
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.

2 participants