Skip to content

Commit

Permalink
Clean up after merging, removed unnecessary changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraDraper-NOAA committed Jan 3, 2024
1 parent e920028 commit 5d053ac
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 291 deletions.
245 changes: 0 additions & 245 deletions regression_var.sh

This file was deleted.

8 changes: 4 additions & 4 deletions src/enkf/gridio_gfs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
if (slc1_ind > 0) then
call read_vardata(dset_sfc, 'soill1', values_2d, errcode=iret)
if (iret /= 0) then
print *,'error reading slc1'
print *,'error reading soill1'
call stop2(22)
endif
ug = reshape(values_2d,(/nlons*nlats/))
Expand All @@ -1215,7 +1215,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
if (slc2_ind > 0) then
call read_vardata(dset_sfc, 'soill2', values_2d, errcode=iret)
if (iret /= 0) then
print *,'error reading slc2'
print *,'error reading soill2'
call stop2(22)
endif
ug = reshape(values_2d,(/nlons*nlats/))
Expand All @@ -1224,7 +1224,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
if (slc3_ind > 0) then
call read_vardata(dset_sfc, 'soill3', values_2d, errcode=iret)
if (iret /= 0) then
print *,'error reading slc3'
print *,'error reading soill3'
call stop2(22)
endif
ug = reshape(values_2d,(/nlons*nlats/))
Expand All @@ -1233,7 +1233,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
if (slc4_ind > 0) then
call read_vardata(dset_sfc, 'soill4', values_2d, errcode=iret)
if (iret /= 0) then
print *,'error reading slc4'
print *,'error reading soill4'
call stop2(22)
endif
ug = reshape(values_2d,(/nlons*nlats/))
Expand Down
22 changes: 11 additions & 11 deletions src/enkf/inflation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -234,30 +234,30 @@ subroutine inflate_ens()
call mpi_allreduce(mpi_in_place,covinfglobal(1,nn),npts,mpi_real4,mpi_sum,mpi_comm_world,ierr)
enddo
! do not apply smoothing to soil temp. or soil moisture (not globally defined)

ind = 0
do i = 1,8
this_ind = getindex(cvars2d, vars2d_landonly(i))
if (this_ind>0) then
if (this_ind>0) then
ind=ind+1
soil_index(ind)=this_ind
endif
enddo

if (ind>0) then
allocate(store_presmooth(npts,ind))
do i = 1, ind
store_presmooth(:,i) = covinfglobal(:,clevels(nc3d)+soil_index(i))
enddo
if (ind>0) then
allocate(store_presmooth(npts,ind))
do i = 1, ind
store_presmooth(:,i) = covinfglobal(:,clevels(nc3d)+soil_index(i))
enddo
endif

call smooth(covinfglobal)

if (ind>0) then
do i = 1, ind
if (ind>0) then
do i = 1, ind
covinfglobal(:,clevels(nc3d) + soil_index(i)) = store_presmooth(:,i)
enddo
deallocate(store_presmooth)
enddo
deallocate(store_presmooth)
endif

where (covinfglobal < covinflatemin) covinfglobal = covinflatemin
Expand Down
20 changes: 10 additions & 10 deletions src/enkf/innovstats.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ subroutine print_innovstats(obfit,obsprd)
do nob=1,nobs_conv+nobs_oz
if(oberrvar(nob) < 1.e10_r_single)then
if (obtype(nob)(1:3) == ' ps') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumps_nh,biasps_nh,sumps_spread_nh,sumps_oberr_nh,nobsps_nh,&
sumps_sh,biasps_sh,sumps_spread_sh,sumps_oberr_sh,nobsps_sh,&
sumps_tr,biasps_tr,sumps_spread_tr,sumps_oberr_tr,nobsps_tr)
else if (obtype(nob)(1:3) == ' t' .and. stattype(nob) /= 121) then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumt_nh,biast_nh,sumt_spread_nh,sumt_oberr_nh,nobst_nh,&
sumt_sh,biast_sh,sumt_spread_sh,sumt_oberr_sh,nobst_sh,&
Expand All @@ -146,31 +146,31 @@ subroutine print_innovstats(obfit,obsprd)
! ((stattype(nob) >= 280 .and. stattype(nob) <= 282) .or. &
! (stattype(nob) >= 220 .and. stattype(nob) <= 221) .or. &
! (stattype(nob) >= 230 .and. stattype(nob) <= 235) ) then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumwnd_nh,biaswnd_nh,sumwnd_spread_nh,sumwnd_oberr_nh,nobswnd_nh,&
sumwnd_sh,biaswnd_sh,sumwnd_spread_sh,sumwnd_oberr_sh,nobswnd_sh,&
sumwnd_tr,biaswnd_tr,sumwnd_spread_tr,sumwnd_oberr_tr,nobswnd_tr)
else if (obtype(nob)(1:3) == ' q') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumq_nh,biasq_nh,sumq_spread_nh,sumq_oberr_nh,nobsq_nh,&
sumq_sh,biasq_sh,sumq_spread_sh,sumq_oberr_sh,nobsq_sh,&
sumq_tr,biasq_tr,sumq_spread_tr,sumq_oberr_tr,nobsq_tr)
else if (obtype(nob)(1:3) == 'spd') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumspd_nh,biasspd_nh,sumspd_spread_nh,sumspd_oberr_nh,nobsspd_nh,&
sumspd_sh,biasspd_sh,sumspd_spread_sh,sumspd_oberr_sh,nobsspd_sh,&
sumspd_tr,biasspd_tr,sumspd_spread_tr,sumspd_oberr_tr,nobsspd_tr)
else if (obtype(nob)(1:3) == 'gps') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumgps_nh,biasgps_nh,sumgps_spread_nh,sumgps_oberr_nh,nobsgps_nh,&
sumgps_sh,biasgps_sh,sumgps_spread_sh,sumgps_oberr_sh,nobsgps_sh,&
sumgps_tr,biasgps_tr,sumgps_spread_tr,sumgps_oberr_tr,nobsgps_tr)
else if (obtype(nob)(1:3) == 'dbz') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumdbz_nh,biasdbz_nh,sumdbz_spread_nh,sumdbz_oberr_nh,nobsdbz_nh,&
sumdbz_sh,biasdbz_sh,sumdbz_spread_sh,sumdbz_oberr_sh,nobsdbz_sh,&
Expand All @@ -182,19 +182,19 @@ subroutine print_innovstats(obfit,obsprd)
sumfed_sh,biasfed_sh,sumfed_spread_sh,sumfed_oberr_sh,nobsfed_sh,&
sumfed_tr,biasfed_tr,sumfed_spread_tr,sumfed_oberr_tr,nobsfed_tr)
else if (obtype(nob)(1:3) == ' rw') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumrw_nh,biasrw_nh,sumrw_spread_nh,sumrw_oberr_nh,nobsrw_nh,&
sumrw_sh,biasrw_sh,sumrw_spread_sh,sumrw_oberr_sh,nobsrw_sh,&
sumrw_tr,biasrw_tr,sumrw_spread_tr,sumrw_oberr_tr,nobsrw_tr)
else if (obtype(nob)(1:3) == ' pw') then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumpw_nh,biaspw_nh,sumpw_spread_nh,sumpw_oberr_nh,nobspw_nh,&
sumpw_sh,biaspw_sh,sumpw_spread_sh,sumpw_oberr_sh,nobspw_sh,&
sumpw_tr,biaspw_tr,sumpw_spread_tr,sumpw_oberr_tr,nobspw_tr)
else if (nob > nobs_conv) then
call obstats(obfit(nob),oberrvar(nob),&
call obstats(obfit(nob),oberrvar_orig(nob),&
obsprd(nob),obloclat(nob),&
sumoz_nh,biasoz_nh,sumoz_spread_nh,sumoz_oberr_nh,nobsoz_nh,&
sumoz_sh,biasoz_sh,sumoz_spread_sh,sumoz_oberr_sh,nobsoz_sh,&
Expand Down
Loading

0 comments on commit 5d053ac

Please sign in to comment.