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

a quick fix for Issue:A indexing out of bounds issue shown in the global_4denvar regr… #681

Merged
21 changes: 0 additions & 21 deletions src/gsi/setuprad.f90
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
logical in_curbin, in_anybin, save_jacobian
logical account_for_corr_obs
logical,dimension(nobs):: zero_irjaco3_pole
logical abi2km ! use 2km abi data (not CSR/ASR)

! Declare local arrays

Expand Down Expand Up @@ -410,7 +409,6 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
real(r_kind) :: clw_guess,clw_guess_retrieval,ciw_guess,rain_guess,snow_guess,clw_avg
real(r_kind),dimension(:), allocatable :: rsqrtinv
real(r_kind),dimension(:), allocatable :: rinvdiag
real(r_kind),dimension(nchanl) :: abi2km_bc

!for GMI (dual scan angles)
real(r_kind),dimension(nchanl):: emissivity2,ts2, emissivity_k2,tsim2
Expand Down Expand Up @@ -529,7 +527,6 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
atms = obstype == 'atms'
saphir = obstype == 'saphir'
abi = obstype == 'abi'
abi2km = .false.

ssmis=ssmis_las.or.ssmis_uas.or.ssmis_img.or.ssmis_env.or.ssmis

Expand Down Expand Up @@ -1102,13 +1099,6 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
endif

predbias=zero
if (abi2km .and. regional) then
abi2km_bc = zero
abi2km_bc(2) = 233.5_r_kind
abi2km_bc(3) = 241.7_r_kind
abi2km_bc(4) = 250.5_r_kind
end if

!$omp parallel do schedule(dynamic,1) private(i,mm,j,k,tlap,node,bias)
do i=1,nchanl
mm=ich(i)
Expand Down Expand Up @@ -1187,17 +1177,6 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
end do
end if

if (abi2km .and. regional) then
pred(:,i) = zero
if (i>=2 .and. i<=4) then
if (tb_obs(i) > 190.0_r_kind .and. tb_obs(i) < 300.0_r_kind) then
pred(1,i)=1.0_r_kind
pred(2,i)=tb_obs(i)-abi2km_bc(i)
pred(3,i)=(tb_obs(i)-abi2km_bc(i))**2
pred(4,i)=(tb_obs(i)-abi2km_bc(i))**3
end if
end if
end if

do j = 1,npred
predbias(j,i) = predchan(j,i)*pred(j,i)
Expand Down