Open scottylad501 opened 3 years ago
@Midms27 check this link for reference on mandatory fields of station information highlighted by @scottylad501: https://oscar.wmo.int/surface/#/search/station/stationReportDetails/0-20000-0-78583
@Midms27 this is a repository maintained by WMO with WIGOS code tables: https://github.com/wmo-im/wmds/tree/master/tables_en
@iedwards I am considering adding https://github.com/wmo-im/wmds as a git submodule to the project so we can refer to the WIGOS code tables in this WMO repository.
@Midms27 please proceed with the following changes:
General instructions:
For each of these fields use the following steps: 1 - Create a corresponding model for the new table. Example: for "WMO Region" create WMORegion model and add a new ForeignKey field to the Station model linking these two objects. For "WMO Program" search for the correct type. 2 - Generate migrations and apply it 3 - Load the CSV file into the new model table. Example for "WMORegion" model, load into wx_wmoregion table 4 - Generate the fixture for this model using the django unload command: https://docs.djangoproject.com/en/4.0/howto/initial-data/#:~:text=You%20can%20load%20data%20by,re%2Dloaded%20into%20the%20database. 5 - Update the frontend code to replace the input text by a dropdown component pointing to the new field
Remark: We will create an update script to move the data stored in the old text fields in Belize to the new field before removing the old fields.
@Midms27 plz check if we can rename the existing "country" CharField to "remarks" and then add a new ForeignKey field for country.
Implement the WIGOS metadata categories that are mandatory for WMO OSCAR - The categories are found on page 4 of the link document - https://www.dropbox.com/s/li8e0vu4lep41y0/us_metadata_opencdms.docx?dl=0
Make sure that SURFACE metadata export format matches XML format needed for OSCAR(for the mandatory fields outlined above)
Test SURFACE export and show that it works in OSCAR
Instrumentation and Maintenance section should be linked to NMS station report and inventory see ISSUE 12 - https://github.com/opencdms/surface/issues/12