NOAA-EMC / JEDI-T2O

JEDI Transition to Operations activities.
GNU Lesser General Public License v2.1
5 stars 4 forks source link

UFO Evaluation - GSI error model for radiosonde and aircraft data #37

Open emilyhcliu opened 1 year ago

emilyhcliu commented 1 year ago

Background:

  1. In UFO, GSI error model for radiosonde and aircraft data had been implemented.
  2. In GSI, the error models for aircraft and radiosonde are applied after the data are read in: read_prepbufr.f90

            if(tob) then
                 ppb=obsdat(1,k)
                 if (aircraftobs .and. aircraft_t_bc .and. acft_profl_file) then
                    call errormod_aircraft(pqm,tqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm,hdr3)
                 else
                    call errormod(pqm,tqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm)
                 end if
                 toe=obserr(3,k)*errout
    
            else if(uvob) then
                 if (aircraftobs .and. aircraft_t_bc .and. acft_profl_file) then
                    call errormod_aircraft(pqm,wqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm,hdr3)
                 else
                    call errormod(pqm,wqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm)
                 end if
                 woe=obserr(5,k)*errout
                 if (inflate_error) woe=woe*r1_2
                 if(obsdat(1,k) < r50)woe=woe*r1_2
    
            else if(qob) then
                 qmaxerr=emerr
                 if (aircraftobs .and. aircraft_t_bc .and. acft_profl_file) then
                    call errormod_aircraft(pqm,qqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm,hdr3)
                 else
                    call errormod(pqm,qqm,levs,plevs,errout,k,presl,dpres,nsig,lim_qm)
                 end if
                 qoe=obserr(2,k)*one_tenth*errout
                 if (inflate_error) then
                    qmaxerr=emerr*r0_7; qoe=qoe*r1_2
                 end if

    qcmod.f90 - contains subroutine errormod for radiosonde and subroutine errormod_aircraft for aircraft

Objectives - test and modify the ObsErrorFactorConventional obsfunction to match GSI result

Steps

  1. Get IODA obs and geoval files for radioaonde and aircarft converted from GSI diagnostics. Note that we could save the intermediate obs error values from the error models in the obs files as reference (truth).
  2. Create YAML file for each to read in the ioda and geoval files and then apply the error model to get initial error assignment.
  3. Exam the output file to check the observation error.
  4. Modify the ObsErrorFactorConventional obsfunction to match GSI result.

More information

There are yaml file and ctest in the UFO to test the ObsErrorFactorConventional obsfunction:

Here is the test YAML:

window begin: 2020-12-01T09:00:00Z
window end: 2020-12-01T15:00:00Z

observations:
- obs operator:
    name: VertInterp
  obs space:
    name: test_obserrorfactorconv
    obsdatain:
      obsfile: Data/ufo/testinput_tier_1/converr_vadwind_obs_2020120112_s.nc4
      obsgrouping:
        group variables: ["station_id", "dateTime"]
        sort variable: "air_pressure"
        sort order: "descending"
    simulated variables: [eastward_wind]
#   obsdataout:
#     obsfile: Data/converr_vadwind_obs_2020120112_s_out.nc4
  geovals:
    filename: Data/ufo/testinput_tier_1/converr_vadwind_geoval_2020120112_s.nc4
  obs function:
    name: ObsErrorFactorConventional@ObsFunction
    variables: [eastward_wind]
    tolerance: 1.e-6
    options:
      inflate variables: [eastward_wind] # Required
      test QCflag: PreQC  # Optional. Default is from filter qcflags     
      test QCthreshold: 2 # Optonal only when using PreQC flags 
                          # Default value = 3 for PreQC
      pressure: "MetaData/air_pressure"

Uncomment the output section, and run the test:

ctest -VV -R test_ufo_function_obserrorfactorconv

You will find the output file in /build/ufo/test/Data/converr_vadwind_obs_2020120112_s_out_0000.nc4

emilyhcliu commented 1 year ago

Let's get the obs and geoval files first. We can try to write out the obs error values right after calling the errormodel and errormodel_aircraft into the obs file.

emilyhcliu commented 1 year ago

Also, check out the latest ufo-bundle. It is quite different from the previous release.