diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2021-01-07 16:29:35 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-01-24 14:29:38 +0100 |
commit | f48efce5614763d16beeb150af1a4eb030148b38 (patch) | |
tree | 558bf14fd1801a4c257e5185a7e9b30a432215cb /kweather/README.txt | |
parent | f89d317e769be7af5399d7d52d3b0d3099c7d025 (diff) | |
download | tdetoys-f48efce5614763d16beeb150af1a4eb030148b38.tar.gz tdetoys-f48efce5614763d16beeb150af1a4eb030148b38.zip |
kweather: Improve station list processing
+ Add a README file with information about the processing stations
+ Automatically generate stations.dat and weather_stations.desktop
from data/nsd_cccc.txt before cmake checks
+ File downloaded from https://tgftp.nws.noaa.gov/data/nsd_cccc.txt
+ Clean up weather_stations.desktop.in and moved relevant information
to data/station_names.txt
+ Added GG to EU and NU, PE to Canada
+ Mapped most of African countries to AF region
+ Mapped few other countries to their regions
+ Algeria is not in the ME region
+ Christmas Islands code is CX
+ Added Greenland to Atlantic
+ Added some more states to Oceania
+ Added some more states to Cenetral and South Americas
+ Antarctica as new region
+ Renamed Australiasia to Australia and Oceania
+ Region abbreviations in alphabetic order
+ Removed Atlantic and Mexico regions and added North America
+ Mapped most of the outstanding stations in Canada and elsewhere
+ J Leslie Turriff provided information on the stations in Canada
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
Modify the generation of weather_stations.desktop so that it is possible
to merge translations into a generated file.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kweather/README.txt')
-rw-r--r-- | kweather/README.txt | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/kweather/README.txt b/kweather/README.txt new file mode 100644 index 0000000..2ca92e2 --- /dev/null +++ b/kweather/README.txt @@ -0,0 +1,77 @@ +January 2021 +==================== +Stations are retrieved from https://tgftp.nws.noaa.gov/data/nsd_cccc.txt + +wget -O data/nsd_cccc.txt https://tgftp.nws.noaa.gov/data/nsd_cccc.txt + +dos2unix data/nsd_cccc.txt + +data/station_names.txt is used to provide correct orthography of the area +where the station is located, which is used in the configuration dialog +of kweather applet. + +The format of station_names.txt is ICAO;status;region_state;name;INFO1;INFO2 + +If status is one of none|false|na|decomissioned the station is ignored. +INFO1 is what was previously the 5th position in weather_stations.desktop +makred with ------ +INFO2 is what was previously the 6th position in weather_stations.desktop +makred with --- + +The source nsd_cccc.txt has illed information and structure that needs to be +corrected in the files used in kweather. Some of the problems are: +1. decomissioned stations +2. names of station locations + +The genstations.pl is based on following idea + +Based on the input nsd_cccc.txt and the station_names.txt file we can +generate stations.dat like following: + + for each station in nsd_cccc.txt do + check if station ID matches one in station_names.txt + if it matches then + use the name of the station + else + use the name from nsd_cccc.txt + write entry/line in stations.dat + +Based on stations.dat and weather_stations.desktop.in we can generate +weather_stations.desktop. +weather_stations.desktop will be updated with the names from stations.dat +and the additional information will be preserved like following. + for each station in stations.dat + for each region from weather_stations.desktop.in + if state is provided in stations.dat + use the state to build a key with region and state + else + for each state in the states of the region + use the state to build a key + if section for this key exists + and + if name of the section matches + stop processing + proper section was found + we add the station here + write entry for the station + +There are few problems with this approach and the ill provided nsd_cccc.txt data + +1. States are missing and thus correlation between station and state can not be done +2. When State is missing, based on the country/state name some entries are ambig + Example Georgia and US state of Georgia + +Country list seemed to be used for the country names and as convention here +wget ftp://ftp.ncdc.noaa.gov/pub/data/noaa/country-list.txt but the FIPS notation was +dropped in 2008 as a standard, however continiues to be used. + + "The Census Bureau decided that, based on decades of using the terminology FIPS to + describe its codes, it would continue to use the FIPS name for its updated codes, + where FIPS now stood for FIP "Series", since there no longer existed an official + FIP "Standard". [https://en.wikipedia.org/wiki/FIPS_county_code] + +A mapping to ISO 3166 ALPHA-2 https://laendercode.net/en/2-letter-list.html +seems more appropriate. + +TODO: check the country code mapping in weather_stations.desktop.in + |