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

Bugfix: speedup interpolation #2

Merged
merged 6 commits into from
Dec 20, 2021

Conversation

twsearle
Copy link
Collaborator

@twsearle twsearle commented Dec 10, 2021

Description

The interpolation for 10 million sea ice observations takes over 3 hours.

Instructions to Reproduce the Issue

Run orcamodel_hofx3D.x with over 10000 observations in the input file. You can do this either using the comparison suite with Simon's branch, or by running using the ostia_seaice_obs.yaml configuration.

Acceptance Criteria (Definition of Done)

The interpolation of 10 million points takes less than 10 minutes.

Dependencies

  • The latest version of the atlas develop branch
  • Setting max_fraction_elems_to_try = 0.0 in the interpolation section of the configuration (the default is 0.2, and causes atlas to search 20% of the grid for points which lie outside of the model domain). An example of this setting is in L41 of ostia_seaice_obs.yaml.

Summary of Changes

  • use an array view instead of a vector of PointXY's
  • use temporary arrays for longitude and latitude
  • update the ostia_seaice_obs.yaml file to point to a large example problem
  • Add the max_fraction_elems_to_try option. Setting this to zero and using the head of atlas develop will cause the interpolator to skip observations that are not found in the cell with the closest cell centre or the 8 surrounding grid cells. See ecmwf::atlas#84 for details.

* use an array view instead of a vector of PointXY's
* use temporary arrays for longitude and latitude
Make the ostia_seaice_obs.yaml configuration match the current OPS
comparision tests more closely.
@twsearle twsearle self-assigned this Dec 10, 2021
@twsearle twsearle requested a review from s-good December 10, 2021 14:25
@twsearle twsearle changed the title Bugfix: speedup atlas obs functionspace construction Bugfix: speedup interpolation Dec 13, 2021
Copy link
Collaborator

@s-good s-good left a comment

Choose a reason for hiding this comment

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

I have tested the changes and can confirm that the code runs much faster than previously. The results that are output look as expected.

Revert the change made to ostia_seaice_obs.yaml. I did this because
this file is the only example of orcamodelHofX.x at the moment.

I moved the test data to a new yaml file. We cannot add a test for this
until atlas is updated to the latest version in jopa-bundle.
@twsearle twsearle merged commit 5642988 into develop Dec 20, 2021
@twsearle twsearle deleted the fix/speedup-obsfunctionspace-construction branch March 15, 2022 11:45
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