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

Updates for soil moisture and soil temperature analysis #675

Merged
merged 178 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
c947c7e
updates to handle overlow of 32 bit integers, make code run in debug …
jswhit2 Sep 18, 2020
e623476
update to include RTPS inflation
jswhit2 Sep 19, 2020
df517d0
add 'write_ensmean'
jswhit2 Oct 9, 2020
27cba66
require use_qsatmean=T if pseudo_rh=T when write_ensmean=T
jswhit2 Oct 9, 2020
55c6373
update
jswhit2 Oct 9, 2020
2c5a7a4
write out ens mean increment
jswhit2 Oct 9, 2020
8b8673e
GitHub Issue NOAA-EMC/GSI#2 merge release/gfsda.v16.0.0 at 1d3e30a i…
RussTreadon-NOAA Oct 15, 2020
348b88c
don't append hour string unless fhr > 0
jswhit2 Oct 20, 2020
c280826
add some comments
jswhit2 Oct 20, 2020
56062d9
Merge branch 'master' into feature/enkf-64bit
jswhit2 Oct 20, 2020
e045e30
remove openmp parallel regions that were causing problems on orion
jswhit2 Oct 23, 2020
158fa32
utility for 'partial' recentering
jswhit2 Nov 4, 2020
54a1470
update
jswhit2 Nov 5, 2020
c988929
Merge remote-tracking branch 'upstream/master'
jswhit2 Nov 6, 2020
87946df
merge from upstream master
jswhit2 Nov 6, 2020
a79f3e4
Merge branch 'master' into feature/enkf-64bit
jswhit2 Nov 6, 2020
582a612
add beta_e0 parameter
jswhit2 Nov 21, 2020
61b5da6
Merge remote-tracking branch 'upstream/master'
jswhit2 Nov 24, 2020
80c366d
Merge branch 'master' into feature/enkf-64bit
jswhit2 Nov 24, 2020
e10a6c0
port 2mda changes from Clara's fork
jswhit2 Nov 24, 2020
e03361a
initial updates for global_2mDA
jswhit2 Nov 24, 2020
f2ab573
update
jswhit2 Dec 4, 2020
605cc9d
Merge remote-tracking branch 'upstream/master'
jswhit2 Dec 24, 2020
09323b2
Merge branch 'master' into feature/enkf-64bit
jswhit2 Dec 24, 2020
92083c1
Merge remote-tracking branch 'upstream/master' into feature/2mDA
jswhit2 Dec 29, 2020
60efefc
fix bugs in readconvobs
jswhit2 Dec 31, 2020
b104c54
update
jswhit2 Jan 2, 2021
7251918
add writeincrement_2mDA
jswhit2 Jan 6, 2021
f6dceea
don't divide obs by sat humidity if global_2mDA
jswhit2 Jan 6, 2021
4e53545
uncomment diagnostic print
jswhit2 Jan 10, 2021
7548c9e
Merge remote-tracking branch 'upstream/master'
jswhit2 Jan 21, 2021
c916148
Merge branch 'master' into feature/enkf-64bit
jswhit2 Jan 21, 2021
b3f9c74
Changed soil update variables from soilw to slc (liquid only)
ClaraDraper-NOAA Feb 6, 2021
b64167c
Changed soil update variables from soilw to slc (liquid only)
ClaraDraper-NOAA Feb 6, 2021
d41d574
add taper for stratospheric humidity increment
jswhit2 Feb 19, 2021
c99edaa
taper_strat
jswhit2 Feb 22, 2021
ba08bc9
read in first guess separately for enkf and var
jswhit2 Feb 22, 2021
aa268a4
fix bug introduced in last commits
jswhit2 Feb 22, 2021
1ba7ae7
fix delz increment calculation
jswhit2 Feb 25, 2021
e575a85
calculate delz increment so it is negative for netcdf (remove sign flip)
jswhit2 Feb 25, 2021
3a7a671
fix typo
jswhit2 Feb 25, 2021
62b27c7
print out min/max ob time
jswhit2 Feb 25, 2021
9e15cee
update
jswhit2 Feb 25, 2021
9b10c13
update
jswhit2 Feb 25, 2021
fc289fb
fix delz calculations so delz is always <0, incr is a-f, and sign fli…
jswhit2 Mar 2, 2021
d2f09f7
fix missing declaration of krev
jswhit2 Mar 2, 2021
7c9d680
fix sign of delz
jswhit2 Mar 2, 2021
f76ba28
fix delz to be consistent with PR #116
jswhit2 Mar 3, 2021
1c08d68
global_2mDA updates for 2m obs:
ClaraDraper-NOAA Mar 1, 2021
57a74cf
Merge branch 'feature/2mDA_csd' of https://github.com/ClaraDraper-NOA…
ClaraDraper-NOAA Mar 3, 2021
98d7d71
fix integer arithmetic so +/-30 minute windows work (with l4densvar=F)
jswhit2 Mar 11, 2021
e7e0320
Merge remote-tracking branch 'upstream/master'
jswhit2 Mar 11, 2021
ffe1f24
Merge branch 'master' into feature/enkf-64bit
jswhit2 Mar 11, 2021
2525f68
revert previous fix for hourly updating problem
jswhit2 Mar 11, 2021
780b6a4
fix typo
jswhit2 Mar 11, 2021
0f4555e
Merge pull request #1 from ClaraDraper-NOAA/feature/2mDA_csd
jswhit Mar 30, 2021
96f7380
add new parameter mincorrlength_fact
jswhit2 Apr 26, 2021
39b044b
set nobsl_max=-1 if nobstot < nobsl_max
jswhit2 Apr 26, 2021
1c25e4b
bound corrlength between correlength and mincorrlength_fact*corrlengt…
jswhit2 Apr 26, 2021
156d87e
add tapering of humidity increments in stratosphere
jswhit2 Apr 27, 2021
8ea8639
add tapering of humidity increments in strat
jswhit2 Apr 27, 2021
2790e5f
Merge remote-tracking branch 'upstream/master'
jswhit2 Apr 27, 2021
68f6e6f
Merge branch 'master' into feature/enkf-64bit
jswhit2 Apr 27, 2021
86f7929
fix netcdf bug
jswhit2 Apr 27, 2021
efba493
populate ak,bk
jswhit2 Apr 29, 2021
ba010a8
fixes for strat tapering
jswhit2 Apr 30, 2021
86a548a
Merge branch 'NOAA-EMC:master' into master
jswhit May 19, 2021
df33214
Merge branch 'NOAA-EMC:master' into feature/enkf-64bit
jswhit May 19, 2021
9c731e2
Merge remote-tracking branch 'upstream/master'
jswhit2 Jun 24, 2021
f7d0066
Merge branch 'master' into feature/enkf-64bit
jswhit2 Jun 24, 2021
a956556
fix writing of ensemble mean
jswhit2 Jun 25, 2021
11fba4f
Merge remote-tracking branch 'upstream/master'
jswhit2 Jul 15, 2021
f471641
Merge remote-tracking branch 'upstream/master'
jswhit2 Jul 28, 2021
d0e21fb
Merge branch 'master' into feature/enkf-64bit
jswhit2 Jul 28, 2021
56f6b37
Merge branch 'master' into feature/2mDA
jswhit2 Jul 28, 2021
20a7310
Moved read of pressure to be from sfc files, comment out buddy check …
ClaraDraper-NOAA Aug 4, 2021
3d3646f
Merge remote-tracking branch 'upstream/feature/2mDA' into feature/2mD…
ClaraDraper-NOAA Aug 4, 2021
7d84c64
Merge remote-tracking branch 'upstream/master'
jswhit2 Aug 18, 2021
11a039e
Merge branch 'master' into feature/enkf-64bit
jswhit2 Aug 18, 2021
a04266b
Merge pull request #2 from ClaraDraper-NOAA/feature/2mDA_csd
jswhit Aug 18, 2021
3ec7a3f
Merge branch 'feature/enkf-64bit' into feature/2mDA
jswhit2 Aug 18, 2021
e5c4d53
Merge remote-tracking branch 'upstream/master'
jswhit2 Aug 26, 2021
7fff4ac
Merge remote-tracking branch 'upstream/master'
jswhit2 Sep 10, 2021
212e3dd
Merge remote-tracking branch 'upstream/master'
jswhit2 Oct 8, 2021
da004e0
Merge remote-tracking branch 'upstream/master'
jswhit2 Nov 10, 2021
8a6641b
Merge branch 'NOAA-EMC:master' into master
jswhit Nov 10, 2021
a297111
remove unneeded files
jswhit2 Nov 10, 2021
dbc7ad4
Merge remote-tracking branch 'upstream/master'
jswhit2 Nov 30, 2021
e3aad64
Merge remote-tracking branch 'upstream/master'
jswhit2 Dec 16, 2021
344e1b1
Merge remote-tracking branch 'upstream/master'
jswhit2 Jan 6, 2022
b81a0a5
Merge remote-tracking branch 'upstream/master'
jswhit2 Jan 19, 2022
46e72f5
Bugfix for writing out 2mDA increments.
ClaraDraper-NOAA Mar 2, 2022
c8f68f1
Merge pull request #3 from ClaraDraper-NOAA/feature/2mDA
jswhit Mar 2, 2022
5f5a859
Merge remote-tracking branch 'upstream/master'
jswhit2 Mar 2, 2022
d2931d5
Merge branch 'master' of https://github.com/jswhit/GSI
jswhit2 Mar 2, 2022
9ac41fe
Merge branch 'master' into feature/2mDA
jswhit2 Mar 2, 2022
15459d8
Merge remote-tracking branch 'upstream/master'
jswhit2 Apr 13, 2022
0a82587
stage-1 merge with regional 2mDA from GSL
guoqing-noaa Jun 1, 2022
6283523
trying to add save_jacobian for 2mT DA
guoqing-noaa Jul 6, 2022
94706a7
Added endif statement to controlvec that had been inadvertently removed.
ClaraDraper-NOAA Jul 9, 2022
45d3aeb
Added end if statement back to controlvec that had inavertently been …
ClaraDraper-NOAA Jul 9, 2022
51d9b4b
Separated reading in 2m obs from doing sfc update. Changes observer
ClaraDraper-NOAA Jul 13, 2022
d5fae40
Changed setupt output QC marks back to original values.
ClaraDraper-NOAA Jul 13, 2022
2d12089
Merge pull request #4 from guoqing-noaa/merge
jswhit Jul 13, 2022
30cb954
Merge branch 'jswhit:feature/2mDA' into feature/2mDA
ClaraDraper-NOAA Jul 13, 2022
3dd4439
Merge branch 'feature/2mDA' into feature/2mDA_4atmosupdate
ClaraDraper-NOAA Jul 13, 2022
2c6d9e5
Reverted drpx and dpres code for use_2m_obs option, and changes to co…
ClaraDraper-NOAA Jul 14, 2022
0a264f6
Merge remote-tracking branch 'upstream/develop'
jswhit2 Jul 14, 2022
16f9d2c
Midway through generalising the 2m DA case:
ClaraDraper-NOAA Jul 26, 2022
e7e8754
Fixed bug in sfc variable indexing into grdin
ClaraDraper-NOAA Jul 26, 2022
53c3ebb
changed dhx_dx dimension in setupt to cover both profile and single l…
ClaraDraper-NOAA Jul 26, 2022
965ca0f
Combined write routines to single routine for sfc and/or atmos fields.
ClaraDraper-NOAA Aug 12, 2022
299e368
Tidy up of read/write for sfc files.
ClaraDraper-NOAA Aug 12, 2022
7046544
Removed global_2mDA input flag.
ClaraDraper-NOAA Aug 12, 2022
cf68497
Updates ot gsi:
ClaraDraper-NOAA Aug 12, 2022
7cf05a4
Merge pull request #6 from ClaraDraper-NOAA/feature/2mDA_4atmosupdate
jswhit Aug 16, 2022
fafbed4
Added back in application of increment to T2m between outer loops.
ClaraDraper-NOAA Aug 18, 2022
e4e9dbe
minor bug fix.
ClaraDraper-NOAA Aug 18, 2022
6326827
Bugfix in setupt - settings obs are surface level for hofx_2m_file op…
ClaraDraper-NOAA Sep 1, 2022
dad7eed
Merge remote-tracking branch 'upstream/develop'
jswhit2 Sep 23, 2022
4dfd73b
removing unnecessary print statements.
ClaraDraper-NOAA Sep 23, 2022
4002db4
Merge branch 'master' into feature/2mDA
jswhit2 Sep 23, 2022
29cca95
Merge branch 'feature/2mDA' into bugfix2mDA
jswhit Sep 23, 2022
5f08c29
Merge pull request #8 from ClaraDraper-NOAA/bugfix2mDA
jswhit Sep 23, 2022
922a5c4
bug fix on latest merge of EMC develop and 2mDA
guoqing-noaa Oct 4, 2022
95a3dc8
revert changes on src/gsi/netcdfgfs_io.f90
guoqing-noaa Oct 4, 2022
f5e537b
go ahead with the changes on src/gsi/netcdfgfs_io.f90
guoqing-noaa Oct 4, 2022
9d454b9
revert changes on src/gsi/netcdfgfs_io.f90
guoqing-noaa Oct 4, 2022
c7be078
minor fix on src/gsi/setupt.f90
guoqing-noaa Oct 12, 2022
2046b38
more changes
guoqing-noaa Oct 26, 2022
0f00543
Merge pull request #9 from guoqing-noaa/bugfix
jswhit Oct 26, 2022
c2d7cbb
Merge remote-tracking branch 'upstream/develop'
jswhit2 Nov 14, 2022
0fa9c97
Merge remote-tracking branch 'upstream/develop'
jswhit2 Nov 22, 2022
fd4f5a1
Merge remote-tracking branch 'upstream/develop'
jswhit2 Nov 22, 2022
c875be3
minor fix on read_prepbufr.f90
guoqing-noaa Jan 3, 2023
f9fe490
read_prepbufr.f90, hardwire obs err, qob not considered yet
guoqing-noaa Jan 4, 2023
7681e2b
debug setupt.f90 and successfully pinned the bug
guoqing-noaa Jan 4, 2023
5a8e06e
remove debug writes
guoqing-noaa Jan 4, 2023
62767d8
update read_prepbufr.f90 for surface qob
guoqing-noaa Jan 18, 2023
b22d832
Merge remote-tracking branch 'upstream/develop'
jswhit2 Jan 18, 2023
673bc86
Merge branch 'master' into feature/2mDA
jswhit2 Jan 18, 2023
bb5c08c
changes in response to PR review
guoqing-noaa Jan 18, 2023
a268603
Merge pull request #10 from guoqing-noaa/pr2mDA
jswhit Jan 18, 2023
39aba44
Merge branch 'feature/2mDA' of https://github.com/jswhit/GSI into fea…
ClaraDraper-NOAA Mar 9, 2023
697ae98
Tidied up comments, treatment of non-land sfc obs for hofx_sfc_file o…
ClaraDraper-NOAA Mar 9, 2023
abea0fa
Tidy up routine to read in sfc background files.
ClaraDraper-NOAA Mar 10, 2023
c0f167f
bug fix to qm in read_prepbufr.
ClaraDraper-NOAA Mar 12, 2023
dac28ac
Clean up to remove unnecessary diffs from develop.
ClaraDraper-NOAA Mar 20, 2023
c4701a0
clean up to gridio.
ClaraDraper-NOAA Mar 20, 2023
d439812
Removed separate diag file name for sfc, and added input to option to…
ClaraDraper-NOAA Mar 20, 2023
b492175
Merge branch 'develop' into feature/2m_hofx
ClaraDraper-NOAA Mar 21, 2023
adaca8f
Over-ride qob qc marks for obs types 181, 183, and 187 in read_prepbu…
ClaraDraper-NOAA Mar 21, 2023
99cd8b8
Setup for getting q2m from file.
ClaraDraper-NOAA Mar 21, 2023
1623ae2
minor updates.
ClaraDraper-NOAA Mar 22, 2023
db75164
Added horizontal interpolation of q2m to setupq. Fixed icount by in g…
ClaraDraper-NOAA Mar 22, 2023
47cd2c8
Added terrain correction to qob in setupq.
ClaraDraper-NOAA Mar 23, 2023
a8f37ce
Removed all q error inflation from qobs in setupq.
ClaraDraper-NOAA Mar 23, 2023
9bc595f
Added comments to gsi code.
ClaraDraper-NOAA Mar 23, 2023
a4b05b8
Added inflation of q ob error when vertically interpolating the obs.
ClaraDraper-NOAA Mar 23, 2023
47d7c5a
small bugfix
ClaraDraper-NOAA Mar 23, 2023
2767046
Fixed GCC linux build bug (inconsistent string length in vars2d_suppo…
ClaraDraper-NOAA Mar 24, 2023
ab578df
Merge branch 'develop' into feature/2m_hofx
ClaraDraper-NOAA Mar 24, 2023
cd1b50b
Merge branch 'develop' into feature/2m_hofx
ClaraDraper-NOAA Mar 28, 2023
a6e5f32
Bugfixes to fix crash due to zero pressure ozone ob, and to run in de…
ClaraDraper-NOAA Apr 21, 2023
0a36398
Added option to write out ensemble mean, without using use_qsatensmean.
ClaraDraper-NOAA Apr 24, 2023
99ce56a
Minor bugfix (for debug compilation), and clarification of comments.
ClaraDraper-NOAA Apr 26, 2023
2ca90f8
Changed slc1 to soill1 (later, introduce test to use appropriate var…
ClaraDraper-NOAA Apr 26, 2023
6d9db60
bug fix.
ClaraDraper-NOAA May 23, 2023
ac7f18d
Write soil update as increments, regardless of whether atmos written …
ClaraDraper-NOAA May 24, 2023
a3f1478
Edits for control experiments (sondes) and assim of 2m obs with soil …
ClaraDraper-NOAA Jun 16, 2023
49e7aec
mend
ClaraDraper-NOAA Jun 16, 2023
4c3a86e
Jeff's bugix to avoid the mystery crash.
ClaraDraper-NOAA Aug 21, 2023
e920028
Merge branch 'develop' into feature/2mDA
ClaraDraper-NOAA Jan 3, 2024
5d053ac
Clean up after merging, removed unnecessary changes.
ClaraDraper-NOAA Jan 3, 2024
8aebd53
Reverted general_read_gfsatm
ClaraDraper-NOAA Jan 3, 2024
f33689e
Reverted regression_vars.sh to develop.
ClaraDraper-NOAA Jan 4, 2024
3001f11
Merge branch 'develop' into feature/2mDA
ClaraDraper-NOAA Feb 5, 2024
304e36c
Minor tidy-up in response to Russ Treadon's review.
ClaraDraper-NOAA Feb 7, 2024
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
1 change: 1 addition & 0 deletions src/enkf/gridinfo_gfs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module gridinfo
character(len=max_varname_length),public, dimension(13) :: vars3d_supported = (/'u ', 'v ', 'tv ', 'q ', 'oz ', 'cw ', 'tsen', 'prse', &
'ql ', 'qi ', 'qr ', 'qs ', 'qg '/)
character(len=max_varname_length),public, dimension(13) :: vars2d_supported = (/'ps ', 'pst', 'sst', 't2m', 'q2m', 'st1', 'st2', 'st3', 'st4', 'sl1', 'sl2', 'sl3', 'sl4' /)
character(len=max_varname_length),public, dimension(8) :: vars2d_landonly = (/'st1', 'st2', 'st3', 'st4', 'sl1', 'sl2', 'sl3', 'sl4' /)
! supported variable names in anavinfo
contains

Expand Down
53 changes: 29 additions & 24 deletions src/enkf/gridio_gfs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
endif ! use_full_hydro
enddo
else if (use_gfs_ncio) then
clip=tiny_r_kind
call read_vardata(dset, 'ugrd', ug3d,errcode=iret)
if (iret /= 0) then
print *,'error reading ugrd'
Expand Down Expand Up @@ -1203,36 +1204,36 @@ subroutine readgriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,ntimes,
call copytogrdin(ug,grdin(:,levels(n3d) + soilt4_ind,nb,ne))
endif
if (slc1_ind > 0) then
call read_vardata(dset_sfc, 'slc1', values_2d, errcode=iret)
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/))
call copytogrdin(ug,grdin(:,levels(n3d) + slc1_ind,nb,ne))
endif
if (slc2_ind > 0) then
call read_vardata(dset_sfc, 'slc2', values_2d, errcode=iret)
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/))
call copytogrdin(ug,grdin(:,levels(n3d) + slc2_ind,nb,ne))
endif
if (slc3_ind > 0) then
call read_vardata(dset_sfc, 'slc3', values_2d, errcode=iret)
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/))
call copytogrdin(ug,grdin(:,levels(n3d) + slc3_ind,nb,ne))
endif
if (slc4_ind > 0) then
call read_vardata(dset_sfc, 'slc4', values_2d, errcode=iret)
call read_vardata(dset_sfc, 'soill4', values_2d, errcode=iret)
if (iret /= 0) then
print *,'error reading slc2'
print *,'error reading soill4'
call stop2(22)
endif
ug = reshape(values_2d,(/nlons*nlats/))
Expand Down Expand Up @@ -2122,6 +2123,7 @@ subroutine writegriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,n
character(nemsio_charkind) :: field
character(len=nf90_max_name) :: time_units
logical :: hasfield
character(len=max_varname_length), dimension(n3d) :: no_vars3d

real(r_kind) kap,kapr,kap1,clip
real(r_single) compress_err
Expand All @@ -2143,10 +2145,12 @@ subroutine writegriddata(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,n

call set_ncio_file_flags(vars3d, n3d, vars2d, n2d, write_sfc_file, write_atm_file)

if (write_sfc_file .and. nproc==0 ) then
if (write_sfc_file ) then
! adding the sfc increments requires adjusting several other variables. This is done is a separate
! program.
write(6,*)'gridio/writegriddata: not coded to write sfc analysis, use separate add_incr program instead'
if (nproc == 0) write(6,*)'gridio/writegriddata: not coded to write sfc analysis, will write increment for sfc fields'
no_vars3d=''
call writeincrement(nanal1,nanal2,no_vars3d,vars2d,n3d,n2d,levels,ndim,grdin,no_inflate_flag)
endif

nocompress = .true.
Expand Down Expand Up @@ -3584,7 +3588,7 @@ subroutine writeincrement(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,
integer :: ql_ind, qi_ind, qr_ind, qs_ind, qg_ind

! netcdf things
integer(i_kind) :: dimids3(3), ncstart(3), nccount(3)
integer(i_kind) :: dimids3(3), ncstart(3), nccount(3), dimids2(2)
integer(i_kind) :: ncid_out, lon_dimid, lat_dimid, lev_dimid, ilev_dimid
integer(i_kind) :: lonvarid, latvarid, levvarid, pfullvarid, ilevvarid, &
hyaivarid, hybivarid, uvarid, vvarid, delpvarid, delzvarid, &
Expand Down Expand Up @@ -3615,14 +3619,14 @@ subroutine writeincrement(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,

call set_ncio_file_flags(vars3d, n3d, vars2d, n2d, write_sfc_file, write_atm_file)

if ( write_atm_file) then
use_full_hydro = .false.
clip = tiny_r_kind
read(datestring,*) iadateout

ncstart = (/1, 1, 1/)
nccount = (/nlons, nlats, nlevs/)

if ( write_atm_file) then
ne = 0
ensmemloop: do nanal=nanal1,nanal2
ne = ne + 1
Expand Down Expand Up @@ -3978,20 +3982,21 @@ subroutine writeincrement(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,
! create dimensions based on analysis resolution, not guess
call nccheck_incr(nf90_def_dim(ncid_out, "longitude", nlons, lon_dimid))
call nccheck_incr(nf90_def_dim(ncid_out, "latitude", nlats, lat_dimid))
dimids2 = (/ lon_dimid, lat_dimid /)
! create variables
call nccheck_incr(nf90_def_var(ncid_out, "longitude", nf90_real, (/lon_dimid/), lonvarid))
call nccheck_incr(nf90_def_var(ncid_out, "latitude", nf90_real, (/lat_dimid/), latvarid))
call nccheck_incr(nf90_def_var(ncid_out, "tmp2m_inc", nf90_real, dimids3(1:2), tmp2mvarid))
call nccheck_incr(nf90_def_var(ncid_out, "spfh2m_inc", nf90_real, dimids3(1:2), spfh2mvarid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt1_inc", nf90_real, dimids3(1:2), soilt1varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt2_inc", nf90_real, dimids3(1:2), soilt2varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt3_inc", nf90_real, dimids3(1:2), soilt3varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt4_inc", nf90_real, dimids3(1:2), soilt4varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc1_inc", nf90_real, dimids3(1:2), slc1varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc2_inc", nf90_real, dimids3(1:2), slc2varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc3_inc", nf90_real, dimids3(1:2), slc3varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc4_inc", nf90_real, dimids3(1:2), slc4varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilsnow_mask", nf90_int, dimids3(1:2), maskvarid))
call nccheck_incr(nf90_def_var(ncid_out, "tmp2m_inc", nf90_real, dimids2, tmp2mvarid))
call nccheck_incr(nf90_def_var(ncid_out, "spfh2m_inc", nf90_real, dimids2, spfh2mvarid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt1_inc", nf90_real, dimids2, soilt1varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt2_inc", nf90_real, dimids2, soilt2varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt3_inc", nf90_real, dimids2, soilt3varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilt4_inc", nf90_real, dimids2, soilt4varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc1_inc", nf90_real, dimids2, slc1varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc2_inc", nf90_real, dimids2, slc2varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc3_inc", nf90_real, dimids2, slc3varid))
call nccheck_incr(nf90_def_var(ncid_out, "slc4_inc", nf90_real, dimids2, slc4varid))
call nccheck_incr(nf90_def_var(ncid_out, "soilsnow_mask", nf90_int, dimids2, maskvarid))
! place global attributes to serial calc_increment output
call nccheck_incr(nf90_put_att(ncid_out, nf90_global, "source", "GSI EnKF"))
call nccheck_incr(nf90_put_att(ncid_out, nf90_global, "comment", &
Expand Down Expand Up @@ -4036,7 +4041,7 @@ subroutine writeincrement(nanal1,nanal2,vars3d,vars2d,n3d,n2d,levels,ndim,grdin,
! note: same logic/threshold used in global_cycle to produce
! mask on model grid.

call read_vardata(dsfg, 'slc1', values_2d, errcode=iret)
call read_vardata(dsfg, 'soill1', values_2d, errcode=iret)

mask = 0
do j=1,nlats
Expand Down
34 changes: 31 additions & 3 deletions src/enkf/inflation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ module inflation
use constants, only: one, zero, rad2deg, deg2rad
use covlocal, only: latval, taper
use controlvec, only: ncdim, cvars3d, cvars2d, nc3d, nc2d, clevels
use gridinfo, only: latsgrd, logp, npts, nlevs_pres
! note: vars2d_landonly currently only defined for gridio_gfs, but smoothing only coded for gfs.
use gridinfo, only: latsgrd, logp, npts, nlevs_pres, vars2d_landonly
use loadbal, only: indxproc, numptsperproc, npts_max, anal_chunk, anal_chunk_prior
use smooth_mod, only: smooth

Expand All @@ -101,9 +102,10 @@ subroutine inflate_ens()
real(r_single),dimension(ndiag) :: sumcoslat,suma,suma2,sumi,sumf,sumitot,sumatot, &
sumcoslattot,suma2tot,sumftot
real(r_single) fnanalsml,coslat
integer(i_kind) i,nn,iunit,ierr,nb,nnlvl,ps_ind
integer(i_kind) i,nn,iunit,ierr,nb,nnlvl,ps_ind, this_ind, ind
integer(i_kind), dimension(8) :: soil_index
character(len=500) filename
real(r_single), allocatable, dimension(:,:) :: tmp_chunk2,covinfglobal
real(r_single), allocatable, dimension(:,:) :: tmp_chunk2,covinfglobal,store_presmooth
real(r_single) r

fnanalsml = one/(real(nanals-1,r_single))
Expand Down Expand Up @@ -231,7 +233,33 @@ subroutine inflate_ens()
do nn=1,ncdim
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
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
endif

call smooth(covinfglobal)

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

where (covinfglobal < covinflatemin) covinfglobal = covinflatemin
where (covinfglobal > covinflatemax) covinfglobal = covinflatemax
do i=1,numptsperproc(nproc+1)
Expand Down
1 change: 0 additions & 1 deletion src/enkf/readconvobs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module readconvobs
! reflectivity and radial velocity assimilation. POC: xuguang.wang@ou.edu
! 2017-12-13 shlyaeva - added netcdf diag read/write capability
! 2019-03-21 CAPS(C. Tong) - added direct reflectivity DA capability
! 2022-03-23 draper - added option to not scale qobs by forecast qsat.
!
! attributes:
! language: f95
Expand Down
4 changes: 2 additions & 2 deletions src/enkf/statevec.f90
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ subroutine init_statevec()
do i = 1, ns2d
if (getindex(vars2d_supported, svars2d(i))<0) then
if (nproc .eq. 0) then
print *,'Error: 2D variable ', svars2d(i), ' is not supported in current version.'
print *,'Error: state 2D variable ', svars2d(i), ' is not supported in current version.'
print *,'Supported variables: ', vars2d_supported
endif
call stop2(502)
Expand All @@ -145,7 +145,7 @@ subroutine init_statevec()
do i = 1, ns3d
if (getindex(vars3d_supported, svars3d(i))<0) then
if (nproc .eq. 0) then
print *,'Error: 3D variable ', svars3d(i), ' is not supported in current version.'
print *,'Error: state 3D variable ', svars3d(i), ' is not supported in current version.'
print *,'Supported variables: ', vars3d_supported
endif
call stop2(502)
Expand Down
19 changes: 10 additions & 9 deletions src/gsi/read_prepbufr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1669,13 +1669,15 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,&
pmq(k)=nint(qcmark(8,k))
end do

! 181, 183, 187, and 188 are the screen-level obs over land
global_2m_land = ( (kx==181 .or. kx==183 .or. kx==188 .or. kx==188 ) .and. hofx_2m_sfcfile )
! 187, 181, and 183 are the screen-level obs over land
! note: don't need the hofx_2m_sfcfile if set usage in convinfo, and qm updated in the input file
global_2m_land = ( (kx==187 .or. kx==181 .or. kx==183) .and. hofx_2m_sfcfile )

! If temperature ob, extract information regarding virtual
! versus sensible temperature
if(tob) then
! use tvirtual if tsensible flag not set, and not in either 2Dregional or global_2m DA mode
! for now, keeping 2m obs as sensible, for global system.
if ( (.not. tsensible) .and. .not. (twodvar_regional .or. global_2m_land) ) then

do k=1,levs
Expand Down Expand Up @@ -1979,18 +1981,17 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,&
pqm(k)=2 ! otherwise, type 183 will be discarded.
qm=2
tqm(k)=2
if (kx==187) obserr(3,k)=2.2
if (kx==181) obserr(3,k)=1.5
if (kx==183) obserr(3,k)=2.6
if (kx==187) obserr(3,k)=2.0_r_double
if (kx==181) obserr(3,k)=2.0_r_double
if (kx==183) obserr(3,k)=2.0_r_double
endif
if (qob .and. qm == 9 ) then
qm = 2
! qob err specified as fraction of qsat, multiplied by 10.
if (kx==187) obserr(2,k)=1.0
if (kx==181) obserr(2,k)=1.0
if (kx==183) obserr(2,k)=1.0
if (kx==187) obserr(2,k)=1.0_r_double
if (kx==181) obserr(2,k)=1.0_r_double
if (kx==183) obserr(2,k)=1.0_r_double
endif

endif
! Set usage variable
usage = zero
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/setupq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav
do k=1,nobs
ikx=nint(data(ikxx,k))
itype=ictype(ikx)
landsfctype =( itype==181 .or. itype==183 .or. itype==187 .or. itype==188 )
landsfctype =( itype==181 .or. itype==183 .or. itype==187 )
do l=k+1,nobs
if (twodvar_regional .or. (hofx_2m_sfcfile .and. landsfctype) ) then
duplogic=data(ilat,k) == data(ilat,l) .and. &
Expand Down
5 changes: 1 addition & 4 deletions src/gsi/setupt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav
do k=1,nobs
ikx=nint(data(ikxx,k))
itype=ictype(ikx)
landsfctype =( itype==181 .or. itype==183 .or. itype==187 .or. itype==188 )
landsfctype =( itype==181 .or. itype==183 .or. itype==187 )
do l=k+1,nobs
if (twodvar_regional .or. (hofx_2m_sfcfile .and. landsfctype) ) then
duplogic=data(ilat,k) == data(ilat,l) .and. &
Expand Down Expand Up @@ -483,9 +483,6 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav

! Run a buddy-check
! Note: buddy check crashes for hofx_2m_sfcfile option.
! Ccurrent params have buddy radius of 108 km, max diff of 8 K.
! The gross error check removes O-F > 7., so this is probably removing
! most obs that fail the buddy check already
if (twodvar_regional .and. buddycheck_t) call buddy_check_t(is,data,luse,mype,nele,nobs,muse,buddyuse)

! If requested, save select data for output to diagnostic file
Expand Down
Loading