dtcenter / METplus

Python scripting infrastructure for MET tools.
https://metplus.readthedocs.io
Apache License 2.0
94 stars 37 forks source link

Feature 2388 update tci #2550

Closed DanielAdriaansen closed 3 months ago

DanielAdriaansen commented 3 months ago

Closes #2388.

Includes:

  1. New table of contents at top of use case docs file
  2. Updated FCST python embedding script
  3. Updated OBS Python embedding script
  4. New station metadata file required for the OBS data
  5. Reorganized and updated use case conf file
  6. New OBS sample data

Pull Request Checklist

See the METplus Workflow for details.

georgemccabe commented 3 months ago

@DanielAdriaansen, could you fill out the pull request template? It would be useful to know what testing is expected of the reviewers and if the differences in the use case output are expected.

DanielAdriaansen commented 3 months ago

@DanielAdriaansen, could you fill out the pull request template? It would be useful to know what testing is expected of the reviewers and if the differences in the use case output are expected.

Done, sorry about that. I had this in draft and converted it as ready but forgot to go back and add the details.

georgemccabe commented 3 months ago

Documentation changes from this PR

DanielAdriaansen commented 3 months ago

Looking closer at the difference tests from CI, I note that there were unexpected differences in the FCST data. However, way back I fixed a bug here: https://github.com/dtcenter/METplus/issues/2388#issuecomment-1787789180, and the differences were only in MAM and JJA so that is reassuring and DJF and SON show zero differences. Thus, the formulation of TCI remains the same, and is being called correctly for the FCST.

I spot checked a few OBS sites. From the point_stat MPR files for DJF, I see:

Truth:
Borgo Cioffi         40.52375   14.95744      10       0   4.62984    0.42177
Tonzi Ranch        38.4316  -120.96598      10       0  -2.23139    1.7888
Grignon               48.84422    1.95191      10       0  -1.09105    1.2232

Output:
IT-BCi    40.5237   14.9574       10       0   4.62984    0.95305
US-Ton    38.4309 -120.966        10       0  -2.23139    2.91969
FR-Gri    48.8442    1.9519       10       0  -1.09105    0.717

What we can see is that: 1) FCST values match 2) OBS values do not match, but the sign is the same and the new values are higher for these three sites 3) The station metadata (lat/lon) matches

The OBS values being different here is almost certainly driven by differences in decisions about what quality of raw FLUXNET data to include in the TCI calculation, compared to whatever data the previous TCI provider chose to use. I'm not sure there's a way to quantify this, but rather just be confident in our data filtering and take the matching FCST values as an indicator the actual math for computing TCI remains unchanged.

anewman89 commented 3 months ago

@DanielAdriaansen Thanks for the testing and explanation of the results. I agree it seems like we're ok with the TCI computation. I also approve the PR.