-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.noaa_icoads.icoads_core_2005`
(
  year INT64 OPTIONS(description="Year of the actual time of observation at which the barometer is read. It is 4-digit"),
  month INT64 OPTIONS(description="Month of the actual time of observation at which the barometer is read. (1=January, 2=February, …, 12=December)"),
  day INT64 OPTIONS(description="Day of the actual time of observation at which the barometer is read. Days 1-31"),
  hour FLOAT64 OPTIONS(description="Hour of the actual time of observation at which the barometer is read. Hours 0.00 to 23.99"),
  latitude FLOAT64 OPTIONS(description="Position to hundredths of a degree +N or –S (measured north or south of the equator) and +E or −W (measured east or west of the Greenwich Meridian)."),
  longitude FLOAT64 OPTIONS(description="Position to hundredths of a degree +N or –S (measured north or south of the equator) and +E or −W (measured east or west of the Greenwich Meridian)."),
  imma_version INT64 OPTIONS(description="IMMA Version: 0=2010, 1=2016"),
  attm_count INT64 OPTIONS(description="The attm count: 0 – abbreviated record (no attm) 1 – one attm 2 – two attms etc."),
  time_indicator INT64 OPTIONS(description="Time indicator preserves the incoming precision of time fields: 0 – nearest whole hour 1 – hour to tenths 2 – hour plus minutes 3 – high resolution (e.g., hour to hundredths)"),
  latlong_indicator INT64 OPTIONS(description="Latlong indicator preserves the precision at which LAT and LON were recorded or translated from, or if they were derived later by interpolation between known positions: 0 – degrees and tenths 1 – whole degrees 2 – mixed precision 3 – interpolated 4 – degrees and minutes 5 – high resolution data (e.g., degrees to seconds) 6 – other"),
  ship_course INT64 OPTIONS(description="True direction of resultant displacement of the ship during the three hours preceding the time of observation (i.e., ship’s course (true) made good): 0 – stationary (ship hove to) 5 – SW 1 – NE 6 – W 2 – E 7 – NW 3 – SE 8 – N 4 – S 9 – unknown"),
  ship_speed INT64 OPTIONS(description="Ship’s average speed made good during the three hours preceding the time of observation (beginning 1 January 1968): 0 – 0 knots  1 – 1-5 knots 2 – 6-10 knots 3 – 11-15 knots 4 – 16-20 knots  5 – 21-25 knots 6 – 26-30 knots 7 – 31-35 knots 8 – 36-40 knots 9 – over 40 knots.    Prior to 1 January 1968 a different code for VS, also with range 0-9, applied (Met Office 1948): 0 – 0 knots 1 – 1-3 knots 2 – 4-6 knots 3 – 7-9 knots 4 – 10-12 knots 5 – 13-15 knots  6 – 16-18 knots 7 – 19-21 knots 8 – 22-24 knots 9 – over 24 knots"),
  national_source_indicator INT64 OPTIONS(description="A field available for national use in identifying data subsets."),
  id_indicator INT64 OPTIONS(description="ID Indicator indicates whether a callsign or some other sort of identification is contained in the ID field (and in R3.0 data, II should always be extant when ID information exists; whereas II should always be missing if ID is missing): 0 – ID present, but unknown type 1 – ship, Ocean Station Vessel (OSV), or ice station callsign 2 – generic ID (e.g., SHIP, BUOY, RIGG, PLAT) 3 – WMO 5-digit buoy number 4 – other buoy number (e.g., Argos or national buoy number) 5 – Coastal-Marine Automated Network (C-MAN) ID (assigned by US NDBC or other organizations) 6 – station name or number 7 – oceanographic platform/cruise number 8 – fishing vessel psuedo-ID 9 – national ship number 10 – composite information from early ship data 11 – 7-digit buoy ID (proposed)"),
  callsign STRING OPTIONS(description="Identification/Callsign"),
  country_code STRING OPTIONS(description="The country that recruited a ship, which may differ from the country of immediate receipt (C2, field 15) and may also differ from the ship’s registry"),
  wind_direction_indicator INT64 OPTIONS(description="Gives the compass (and approximate precision) used for reporting the wind direction: 0 – 36-point compass 1 – 32-point compass 2 – 16 of 36-point compass 3 – 16 of 32-point compass 4 – 8-point compass 5 – 360-point compass 6 – high resolution data (e.g., tenths of degrees)"),
  wind_direction_true INT64 OPTIONS(description="The direction (true) from which wind is blowing (or will blow), stored in whole degrees (i.e., 360-point compass; range: 1-360°), or special codes: 361 – calm 362 – variable, or all directions"),
  wind_speed_indicator INT64 OPTIONS(description="Wind speed is stored in tenths of a meter per second (to retain adequate precision for winds converted from knots, or high-resolution data). WI shows the units in which and/or the method by which W was originally recorded (0, 1, 3, 4 follow WMO Code 1855): 0 – meter per second, estimated 53 1 – meter per second, obtained from anemometer (measured) 2 – estimated (original units unknown) 3 – knot, estimated 4 – knot, obtained from anemometer (measured) 5 – Beaufort force (based on documentation) 6 – estimated (original units unknown)/unknown method 7 – measured (original units unknown) 8 – high-resolution measurement (e.g., hundredths of a meter per second)"),
  wind_speed FLOAT64 OPTIONS(description="Wind speed which is stored in tenths of a meter per second (to retain adequate precision for winds converted from knots, or high-resolution data)"),
  visibility_indicator INT64 OPTIONS(description="shows whether visibility was: 0 – estimated (or unknown method of observation) 1 – measured 2 – fog present (obsolete)"),
  visibility INT64 OPTIONS(description="Visibility (horizontal visibility at the surface in kilometers) according to WMO Code 4377 from which, in reporting visibility at sea, WMO (2009a; Reg. 12.2.1.3.2) states that the decile 90-99 shall be used (moreover Reg. 12.2.1.3.1: when the horizontal visibility is not the same in different directions, the shortest distance shall be given for VV): 90 – less than 0.05 kilometer 91 – 0.05 92 – 0.2 93 – 0.5 94 – 1 95 – 2 96 – 4 97 – 10 98 – 20 99 – 50 or more"),
  present_weather INT64 OPTIONS(description="WMO Codes 4677 (Table D3) for WW, and 4561 for W1: 0 – Cloud covering 1/2 or less of the sky throughout the appropriate period 1 – Cloud covering more than 1/2 of the sky during part of the appropriate period and covering 1/2 or less during part of the period 2 – Cloud covering more than 1/2 of the sky throughout the appropriate period 54 3 – Sandstorm, duststorm or blowing snow 4 – Fog or ice fog or thick haze 5 – Drizzle 6 – Rain 7 – Snow, or rain and snow mixed 8 – Shower(s) 9 – Thunderstorm(s) with or without precipitation"),
  past_weather INT64 OPTIONS(description="WMO Codes 4677 (Table D3) for WW, and 4561 for W1: 0 – Cloud covering 1/2 or less of the sky throughout the appropriate period 1 – Cloud covering more than 1/2 of the sky during part of the appropriate period and covering 1/2 or less during part of the period 2 – Cloud covering more than 1/2 of the sky throughout the appropriate period 54 3 – Sandstorm, duststorm or blowing snow 4 – Fog or ice fog or thick haze 5 – Drizzle 6 – Rain 7 – Snow, or rain and snow mixed 8 – Shower(s) 9 – Thunderstorm(s) with or without precipitation"),
  sea_level_pressure FLOAT64 OPTIONS(description="Amount of pressure tendency at station level during the three hours preceding the time of observation in tenths of hPa (i.e., millibars)"),
  characteristic_of_ppp INT64 OPTIONS(description="WMO Code 0200 for characteristic of pressure tendency during the three hours preceding the time of observation (A) (after WMO 2015)."),
  amt_pressure_tend FLOAT64 OPTIONS(description="Amount of pressure tendency at station level during the three hours preceding the time of observation in tenths of hPa (i.e., millibars)"),
  indicator_for_temp INT64 OPTIONS(description="Indicator provides information about the precision and/or units that the Core temperature elements were translated from: 0 – tenths °C 1 – half °C 2 – whole °C 3 – whole or tenths °C (mixed precision among temperature fields) 4 – tenths °F 5 – half °F 6 – whole °F 7 – whole or tenths °F (mixed precision among temperature fields) 8 – high resolution data (e.g., hundredths °C) 9 – other"),
  air_temperature FLOAT64 OPTIONS(description="Air temperature, Celsius"),
  wbt_indicator INT64 OPTIONS(description="WBTI and DPTI indicate which of WBT or DPT was measured or computed, and ice bulb conditions: 0 – measured 1 – computed 2 – iced measured 3 – iced computed"),
  wetbulb_temperature FLOAT64 OPTIONS(description="Wet-bulb temperature, Celsius"),
  dpt_indicator INT64 OPTIONS(description="WBTI and DPTI indicate which of WBT or DPT was measured or computed, and ice bulb conditions: 0 – measured 1 – computed 2 – iced measured 3 – iced computed"),
  dewpoint_temperature FLOAT64 OPTIONS(description="Dew-point temperature, Celsius"),
  sst_measurement_method INT64 OPTIONS(description="Shows the method by which SST was taken: 0 – bucket 1 – condenser inlet (intake) 2 – trailing thermistor 3 – hull contact sensor 4 – through hull sensor 5 – radiation thermometer 6 – bait tanks thermometer 7 – others 9 – unknown or non-bucket 10 – “implied” bucket [note: applicable to early ICOADS data] 11 – reversing thermometer or mechanical sensor 12 – electronic sensor"),
  sea_surface_temp FLOAT64 OPTIONS(description="Temperatures are stored in tenths of a degree Celsius."),
  total_cloud_amount INT64 OPTIONS(description="Codes 0 to 9 (WMO Code 2700) show the total fraction of the celestial dome covered by clouds (irrespective of their genus). 0 – clear 1 – 1 okta or less, but not zero 2-6 – 2-6 oktas 7 – 7 oktas or more, but not 8 oktas 8 – 8 oktas 9 – sky obscured by fog and/or other meteorological phenomena"),
  lower_cloud_amount INT64 OPTIONS(description="0 – clear 1 – 1 okta or less, but not zero 2-6 – 2-6 oktas 7 – 7 oktas or more, but not 8 oktas 8 – 8 oktas 9 – sky obscured by fog and/or other meteorological phenomena"),
  low_cloud_type STRING OPTIONS(description="Codes 0 to 10 [A in base36 encoding] show characteristics observed of clouds of the genera Stratocumulus, Stratus, Cumulus, and Cumulonimbus (WMO Code 0513"),
  cloud_height_indicator INT64 OPTIONS(description="Shows if cloud height H was: 0 – estimated 1 – measured"),
  cloud_height STRING OPTIONS(description="Codes 0 to 9 and “A” (following WMO Code 1600) show the height above surface of the base of the lowest cloud seen (such that a height exactly equal to one of the values at  60 the ends of the ranges shall be coded in the higher range, e.g., a height of 600 m shall be reported by code 5): 0 – 0 to 50 m 1 – 50 to 100 m 2 – 100 to 200 m 3 – 200 to 300 m 4 – 300 to 600 m 5 – 600 to 1000 m 6 – 1000 to 1500 m 7 – 1500 to 2000 m 8 – 2000 to 2500 m 9 – 2500 m or more, or no clouds 10 [A in base36 encoding] – height of base of cloud not known or base of clouds at a level lower and tops at a level higher than that of the station"),
  middle_cloud_type STRING OPTIONS(description="Codes 0 to 10 [A in base36 encoding] show characteristics observed of clouds of the genera Altocumulus, Altostratus, and Nimbostratus (WMO Code 0515)."),
  high_cloud_type STRING OPTIONS(description="Codes 0 to 10 [A in base36 encoding] show characteristics observed of clouds of the genera Cirrus, Cirrocumulus and Cirrostratus (WMO Code 0509)."),
  wave_direction INT64 OPTIONS(description="Starting in 1968, WD was no longer reported in the SHIP code. Codes 00 to 36 (note: leading zero is omitted in IMMA) show the direction (if any) from which (wind) waves come, in tens of degrees (following WMO Code 0877; ref. Code and Range columns in Table D2). Codes 37 and 38 show: 37 – waves confused, direction indeterminate (WH ≤ 4.75 m) 38 – waves confused, direction indeterminate (WH > 4.75 m; or irrespective of wave height, corresponding to 99 in WMO Code 0877)"),
  wave_period INT64 OPTIONS(description="Period of wind waves, in seconds. Starting in 1968, WP was reported in seconds; prior to 1968 the period was reported as a code, which was converted into whole seconds following Table D5a, with WX (C1, field 13) set accordingly."),
  wave_height FLOAT64 OPTIONS(description="Height of wind waves, in metres."),
  swell_direction INT64 OPTIONS(description="Starting in 1968, SD was no longer reported in the SHIP code. Codes 00 to 36 (note: leading zero is omitted in IMMA) show the direction (if any) from which (wind) waves come, in tens of degrees (following WMO Code 0877; ref. Code and Range columns in Table D2). Codes 37 and 38 show: 37 – waves confused, direction indeterminate (SH ≤ 4.75 m) 38 – waves confused, direction indeterminate (SH > 4.75 m; or irrespective of wave height, corresponding to 99 in WMO Code 0877)"),
  swell_period INT64 OPTIONS(description="Period of wind waves, in seconds. Starting in 1968, SP was reported in seconds; prior to 1968 the period was reported as a code, which was converted into whole seconds following Table D5a, with WX (C1, field 13) set accordingly."),
  swell_height FLOAT64 OPTIONS(description="Height of wind waves, in metres."),
  box_system_indicator STRING OPTIONS(description="The box system indicator is currently unused."),
  ten_degree_box_number INT64 OPTIONS(description="10° box numbers (see Release 1, supp. G; http://icoads.noaa.gov/Release_1/suppG.html) are available e.g., for use in sorting operations"),
  one_degree_box_number INT64 OPTIONS(description="1° box numbers (see Release 1, supp. G; http://icoads.noaa.gov/Release_1/suppG.html) are available e.g., for use in sorting operations"),
  deck INT64 OPTIONS(description="Number of the deck from which the report came (Table D6a), with Tables D6b and D6c providing additional information about selected DCK ranges. “Deck” originally referred to a punched card deck, but is now used as the primary field to track ICOADS data collections."),
  source_id INT64 OPTIONS(description="Number of the source ID from which the report came (Table D7). Each SID may contain a single deck or a mixture of decks, but each SID is generally constrained to a single input format."),
  platform_type INT64 OPTIONS(description="The type of observing platform: 0 – US Navy or “deck” log, or unknown 1 – merchant ship or foreign military 2 – ocean station vessel—off station or station proximity unknown 3 – ocean station vessel—on station 4 – lightship 5 – ship 6 – moored buoy 7 – drifting buoy 8 – ice buoy [note: currently unused] 9 – ice station (manned, including ships overwintering in ice) 10 – oceanographic station data (bottle and low-resolution CTD/XCTD data) 11 – mechanical/digital/micro bathythermograph (MBT) 12 – expendable bathythermograph (XBT) 13 – Coastal-Marine Automated Network (C-MAN) (NDBC operated) 14 – other coastal/island station 15 – fixed (or mobile) ocean platform (plat, rig) 16 – tide gauge 17 – high-resolution Conductivity-Temp.-Depth (CTD)/Expendable CTD (XCTD) 74 18 – profiling float 19 – undulating oceanographic recorder 20 – autonomous pinneped bathythermograph 21 – glider"),
  dup_status INT64 OPTIONS(description="Indicates duplicate status. 0 unique 1 best duplicate 2 best duplicate with substitution"),
  dup_check INT64 OPTIONS(description="The presence of a duplicate match between a Global Telecommunication System (GTS) and logbook (or other delayed-mode) report may provide some location verification, with greater credibility if SLP and SST match under “allowances.” DUPC indicates whether such matches were detected during duplicate elimination processing (either the GTS or delayed-mode report is retained in the output data mixture), in case users might wish to make use of this information for independent quality control purposes: 0 – GTS and logbook match with SLP and SST match 1 – GTS and logbook match without SLP and SST match 2 – no GTS and logbook match was encountered"),
  track_check INT64 OPTIONS(description="Indicates if a report was: 0 – not track checked 1 – track checked"),
  pressure_bias INT64 OPTIONS(description="Indicates questionable sea level pressure data: 0 – questionable SLP: level 0: individual platform (unused) 1 – questionable SLP: level 1: deck 2 – questionable SLP: level 2: deck"),
  wave_period_indicator INT64 OPTIONS(description="Indicates that the wave and swell periods were converted from code into whole seconds: 1 – period converted from code into whole seconds"),
  swell_period_indicator INT64 OPTIONS(description="Indicates that the wave and swell periods were converted from code into whole seconds: 1 – period converted from code into whole seconds"),
  second_country_code INT64 OPTIONS(description="The country of immediate receipt (C2), which may differ from the recruiting country (C1) and may also differ from the ship’s registry."),
  adaptive_qc_flags STRING OPTIONS(description="SQZ indicates the relationship of SST to “adaptive” QC limits in 0.5σ (standard deviation) increments, and SQZ provides a measure of the reliability of the QC"),
  nightday_flag INT64 OPTIONS(description="The night/day report flag was set to indicate whether the report fell in local nighttime or daytime, as determined according to Slutz et al. 1 = report time is local nighttime 2 = report time is local daytime"),
  trimming_flags STRING OPTIONS(description="These flags indicate the relationship of a given observational data value to the legacy trimming limits, or to indicate if those limits, which were calculated separately for three historical periods are unavailable, or other conditions."),
  ncdc_qc_flags STRING OPTIONS(description="Possible NCDC-QC flag values, where “–” indicates an undefined flag value, or letters included in the table indicate a defined flag value. For the letters, lower-case “x” indicates a flag value not utilized, whereas upper-case flag values were utilized, in preparing enhanced or standard trimmed data"),
  external INT64 OPTIONS(description="The single extant value of the external flags is defined as 1 = erroneous (based on external OSD buoy quality control) They range from 0-63"),
  landlocked_flag INT64 OPTIONS(description="The single extant value of the landlocked flag (LZ) is defined as 1 = report over land If LZ is missing, this indicates that the report falls over an ocean or coastal region as defined by a “landlocked” file at 2°×2° resolution"),
  source_exclusion_flags INT64 OPTIONS(description="The single extant value of the source exclusion flags is defined as 1 = data automatically disqualified from statistics They range from 0-31"),
  unique_report_id STRING OPTIONS(description="A unique ID for each record in ICOADS represented as a base36 number of length 6."),
  release_no_primary INT64 OPTIONS(description="First of the three elements that make up the full release number associated with the record. For example, Release 3.0.1 is represented with RN1=3, RN2=0, and RN3=1"),
  release_no_secondary INT64 OPTIONS(description="Second of the three elements that make up the full release number associated with the record. For example, Release 3.0.1 is represented with RN1=3, RN2=0, and RN3=1"),
  release_no_tertiary INT64 OPTIONS(description="Third of the three elements that make up the full release number associated with the record. For example, Release 3.0.1 is represented with RN1=3, RN2=0, and RN3=1"),
  release_status_indicator INT64 OPTIONS(description="An indicator that specifies whether the record is: 0 – Preliminary (Not yet included in an official ICOADS Release) 1 – Auxiliary (Records provided in separate data files in addition to ICOADS official Releases and Preliminary data. This also includes new data sources received, but awaiting blending into an official ICOADS Release) 2 – Full (A record included in an official ICOADS Release)"),
  intermediate_reject_flag INT64 OPTIONS(description="0=Retain in Intermediate, Reject from Final dataset;  1=Retain in both Intermediate and Final datasets;  2=Reject from both Intermediate and Final datasets"),
  timestamp TIMESTAMP OPTIONS(description="Converted UTC timestamp for the actual time of observation at which the barometer is read")
);

INSERT INTO `bigquery-public-data.noaa_icoads.icoads_core_2005` (year, month, day, hour, latitude, longitude, imma_version, attm_count, time_indicator, latlong_indicator, ship_course, ship_speed, national_source_indicator, id_indicator, callsign, country_code, wind_direction_indicator, wind_direction_true, wind_speed_indicator, wind_speed, visibility_indicator, visibility, present_weather, past_weather, sea_level_pressure, characteristic_of_ppp, amt_pressure_tend, indicator_for_temp, air_temperature, wbt_indicator, wetbulb_temperature, dpt_indicator, dewpoint_temperature, sst_measurement_method, sea_surface_temp, total_cloud_amount, lower_cloud_amount, low_cloud_type, cloud_height_indicator, cloud_height, middle_cloud_type, high_cloud_type, wave_direction, wave_period, wave_height, swell_direction, swell_period, swell_height, box_system_indicator, ten_degree_box_number, one_degree_box_number, deck, source_id, platform_type, dup_status, dup_check, track_check, pressure_bias, wave_period_indicator, swell_period_indicator, second_country_code, adaptive_qc_flags, nightday_flag, trimming_flags, ncdc_qc_flags, external, landlocked_flag, source_exclusion_flags, unique_report_id, release_no_primary, release_no_secondary, release_no_tertiary, release_status_indicator, intermediate_reject_flag, timestamp) VALUES (2005, 2, 4, 6.0, 24.92, 35.67, 1, 3, 0, 5, NULL, NULL, NULL, NULL, '', '99', 0, 160, 4, 8.0, NULL, NULL, NULL, NULL, nan, NULL, nan, NULL, nan, NULL, nan, NULL, nan, 12, 23.8, NULL, NULL, '', NULL, '', '', '', NULL, NULL, nan, NULL, NULL, nan, '', 217, 45, 780, 149, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, '', 2, '1F13FF', '11AAAAAAA1AAAA', NULL, NULL, NULL, 'FBZGLE', 3, 0, 0, 2, 1, '2005-02-04 06:00:00+00:00'), (2005, 11, 22, 12.0, 32.2, 32.12, 1, 3, 0, 5, NULL, NULL, NULL, NULL, '', '99', 0, 350, 4, 5.0, NULL, NULL, NULL, NULL, nan, NULL, nan, NULL, 17.0, NULL, nan, NULL, nan, 12, 21.7, NULL, NULL, '', NULL, '', '', '', NULL, NULL, nan, NULL, NULL, nan, '', 181, 22, 780, 149, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, '', 2, '1111FF', '11AAAA1AA1AAAA', NULL, NULL, NULL, 'FRKR18', 3, 0, 0, 2, 1, '2005-11-22 12:00:00+00:00'), (2005, 11, 27, 18.0, 17.27, 56.88, 1, 3, 0, 5, NULL, NULL, NULL, NULL, '', '99', 0, 40, 4, 15.0, NULL, NULL, NULL, NULL, nan, NULL, nan, NULL, nan, NULL, nan, NULL, nan, 12, 27.0, NULL, NULL, '', NULL, '', '', '', NULL, NULL, nan, NULL, NULL, nan, '', 255, 76, 780, 149, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, '', 1, '1F22FF', '11AAAAAAA1AAAA', NULL, NULL, NULL, 'FRVT7O', 3, 0, 0, 2, 1, '2005-11-27 18:00:00+00:00'), (2005, 11, 24, 16.0, 40.0, 17.52, 1, 3, 0, 5, NULL, NULL, NULL, NULL, '', '99', 0, 280, 4, 6.0, NULL, NULL, NULL, NULL, nan, NULL, nan, NULL, 13.0, NULL, nan, NULL, nan, 12, 17.0, NULL, NULL, '', NULL, '', '', '', NULL, NULL, nan, NULL, NULL, nan, '', 179, 7, 780, 149, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, '', 1, '1111FF', '11AAAA1AA1AAAA', NULL, NULL, NULL, 'FRP9QX', 3, 0, 0, 2, 1, '2005-11-24 16:00:00+00:00'), (2005, 2, 8, 10.3, 44.08, 9.58, 1, 3, 3, 5, NULL, NULL, NULL, NULL, '', '99', 0, 350, 4, 4.0, NULL, NULL, NULL, NULL, nan, NULL, nan, NULL, 0.7, NULL, nan, NULL, nan, 12, 13.5, NULL, NULL, '', NULL, '', '', '', NULL, NULL, nan, NULL, NULL, nan, '', 178, 49, 780, 149, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, '', 2, '1211FF', '11AAAA1AA1AAAA', NULL, NULL, NULL, 'FC6EK5', 3, 0, 0, 2, 1, '2005-02-08 10:18:00+00:00');