Skip to content

Commit

Permalink
Merge branch 'dev/gfdl' into fix-param-test
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallward committed Oct 28, 2022
2 parents fe35285 + b525932 commit 3e2da9a
Show file tree
Hide file tree
Showing 8 changed files with 1,202 additions and 1,123 deletions.
8 changes: 4 additions & 4 deletions src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module MOM_ALE
use MOM_debugging, only : check_column_integrals
use MOM_diag_mediator, only : register_diag_field, post_data, diag_ctrl
use MOM_diag_mediator, only : time_type, diag_update_remap_grids, query_averaging_enabled
use MOM_diag_vkernels, only : interpolate_column, reintegrate_column
use MOM_domains, only : create_group_pass, do_group_pass, group_pass_type
use MOM_error_handler, only : MOM_error, FATAL, WARNING
use MOM_error_handler, only : callTree_showQuery
Expand All @@ -40,6 +39,7 @@ module MOM_ALE
use MOM_remapping, only : initialize_remapping, end_remapping
use MOM_remapping, only : remapping_core_h, remapping_core_w
use MOM_remapping, only : remappingSchemesDoc, remappingDefaultScheme
use MOM_remapping, only : interpolate_column, reintegrate_column
use MOM_remapping, only : remapping_CS, dzFromH1H2
use MOM_string_functions, only : uppercase, extractWord, extract_integer
use MOM_tracer_registry, only : tracer_registry_type, tracer_type, MOM_tracer_chkinv
Expand Down Expand Up @@ -536,15 +536,15 @@ subroutine ALE_offline_inputs(CS, G, GV, h, tv, Reg, uhtr, vhtr, Kd, debug, OBC)
if (G%mask2dCu(i,j)>0.) then
h_src(:) = 0.5 * (h(i,j,:) + h(i+1,j,:))
h_dest(:) = 0.5 * (h_new(i,j,:) + h_new(i+1,j,:))
call reintegrate_column(nk, h_src, uhtr(I,j,:), nk, h_dest, 0., temp_vec)
call reintegrate_column(nk, h_src, uhtr(I,j,:), nk, h_dest, temp_vec)
uhtr(I,j,:) = temp_vec
endif
enddo ; enddo
do j=G%jscB,G%jecB ; do i=isc,iec
if (G%mask2dCv(i,j)>0.) then
h_src(:) = 0.5 * (h(i,j,:) + h(i,j+1,:))
h_dest(:) = 0.5 * (h_new(i,j,:) + h_new(i,j+1,:))
call reintegrate_column(nk, h_src, vhtr(I,j,:), nk, h_dest, 0., temp_vec)
call reintegrate_column(nk, h_src, vhtr(I,j,:), nk, h_dest, temp_vec)
vhtr(I,j,:) = temp_vec
endif
enddo ; enddo
Expand All @@ -554,7 +554,7 @@ subroutine ALE_offline_inputs(CS, G, GV, h, tv, Reg, uhtr, vhtr, Kd, debug, OBC)
if (check_column_integrals(nk, h_src, nk, h_dest)) then
call MOM_error(FATAL, "ALE_offline_inputs: Kd interpolation columns do not match")
endif
call interpolate_column(nk, h(i,j,:), Kd(i,j,:), nk, h_new(i,j,:), 0., Kd(i,j,:))
call interpolate_column(nk, h(i,j,:), Kd(i,j,:), nk, h_new(i,j,:), Kd(i,j,:))
endif
enddo ; enddo

Expand Down
1,286 changes: 540 additions & 746 deletions src/ALE/MOM_remapping.F90

Large diffs are not rendered by default.

648 changes: 648 additions & 0 deletions src/ALE/remapping_attic.F90

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/core/MOM_unit_tests.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module MOM_unit_tests
use MOM_string_functions, only : string_functions_unit_tests
use MOM_remapping, only : remapping_unit_tests
use MOM_neutral_diffusion, only : neutral_diffusion_unit_tests
use MOM_diag_vkernels, only : diag_vkernels_unit_tests
use MOM_random, only : random_unit_tests
use MOM_lateral_boundary_diffusion, only : near_boundary_unit_tests
use MOM_CFC_cap, only : CFC_cap_unit_tests
Expand All @@ -35,8 +34,6 @@ subroutine unit_tests(verbosity)
"MOM_unit_tests: remapping_unit_tests FAILED")
if (neutral_diffusion_unit_tests(verbose)) call MOM_error(FATAL, &
"MOM_unit_tests: neutralDiffusionUnitTests FAILED")
if (diag_vkernels_unit_tests(verbose)) call MOM_error(FATAL, &
"MOM_unit_tests: diag_vkernels_unit_tests FAILED")
if (random_unit_tests(verbose)) call MOM_error(FATAL, &
"MOM_unit_tests: random_unit_tests FAILED")
if (near_boundary_unit_tests(verbose)) call MOM_error(FATAL, &
Expand Down
17 changes: 8 additions & 9 deletions src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ module MOM_diag_remap
use MOM_error_handler, only : MOM_error, FATAL, assert, WARNING
use MOM_debugging, only : check_column_integrals
use MOM_diag_manager_infra,only : MOM_diag_axis_init
use MOM_diag_vkernels, only : interpolate_column, reintegrate_column
use MOM_file_parser, only : get_param, log_param, param_file_type
use MOM_string_functions, only : lowercase, extractWord
use MOM_grid, only : ocean_grid_type
use MOM_unit_scaling, only : unit_scale_type
use MOM_verticalGrid, only : verticalGrid_type
use MOM_EOS, only : EOS_type
use MOM_remapping, only : remapping_CS, initialize_remapping
use MOM_remapping, only : remapping_core_h
use MOM_remapping, only : remapping_CS, initialize_remapping, remapping_core_h
use MOM_remapping, only : interpolate_column, reintegrate_column
use MOM_regridding, only : regridding_CS, initialize_regridding
use MOM_regridding, only : end_regridding
use MOM_regridding, only : set_regrid_params, get_regrid_size
Expand Down Expand Up @@ -528,7 +527,7 @@ subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, staggered
h_src(:) = 0.5 * (h(i_lo,j,:) + h(i_hi,j,:))
h_dest(:) = 0.5 * (h_target(i_lo,j,:) + h_target(i_hi,j,:))
call reintegrate_column(nz_src, h_src, field(I1,j,:), &
nz_dest, h_dest, 0., reintegrated_field(I1,j,:))
nz_dest, h_dest, reintegrated_field(I1,j,:))
enddo
enddo
elseif (staggered_in_y .and. .not. staggered_in_x) then
Expand All @@ -543,7 +542,7 @@ subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, staggered
h_src(:) = 0.5 * (h(i,j_lo,:) + h(i,j_hi,:))
h_dest(:) = 0.5 * (h_target(i,j_lo,:) + h_target(i,j_hi,:))
call reintegrate_column(nz_src, h_src, field(i,J1,:), &
nz_dest, h_dest, 0., reintegrated_field(i,J1,:))
nz_dest, h_dest, reintegrated_field(i,J1,:))
enddo
enddo
elseif ((.not. staggered_in_x) .and. (.not. staggered_in_y)) then
Expand All @@ -556,7 +555,7 @@ subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, staggered
h_src(:) = h(i,j,:)
h_dest(:) = h_target(i,j,:)
call reintegrate_column(nz_src, h_src, field(i,j,:), &
nz_dest, h_dest, 0., reintegrated_field(i,j,:))
nz_dest, h_dest, reintegrated_field(i,j,:))
enddo
enddo
else
Expand Down Expand Up @@ -609,7 +608,7 @@ subroutine vertically_interpolate_diag_field(remap_cs, G, h, staggered_in_x, sta
h_src(:) = 0.5 * (h(i_lo,j,:) + h(i_hi,j,:))
h_dest(:) = 0.5 * (remap_cs%h(i_lo,j,:) + remap_cs%h(i_hi,j,:))
call interpolate_column(nz_src, h_src, field(I1,j,:), &
nz_dest, h_dest, 0., interpolated_field(I1,j,:))
nz_dest, h_dest, interpolated_field(I1,j,:))
enddo
enddo
elseif (staggered_in_y .and. .not. staggered_in_x) then
Expand All @@ -624,7 +623,7 @@ subroutine vertically_interpolate_diag_field(remap_cs, G, h, staggered_in_x, sta
h_src(:) = 0.5 * (h(i,j_lo,:) + h(i,j_hi,:))
h_dest(:) = 0.5 * (remap_cs%h(i,j_lo,:) + remap_cs%h(i,j_hi,:))
call interpolate_column(nz_src, h_src, field(i,J1,:), &
nz_dest, h_dest, 0., interpolated_field(i,J1,:))
nz_dest, h_dest, interpolated_field(i,J1,:))
enddo
enddo
elseif ((.not. staggered_in_x) .and. (.not. staggered_in_y)) then
Expand All @@ -637,7 +636,7 @@ subroutine vertically_interpolate_diag_field(remap_cs, G, h, staggered_in_x, sta
h_src(:) = h(i,j,:)
h_dest(:) = remap_cs%h(i,j,:)
call interpolate_column(nz_src, h_src, field(i,j,:), &
nz_dest, h_dest, 0., interpolated_field(i,j,:))
nz_dest, h_dest, interpolated_field(i,j,:))
enddo
enddo
else
Expand Down
Loading

0 comments on commit 3e2da9a

Please sign in to comment.