MetOffice / opsinputs

JEDI library generating VarObs and Cx files
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

ensure GMIhigh has the correct ObsType #166

Closed stemiglio closed 1 year ago

stemiglio commented 1 year ago

This modifies the VarObs Writer filter to make sure GMIhigh has the correct ObsType. This is necessary for VAR as in standard JOPA the ops_obstype for GMIlow and GMIhigh are the same

stemiglio commented 1 year ago

All tests pass, see http://fcm1/cylc-review/taskjobs/smiglior/?suite=opsinputs_20230419

stemiglio commented 1 year ago

I have now tested the code with sith for GMIhigh. The VarObs file for JOPA (glu_jopa_varobs/GMIhigh.varobs) now is consistent with that generated in OPS (glu_varobs/GMIhigh.varobs). The JOPA varobs has:

batch ob num  level  field   Time obtype   Plevel         Callsign            ob value                 lat                 lon                time
    1      1      1     10   -114  29200   n/a    0288                       286.83133            -9.78161          -131.84155         -6848.00000
    1      1      2     10   -114  29200   n/a    0288                       286.10425            -9.78161          -131.84155         -6848.00000
    1      1      3     10   -114  29200   n/a    0288                       270.91220            -9.78161          -131.84155         -6848.00000
    1      1      4     10   -114  29200   n/a    0288                       282.92636            -9.78161          -131.84155         -6848.00000

and the OPS varobs:

batch ob num  level  field   Time obtype   Plevel         Callsign            ob value                 lat                 lon                time
    1      1      1     10   -180  29200   n/a    0288                       275.17822            67.97243            -4.89337        -10793.00000
    1      1      2     10   -180  29200   n/a    0288                       271.02048            67.97243            -4.89337        -10793.00000
    1      1      3     10   -180  29200   n/a    0288                       253.80594            67.97243            -4.89337        -10793.00000
    1      1      4     10   -180  29200   n/a    0288                       268.90065            67.97243            -4.89337        -10793.00000

so both have now the correct (29200) ObType for GMIhigh. I have also tested JOPA with fill_obstype_from_ops_subtype: false and the varob output is consistent with that from JOPA with fill_obstype_from_ops_subtype: true.

mikecooke77 commented 1 year ago

This is the way it could be solved by variable assignment:

    - filter: Variable Assignment
      assignments:
      - name: MetaData/observationSubTypeNum
        value: <the value you wish it to be>
stemiglio commented 1 year ago

@mikecooke77 many thanks for your suggestion, I have now tested it and I am pleased to say it works as intended. I am now closing this PR as it is not needed any longer.