Skip to content

Commit

Permalink
Change indexing src/topography.f90
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Kiss <[email protected]>
  • Loading branch information
ezhilsabareesh8 and aekiss authored Nov 1, 2024
1 parent 3fcc49d commit 54b88a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/topography.f90
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,12 @@ subroutine topography_cut_off_T_cells(this, hgrid, cutoff)
call handle_error(nf90_close(ncid_hgrid))

! Calculate T cell size based on dy
! For each point, the T cell size is a sum of dy(2*i-1, 2*j) and dy(2*i, 2*j)
! For each point, the T cell size is a sum of dy(2*j-1, 2*i) and dy(2*j, 2*i)
! Apply cutoff to depth based on the provided T-cell cutoff value in kilometers
do i = 1, ny_len / 2
do j = 1, (nxp_len - 1) / 2
if (dy(2 * i - 1, 2 * j) + dy(2 * i, 2 * j) < cutoff*1000.0_real64) then !Input cutoff in Kilometers covert it to meters
this%depth(i, j) = MISSING_VALUE ! Set values below cutoff to zero or another value as needed
do j = 1, ny_len / 2
do i = 1, (nxp_len - 1) / 2
if (dy(2 * j - 1, 2 * i) + dy(2 * j, 2 * i) < cutoff*1000.0_real64) then !Input cutoff in Kilometers convert it to meters
this%depth(j, i) = MISSING_VALUE ! Set values below cutoff to zero or another value as needed
end if
end do
end do
Expand Down

0 comments on commit 54b88a9

Please sign in to comment.