From 2d94c14e562481f5a40192444494f7be24bb55d7 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Mon, 3 Jun 2024 15:35:43 -0400 Subject: [PATCH] undo time_interp changes, and change bicubic CPP name to be more accurate --- horiz_interp/include/horiz_interp.inc | 4 ++-- horiz_interp/include/horiz_interp_bicubic.inc | 8 +++----- horiz_interp/include/horiz_interp_bicubic_r4.fh | 4 ++-- horiz_interp/include/horiz_interp_bicubic_r8.fh | 4 ++-- time_interp/include/time_interp_external2.inc | 4 ++-- time_interp/include/time_interp_external2_bridge.inc | 4 ++-- time_interp/time_interp_external2.F90 | 2 +- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/horiz_interp/include/horiz_interp.inc b/horiz_interp/include/horiz_interp.inc index cea04a0c70..ec0540b442 100644 --- a/horiz_interp/include/horiz_interp.inc +++ b/horiz_interp/include/horiz_interp.inc @@ -429,7 +429,7 @@ mask_in, mask_out, missing_value, missing_permit, & err_msg, new_missing_handle ) !----------------------------------------------------------------------- - type (horiz_interp_type), intent(inout) :: Interp + type (horiz_interp_type), intent(in) :: Interp real(FMS_HI_KIND_), intent(in), dimension(:,:) :: data_in real(FMS_HI_KIND_), intent(out), dimension(:,:) :: data_out integer, intent(in), optional :: verbose @@ -477,7 +477,7 @@ ! uses 3d arrays for data and mask ! this allows for multiple interpolations with one call !----------------------------------------------------------------------- - type (horiz_interp_type), intent(inout) :: Interp + type (horiz_interp_type), intent(in) :: Interp real(FMS_HI_KIND_), intent(in), dimension(:,:,:) :: data_in real(FMS_HI_KIND_), intent(out), dimension(:,:,:) :: data_out integer, intent(in), optional :: verbose diff --git a/horiz_interp/include/horiz_interp_bicubic.inc b/horiz_interp/include/horiz_interp_bicubic.inc index edb9c8f063..e4f180c657 100644 --- a/horiz_interp/include/horiz_interp_bicubic.inc +++ b/horiz_interp/include/horiz_interp_bicubic.inc @@ -351,9 +351,9 @@ end subroutine HORIZ_INTERP_BICUBIC_NEW_1D_ !> @brief Perform bicubic horizontal interpolation - subroutine HORIZ_INTERP_BICUBIC_NEW_( Interp, data_in, data_out, verbose, mask_in, mask_out, missing_value, & + subroutine HORIZ_INTERP_BICUBIC_( Interp, data_in, data_out, verbose, mask_in, mask_out, missing_value, & & missing_permit) - type (horiz_interp_type), intent(inout) :: Interp + type (horiz_interp_type), intent(in) :: Interp real(FMS_HI_KIND_), intent(in), dimension(:,:) :: data_in real(FMS_HI_KIND_), intent(out), dimension(:,:) :: data_out integer, intent(in), optional :: verbose @@ -430,10 +430,8 @@ !! dff_y(i,j) = val2 enddo enddo - Interp% HI_KIND_TYPE_ % is_allocated = .true. - Interp%interp_method = BICUBIC return - end subroutine HORIZ_INTERP_BICUBIC_NEW_ + end subroutine HORIZ_INTERP_BICUBIC_ !--------------------------------------------------------------------------- diff --git a/horiz_interp/include/horiz_interp_bicubic_r4.fh b/horiz_interp/include/horiz_interp_bicubic_r4.fh index 1d3b148480..bc9c0037d7 100644 --- a/horiz_interp/include/horiz_interp_bicubic_r4.fh +++ b/horiz_interp/include/horiz_interp_bicubic_r4.fh @@ -30,8 +30,8 @@ #undef HORIZ_INTERP_BICUBIC_NEW_1D_ #define HORIZ_INTERP_BICUBIC_NEW_1D_ horiz_interp_bicubic_new_1d_r4 -#undef HORIZ_INTERP_BICUBIC_NEW_ -#define HORIZ_INTERP_BICUBIC_NEW_ horiz_interp_bicubic_r4 +#undef HORIZ_INTERP_BICUBIC_ +#define HORIZ_INTERP_BICUBIC_ horiz_interp_bicubic_r4 #undef BCUINT_ #define BCUINT_ bcuint_r4 diff --git a/horiz_interp/include/horiz_interp_bicubic_r8.fh b/horiz_interp/include/horiz_interp_bicubic_r8.fh index d269767726..e37a234bf5 100644 --- a/horiz_interp/include/horiz_interp_bicubic_r8.fh +++ b/horiz_interp/include/horiz_interp_bicubic_r8.fh @@ -30,8 +30,8 @@ #undef HORIZ_INTERP_BICUBIC_NEW_1D_ #define HORIZ_INTERP_BICUBIC_NEW_1D_ horiz_interp_bicubic_new_1d_r8 -#undef HORIZ_INTERP_BICUBIC_NEW_ -#define HORIZ_INTERP_BICUBIC_NEW_ horiz_interp_bicubic_r8 +#undef HORIZ_INTERP_BICUBIC_ +#define HORIZ_INTERP_BICUBIC_ horiz_interp_bicubic_r8 #undef BCUINT_ #define BCUINT_ bcuint_r8 diff --git a/time_interp/include/time_interp_external2.inc b/time_interp/include/time_interp_external2.inc index dd59b5c0b6..863941df1d 100644 --- a/time_interp/include/time_interp_external2.inc +++ b/time_interp/include/time_interp_external2.inc @@ -29,7 +29,7 @@ real(FMS_TI_KIND_), dimension(:,:), intent(inout) :: data_in integer, intent(in), optional :: interp logical, intent(in), optional :: verbose - type(horiz_interp_type),intent(inout), optional :: horz_interp + type(horiz_interp_type),intent(in), optional :: horz_interp logical, dimension(:,:), intent(out), optional :: mask_out !< set to true where output data is valid integer, intent(in), optional :: is_in, ie_in, js_in, je_in integer, intent(in), optional :: window_id @@ -61,7 +61,7 @@ real(FMS_TI_KIND_), dimension(:,:,:), intent(inout) :: time_data !< global or local data array integer, intent(in), optional :: interp logical, intent(in), optional :: verbose !< flag for debugging - type(horiz_interp_type), intent(inout), optional :: horz_interp + type(horiz_interp_type), intent(in), optional :: horz_interp logical, dimension(:,:,:), intent(out), optional :: mask_out !< set to true where output data is valid integer, intent(in), optional :: is_in, ie_in, js_in, je_in integer, intent(in), optional :: window_id diff --git a/time_interp/include/time_interp_external2_bridge.inc b/time_interp/include/time_interp_external2_bridge.inc index 53d020ef4a..e550b42296 100644 --- a/time_interp/include/time_interp_external2_bridge.inc +++ b/time_interp/include/time_interp_external2_bridge.inc @@ -30,7 +30,7 @@ real(FMS_TI_KIND_), dimension(:,:), intent(inout) :: data_in !< global or local data array integer, intent(in), optional :: interp !< hardcoded to linear logical, intent(in), optional :: verbose !< flag for debugging - type(horiz_interp_type),intent(inout), optional :: horz_interp !< horizontal interpolation type + type(horiz_interp_type),intent(in), optional :: horz_interp !< horizontal interpolation type logical, dimension(:,:), intent(out), optional :: mask_out !< set to true where output data is valid integer, intent(in), optional :: is_in, ie_in, js_in, je_in !< horizontal indices for load_record integer, intent(in), optional :: window_id !< harcoded to 1 in load_record @@ -60,7 +60,7 @@ real(FMS_TI_KIND_), dimension(:,:,:), intent(inout) :: time_data !< global or local data array integer, intent(in), optional :: interp !< hardcoded to linear logical, intent(in), optional :: verbose !< flag for debugging - type(horiz_interp_type), intent(inout), optional :: horz_interp !< horizontal interpolation type + type(horiz_interp_type), intent(in), optional :: horz_interp !< horizontal interpolation type logical, dimension(:,:,:), intent(out), optional :: mask_out !< set to true where output data is valid integer, intent(in), optional :: is_in, ie_in !< x horizontal indices for load_record integer, intent(in), optional :: js_in, je_in !< y horizontal indices for load_record diff --git a/time_interp/time_interp_external2.F90 b/time_interp/time_interp_external2.F90 index 598305f814..02fad81f4b 100644 --- a/time_interp/time_interp_external2.F90 +++ b/time_interp/time_interp_external2.F90 @@ -753,7 +753,7 @@ end subroutine set_time_modulo subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id_in) type(ext_fieldtype), intent(inout) :: field integer , intent(in) :: rec ! record number - type(horiz_interp_type), intent(inout), optional :: interp + type(horiz_interp_type), intent(in), optional :: interp integer, intent(in), optional :: is_in, ie_in, js_in, je_in integer, intent(in), optional :: window_id_in