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

Removes missing_value argument from fns in MOM_diag_remap #1091

Merged
merged 2 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ subroutine post_data_3d(diag_field_id, field, diag_cs, is_static, mask, alt_h)
call vertically_reintegrate_diag_field( &
diag_cs%diag_remap_cs(diag%axes%vertical_coordinate_number), &
diag_cs%G, h_diag, staggered_in_x, staggered_in_y, &
diag%axes%mask3d, diag_cs%missing_value, field, remapped_field)
diag%axes%mask3d, field, remapped_field)
if (id_clock_diag_remap>0) call cpu_clock_end(id_clock_diag_remap)
if (associated(diag%axes%mask3d)) then
! Since 3d masks do not vary in the vertical, just use as much as is
Expand All @@ -1528,7 +1528,7 @@ subroutine post_data_3d(diag_field_id, field, diag_cs, is_static, mask, alt_h)
allocate(remapped_field(size(field,1), size(field,2), diag%axes%nz))
call diag_remap_do_remap(diag_cs%diag_remap_cs(diag%axes%vertical_coordinate_number), &
diag_cs%G, diag_cs%GV, h_diag, staggered_in_x, staggered_in_y, &
diag%axes%mask3d, diag_cs%missing_value, field, remapped_field)
diag%axes%mask3d, field, remapped_field)
if (id_clock_diag_remap>0) call cpu_clock_end(id_clock_diag_remap)
if (associated(diag%axes%mask3d)) then
! Since 3d masks do not vary in the vertical, just use as much as is
Expand All @@ -1552,7 +1552,7 @@ subroutine post_data_3d(diag_field_id, field, diag_cs, is_static, mask, alt_h)
call vertically_interpolate_diag_field(diag_cs%diag_remap_cs( &
diag%axes%vertical_coordinate_number), &
diag_cs%G, h_diag, staggered_in_x, staggered_in_y, &
diag%axes%mask3d, diag_cs%missing_value, field, remapped_field)
diag%axes%mask3d, field, remapped_field)
if (id_clock_diag_remap>0) call cpu_clock_end(id_clock_diag_remap)
if (associated(diag%axes%mask3d)) then
! Since 3d masks do not vary in the vertical, just use as much as is
Expand Down Expand Up @@ -1769,7 +1769,7 @@ subroutine post_xy_average(diag_cs, diag, field)
call horizontally_average_diag_field(diag_cs%G, diag_cs%GV, diag_cs%h, &
staggered_in_x, staggered_in_y, &
diag%axes%is_layer, diag%v_extensive, &
diag_cs%missing_value, field, &
field, &
averaged_field, averaged_mask)
else
nz = size(field, 3)
Expand All @@ -1788,7 +1788,7 @@ subroutine post_xy_average(diag_cs, diag, field)
diag_cs%diag_remap_cs(coord)%h, &
staggered_in_x, staggered_in_y, &
diag%axes%is_layer, diag%v_extensive, &
diag_cs%missing_value, field, &
field, &
averaged_field, averaged_mask)
endif

Expand Down
12 changes: 4 additions & 8 deletions src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,14 @@ end subroutine diag_remap_update

!> Remap diagnostic field to alternative vertical grid.
subroutine diag_remap_do_remap(remap_cs, G, GV, h, staggered_in_x, staggered_in_y, &
mask, missing_value, field, remapped_field)
mask, field, remapped_field)
type(diag_remap_ctrl), intent(in) :: remap_cs !< Diagnostic coodinate control structure
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
type(verticalGrid_type), intent(in) :: GV !< ocean vertical grid structure
real, dimension(:,:,:), intent(in) :: h !< The current thicknesses
logical, intent(in) :: staggered_in_x !< True is the x-axis location is at u or q points
logical, intent(in) :: staggered_in_y !< True is the y-axis location is at v or q points
real, dimension(:,:,:), pointer :: mask !< A mask for the field
real, intent(in) :: missing_value !< A missing_value to assign land/vanished points
real, dimension(:,:,:), intent(in) :: field(:,:,:) !< The diagnostic field to be remapped
real, dimension(:,:,:), intent(inout) :: remapped_field !< Field remapped to new coordinate
! Local variables
Expand Down Expand Up @@ -486,14 +485,13 @@ end subroutine diag_remap_calc_hmask

!> Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.
subroutine vertically_reintegrate_diag_field(remap_cs, G, h, staggered_in_x, staggered_in_y, &
mask, missing_value, field, reintegrated_field)
mask, field, reintegrated_field)
type(diag_remap_ctrl), intent(in) :: remap_cs !< Diagnostic coodinate control structure
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
real, dimension(:,:,:), intent(in) :: h !< The current thicknesses
logical, intent(in) :: staggered_in_x !< True is the x-axis location is at u or q points
logical, intent(in) :: staggered_in_y !< True is the y-axis location is at v or q points
real, dimension(:,:,:), pointer :: mask !< A mask for the field
real, intent(in) :: missing_value !< A missing_value to assign land/vanished points
real, dimension(:,:,:), intent(in) :: field !< The diagnostic field to be remapped
real, dimension(:,:,:), intent(inout) :: reintegrated_field !< Field argument remapped to alternative coordinate
! Local variables
Expand Down Expand Up @@ -567,14 +565,13 @@ end subroutine vertically_reintegrate_diag_field

!> Vertically interpolate diagnostic field to alternative vertical grid.
subroutine vertically_interpolate_diag_field(remap_cs, G, h, staggered_in_x, staggered_in_y, &
mask, missing_value, field, interpolated_field)
mask, field, interpolated_field)
type(diag_remap_ctrl), intent(in) :: remap_cs !< Diagnostic coodinate control structure
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
real, dimension(:,:,:), intent(in) :: h !< The current thicknesses
logical, intent(in) :: staggered_in_x !< True is the x-axis location is at u or q points
logical, intent(in) :: staggered_in_y !< True is the y-axis location is at v or q points
real, dimension(:,:,:), pointer :: mask !< A mask for the field
real, intent(in) :: missing_value !< A missing_value to assign land/vanished points
real, dimension(:,:,:), intent(in) :: field !< The diagnostic field to be remapped
real, dimension(:,:,:), intent(inout) :: interpolated_field !< Field argument remapped to alternative coordinate
! Local variables
Expand Down Expand Up @@ -650,7 +647,7 @@ end subroutine vertically_interpolate_diag_field
!> Horizontally average field
subroutine horizontally_average_diag_field(G, GV, h, staggered_in_x, staggered_in_y, &
is_layer, is_extensive, &
missing_value, field, averaged_field, &
field, averaged_field, &
averaged_mask)
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
type(verticalGrid_type), intent(in) :: GV !< The ocean vertical grid structure
Expand All @@ -659,7 +656,6 @@ subroutine horizontally_average_diag_field(G, GV, h, staggered_in_x, staggered_i
logical, intent(in) :: staggered_in_y !< True if the y-axis location is at v or q points
logical, intent(in) :: is_layer !< True if the z-axis location is at h points
logical, intent(in) :: is_extensive !< True if the z-direction is spatially integrated (over layers)
real, intent(in) :: missing_value !< A missing_value to assign land/vanished points
real, dimension(:,:,:), intent(in) :: field !< The diagnostic field to be remapped
real, dimension(:), intent(inout) :: averaged_field !< Field argument horizontally averaged
logical, dimension(:), intent(inout) :: averaged_mask !< Mask for horizontally averaged field
Expand Down