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

Fix write_incr #559

Merged
merged 23 commits into from
Apr 14, 2023
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b846b29
GitHub Issue NOAA-EMC/GSI#175. Use the global 127L B-Matrix in regio…
jderber-NOAA Aug 13, 2021
05f1c1f
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Sep 30, 2021
059e402
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Oct 15, 2021
f938842
GitHub Issue NOAA-EMC/GSI#219 Improve Minimization and fix bug in vqc
jderber-NOAA Oct 22, 2021
fafadac
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Nov 3, 2021
52c5ae6
fix setupw
jderber-NOAA Nov 5, 2021
f00e377
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Nov 16, 2021
7703367
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Feb 17, 2022
9eb9606
Merge remote-tracking branch 'upstream/master'
jderber-NOAA Feb 23, 2022
3eb0e13
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jun 17, 2022
ddced98
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jun 29, 2022
f60343b
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jul 11, 2022
8dbfbd1
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jul 14, 2022
1554f65
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jul 21, 2022
bf060fd
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Aug 29, 2022
3f073fa
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Nov 4, 2022
7f62d1c
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Jan 25, 2023
85cbdb1
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Feb 23, 2023
51a444b
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Mar 3, 2023
0be4126
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Mar 22, 2023
57fda95
Merge remote-tracking branch 'upstream/develop' into develop
jderber-NOAA Apr 13, 2023
333ec2b
Changes to write_incr for ticket # 558
jderber-NOAA Apr 13, 2023
768a703
Fix issue found by Ting in review.
jderber-NOAA Apr 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/gsi/write_incr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ subroutine write_fv3_inc_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin)
use general_sub2grid_mod, only: sub2grid_info

use gsi_bundlemod, only: gsi_bundle, gsi_bundlegetpointer
use gsi_bundlemod, only: assignment(=)
use control_vectors, only: control_vector

use constants, only: one, rad2deg, r1000
Expand Down Expand Up @@ -158,7 +159,6 @@ subroutine write_fv3_inc_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin)
! set up state space based off of xhatsave
! Convert from control space directly to physical
! space for comparison with obs.
call allocate_preds(sbiasinc)
do iii=1,nobs_bins
call allocate_state(svalinc(iii))
end do
Expand All @@ -168,7 +168,10 @@ subroutine write_fv3_inc_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin)
do iii=1,ntlevs_ens
call allocate_state(evalinc(iii))
end do

call allocate_preds(sbiasinc)
call control2state(xhatsave,mvalinc,sbiasinc)
call deallocate_preds(sbiasinc)

if (l4dvar) then
if (l_hyb_ens) then
Expand All @@ -193,6 +196,12 @@ subroutine write_fv3_inc_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin)
end do
end if
end if
do iii=1,ntlevs_ens
call deallocate_state(evalinc(iii))
end do
do iii=1,nsubwin
call deallocate_state(mvalinc(iii))
end do

! Check hydrometeors in control variables
iql = getindex(svars3d,'ql')
Expand Down Expand Up @@ -527,6 +536,10 @@ subroutine write_fv3_inc_ (grd,sp_a,filename,mype_out,gfs_bundle,ibin)
endif
! ! cleanup and exit
call nccheck_incr(nf90_close(ncid_out))
deallocate(out3d)
do iii=1,nobs_bins
call deallocate_state(svalinc(iii))
end do
if ( mype == mype_out ) then
write(6,*) "FV3 netCDF increment written, file= "//trim(filename)//".nc"
end if
Expand Down