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

Feature/msienkie/#33 implement nrl acqc #138

Merged
merged 19 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
174091e
add test program for AIRCFT bias correction
gmao-msienkie Aug 5, 2019
bfd267c
Changes for NRL aircraft QC
gmao-msienkie Aug 19, 2019
7d915a1
remove file added accidentally
gmao-msienkie Aug 19, 2019
ba0d5b9
Additional changes for NRL ACQC
gmao-msienkie Aug 20, 2019
f06f087
New README file
gmao-msienkie Aug 20, 2019
fc847d9
New prepbufr table needed for use with NRL ACQC
gmao-msienkie Aug 29, 2019
c5b76e2
Remove files associated with old ACQC and ACARSQC from list
gmao-msienkie Sep 3, 2019
c6d54f7
Add CMake change from hotfix/mathomp4/#43-add-extended-source-to-radcor
gmao-msienkie Sep 12, 2019
fe7e4fd
call maxout() to increase maximum record size - some soundings in
gmao-msienkie Sep 12, 2019
c958afd
Needed to change the name of the executable. For NRL Aircraft QC
gmao-msienkie Sep 12, 2019
e041b46
Merge branch 'base_v5.25.2' into feature/msienkie/#33_implement_NRL_acqc
gmao-msienkie Oct 18, 2019
2f21686
Remove reference to Shell.pm - replace 'rm' with 'unlink'
gmao-msienkie Oct 18, 2019
0868c0d
Remove reference to Shell.pm; remove code for old ACQC, ACARSQC
gmao-msienkie Oct 18, 2019
4163880
Merge branch 'main' into feature/msienkie/#33_implement_NRL_acqc
gmao-msienkie Feb 26, 2021
fce6fef
Bring in newer changes to this branch
gmao-msienkie Jun 16, 2021
557b6a2
Merge remote-tracking branch 'origin/bugfix/msienkie/#49-SP-interp-cr…
gmao-msienkie Jun 16, 2021
3c277ed
Bring this branch up to date with current development
gmao-msienkie Oct 27, 2021
705d931
Try and bring up to date with recent development
gmao-msienkie Nov 17, 2021
68479b0
Merge branch 'develop' into feature/msienkie/#33_implement_NRL_acqc
rtodling Dec 13, 2021
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
3 changes: 0 additions & 3 deletions src/Applications/GEOSdas_App/fvsetup
Original file line number Diff line number Diff line change
Expand Up @@ -801,17 +801,14 @@ sub defaults {
gsi_sens.rc.tmpl
noreplay.acq
odsmatch.rc
prepobs_acarsqc.merra.parm
prepobs_cqc_statbge
prepobs_cqcbufr.merra.parm
prepobs_errtable.global
prepobs_landc
prepobs_oiqc.oberrs
prepobs_prep.bufrtable
prepobs_prepacqc.merra.parm
prepobs_prevents.merra.parm
prepobs_profcqc.merra.parm
prepobs_waypoints
sac.nl.tmpl
vtrack.ctl.tmpl
vtrack.rc
Expand Down
1,502 changes: 947 additions & 555 deletions src/Applications/GSI_App/prepobs_prep.bufrtable

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions src/Applications/NCEP_Paqc/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
README for NCEPQC

04 Sep 1997 - This code was obtained from NCEP on 14 Aug 1997
* make_prepbufr.gbl.sh operational script
* bufrlib library of 'prepbufr' routines
* w3lib library of utility routines
* prepdata read input datasets, perform
QC checks not requiring background
* prevents interpolate background field to obs.
location and write 'events'
* acqc quality control of aircraft obs
(except ACARS)
* cqcht96 complex quality control of rawinsonde
height/temperature
(oiqc not included in this program set)


These programs have been run on the Cray J90 'charney'
using either ON29 or BUFR input to 'prepdata'

11 Mar 1999
Current snapshot of NCEPQC code used to run (ultimately) CQCHT.
This is not the final version for the operational system. Routines
in the 'w3lib' and 'bufrlib' that are not used by PREPDATA, PREVENTS,
or CQCHT are not included here.


26 Jul 1999
New versions of NCEPQC 'prepdata' and 'prevents' have been
integrated into code base. The complex quality control is being tested
and will be added when ready.
Code was added to 'prevents' to work with GFIO files. The
following routines from the GFIO library are used:
GFIO_Open, GFIO_DimInquire, GFIO_Inquire, GFIO_GetVar, GFIO_Close
Note that (in general) the NCEP programs need to be compiled
-i8 -r8 - with long integers. The calls to GFIO routines *are* being
performed with integer*4 variables, however. This has been tested with
the GFIO libraries in /ford1/local/IRIX64/pkg/gfio (which were compiled
as 'i4') and it works OK.

12 Aug 1999
The 'parms' subdirectory contains some tables and parameter
files used by the NCEP programs

15 Jul 2004 (Todling)

This now builds from buffer and w3 libs living under src/ncepshrd.
All compiles, but results still need to be check.

26 Jan 2005 - Sienkiewicz

Update of directory for MERRA. Moved files onto main branch.
Original code from NCEP replaced by updated code in new directories -
except for 'oiqc' and 'ssprev'

1 Jul 2008

Added new GMAO version of 'prevents' in GMAOprev directory. This version
reads the 'g5eta' format background fields directly. The new code is
adapted from the latest NCEP 'gblevents' code.

Current directories:
block-unblock - utilities to add f77 filemarkers on BUFR files
* not on main CVS branch, should move out of PAQC?
combine_bfr - utilities and notes about combining BUFR files
* not on main CVS branch
oiqc - NCEP OIQC Optimal interpolation quality control
ssprev - Older version of NCEP prevents code to interpolate
background from spectral coeffs. Current NCEP version
is not compatible with our spectral files produced by
'fv2ss'. Interim fix for MERRA, to be replaced by
native interpolation routine eventually
GMAOprev - New GMAO version of NCEP prevents code modified to
read g5-eta files directly. Uses newer version of
NCEP gblevents interpolation from eta levels.

prepobs_acarsqc.fd - MDCARS (ACARS) QC routine from NCEP (Oct 05)
prepobs_cqcbufr.fd - Raob Complex Quality Control from NCEP (Oct 05)
prepobs_cqcvad.fd - VAD wind QC routine from NCEP (Oct 05)
prepobs_prepacqc.fd - Aircraft (except ACARS) QC routine from NCEP (Oct 05)
prepobs_profcqc.fd - Wind Profiler QC routine from NCEP (Oct 05)

21 Mar 2013

Adding new directory modify_bufr with programs to modify BUFR files -
typically to change quality marks to undo blacklisting of observations.

24 Sep 2013

The code in directory prepobs_prepacqc.fd was updated with the new
NRL aircraft QC adopted at NCEP in July 2012. When/if the new code
is adopted, it will handle aircraft and ACARS qc and the acarsqc
program will be obsolete. Meanwhile, changes to the old prepacqc
(to work around a problem with TAMDAR data) are being written to
an OPS branch. (GEOSadas-5_9_1_p10_OPS_branch)

Some routines updated with code merged from NCEP WCOSS versions.
The new versions require use of the new BUFR library (to use
setbmiss/getbmiss).

19 Nov 2015

latest tag 'meta_prepQC_fixesNov2015' for GEOSadas-5_13_2
Changes relative to prior tag GEOSadas-5_13_1:

Routines have been updated with the NCEP versions from WCOSS transition
or later - except for aircraft QC still using older code. (Not transitioned
to NRLqc for aircraft partly because BUFR table problems with older
prepbufr in the archive.)
There were a few problems found in the prepQC used in MERRA2 up to Nov 2015.
*There was a limit of 120000 observations (wind+mass combined) for ACARS with
observations beyond that limit being discarded. Array sizes were updated.
*The OIQC was failing to check upperair temperature and wind data - the
new WCOSS version no longer uses OpenMP (it is MPI only) and appears to
not have the problem.
*The old prepacqc (AMDAR/AIREP QC) routine was dropping some observations
for a 'receipt time check' - added a 'SAVE' statement so receipt times
would not be retained for the read of the second part of a report and
not zeroed out. (Change is on GEOSadas-5_9_1_p10_OPS_branch.)
Other routines have changes for WCOSS including adjustment of the
prepbufr missing value to a smaller number that does not cause an overflow
when cast to integer on Linux. 'cqcvad.x' increased array sizes. The
'prevents' code added a check to reject calm SFCSHP winds when the background
wind speed is > 5m/s.

81 changes: 73 additions & 8 deletions src/Applications/NCEP_Paqc/GMAOprev/gblevents_gmao.f
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@
C 2014-05-08 JWhiting -- altered print statement (2 format) in GBLEVN10
C subroutine; increased field width for spectral resolution to
C accommodate models w/ up to 5-digit resolution (I3 to I5).
C
C 2016-10-25 M. Sienkiewicz - REPLACE INCORRECT HEIGHTS FOR ACARS OBS
C ABOVE 226.3HPA. (INCORRECT CALCULATION IN MERRA PREPDATA PROCESSING
C PRIOR TO WCOSS TRANSITION.) CONTROL BY NAMELIST SWITCH 'ACARSH'.
C 2020-11-19 M.SIENKIEWICZ -- IN GBLEVN06, MODIFY INTERPOLATION TO
C CORRECT ARRAY ACCESS FOR SP STATION. (AFTER CHANGE TO PREPDATA
C AND/OR BUFR LIBRARY THE SP LATITUDE LOADED IN YOB WAS SLIGHTLY
Expand Down Expand Up @@ -490,6 +492,11 @@
C PG4243 =.TRUE. ---> GIVE ALL MASS VARIABLES A
C PREPBUFR TBL. VAL. 15
C (DEFAULT=.TRUE.)
C ACARSH - RECALCULATE HEIGHTS FOR ACARS DATA WHEN P<226.3 MB
C ACARSH =.FALSE. ---> DO NOT CHANGE REPORTS
C ACARSH =.TRUE. ---> RECALCULATE STD. ATM. HEIGHT ABOVE 226.3 MB
C (DEFAULT=.TRUE.)
C
C
CC
C
Expand Down Expand Up @@ -525,15 +532,16 @@ SUBROUTINE GBLEVENTS(IDATEP,IUNITF,IUNITE,IUNITP,IUNITS,SUBSET,
REAL(8) OBS_8,QMS_8,BAK_8,SID_8,HDR_8(10)
REAL(8) BMISS,GETBMISS
LOGICAL DOVTMP,DOFCST,SOME_FCST,DOBERR,FCST,VIRT,DOANLS,
$ SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,
$ ACARSH

DIMENSION IUNITF(2)

COMMON /GBEVAA/ SID_8,OBS_8(13,255),QMS_8(12,255),BAK_8(12,255),
$ XOB,YOB,DHR,TYP,NLEV
COMMON /GBEVBB/ PVCD,VTCD
COMMON /GBEVCC/ DOVTMP,DOFCST,SOME_FCST,DOBERR,FCST,VIRT,
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,ACARSH
COMMON /GBEVDD/ ERRS(300,33,6)
COMMON /GBEVFF/ BMISS

Expand All @@ -555,7 +563,8 @@ SUBROUTINE GBLEVENTS(IDATEP,IUNITF,IUNITE,IUNITP,IUNITS,SUBSET,
$ 'POE QOE TOE ZOE WOE PWE PW1E PW2E PW3E PW4E NUL NUL '/

NAMELIST /PREVDATA/DOVTMP,DOFCST,SOME_FCST,DOBERR,DOANLS,
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,
$ ACARSH

C----------------------------------------------------------------------
C----------------------------------------------------------------------
Expand Down Expand Up @@ -592,6 +601,7 @@ SUBROUTINE GBLEVENTS(IDATEP,IUNITF,IUNITE,IUNITP,IUNITS,SUBSET,
ADPUPA_VIRT = .FALSE.
dopmsl = .false.
PG4243 = .TRUE.
ACARSH = .TRUE.
READ(5,PREVDATA,ERR=101,END=102)
GO TO 103
C-----------------------------------------------------------------------
Expand Down Expand Up @@ -627,6 +637,8 @@ SUBROUTINE GBLEVENTS(IDATEP,IUNITF,IUNITE,IUNITP,IUNITS,SUBSET,
DOBERR = .FALSE.
ADPUPA_VIRT = .FALSE.
dopmsl = .false.
PG4243 = .FALSE.
ACARSH = .FALSE.
ENDIF
IF(DOVTMP) RECALC_Q=.TRUE. ! RECALC_Q must be T if DOVTMP is T
WRITE (6,PREVDATA)
Expand Down Expand Up @@ -838,6 +850,10 @@ SUBROUTINE GBLEVENTS(IDATEP,IUNITF,IUNITE,IUNITP,IUNITS,SUBSET,
CALL GBLEVN08(IUNITP,SUBSET)
ENDIF

if(SUBSET .EQ. 'AIRCAR ' .AND. ACARSH ) then
CALL ACARSFIX(IUNITP)
end if

C RETURN TO CALLING PROGRAM TO WRITE GBL-EVENTED REPORT (SUBSET) INTO
C PREPBUFR FILE
C -------------------------------------------------------------------
Expand Down Expand Up @@ -891,14 +907,14 @@ SUBROUTINE GBLEVN02(IUNITP,IUNITS,NEWTYP,subset)
LOGICAL FCST,REJP_PS,REJPS,REJT,REJQ,REJW,REJPW,REJPW1,
$ REJPW2,REJPW3,REJPW4,SATMQC,SATEMP,SOLN60,SOLS60,
$ MOERR_P,MOERR_T,ADPUPA_VIRT,DOBERR,DOFCST,SOME_FCST,
$ DOVTMP,VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ DOVTMP,VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,ACARSH
REAL(8) BMISS

COMMON /GBEVAA/ SID_8,OBS_8(13,255),QMS_8(12,255),BAK_8(12,255),
$ XOB,YOB,DHR,TYP,NLEV
COMMON /GBEVBB/ PVCD,VTCD
COMMON /GBEVCC/ DOVTMP,DOFCST,SOME_FCST,DOBERR,FCST,VIRT,
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,ACARSH
COMMON /GBEVEE/PSG01,ZSG01,TG01(500),UG01(500),VG01(500),
x QG01(500),zint(500),pint(500),pintlog(500),plev(500),
x plevlog(500)
Expand Down Expand Up @@ -2190,13 +2206,13 @@ SUBROUTINE GBLEVN08(IUNITP,SUBSET) ! FORMERLY SUBROUTINE VTPEVN

LOGICAL EVNQ,EVNV,DOVTMP,TROP,ADPUPA_VIRT,DOBERR,DOFCST,
$ SOME_FCST,FCST,VIRT,SATMQC,RECALC_Q,DOPREV,
$ evnp,dopmsl,surf,PG4243
$ evnp,dopmsl,surf,PG4243,ACARSH

COMMON /GBEVAA/ SID_8,OBS_8(13,255),QMS_8(12,255),BAK_8(12,255),
$ XOB,YOB,DHR,TYP,NLEV
COMMON /GBEVBB/ PVCD,VTCD
COMMON /GBEVCC/ DOVTMP,DOFCST,SOME_FCST,DOBERR,FCST,VIRT,
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243
$ QTOP_REJ,SATMQC,ADPUPA_VIRT,RECALC_Q,DOPREV,dopmsl,PG4243,ACARSH
COMMON /GBEVFF/ BMISS

DATA EVNSTQ /'QOB QQM QPC QRC'/
Expand Down Expand Up @@ -2610,3 +2626,52 @@ subroutine hflip2 ( q,im,jm,dum )
q(:,j) = dum(:)
enddo
end subroutine hflip2

!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! NASA/GSFC, Global Modeling and Assimilation Office, Code 610.1 !
!-----------------------------------------------------------------------
!BOP
!
! !IROUTINE: ACARSFIX - modify std atm height for ACARS obs
!
! !INTERFACE:

subroutine acarsfix(IUNITP)
!
! !INPUT PARAMETERS
INTEGER IUNITP ! BUFR OUTPUT UNIT NUMBER

! !DESCRIPTION: Replace incorrect ACARS standard atmosphere heights
! that were written to MERRA obs files prior to WCOSS transition
!
! !REVISION HISTORY:
!
! 25Oct2016 M.Sienkiewicz Initial version
!
!EOP
!-----------------------------------------------------------------------

real(8) zev_8(4)
integer iret

COMMON /GBEVAA/ SID_8,OBS_8(13,255),QMS_8(12,255),BAK_8(12,255),
$ XOB,YOB,DHR,TYP,NLEV
COMMON /GBEVFF/ BMISS
COMMON /GBEVBB/ PVCD,VTCD
HGTF_HI(P) = 11000 - ALOG(P/226.3)/1.576106E-4

if (nlev.eq.1) then
pob = obs_8(1,1)
if (pob .lt. 226.3) then
zob = hgtf_hi(pob)
zev_8(1) = zob
zev_8(2) = qms_8(4,1)
zev_8(3) = pvcd
zev_8(4) = 43
CALL UFBINT(IUNITP,ZEV_8,4,1,iret,' ZOB ZQM ZPC ZRC ')
CALL UFBINT(IUNITP,ZEV_8(1),1,1,iret,' ELV ')
end if
end if
return
end

3 changes: 3 additions & 0 deletions src/Applications/NCEP_Paqc/GMAOprev/prevents.f
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
C STANDARD GET_ENVIRONMENT_VARIABLE; USE FORMATTED PRINT
C STATEMENTS WHERE PREVIOUSLY UNFORMATTED PRINT WAS > 80
C CHARACTERS
C 2017-05-22 M. SIENKIEWICZ - CALL MAXOUT TO INCREASE MAX RECORD SIZE
C TO AVOID LOSING SOUNDING RECORDS THAT SLIGHTLY EXCEED MAX
c
c rename all REAL(8) variables as
C *_8
Expand Down Expand Up @@ -232,6 +234,7 @@ PROGRAM PREPOBS_PREVENTS

CALL OPENBF(IUNITI,'IN ',IUNITI)
CALL OPENBF(IUNITP,'OUT',IUNITI)
call maxout(15000)

C DETERMINE WHICH NETWORK WE ARE RUNNING UNDER
C --------------------------------------------
Expand Down
Loading