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

Two small tweaks to thinning #734

Merged
merged 9 commits into from
Apr 18, 2024
5 changes: 0 additions & 5 deletions src/gsi/read_atms.f90
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,6 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,&
dlat_earth = dlat_earth*deg2rad
dlon_earth = dlon_earth*deg2rad

! Just use every fifth scan position and scanline (and make sure that we have
! position 48 as we need it for scan bias)
if (5*NINT(REAL(IScan(Iob))/5_r_kind) /= IScan(IOb) .OR. &
5*NINT(REAL(IFov-3)/5_r_kind) /= IFOV -3 ) CYCLE ObsLoop

! Regional case
if(regional)then
call tll2xy(dlon_earth,dlat_earth,dlon,dlat,outside)
Expand Down
11 changes: 8 additions & 3 deletions src/gsi/satthin.F90
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ subroutine makegvals
end subroutine makegvals


subroutine makegrids(rmesh,ithin,n_tbin)
subroutine makegrids(rmesh,ithin,n_tbin,itxmax_in)
!$$$ subprogram documentation block
! . . . .
! subprogram: makegrids
Expand Down Expand Up @@ -386,7 +386,8 @@ subroutine makegrids(rmesh,ithin,n_tbin)

real(r_kind) ,intent(in ) :: rmesh
integer(i_kind),intent(in ) :: ithin
integer(i_kind),intent(in ), optional :: n_tbin
integer(i_kind),intent(in ), optional :: n_tbin
integer(i_kind),intent(in ), optional :: itxmax_in
real(r_kind),parameter:: r360 = 360.0_r_kind
integer(i_kind) i,j
integer(i_kind) mlonx,mlonj
Expand All @@ -402,7 +403,11 @@ subroutine makegrids(rmesh,ithin,n_tbin)
itx_all=0
if(abs(rmesh) <= one .or. ithin <= 0)then
use_all=.true.
itxmax=1e9
if (present(itxmax_in)) then
itxmax = itxmax_in
else
itxmax = 1e7
endif
allocate(icount(itxmax))
allocate(score_crit(itxmax))
do j=1,itxmax
Expand Down
Loading