Skip to content

Commit

Permalink
Merge branch 'develop' into feature/new_ip
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Dec 7, 2022
2 parents 36b5592 + 2c88329 commit a50b3c3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,15 @@ subroutine calc_gsl_oro_data_lg_scale(tile_num,res_indx,halo)
nu = 0
nd = 0
do jj = 1,jj_m
do ii = 1,ii_m/2 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
if(mod(ii_m,2).eq.0.) then
do ii = 1,ii_m/2 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
else
do ii = 1,ii_m/2+1 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
endif
do ii = ii_m/2 + 1, ii_m ! right half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end do
Expand All @@ -628,11 +634,19 @@ subroutine calc_gsl_oro_data_lg_scale(tile_num,res_indx,halo)
! OA2 -- orographic asymmetry in South direction
nu = 0
nd = 0
do jj = 1,jj_m/2 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
if(mod(jj_m,2).eq.0.) then
do jj = 1,jj_m/2 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
else
do jj = 1,jj_m/2+1 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
endif
do jj = jj_m/2 + 1,jj_m ! top half of box
do ii = 1, ii_m
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
Expand All @@ -651,10 +665,12 @@ subroutine calc_gsl_oro_data_lg_scale(tile_num,res_indx,halo)
ratio = real(jj_m,real_kind)/real(ii_m,real_kind)
do jj = 1,jj_m
do ii = 1,ii_m
if ( nint(real(ii,real_kind)*ratio) < (jj_m - jj) ) then
if ( nint(real(ii,real_kind)*ratio) <= (jj_m - jj + 1) ) then
! south-west half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
else ! north-east half of box
endif
if ( nint(real(ii,real_kind)*ratio) >= (jj_m - jj + 1) ) then
! north-east half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end if
end do
Expand All @@ -672,10 +688,12 @@ subroutine calc_gsl_oro_data_lg_scale(tile_num,res_indx,halo)
ratio = real(jj_m,real_kind)/real(ii_m,real_kind)
do jj = 1,jj_m
do ii = 1,ii_m
if ( nint(real(ii,real_kind)*ratio) < jj ) then
if ( nint(real(ii,real_kind)*ratio) <= jj ) then
! north-west half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
else ! south-east half of box
end if
if ( nint(real(ii,real_kind)*ratio) >= jj ) then
! south-east half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end if
end do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,15 @@ subroutine calc_gsl_oro_data_sm_scale(tile_num,res_indx,halo, &
nu = 0
nd = 0
do jj = 1,jj_m
do ii = 1,ii_m/2 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
if(mod(ii_m,2).eq.0.) then
do ii = 1,ii_m/2 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
else
do ii = 1,ii_m/2+1 ! left half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
endif
do ii = ii_m/2 + 1, ii_m ! right half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end do
Expand All @@ -575,11 +581,19 @@ subroutine calc_gsl_oro_data_sm_scale(tile_num,res_indx,halo, &
! OA2 -- orographic asymmetry in South direction
nu = 0
nd = 0
do jj = 1,jj_m/2 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
if(mod(jj_m,2).eq.0.) then
do jj = 1,jj_m/2 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
else
do jj = 1,jj_m/2+1 ! bottom half of box
do ii = 1,ii_m
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
end do
end do
endif
do jj = jj_m/2 + 1,jj_m ! top half of box
do ii = 1, ii_m
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
Expand All @@ -598,10 +612,12 @@ subroutine calc_gsl_oro_data_sm_scale(tile_num,res_indx,halo, &
ratio = real(jj_m,real_kind)/real(ii_m,real_kind)
do jj = 1,jj_m
do ii = 1,ii_m
if ( nint(real(ii,real_kind)*ratio) < (jj_m - jj) ) then
if ( nint(real(ii,real_kind)*ratio) <= (jj_m - jj + 1) ) then
! south-west half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
else ! north-east half of box
endif
if ( nint(real(ii,real_kind)*ratio) >= (jj_m - jj + 1) ) then
! north-east half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end if
end do
Expand All @@ -619,10 +635,12 @@ subroutine calc_gsl_oro_data_sm_scale(tile_num,res_indx,halo, &
ratio = real(jj_m,real_kind)/real(ii_m,real_kind)
do jj = 1,jj_m
do ii = 1,ii_m
if ( nint(real(ii,real_kind)*ratio) < jj ) then
if ( nint(real(ii,real_kind)*ratio) <= jj ) then
! north-west half of box
if ( zs(ii,jj) > zs_mean ) nu = nu + 1
else ! south-east half of box
end if
if ( nint(real(ii,real_kind)*ratio) >= jj ) then
! south-east half of box
if ( zs(ii,jj) > zs_mean ) nd = nd + 1
end if
end do
Expand Down

0 comments on commit a50b3c3

Please sign in to comment.