Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ndbc_stations.xml after 7-character buoy ids are introduced in Aug/Sept 2023 #2631

Closed
6 of 20 tasks
JohnHalleyGotway opened this issue Jul 28, 2023 · 4 comments · Fixed by #3002
Closed
6 of 20 tasks
Assignees
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue MET: PreProcessing Tools (Point) priority: medium Medium Priority requestor: NOAA/EMC NOAA Environmental Modeling Center required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: task An actionable item of work
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Jul 28, 2023

Describe the Task

The ndbc_stations.xml file is a static file defining (lat, lon) NDBC buoy locations. Unfortunately, the NDBC file format is not self-describing and ascii2nc performs a lookup from a static table file to retrieve the (lat, lon) location for each buoy based on its ID. The issue is that these locations change relatively frequently. For example, in the 18 days between July 10, 2023 and July 28, 2023, differences emerged for 30 of the 2626 lines in that file.

The huge problem here is that NDBC buoy data can only be trusted if...

  1. The ndbc_stations.xml locations file has been updated very recently.
  2. You are processing near realtime buoy data.

Processing "old" buoy data creates low confidence in the accuracy of the (lat, lon) locations.

This issue is to update the locations in that file after a relatively large change occurs in mid to late August 2023. Some of the stations ids will be modified from 5 characters to 7 characters. Since ascii2nc parses this data based on whitespace rather than using a fixed-width-format, no code changes should be required. But we should test with 7 character buoy ids to confirm they are processed as expected.

Please see this change description:
https://www.weather.gov/media/notification/pdf_2023_24/scn23-85_ndbc_web_file_format_change.pdf

Here are sample commands you can use to regenerate this file:

cd MET/scripts/python/utility
./build_ndbc_stations_from_web.py
mv merged.txt ndbc_stations.xml

Please coordinate with [email protected] on these updates.

Time Estimate

2 hours.

Sub-Issues

Consider breaking the task down into sub-issues.
None needed.

Relevant Deadlines

Do this between mid-August and mid-September, 2023 after the changes have taken effect.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added requestor: NOAA/EMC NOAA Environmental Modeling Center type: task An actionable item of work priority: medium Medium Priority alert: NEED ACCOUNT KEY Need to assign an account key to this issue MET: PreProcessing Tools (Point) labels Jul 28, 2023
@JohnHalleyGotway JohnHalleyGotway added this to the MET 12.0.0 milestone Jul 28, 2023
@JohnHalleyGotway JohnHalleyGotway changed the title Update ndbc_stations.xml after 7-character buoy id's are introduced in Aug/Sept 2023 Update ndbc_stations.xml after 7-character buoy ids are introduced in Aug/Sept 2023 Jul 28, 2023
@JohnHalleyGotway
Copy link
Collaborator Author

FYI, we could consider setting this script up to run via cron nightly on NCAR machines and posting the result to a public website, such as:
https://dtcenter.ucar.edu/dfiles/code/METplus/MET/

@georgemccabe
Copy link
Collaborator

We should also update the script used to update the buoy stations file to include a timestamp so it is clear when the file was last updated. Without this information it is difficult to know which version of the file should be used for a use case.

The active stations file includes a "created" attribute at the top. If the script combines this file with other data, we could consider generating our own timestamp of when the script was run and include that instead.

@georgemccabe
Copy link
Collaborator

We should also add a log message to note which station file was used so we can tell if the MET_NDBC_STATIONS environment variable is used or not. @JohnHalleyGotway said:

We should look to see how similar things are logged, like MET_GRIB_TABLES and mimic that.

@JohnHalleyGotway JohnHalleyGotway added the required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone label May 15, 2024
@JohnHalleyGotway
Copy link
Collaborator Author

Recommend doing this work during the LAST beta development cycle.

@JohnHalleyGotway JohnHalleyGotway moved this from 🟢 Ready to 🏗 In progress in MET-12.0.0 Development Oct 22, 2024
JohnHalleyGotway added a commit that referenced this issue Oct 23, 2024
JohnHalleyGotway added a commit that referenced this issue Oct 23, 2024
…ed to be periodically updated. Note that this is NOT an exhaustive list.
JohnHalleyGotway added a commit that referenced this issue Oct 23, 2024
JohnHalleyGotway added a commit that referenced this issue Oct 23, 2024
@JohnHalleyGotway JohnHalleyGotway moved this from 🏗 In progress to 🔎 In review in MET-12.0.0 Development Oct 25, 2024
@JohnHalleyGotway JohnHalleyGotway linked a pull request Oct 25, 2024 that will close this issue
17 tasks
JohnHalleyGotway added a commit that referenced this issue Oct 25, 2024
…I encountered when using the utility to inspect the diffs for this PR.
JohnHalleyGotway added a commit that referenced this issue Oct 28, 2024
* Per #2631, regenerate ndbc_stations.xml for MET-12.0.0 on October 22, 2024.

* Per #2631, add MET_BASE anchor

* Per #2631, add a description of some of the static data files that need to be periodically updated. Note that this is NOT an exhaustive list.

* Per #2631, consistent wording

* Per #2631, subset by update frequency.

* Per #2631, consistent wording. Fix typos.

* Per #2631, fix typo and URL

* Per #2631, fix masked array error in the get_precision(...) function I encountered when using the utility to inspect the diffs for this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue MET: PreProcessing Tools (Point) priority: medium Medium Priority requestor: NOAA/EMC NOAA Environmental Modeling Center required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: task An actionable item of work
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

3 participants