diff --git a/data/table_files/ndbc_stations.xml b/data/table_files/ndbc_stations.xml index ec1d252dc2..a62b75aed5 100644 --- a/data/table_files/ndbc_stations.xml +++ b/data/table_files/ndbc_stations.xml @@ -38,10 +38,17 @@ + + + + + + + @@ -53,12 +60,12 @@ - - - + + + - + @@ -96,6 +103,7 @@ + @@ -104,7 +112,7 @@ - + @@ -146,11 +154,11 @@ - + - - + + @@ -165,7 +173,7 @@ - + @@ -174,7 +182,7 @@ - + @@ -196,14 +204,14 @@ - + - - + + - + @@ -218,7 +226,12 @@ + + + + + @@ -226,16 +239,16 @@ - + - + - + @@ -245,10 +258,10 @@ - - + + - + @@ -262,7 +275,7 @@ - + @@ -279,8 +292,8 @@ - - + + @@ -288,7 +301,7 @@ - + @@ -308,9 +321,9 @@ - + - + @@ -324,17 +337,17 @@ - - + + - - + + - + - + @@ -366,9 +379,9 @@ - + - + @@ -399,7 +412,7 @@ - + @@ -412,11 +425,12 @@ - + + - + @@ -445,8 +459,8 @@ - - + + @@ -474,7 +488,7 @@ - + @@ -542,22 +556,29 @@ - - + + - + + + + + + + + - + - + @@ -568,7 +589,7 @@ - + @@ -581,7 +602,7 @@ - + @@ -598,27 +619,27 @@ - - - + + + - - - + + + - + - + - + @@ -637,7 +658,7 @@ - + @@ -675,15 +696,15 @@ - + - + - + @@ -707,10 +728,10 @@ - - + + - + @@ -735,31 +756,36 @@ - + - + + + + + + - - - + + + - - - + + + - - - + + + @@ -830,19 +856,20 @@ - + - + - + - + + @@ -855,11 +882,11 @@ - + - + @@ -870,9 +897,12 @@ - + + + + @@ -882,11 +912,11 @@ - - - - - + + + + + @@ -899,6 +929,7 @@ + @@ -907,7 +938,19 @@ + + + + + + + + + + + + @@ -928,7 +971,7 @@ - + @@ -998,11 +1041,13 @@ + + @@ -1039,7 +1084,7 @@ - + @@ -1048,9 +1093,10 @@ - + + @@ -1085,7 +1131,7 @@ - + @@ -1100,8 +1146,9 @@ - + + @@ -1114,7 +1161,7 @@ - + @@ -1124,8 +1171,9 @@ - + + @@ -1161,6 +1209,7 @@ + @@ -1175,7 +1224,7 @@ - + @@ -1235,6 +1284,8 @@ + + @@ -1244,13 +1295,14 @@ - + + @@ -1263,13 +1315,14 @@ + - + - + @@ -1296,7 +1349,7 @@ - + @@ -1314,7 +1367,7 @@ - + @@ -1323,9 +1376,12 @@ + + + @@ -1355,13 +1411,13 @@ - + - + @@ -1375,6 +1431,7 @@ + @@ -1382,6 +1439,7 @@ + @@ -1402,7 +1460,7 @@ - + @@ -1482,7 +1540,7 @@ - + @@ -1491,7 +1549,7 @@ - + @@ -1530,7 +1588,7 @@ - + @@ -1544,6 +1602,7 @@ + @@ -1553,6 +1612,7 @@ + @@ -1593,14 +1653,17 @@ + + + @@ -1609,7 +1672,7 @@ - + @@ -1633,11 +1696,13 @@ + - + + @@ -1656,6 +1721,7 @@ + @@ -1685,7 +1751,7 @@ - + @@ -1698,7 +1764,7 @@ - + @@ -1718,7 +1784,7 @@ - + @@ -1800,6 +1866,7 @@ + @@ -1808,7 +1875,7 @@ - + @@ -1845,7 +1912,7 @@ - + @@ -1857,7 +1924,7 @@ - + @@ -1874,8 +1941,9 @@ - + + @@ -1891,10 +1959,12 @@ + + @@ -1937,6 +2007,7 @@ + @@ -2000,6 +2071,7 @@ + @@ -2031,6 +2103,7 @@ + @@ -2074,6 +2147,8 @@ + + @@ -2087,6 +2162,7 @@ + @@ -2096,6 +2172,7 @@ + @@ -2140,8 +2217,10 @@ + + @@ -2186,6 +2265,7 @@ + @@ -2193,6 +2273,7 @@ + @@ -2325,6 +2406,7 @@ + @@ -2333,6 +2415,7 @@ + @@ -2369,14 +2452,17 @@ + + + @@ -2407,11 +2493,13 @@ + + @@ -2428,6 +2516,7 @@ + @@ -2544,6 +2633,7 @@ + @@ -2610,6 +2700,7 @@ + diff --git a/docs/Contributors_Guide/dev_details/index.rst b/docs/Contributors_Guide/dev_details/index.rst index 81a0f5c451..fde3513711 100644 --- a/docs/Contributors_Guide/dev_details/index.rst +++ b/docs/Contributors_Guide/dev_details/index.rst @@ -9,3 +9,4 @@ MET code base. The list of topics is certainly not comprehensive. :titlesonly: tmp_file_use + static_data_files diff --git a/docs/Contributors_Guide/dev_details/static_data_files.rst b/docs/Contributors_Guide/dev_details/static_data_files.rst new file mode 100644 index 0000000000..e159905dd3 --- /dev/null +++ b/docs/Contributors_Guide/dev_details/static_data_files.rst @@ -0,0 +1,124 @@ +.. _static_data_files: + +Static Data Files +================= + +The MET software package includes static data files that are read at +runtime and impact the behavior of the MET tools. These static data +files are organized into subdirectories of the top-level :code:`data` +directory. When the MET :code:`configure` script is run, the +:code:`--prefix path` option (default :code:`/usr/local`) defines +the directory where the resulting executables and data files should +be installed. The :code:`make install` step copies the binaries into +the installation :code:`bin` directory and data files into the +:code:`share/met` directory. By default these static data files are +read from the installed :code:`share/met` directory at runtime +unless the **MET_BASE** environment variable, described in +:numref:`User's Guide Section %s `, is set to +override the default location. + +Depending on their type, the content of these data files grows stale +over time and requires updates. Listed below are descriptions of some +of the static data sources found in :code:`share/met`, along with +recommended update frequency and method. + +- Often updated *by developers* during development: + + - The :code:`config` directory contains all of the default configuration + files used by the MET tools. These are updated routinely when adding new + features and enhancements to the tools. + + - The :code:`python` and :code:`wrappers` directories contain Python + scripts to support the Python-embedding logic used throughout MET. + These are updated routinely when adding new Python-embedding features + and enhancements. + + - :code:`table_files/met_header_columns_VX.Y.txt` files define + line types and column names for each major **X.Y** released version + of MET. Stat-Analysis reads these files when processing the STAT output + from other MET tools. A new header file is added during development + whenever the **X.Y** software version number is increased. + +- Updated *by developers* prior to **each major X.Y release**: + + - :code:`table_files/ndbc_stations.xml`, described in + :numref:`User's Guide Section %s `, is read by + ASCII2NC and contains buoy latitude and longitude locations that can + change on a daily basis. To be used in real time, this file should be + regenerated daily and the :code:`MET_NDBC_STATION` environment variable + should define its location. Use the + :code:`scripts/python/utility/build_ndbc_stations_from_web.py` + utility to update its contents. + + - :code:`table_files/airnow_monitoring_site_locations_v2.txt`, + described in :numref:`User's Guide Section %s `, + is read by ASCII2NC, contains AIRNOW site latitude and longitude + locations that can change over time, and should be routinely updated. + The :code:`MET_AIRNOW_STATIONS` environment variable can be set to + override its default location. + + - :code:`table_files/grib*.txt` files define the GRIB1 and GRIB2 table + information. They are read by the MET libraries which read GRIB1 and + GRIB2 input data. Additions are made to these tables over time and + they should be routinely updated. The GRIB2 tables should be kept + current with those included in the **wgrib2** software found in the + `wgrib2 code repository `_. + + - :code:`tc_data/wwpts_us.txt` is read by TC-Pairs, contains hurricane + watch/warning information, and is referenced in the TC-Pairs + configuration file. Since hurricane watches and warnings change over + time, this file should be routinely updated. + + - The :code:`map` directory contains map data read by the MET tools + which create PostScript output plots. This data is derived from GIS + shapefiles and defines the background map data for those plots. + Since map data can change over time, these files should be periodically + updated using the :code:`make_mapfiles` development utility. + +- Updated *by developers* only as needed: + + - :code:`table_files/stat_column_description.txt` is read by + Series-Analysis and contains a description for each statistic + computed by the tool. These descriptions are written to the **long_name** + attribute of the output variables. This only needs to be updated when + Series-Analysis is enhanced to process new output statistics. + + - :code:`tc_data/*land*` files are read by TC-DLand and TC-Pairs to + define the distance of storms to land. These definitions seldom change + over time and should only be modified when the TC-DLand tool is modified + to process the updated inputs. + + - :code:`climo/seeps/PPT24_seepsweights.nc` is read by Point-Stat when + computing the SEEPS line type as described in :numref:`User's Guide + Section %s `. This only needs to be updated when new SEEPS + stations are added or the 24-hour precipitation climatology values + are modified. + +- Updated *by users* only as needed: + + - :code:`table_files/obs_error_table.txt`, described in + :numref:`User's Guide Section %s `, is read by + Ensemble-Stat and defines assumptions about observation error. The + :code:`MET_OBS_ERROR_TABLE` environment variable can be set to + override its default location. Generally, the observation error + assumptions in this file do not change over time. Instead, it should + be copied and modified by researchers for specific scientific + applications and use cases. + +- No updates typically required: + + - The :code:`colortables` directory contains color table definitions + that are read by MET tools which create PostScript output plots. + While users are encouraged to copy and modify these color table files + for their specific needs, these default colortables do not change over + time and typically require no updates. + + - The :code:`poly` directory contains polyline files read by the MET + tools when applying polyline masking regions. The default polyline + regions included were originally defined by NOAA/EMC, do not change + over time, and typically require no updates. + + - The :code:`ps` directory contains font definition files that are read + by the MET tools which create PostScript output plots. These font + definitions do not change over time and typically require no updates. + diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index b85b2d233b..bdb3f201e4 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -280,10 +280,10 @@ AirNow stations based on stationId and/or AqSid. Additional information and updated site locations can be found at the `EPA AirNow website `_. While some monitoring stations are permanent, others are temporary, and theirs locations can change. When running the -ascii2nc tool with the `-format airnowhourly` option, users should -`download `_ the `Monitoring_Site_Locations_V2.dat` data file -data file corresponding to the date being processed and set the MET_AIRNOW_STATIONS -envrionment variable to define its location. +ASCII2NC tool with the :code:`-format airnowhourly` option, users should +`download `_ the **Monitoring_Site_Locations_V2.dat** +data file for the date being processed and set the MET_AIRNOW_STATIONS environment +variable to define its location. .. _met_ndbc_stations: @@ -329,6 +329,8 @@ To run this utility: The downloaded files are written to a subdirectory ndbc_temp_data which can be deleted once the final output file is created. +.. _met_base_env_var: + MET_BASE -------- @@ -339,6 +341,8 @@ files when specifying paths and the appropriate path will be substituted in. If MET_BASE is defined as an environment variable, its value will be used instead of the one defined at compilation time. +.. _met_obs_error_table: + MET_OBS_ERROR_TABLE ------------------- diff --git a/scripts/python/utility/print_pointnc2ascii.py b/scripts/python/utility/print_pointnc2ascii.py index 88ad830eb8..6a1fa36e32 100755 --- a/scripts/python/utility/print_pointnc2ascii.py +++ b/scripts/python/utility/print_pointnc2ascii.py @@ -158,7 +158,9 @@ def get_nc_var_string_data(self, nc_group, var_name): def get_precision(self, data_list): precision = 0 for v in data_list: - if abs((v*10)-int(v*10)) < 0.000001 or abs((v*10)-int(v*10)) > 0.999998: + if np.ma.is_masked(v) or np.isnan(v): + continue + elif abs((v*10)-int(v*10)) < 0.000001 or abs((v*10)-int(v*10)) > 0.999998: if precision < 1: precision = 1 elif abs((v*100)-int(v*100)) < 0.000001 or abs((v*100)-int(v*100)) > 0.999998: