Skip to content

Commit

Permalink
Ref #125 (#126)
Browse files Browse the repository at this point in the history
Correct missing count value to 0 not rmiss (-999.0).
  • Loading branch information
EdwardSafford-NOAA authored Mar 18, 2024
1 parent d1ce96a commit 88a1401
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ program gatime
tot_cnt = tot_cnt + cnt(ftyp,cyc,j,k)
end do

chi(ftyp,j,k) = (tot_pen/tot_cnt)
if( tot_cnt > 0.0 ) then
chi(ftyp,j,k) = (tot_pen/tot_cnt)
else
chi(ftyp,j,k) = rmiss
end if
end do
end do
end do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
amsua_n18 amsua_n19 atms_npp hirs4_n19 amsua_metop-b iasi_metop-b mhs_metop-b mhs_n19
amsua_n15 amsua_n18 amsua_n19 atms_npp hirs4_n19 amsua_metop-b iasi_metop-b mhs_metop-b mhs_n19

Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ program bcoef

! If observation was assimilated, accumulate sum
if (data_chan(j)%errinv > 1.e-6) then
! pen = data_chan(j)%errinv*(data_chan(j)%omgbc)**2
pen = (data_chan(j)%errinv*(data_chan(j)%omgbc))**2
count(j) = count(j) + 1.0
penalty(j) = penalty(j) + pen
Expand All @@ -238,7 +237,7 @@ program bcoef
if (count(j)>0) then
penalty(j)=penalty(j)/count(j)
else
count(j)=rmiss
count(j)=0.0
penalty(j)=rmiss
endif
end do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ program bcor
if (count(j,k)>0) then
penalty(j,k)=penalty(j,k)/count(j,k)
else
count(j,k)=rmiss
count(j,k) = 0.0
penalty(j,k)=rmiss
endif
end do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ program time
endif

else
count(j,k)=rmiss
count(j,k)=0.0
penalty(j,k)=rmiss
endif

Expand Down

0 comments on commit 88a1401

Please sign in to comment.