geometry:
  fms initialization:
    namelist filename: fv3-jedi/fv3files/fmsmpp.nml
    field table filename: fv3-jedi/fv3files/field_table_gmao
  akbk: fv3-jedi/fv3files/akbk72.nc4
  layout: [1,1]
  npx: 91
  npy: 91
  npz: 72
  field metadata override: fv3-jedi/fieldmetadata/geos.yaml
time window:
  begin: &idate 2021-12-12T21:00:00Z
  length: PT6H
increment variables: [ua,va,t,delp,q,qi,ql,o3ppmv]

background:
   members from template:
     template:
       datetime: 2021-12-12T00:00:00Z
       filetype: cube sphere history
       provider: geos
       datapath: './'
       filenames: [c90/mem%mem%/geos.bkg.20211212_000000z.nc4, fv3-jedi/bkg/geos.crtmsrf.91.nc4]
       state variables: &state_variables [u,v,ua,va,t,delp,ps,q,qi,ql,qr,qs,o3ppmv,phis,
                        qls,qcn,cfcn,frocean,frland,varflt,ustar,bstar,
                        zpbl,cm,ct,cq,kcbl,tsm,khl,khu,frlake,frseaice,vtype,
                        stype,vfrac,sheleg,ts,soilt,soilm,u10m,v10m]
     pattern: '%mem%'
     nmembers: 3
     zero padding: 3

driver:
  read HX from disk: false
  do posterior observer: false
  do test prints: false
  save posterior mean: true
  save posterior ensemble: false
  save prior mean: true
  save posterior mean increment: true
  save posterior ensemble increments: true
  update obs config with geometry info: true
local ensemble DA:
  solver: GETKF
  use linear observer: true
# vertical localization:
#   fraction of retained variance: 0.95
#   lengthscale: 7
#   lengthscale units: levels
# inflation:
#   rtps: 0.85
#   rtpp: 0.0
#   mult: 1.0
  vertical localization:
    fraction of retained variance: .5
    lengthscale: 1.5
    lengthscale units: logp
  inflation:
    rtps: 0.5
    rtpp: 0.6
    mult: 1.1

output ensemble increments:
  filetype: cube sphere history
  provider: geos
  datapath: Data/inc/mem%{member}%
  filename: inc.20220207_0000z.nc4
output:
  filetype: auxgrid
  gridtype: latlon
  filename: Data/ana/xamean.
output mean prior:
  filetype: auxgrid
  gridtype: latlon
  filename: Data/ana/xbmean.
output increment:
  filetype: auxgrid
  gridtype: latlon
  filename: Data/inc/xainc.
observations:
  observers:
################## SCATWINDS
#
    - linear obs operator:
        hofx scaling field: SurfaceWindScalingHeight
        hofx scaling field group: DerivedVariables
        interpolation method: linear
        name: VertInterp
        observation alias file: /discover/nobackup/rtodling/SwellExperiments/swell-localensembleda/configuration/jedi/interfaces/geos_atmosphere/observations/obsop_name_map.yaml
        observation vertical coordinate: adjustedHeight
        observation vertical coordinate group: DerivedVariables
        vertical coordinate: geopotential_height
      obs operator:
        hofx scaling field: SurfaceWindScalingHeight
        hofx scaling field group: DerivedVariables
        interpolation method: linear
        name: VertInterp
        observation alias file: /discover/nobackup/rtodling/SwellExperiments/swell-localensembleda/configuration/jedi/interfaces/geos_atmosphere/observations/obsop_name_map.yaml
        observation vertical coordinate: adjustedHeight
        observation vertical coordinate group: DerivedVariables
        vertical coordinate: geopotential_height
      obs post filters:
      - action:
          error function:
            name: ObsFunction/ObsErrorModelStepwiseLinear
            options:
              errors:
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              - 2.0
              xvals:
              - 110000
              - 105000
              - 100000
              - 95000
              - 90000
              - 85000
              - 80000
              - 75000
              - 70000
              - 65000
              - 60000
              - 55000
              - 50000
              - 45000
              - 40000
              - 35000
              - 30000
              - 25000
              - 20000
              - 15000
              - 10000
              - 7500
              - 5000
              - 4000
              - 3000
              - 2000
              - 1000
              xvar:
                name: MetaData/pressure
          name: assign error
        filter: Bounds Check
        filter variables:
        - name: windEastward
        - name: windNorthward
        maxvalue: 135
        minvalue: -135
      - action:
          name: reject
        filter: Perform Action
        filter variables:
        - name: windEastward
        where:
        - is_in: 100
          variable: PreUseFlag/windEastward
      - action:
          name: reject
        filter: Perform Action
        filter variables:
        - name: windNorthward
        where:
        - is_in: 100
          variable: PreUseFlag/windNorthward
      - action:
          inflation variable:
            name: ObsFunction/ObsErrorFactorPressureCheck
            options:
              adjusted_error_name: GsiAdjustObsError
              geovar_sfc_geomz: surface_geometric_height
              inflation factor: 4.0
              variable: windEastward
          name: inflate error
        filter: BlackList
        filter variables:
        - name: windEastward
        where:
        - is_in: 290
          variable:
            name: ObsType/windEastward
      - action:
          inflation variable:
            name: ObsFunction/ObsErrorFactorPressureCheck
            options:
              adjusted_error_name: GsiAdjustObsError
              geovar_sfc_geomz: surface_geometric_height
              inflation factor: 4.0
              variable: windNorthward
          name: inflate error
        filter: BlackList
        filter variables:
        - name: windNorthward
        where:
        - is_in: 290
          variable:
            name: ObsType/windNorthward
      - action:
          name: reject
        filter: Bounds Check
        filter variables:
        - name: windEastward
        - name: windNorthward
        maxvalue: 1.0e-12
        test variables:
        - name: ObsFunction/ScatWindsAmbiguityCheck
        where:
        - is_in: 290
          variable:
            name: ObsType/windEastward
      - filter: Bounds Check
        filter variables:
        - name: windEastward
        - name: windNorthward
        maxvalue: 5.0
        minvalue: -5.0
        test variables:
        - name: ObsFunction/Arithmetic
          options:
            coefs:
            - 1.0
            - -1.0
            variables:
            - name: ObsValue/windEastward
            - name: HofX/windEastward
      - filter: Bounds Check
        filter variables:
        - name: windEastward
        - name: windNorthward
        maxvalue: 5.0
        minvalue: -5.0
        test variables:
        - name: ObsFunction/Arithmetic
          options:
            coefs:
            - 1.0
            - -1.0
            variables:
            - name: ObsValue/windNorthward
            - name: HofX/windNorthward
      - action:
          name: reject
        defer to post: true
        filter: Background Check
        filter variables:
        - name: windEastward
        function absolute threshold:
        - name: ObsFunction/WindsSPDBCheck
          options:
            cgross:
            - 5.0
            error_max:
            - 6.1
            error_min:
            - 1.4
            variable: windEastward
            wndtype:
            - 290
      - action:
          name: reject
        defer to post: true
        filter: Background Check
        filter variables:
        - name: windNorthward
        function absolute threshold:
        - name: ObsFunction/WindsSPDBCheck
          options:
            cgross:
            - 5.0
            error_max:
            - 6.1
            error_min:
            - 1.4
            variable: windNorthward
            wndtype:
            - 290
      obs prior filters:
      - SkipWhenNoObs: false
        Transform: AdjustedHeightCoordinate
        filter: Variable Transforms
      - SkipWhenNoObs: false
        Transform: SurfaceWindScalingHeight
        filter: Variable Transforms
      obs space:
        name: Scatterometer Winds
        distribution:
          name: Halo
          halo size: 5000e3
        obsdatain:
          engine:
            obsfile: scatwind.20211211T210000Z.nc4
            type: H5File
        obsdataout:
          engine:
            obsfile: hofx.scatwind.20211211T210000Z.nc4
            type: H5File
        simulated variables:
        - windEastward
        - windNorthward

      obs error:
        covariance model: diagonal

      obs localizations:
      - localization method: Horizontal Box car
        lengthscale: 5000e3
        max nobs: 1000


