From eb59d576bfac96c62697fdbd23560cb379b7b2d2 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Wed, 16 Apr 2025 18:01:29 +0000 Subject: [PATCH 1/5] add option to ignore qm=9 for T2m and q2m in prepbufr files. --- src/gsi/gsimod.F90 | 11 +++++++++-- src/gsi/jfunc.f90 | 5 +++++ src/gsi/read_prepbufr.f90 | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index 754d14499..c42818b3e 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -107,7 +107,7 @@ module gsimod factv,factl,factp,factg,factw10m,facthowv,factcldch,niter,niter_no_qc,biascor,& init_jfunc,qoption,cwoption,switch_on_derivatives,tendsflag,jiterstart,jiterend,R_option,& bcoption,diurnalbc,print_diag_pcg,tsensible,diag_precon,step_start,pseudo_q2,& - clip_supersaturation,cnvw_option,hofx_2m_sfcfile + clip_supersaturation,cnvw_option,hofx_2m_sfcfile, ignore_2mQM use state_vectors, only: init_anasv,final_anasv use control_vectors, only: init_anacv,final_anacv,nrf,nvars,nrf_3d,cvars3d,cvars2d,& nrf_var,lcalc_gfdl_cfrac,incvars_to_zero,incvars_zero_strat,incvars_efold @@ -1087,9 +1087,16 @@ module gsimod ! time_window_rad - upper limit on time window for certain radiance input data ! ext_sonde - logical for extended forward model on sonde data ! l_foreaft_thin - separate TDR fore/aft scan for thinning +! hofx_2m_sfcfile - Calculate h(x) for q2m and T2m from +! same fields in sfc_data.tile files +! (for use in global 2m DA) +! ignore_2mQM - ignore quality mark of 9 (no obs errors) +! for T2m and q2m in prepbufr file, and +! insert hard-coded obs errors (for reanalysis, +! allows use of archived prepbufr files) namelist/obs_input/dmesh,time_window_max,time_window_rad, & - ext_sonde,l_foreaft_thin,hofx_2m_sfcfile + ext_sonde,l_foreaft_thin,hofx_2m_sfcfile, ignore_2mQM ! SINGLEOB_TEST (one observation test case setup): ! maginnov - magnitude of innovation for one ob diff --git a/src/gsi/jfunc.f90 b/src/gsi/jfunc.f90 index 616f83521..bb45d0a77 100644 --- a/src/gsi/jfunc.f90 +++ b/src/gsi/jfunc.f90 @@ -137,11 +137,13 @@ module jfunc public :: varq public :: cnvw_option public :: hofx_2m_sfcfile + public :: ignore_2mQM logical first,last,switch_on_derivatives,tendsflag,print_diag_pcg,tsensible,diag_precon logical clip_supersaturation,R_option logical pseudo_q2,limitqobs logical hofx_2m_sfcfile + logical ignore_2mQM logical cnvw_option integer(i_kind) iout_iter,miter,iguess,nclen,qoption,cwoption integer(i_kind) jiter,jiterstart,jiterend,iter @@ -254,6 +256,9 @@ subroutine init_jfunc ! option to calculate hofx for T2m and q2m by interpolating from 2m vars in sfc file hofx_2m_sfcfile=.false. +! option to ignore qm=9 in prepbufr file for T2m and q2m + ignore_2mQM=.false. + return end subroutine init_jfunc diff --git a/src/gsi/read_prepbufr.f90 b/src/gsi/read_prepbufr.f90 index be585ab03..9dd978779 100644 --- a/src/gsi/read_prepbufr.f90 +++ b/src/gsi/read_prepbufr.f90 @@ -219,7 +219,7 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& apply_hilbertcurve,destroy_hilbertcurve use ndfdgrids,only: init_ndfdgrid,destroy_ndfdgrid,relocsfcob,adjust_error use ndfdgrids,only: valley_adjustment - use jfunc, only: tsensible, hofx_2m_sfcfile + use jfunc, only: tsensible, hofx_2m_sfcfile, ignore_2mQM use deter_sfc_mod, only: deter_sfc_type,deter_sfc2 use gsi_nstcouplermod, only: nst_gsi,nstinfo use gsi_nstcouplermod, only: gsi_nstcoupler_deter @@ -2012,9 +2012,8 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& ! Over-ride QM=9 and hard-wire errors for land obs and hofx_sfc_file option ! Can be deleted once prepbufr processing updated. - if ( global_2m_land ) then + if ( global_2m_land .and. ignore_2mQM ) then if (tob .and. qm==9 ) then - pqm(k)=2 ! otherwise, type 183 will be discarded. qm=2 tqm(k)=2 if (kx==187) obserr(3,k)=2.0_r_double @@ -2022,7 +2021,8 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& if (kx==183) obserr(3,k)=2.0_r_double endif if (qob .and. qm == 9 ) then - qm = 2 + qm=2 + qqm(k) = 2 ! qob err specified as fraction of qsat, multiplied by 10. if (kx==187) obserr(2,k)=1.0_r_double if (kx==181) obserr(2,k)=1.0_r_double From 14cf117d766e71e394ff24702fb409629285586b Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Thu, 17 Apr 2025 21:19:06 +0000 Subject: [PATCH 2/5] Output ignore_2mQM and hofx_2m_sfcfile to stdout. --- src/gsi/gsimod.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gsi/gsimod.F90 b/src/gsi/gsimod.F90 index c42818b3e..d6d9a9447 100644 --- a/src/gsi/gsimod.F90 +++ b/src/gsi/gsimod.F90 @@ -2317,6 +2317,8 @@ subroutine gsimain_initialize write(6,strongopts) write(6,obsqc) write(6,*)'EXT_SONDE on type 120 =',ext_sonde + write(6,*)'hofx_2m_sfcfile =', hofx_2m_sfcfile + write(6,*)'ignore_2mQM =', ignore_2mQM ngroup=0 do i=1,ndat dthin(i) = max(dthin(i),0) From 19211dd845f59b68fd917539d0bb7db487293d67 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Fri, 18 Apr 2025 16:11:54 +0000 Subject: [PATCH 3/5] Update fix hash. --- fix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix b/fix index 1567130f4..8ea29cd5c 160000 --- a/fix +++ b/fix @@ -1 +1 @@ -Subproject commit 1567130f4eba20b301903e30114e72a734fd9a15 +Subproject commit 8ea29cd5c7eb68168bd587c3c048f750becd8f67 From 6d24286696038b8c5038c8d6c36364413921c127 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Fri, 18 Apr 2025 19:59:55 +0000 Subject: [PATCH 4/5] Removed ovs type 183 from global_2m_land --- src/gsi/read_prepbufr.f90 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/gsi/read_prepbufr.f90 b/src/gsi/read_prepbufr.f90 index 9dd978779..e97c5e516 100644 --- a/src/gsi/read_prepbufr.f90 +++ b/src/gsi/read_prepbufr.f90 @@ -1685,9 +1685,8 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& pmq(k)=nint(qcmark(8,k)) end do -! 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 ) +! 187 and 181, are the screen-level obs over land + global_2m_land = ( (kx==187 .or. kx==181) .and. hofx_2m_sfcfile ) ! If temperature ob, extract information regarding virtual ! versus sensible temperature @@ -2016,17 +2015,13 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,& if (tob .and. qm==9 ) then qm=2 tqm(k)=2 - 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 + obserr(3,k)=2.0_r_double endif if (qob .and. qm == 9 ) then qm=2 qqm(k) = 2 ! qob err specified as fraction of qsat, multiplied by 10. - 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 + obserr(2,k)=1.0_r_double endif endif ! Set usage variable From 05b07b8ed324771681977845e2476da1baeb5785 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Mon, 21 Apr 2025 16:40:23 +0000 Subject: [PATCH 5/5] Updated fix hash to include reject list. --- fix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix b/fix index 8ea29cd5c..e042f8bf8 160000 --- a/fix +++ b/fix @@ -1 +1 @@ -Subproject commit 8ea29cd5c7eb68168bd587c3c048f750becd8f67 +Subproject commit e042f8bf80c6b3341ece8b92c098ab8c63dd2267