Skip to content

Conversation

@mlee03
Copy link
Contributor

@mlee03 mlee03 commented Sep 19, 2025

Description
This PR adds support for conservative horizontal interpolation in time_interp_external_mod. Users can now pass in the horiz_interp_type interp with interp%interp_method = CONSERVE in order to remap the external data to the model grid before time interpolation.

Code change explanation:
Horiz_interp_conserve methods do not accept mask arrays for data interpolation. (Users are expected to pass in the mask arrays during weight generation). Thus, (1) mask arguments were removed in call horiz_interp in the load_record subroutine and (2) a warning message has been added to warn users to check if the interp derived type correspond to the interpolation region.

Fixes #1770

How Has This Been Tested?
Make check passes with GCC on the AMDbox

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

@mlee03
Copy link
Contributor Author

mlee03 commented Sep 19, 2025

It's a draft. The new unit test doesn't pass yet.

@mlee03 mlee03 marked this pull request as ready for review September 22, 2025 14:38
@mlee03
Copy link
Contributor Author

mlee03 commented Sep 22, 2025

@uramirez, ready for review!

@vithikashah001 vithikashah001 merged commit 0ba4c6c into NOAA-GFDL:main Sep 22, 2025
27 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.

Add conservative interpotation option to time_interp_external

4 participants