Help understanding hofx yaml for creating simulated obs


I am wondering if someone might be able to help verify my understanding of the YAML configuration when generating obs using HofX.

Take this example from the OOPS QG model test input:

  nx: 40
  ny: 20
  depths: [4500.0, 5500.0]
initial condition:
  date: 2010-01-01T00:00:00Z
  filename: Data/
  name: QG
  tstep: PT1H
forecast length: PT15H
window begin: 2010-01-01T00:00:00Z
window length: PT15H
  - obs operator:
      obs type: Stream
    obs space:
          obsfile: Data/
      obs type: Stream
        begin: PT10H
        nval: 1
        obs density: 100
        obs error: 4.0e6
        obs period: PT1H

The part I’m not sure about is the generate section, which is not described in the documentation I’ve found so far. I take the above to mean “run a forecast for analysis time 2010-01-01T00:00:00Z using initial conditions from Data/ and between 10-11 hours into that forecast generate 100 random observations”. I am wondering if that is correct? I am not 100% sure I’m correctly understanding the meaning of “begin” and “obs period” in the “generate” section. It’s been a long time since I’ve done this, so can’t remember.


In this case the “begin” key defines the first time after the “window begin” date to generate the first observation. So the first observation time would be 2010-01-01T10:00:00Z 10 hours after the window begin date. The “obs period” is actually a frequency with which to take observations until the end of the window. So with the window ending at 2010-01-01T15:00:00Z since the length is PT15H observations would be generated every hour after the begin time until then. So one should get 5 observations if the frequency is PT1H.

For how this set see:

The “obs density” key is used to determine how many locations one wants to have observations at at a given time. When using this key as in this example 100 (x,y,z) locations are chosen according to a random distribution.
For this set up see:

So essentially you are correct, just that the obs period tells how often to get obs until the end of the window.