netCDF Code Manual for Quality Controlled Surface Meteorological Data Shawn R. Smith and David Legler Coupled Ocean Atmosphere Response Experiment (COARE) Surface Meteorological Data Processing Center (DPC) Center for Ocean-Atmospheric Prediction Studies Florida State University 3 January 1996 Report COAREMET 95-4 Version 1.1 1. Introduction The COARE network Common Data Format (netCDF) code manual for quality controlled surface meteorological data outlines the codes used within the DPC surface meteorological data sets released to the COARE community. The code is a synthesis of the COADS documentation (Slutz et al. 1985), standard World Meteorological Organization (WMO) synoptic code, and new codes derived at Florida State University (FSU). In many places numeric codes were used to keep the data set compact. NetCDF was chosen to take advantage of its portability and capability to include both the data and metadata (information about the data) in a single file. Complete details regarding netCDF can be found in Appendix 1. The COARE netCDF data file includes up to 24 possible variables. In some cases, multiple measurements of the same variable are available (e.g. sea temperature measured from a thermosalinograph and a bucket temperature) and are differentiated using sequentially numbered variable names (TS, TS2, TS3, TS4, etc). As described in section 2, variables include not only meteorological data (temperature, pressure, etc.), but also a number of supporting variables (time of observation, platform position and movement, etc.). A variable containing quality control (QC) flags is included to indicate the QC applied to the data values. Multiple variable attributes provide information on data units, instruments used, instrument height, etc. in an attempt to provide an even mix between raw data and metadata. Eleven global attributes contain general information for all data within the netCDF file. Most of the data that arrive at the Surface Meteorology DPC are converted to netCDF. The only change to the data is a simple conversion to a standard set of units. The original units are noted in a variable attribute. Any data arriving without an accurate time stamp or information on whether the time is local or GMT were discarded only after all attempts to obtain correct time information were exhausted. The data also must have position information, i.e. data lacking latitude and longitude values were discarded only after all attempts to correctly position the data failed. Furthermore, if data arrived with no units attached, only after every effort to determine their units was exhausted, were the data discarded. Data collected without a record of time, position, or units are useless to the research community. However, all original data contributions are archived in the event additional information is discovered later that would allow the inclusion of discarded data. Section 2 outlines the data variables and attributes and describes all numeric codes that are employed. Section 3 covers the global attributes. Throughout the manual, variables will be indicated by bold type and attributes will be italicized. 2.Variables Up to 24 variables with a maximum of 8 associated attributes may appear in a surface meteorology file for COARE, Table 1. All data files will contain the time, latitude, longitude, and quality control flag variables. The quality control flags are single alphabetic characters that represent either problems or notable features in the data. The quality control flags for multiple variables are combined in a single string and stored in the flag variable. The flag variable as a result is a character string that has a length equal to the number of variables that underwent quality control. (A list of the flags, their definitions, and an example of their usage is found in section 2x). For each variable, Table 1 shows whether or not that attribute is associated with a particular variable. Table 1: Variable attribute list. Variable long_name units convers type inst ht FORTRAN qcindex _units _format ------------------------------------------------------------------------------------------ ctc cruise track code A9 code (see text) time time min. since Table 2 I12 * 1-1-1980 00:00 lat latitude degrees N Table 3 F9.2 * lon longitude degrees E Table 3 F9.2 * PL_HD platform degrees - Table 4 * F9.1 * heading clockwise from N PL_SPD platform m s-1 Table 5 * F9.1 * speed DIR earth relative degrees - Table 4 * * F9.1 * wind clockwise direction from N SPD earth relative m s-1 Table 5 * * F9.1 * wind speed P atmospheric mb Table 6 Table 7 * * F9.1 * pressure T air degrees C Table 8 * * F9.2 * temperature TW wet-bulb degrees C Table 8 * * F9.2 * temperature TD dew point degrees C Table 8 * * F9.2 * temperature TS sea degrees C Table 8 Table 9 * * F9.2 * temperature RH relative percent * * F9.1 * humidity Q specific g kg-1 * * F9.1 * humidity PRECIP precipitation mm Table 10 * * F9.1 * WX present code I6 weather (Table 11) TCA total cloud code Table 14 I6 amount (Table 12) LMCA low/middle code Table 14 I6 cloud amount (Table 12) ZCL cloud height code I6 (Table 15) LCT low cloud type code I6 (Table 16) MCT middle cloud I6 type (Table 17) HCT high cloud type code I6 (Table 18) flag quality code A* control flags (Table 19) The definition of the attributes are: long_name A descriptive name for the variable which is given in Table 1. units The SI units used for the variable values. Since no data are useful without units, this attribute will always have a value (when units is applicable). Units are given for most variables in Table 1. The exception are those variables that are coded (ctc, WX, etc.) which refer to the specific code table. convers_units The units (SI, English, cgs, etc.) of the variable value when it arrived at the DPC. Again, since no data are useful without units, this attribute will always have a value when present. If a variable has convers_units, Table 1 references specific code tables for the convers_units. type A coded attribute that signifies the variable value as being a certain type. For example, type indicates if the pressure is station level or converted to sea level. Code tables for type are referenced in Table 1. inst A character attribute that contains the make, model number, manufacturer and/or type of instrument used to record the variable values. When no information on the instrument type is known, inst = "unknown". Table 1 lists whether or not an inst attribute exists for each variable. ht The instrument height in meters above the station elevation (see Global Attributes, section 3). When unknown, ht = -999.9. Table 1 lists whether or not a ht attribute exists for a variable. NOTE: the height attribute for sea temperature is named "depth" and is a positive number in meters below sea level. FORTRAN_format A FORTRAN specific format for printing each variable. The formats for ctc, time, WX, TCA, LMCA, ZCL, LCT, MCT, and HCT are a fixed length. The length of the flag FORTRAN_format varies depending on the number of variables that were quality controlled in the ASCII file. All floating point values are represented by F9.n where n indicates the decimal precision of the supplied data. The formats provided in Table 1 show the maximum precision a variable can have within the COARE ASCII file. As an example, lat and lon have a FORTRAN_format of F9.2 in Table 1. If the position data we receive is accurate to two decimal places, the FORTRAN_format will remain F9.2. If the position data is only accurate to the tenths place the FORTRAN _format will be F9.1 and for data accurate to the whole number the FORTRAN_format will be F9.0. qcindex An integer pointer to the flag for the selected variable. Table 1 lists which variables have a qcindex. a) Cruise track code (RESEARCH VESSEL DATA ONLY) The cruise track code stores up to a 9 character string that marks each recording time as being either a TOGA/COARE cruise, a WOCE cruise, another dedicated cruise (other), or a cruise with an 'unknown' designation. The COARE cruise track code will only include the leg number for a specific ship using the code T/CLEG###. As an example, if a data record was collected on the second leg of the Moana Wave COARE cruise, then the cruise track code would be T/CLEG002. b) time The time is a double precision variable with units equal to minutes since 1-1-1980 00:00. The time is quality controlled for non-sequential and unrealistic values. The type is encoded according to Table 2. Table 2: Time types. code definition 0 unknown time type 1 mean time (Data represent a mean observed/recorded over some period of time. Notes on the position of the recorded time stamp within the mean (e.g. beginning, end, or middle of mean) and the length of the averaging period will be provided in the data quality reports). 2 instantaneous time (Data are recorded as instantaneous values at the time indicated) A FORTRAN subroutine to convert from minutes since 1-1-1980 00:00 to year, month, day, hour, and minute values is provided in Appendix 2. c) latitude d) longitude Platform position is in units of degrees; positive degrees for north latitude, negative degrees for south latitude, and positive 0-359 degrees east longitude. The units of the original values of latitude and longitude are found in Table 3. Table 3: Units of original latitude and longitude. code definition 0 degrees and tenths 1 whole degrees 2 non-random tenths 3 interpolated 4 degrees and minutes 5 high resolution data (e.g., degrees to seconds, or degrees and hundredths) 6 other (refer to supplemental data) The latitude and longitude is quality controlled for data validity, unrealistic platform movement, and whether an oceanographic platform moves over land. e) platform heading The heading is recorded in units of degrees (recorded clockwise relative to true north) and represents the direction that the bow of the ship is pointing. Valid headings range from 000.0 to 359.0 degrees. A convers_units attribute stores the type of compass that recorded the original data using the codes found below in Table 4. f) platform speed The platform speed is recorded in units of meter per second after a conversion from the original units (encoded using Table 5). g) earth-relative wind direction The earth-relative wind direction is stored with units of degrees and is encoded using 000.0 = calm 001.0-360.0 = direction in degrees 361.0 = variable going clockwise from true north. All wind directions are reported in the standard meteorological convention; the direction the wind is blowing from. Table 4 lists the possible compass types used to record the original data. Table 4: Compass direction conversion units. Code Definition 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) 7 16 point compass h) earth-relative wind speed The earth-relative wind speed is recorded in units of meters per second, and Table 5 lists the codes for the original units of the wind speed data. Table 5: Wind speed conversion units. Code Definition 0 meters per second, estimated 1 meters per second, unknown 2 meters per second, measured 3 knots, estimated 4 knots, unknown 5 knots, measured 6 Beaufort force (based on documentation) 7 high resolution measurement (e.g., hundredths of a meter per second) i) atmospheric pressure Pressure is recorded in units of millibars. The units of the original data are listed in Table 6 and Table 7 outlines the codes for the pressure type. Table 6: Atmospheric pressure conversion units. Code Definition 0 millibars 1 bars 2 millimeters of mercury 3 inches of mercury 4 pascals Table 7: Atmospheric pressure type. Code Definition 0 unknown type 1 sea level 2 station level j) air temperature k) dewpoint temperature l) wet bulb temperature All atmospheric temperatures are recorded in units of degrees Celsius after a conversion from the original units (see Table 8). Table 8: Temperature conversion units. Code Definition 0 degrees Celsius and tenths 1 half degrees Celsius 2 whole degrees Celsius 3 degrees Fahrenheit and tenths 4 half degrees Fahrenheit 5 whole degrees Fahrenheit 6 high resolution data (e.g., hundredths of a degree Celsius or Fahrenheit) 7 other (notes will be found in data quality reports) m) sea temperature The sea temperature is recorded in units of degrees Celsius with the original units encoded according to Table 8. NOTE: The sensor depth is recorded in meters and has a positive value for all non-missing values (the attribute name is changed from ht to avoid confusion). The specific instrument type used to measure the sea temperature is stored in inst while the general instrument type is recorded using the codes in Table 9. Table 9: General instrument types used to record sea temperature. Code Definition 0 unknown or non-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 8 bucket 9 implied bucket (an HSST SID or any match) 10 reversing thermometer 11 other electronic sensor n) relative humidity o) specific humidity Though the relative humidity, recorded in units of percent, is the more common moisture measurement; the specific humidity, always recorded in grams per kilogram, is preferred and supplied whenever it is present in the original data. p) precipitation The precipitation is recorded in units of millimeters and Table 10 lists the original precipitation units. Table 10: Precipitation conversion units. Code Definition 0 inches 1 tenths of an inch 2 hundredths of an inch 3 centimeters 4 millimeters 5 high resolution (>0.1 millimeter) An alternative measure of precipitation, the rain rate (RRATE) may be used in some files. The rain rate units are amount of rain per unit time. All other attributes are the same as in PRECIP. q) present weather Table 11: Present weather codes are the same as those from COADS data (Slutz et al. 1985). Code Definition Codes 00 to 49 indicate no precipitation at the site (e.g., ship, buoy, etc.) at time of observation: 00 cloud development not observed. 01 clouds generally dissolving or becoming less developed. 02 state of the sky unchanged. 03 clouds generally forming or developing. 04 visibility reduced by smoke. 05 haze. 06 widespread dust in suspension in the air, not raised by wind at or near the station at time of observation. 07 dust or sand raised by wind at or near the station at time of observation, but no well-developed dust whirls or sand whirls and no dust storm or sandstorm seen. 08 well developed dust whirls or sand whirls seen at or near the station during the preceding hour or at time of observation, but no dust storm or sandstorm. 09 dust storm or sandstorm within sight at time of observation, or at the station during the preceding hour. 10 light fog (visibility 1,100 yards or more); synonymous with European term "mist." 11 patches of shallow fog or ice fog at the station, not deeper than about 10 meters. 12 more or less continuous shallow fog or ice fog at the station, not deeper than about 10 meters. 13 lightning visible, no thunder heard. 14 precipitation within sight, not reaching the surface of the sea. 15 precipitation within sight, reaching the surface of the sea, but more than 5 kilometers from the station. 16 precipitation within sight, reaching the surface of the sea, near to, but not at the station. 17 thunderstorm, but no precipitation at time of observation. 18 squalls at or within sight of the station during the preceding hour or at time of observation. 19 funnel cloud or waterspout at or within sight of the station during the preceding hour or at time of observation. Codes 20 to 29 refer to phenomena that occurred at the station during the preceding hour but not at time of observation: 20 drizzle (not freezing) or snow grains. 21 rain (not freezing). 22 snow. 23 rain and snow or ice pellets, type (a). 24 freezing drizzle or freezing rain. 25 shower of rain. 26 shower of snow, or of rain and snow. 27 shower of hail (ice pellets, type (b), snow pellets), or of rain and hail. 28 fog or ice fog. 29 thunderstorm (with or without precipitation). Codes 30 to 99 refer to phenomena occurring at the ship at time of observation: 30 slight or moderate dust storm or sandstorm has decreased during the preceding hour. 31 slight or moderate dust storm or sandstorm with no appreciable change during the preceding hour. 32 slight or moderate dust storm or sandstorm has begun or has increased during the preceding hour. 33 severe dust storm or sandstorm has decreased during the preceding hour. 34 severe dust storm or sandstorm with no appreciable change during the preceding hour. 35 severe dust storm or sandstorm has begun or has increased during the preceding hour. 36 slight or moderate drifting snow generally low (below eye level, less than 6 feet). 37 heavy drifting snow generally low (below eye level, less than 6 feet). 38 slight or moderate blowing snow generally high (above eye level, 6 feet or more). 39 heavy blowing snow generally high (above eye level, 6 feet or more). 40 fog or ice fog at a distance at time of observation, but not at the station during the preceding hour, the fog or ice fog extending to a level above that of the observer. 41 fog or ice fog in patches. 42 fog or ice fog (sky visible) has become thinner during the preceding hour. 43 fog or ice fog (sky invisible) has become thinner during the preceding hour. 44 fog or ice fog (sky visible) with no appreciable change during the preceding hour. 45 fog or ice fog (sky invisible) with no appreciable change during the preceding hour. 46 fog or ice fog (sky visible) has begun or has become thicker during the preceding hour. 47 fog or ice fog (sky invisible) has begun or has become thicker during the preceding hour. 48 fog, depositing rime, sky visible. 49 fog, depositing rime, sky invisible. Codes 50 to 99 indicate precipitation at the station at time of observation: 50 drizzle, not freezing, intermittent, slight at time of observation. 51 drizzle, not freezing, continuous, slight at time of observation. 52 drizzle, not freezing, intermittent, moderate at time of observation. 53 drizzle, not freezing, continuous, moderate at time of observation. 54 drizzle, not freezing, intermittent, heavy (dense) at time of observation. 55 drizzle, not freezing, continuous, heavy (dense) at time of observation. 56 drizzle, freezing, slight. 57 drizzle, freezing, moderate or heavy (dense). 58 drizzle and rain, slight. 59 drizzle and rain, moderate or heavy. 60 rain, not freezing, intermittent, slight at time of observation. 61 rain, not freezing, continuous, slight at time of observation. 62 rain, not freezing, intermittent, moderate at time of observation. 63 rain, not freezing, continuous, moderate at time of observation. 64 rain, not freezing, intermittent, heavy at time of observation. 65 rain, not freezing, continuous, heavy at time of observation. 66 rain, freezing, slight. 67 rain, freezing, moderate or heavy. 68 rain or drizzle and snow, slight. 69 rain or drizzle and snow, moderate or heavy. 70 intermittent fall of snowflakes, slight at time of observation. 71 continuous fall of snowflakes, slight at time of observation. 72 intermittent fall of snowflakes, moderate at time of observation. 73 continuous fall of snowflakes, moderate at time of observation. 74 intermittent fall of snowflakes, heavy at time of observation. 75 continuous fall of snowflakes, heavy at time of observation. 76 ice prisms (with or without fog). 77 snow grains (with or without fog). 78 isolated star-like snow crystals (with or without fog). 79 ice pellets, type (a) (sleet, U.S. definition). 80 rain shower, slight. 81 rain shower, moderate or heavy. 82 rain shower, violent. 83 shower of rain and snow mixed, slight. 84 shower of rain and snow mixed, moderate or heavy. 85 snow shower, slight. 86 snow shower, moderate or heavy. 87 slight showers of snow pellets or ice pellets, type (b), with or without rain or rain and snow mixed. 88 moderate or heavy showers of snow pellets or ice pellets, type (b), with or without rain or rain and snow mixed. 89 slight showers of hail, with or without rain or rain and snow mixed, not associated with thunder. 90 moderate or heavy showers of hail, with or without rain or rain and snow, mixed, not associated with thunder. 91 slight rain at time of observation, thunderstorm during preceding hour but not at time of observation. 92 moderate or heavy rain at time of observation, thunderstorm during preceding hour but not at time of observation. 93 slight snow, or rain and snow mixed, or hail, at time of observation with thunderstorm during the preceding hour but not at time of observation. 94 moderate or heavy snow, or rain and snow mixed, or hail, at time of observation with thunderstorm during the preceding hour but not at time of observation. 95 thunderstorm, slight or moderate, without hail, but with rain and/or snow at time of observation. 96 thunderstorm, slight or moderate, with hail at time of observation. 97 thunderstorm, heavy, without hail but with rain and/or snow at time of observation. 98 thunderstorm combined with dust storm or sandstorm at time of observation. 99 thunderstorm, heavy, with hail at time of observation. r) total cloud amount s) low/middle cloud amount The codes for the total and low/middle cloud amounts (Table 12) are from the COADS data (Slutz et al. 1985). For the total cloud amount, codes 0 to 9 show the fraction, in oktas, of the celestial dome covered by all clouds. For the low/middle cloud amount the codes show the fraction, in oktas, of the celestial dome covered by all the low clouds and, if no low clouds are present, the fraction covered by all the middle clouds. Table 12: Cloud amount codes. Code Definition 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 or cloud amount cannot be estimated. If the data arriving at the DPC use tenths to describe cloud cover, the convention in Table 13 will be used to convert from tenths to oktas and the original data units will be noted using the codes in Table 14. Table 13: Relationship between tenths and oktas. tenths oktas 0 0 1 1 2,3 2 4 3 5 4 6 5 7,8 6 9 7 10 8 Table 14: Cloud amount conversion units. Code Definition 1 oktas 2 tenths t) cloud height Cloud height is recorded using the standard 0-10 synoptic code. Table 15 shows the height ranges and codes for measurements in feet or meters. Table 15: Cloud height codes, adapted from table 9 of the COADS data documentation (Slutz et al. 1985) . Approximate height of lowest cloud base Code Feet Meters 0 0-149 0-49 1 150-299 50-99 2 300-599 100-199 3 600-999 200-299 4 1000-1999 300-599 5 2000-3499 600-999 6 3500-4999 1000-1499 7 5000-6499 1500-1999 8 6500-7999 2000-2499 9 >=8000 or >=2500 or no clouds no clouds 10 indicates that the cloud height cannot be estimated because of darkness or for other reasons. u) low cloud type Table 16: Low cloud type codes extracted from the COADS data documentation (Slutz et al. 1985). The codes show observed characteristics of clouds of the types stratocumulus, stratus, cumulus, cumulonimbus, and their variations. Code Definition 0 no stratocumulus, stratus, cumulus, or cumulonimbus. 1 cumulus with little vertical extent and seemingly flattened, or ragged cumulus other than of bad weather, or both. 2 cumulus of moderate or strong vertical extent, generally with protuberances in the form of domes or towers, either accompanied or not by other cumulus or by stratocumulus, all having their base at the same level. 3 cumulonimbus the summits of which, at least partially, lack sharp outlines but are neither clearly fibrous (cirriform) nor in the form of an anvil; cumulus, stratocumulus, or stratus may also be present. 4 stratocumulus formed by the spreading out of cumulus; cumulus may also be present. 5 stratocumulus not resulting from the spreading out of cumulus. 6 stratus in a more or less continuous sheet or layer, or in ragged shreds, or both, but no stratus fractus of bad weather. 7 stratus fractus of bad weather (generally existing during precipitation and a short time before and after) or cumulus fractus of bad weather, or both (pannus), usually below altostratus or nimbostratus. 8 cumulus and stratocumulus other than that formed from the spreading out of cumulus; the base of the cumulus is at a different level from that of the stratocumulus. 9 cumulonimbus, the upper part of which is clearly fibrous (cirriform), often in the form of an anvil; either accompanied or not by cumulonimbus without anvil or fibrous upper part, by cumulus, stratocumulus, stratus, or pannus. 10 low clouds not visible, owing to darkness, fog, blowing dust or sand, or other similar phenomena. v) middle cloud type Table 17: Middle cloud type codes extracted from the COADS data documentation (Slutz et al. 1985). The codes show observed characteristics of clouds of the types altocumulus, altostratus, and nimbostratus. Code Definition 0 no altocumulus, altostratus, or nimbostratus. 1 altostratus, the greater part of which is semi-transparent; through this part the sun or moon may be weakly visible, as through ground glass. 2 altostratus, the greater part of which is sufficiently dense to hide the sun or moon, or nimbostratus. 3 altocumulus, the greater part of which is semi-transparent; the various elements of the cloud change only slowly and are all at a single level. 4 patches (often in the form of almonds or fishes) of altocumulus, the greater part of which is semi-transparent; the clouds occur at one or more levels and the elements are continually changing in appearance. 5 semi-transparent altocumulus in bands, or altocumulus in one or more fairly continuous layers (semi-transparent or opaque), progressively invading the sky; these altocumulus clouds generally thicken as a whole. 6 altocumulus resulting from the spreading out of cumulus (or cumulonimbus). 7 altocumulus in two or more layers, usually opaque in places, and not progressively invading the sky; or opaque layer of altocumulus, not progressively invading the sky; or altocumulus together with altostratus or nimbostratus. 8 altocumulus with sproutings in the form of small towers or battlements; or altocumulus having the appearance of cumuliform tufts. 9 altocumulus of a chaotic sky, generally at several levels. 10 middle clouds not visible, owing to darkness, fog, blowing dust or sand, or other similar phenomena, or more often because of the presence of a continuous layer of lower clouds. w) high cloud type Table 18: High cloud type codes extracted from the COADS data documentation (Slutz et al. 1985). The codes show observed characteristics of clouds of the types cirrus, cirrocumulus and cirrostratus. Code Definition 0 no cirrus, cirrocumulus or cirrostratus. 1 cirrus in the form of filaments, strands, or hooks, not progressively invading the sky. 2 dense cirrus, in patches or entangled sheaves, which usually do not increase and sometimes seem to be the remains of the upper part of a cumulonimbus, or cirrus with sproutings in the form of small turrets or battlements, or cirrus having the appearance of cumuliform tufts. 3 dense cirrus, often in the form of an anvil, being the remains of the upper parts of cumulonimbus. 4 cirrus in the form of hooks or of filaments, or both, progressively invading the sky; they generally become denser as a whole. 5 cirrus (often in bands converging towards one point or two opposite points of the horizon) and cirrostratus, or cirrostratus alone; in either case, they are progressively invading the sky, and generally growing denser as a whole, but the continuous veil does not reach 45 degrees above the horizon. 6 cirrus (often in bands converging towards one point or two opposite points of the horizon) and cirrostratus, or cirrostratus alone; in either case, they are progressively invading the sky, and generally growing denser as a whole; the continuous veil extends more than 45 degrees above the horizon, without the sky being totally covered. 7 veil of cirrostratus covering the celestial dome. 8 cirrostratus not progressively invading the sky and not completely covering the celestial dome. 9 cirrocumulus alone, or cirrocumulus accompanied by cirrus or cirrostratus, or both, but cirrocumulus is predominant. 10 high clouds not visible, owing to darkness, fog, blowing dust or sand, or other similar phenomena, or more often because of the presence of a continuous layer of lower clouds. x) quality control flag The quality control flags (Table 19) are single alphabetic characters for each data value. Only those variables with a qcindex have flag values (the qcindex is an integer pointer to the flag for a selected variable), i.e. not all meteorological variables are quality controlled. Table 19: Definitions of COARE quality control flags. Flag Definition A Original data had unknown units. The units shown were determined using a climatology or some other method. B Original data were out of the range bounds outlined (Table 20). C Time data are not sequential or date/time not valid. D Data failed T>=Tw>=Td test. In the free atmosphere, the value of the temperature is always greater than or equal to the wet-bulb temperature, which in turn is always greater than or equal to the dew point temperature. E Data failed resultant wind recomputation check. When the data set includes the platform's speed and direction along with the platform relative wind speed and direction, a program recomputes the earth relative wind speed and direction and compares the computed values to the reported earth relative wind speed and direction. A failed test occurs when the wind direction difference is >10 degC or the wind speed difference is >5 m/s. F Platform velocity unrealistic. Determined by platform position and speed data. G Data are greater than 4 standard deviations from the COADS climatological means (da Silva et al. 1994). The test is only applied to pressure, temperature, sea temperature, relative humidity, and wind speed data. H Discontinuity found in data I Interesting feature found in data. More specific information on the feature is contained in the data reports. Examples include: hurricanes passing station, sharp sea water temperature gradients, strong convective events, etc. J Data are of poor quality by visual inspection, DO NOT USE. K Data suspect/use with caution - this flag applies when the data look to have obvious errors, but no specific reason for the error can be determined. L Oceanographic platform passes over land or fixed platform moves dramatically. M Known instrument malfunction. P Position of platform or its movement are uncertain. Data should be used with caution. Q Original data were flagged as questionable. S Spike in the data. Usually one or two sequential data values (sometimes up to 4 values) that are drastically out of the current data trend. Spikes occur for many reasons including power surges, typos, data logging problems, lightning strikes, etc. T Time duplicate found. Z Data passed evaluation. Table 20: Range Bounds used in determining the use of flag B. Variable Lower Bound Upper Bound Units Comments ------------------------------------------------------------------------------ time 1-1-1980 12-31-1999 latitude -90 90 degrees longitude 0 359 degrees platform heading 0 359 degrees platform speed 0 15 m/s research vessels 0 0 m/s stationary buoys 0 2 m/s drifters plat. wind direction 0 360 degrees plat. wind speed 0 40 m/s wind direction 0 360 degrees wind speed 0 40 m/s atmospheric pressure 950 1050 mb sea level air temperature -10 40 deg. C wet bulb temperature -10 40 deg. C dew point temperature -10 40 deg. C sea temperature 0 35 deg. C relative humidity 0 100 percent radiation 0 1400 W/m2 specific humidity 0 48 g/kg rain rate 0 150 mm/hr As an example of the usage of the flag variable, assume that a COARE netCDF file contains only time, latitude, longitude, atmospheric pressure, and air temperature data along with a flag variable. Based on Table 1, all five variables will be quality controlled and each will have a unique qcindex. If the values for the first record of all five variables pass all quality control checks, then the first record of the flag variable will contain "ZZZZZ"; i.e. the flag variable contains QC flags for each QC variable, in this example 5 flags. However, if the second record contains a non-sequential time, but good latitude and longitude values, a pressure value of 1090 mb, and a temperature that is 6 standard deviations from the climatology, then the second record of flag will contain "CZZBG". The qcindex allows access to the flags for any variable. For example, the flag for the second record for atmospheric pressure (qcindex=4) is a "B" indicating the pressure value is out of bounds. 3. Global Attributes The global attributes in the COARE DPC netCDF files include parameters that apply to all the variables in the file or to the file in general. Again a mix of data and metadata are included. a) title A descriptive title highlighting the platform name, location, and special instrument characteristics. Often used to title plots of the data from the netCDF file. Ex: ÒMidas observations - R/V Wecoma - T/CLEG001 CruiseÓ b) site This attribute will contain either the alphanumeric R/V or land station name or a buoy location. c) elev Stores the geographic elevation of the site in meters above sea level. This value is zero for ships and buoys. d) ID Either the ship/platform identification, call sign, or WMO number. e) platform Instrument system that recorded the data. For example: IMET, ISS, ATLAS, unspecified tower, bridge report, hand held instruments, etc. f) facility The institution or country that either collected the data or are the primary holder of the data. For example: NOAA, PMEL, WHOI, University of Washington, Chile, etc. g) fsu_version The current version number or the data in the file. h) missing_value A missing value flag that is used for all variables. Typically set to -9999. i) startdate The first date of the data in the file. Coded as DD MMM YYYY where DD Day number (01 to 31) MMM Month (JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC) YYYY Four digit year (ex: 1992). j) enddate The last date of the data in the file. Coded the same as startdate. k) Release_Date Date that QC data set was released by COARE DPC. 4. References da Silva, A. M., C. C. Young, and S. Levitus, 1994: Atlas of Surface Marine Data, Volumes 1: Algorithms and Procedures. NOAA Atlas Series. In preparation. Slutz, R.J., S.J. Lubker, J.D. Hiscox, S.D. Woodruff, R.L. Jenne, D.H. Joseph, P.M. Steurer, and J.D. Elms, COADS (Comprehensive Ocean-Atmosphere Data Set) Release 1, pp. 300, CIRES University of Colorado, 1985. Appendix 1 Unidata netCDF Version 2.3.2 June 1993 The Unidata network Common Data Form (netCDF) is an interface for scientific data access and a freely-distributed software library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data. The current netCDF software provides common C and FORTRAN interfaces for applications and data. It has been tested on various common platforms, including several versions of UNIX, VMS, MSDOS, and OS/2. NetCDF files are self-describing, network-transparent, directly accessible, and extendible. `Self- describing' means that a netCDF file includes information about the data it contains. `Network- transparent' means that a netCDF file is represented in a form that can be accessed by computers with different ways of storing integers, characters, and floating-point numbers. `Direct-access' means that a small subset of a large data set may be accessed efficiently, without first reading through all the preceding data. `Extendible' means that data can be appended to a netCDF data set without copying it or redefining its structure. NetCDF is useful for supporting access to diverse kinds of scientific data in heterogeneous networking environments and for writing application software that does not depend on application- specific formats. A variety of analysis and display packages have been developed to analyze and display data in netCDF form. You can obtain a copy of the latest version of netCDF software using anonymous FTP from host: unidata.ucar.edu file: pub/netcdf/netcdf.tar.Z Included in this distribution are: the C source for the netCDF data access library, sources for the FORTRAN jacket library for various systems, documentation for the netCDF library and utilities in the form of a netCDF User's Guide, source for the netCDF utilities ncdump and ncgen, a directory of test programs to verify the correct implementation of the netCDF library in new environments, and a directory of XDR (eXternal Data Representation) source code for environments that do not support XDR. Other files available for anonymous FTP from the pub/netcdf/ directory of unidata.ucar.edu include README general information about netCDF FAQ Frequently Asked Questions (with answers) about netCDF. utilities.txt a list of software packages currently available or under development for manipulating and displaying netCDF data guide.ps.Z a compressed PostScript file of the NetCDF User's Guide. This is included in the netcdf.tar.Z distribution, so you don't need both. ncprogs.ps a draft PostScript document describing an initial set of netCDF operator and utility programs under development ncprogs.txt an ASCII version of ncprogs.ps conventions.info a draft document of some proposed netCDF conventions cdl/ a directory containing some examples of CDL files (an ASCII representation for netCDF files). msdos/ a directory containing executables and binaries for netCDF under MSDOS 5.0. These can also be built from the sources in netcdf.tar.Z, if you have the necessary Microsoft compilers. mac/ a directory containing notes and Macintosh MPW makefiles for porting netCDF to an Apple Macintosh. These were contributed by Chuck Denham, U.S. Geological Survey. A mailing list, netcdfgroup@unidata.ucar.edu, exists for discussion of the netCDF interface and announcements about netCDF bugs, fixes, and enhancements. To subscribe, send a request to netcdfgroup-adm@unidata.ucar.edu An archive of past postings to the netcdfgroup mailing list is available for anonymous FTP from the file mail-archives/netcdfgroup of unidata.ucar.edu. A recent paper that provides a good introduction to the use of netCDF appeared in Jenter, H. L. and R. P. Signell, 1992. "NetCDF: A Freely-Available Software-Solution to Data- Access Problems for Numerical Modelers". Proceedings of the American Society of Civil Engineers Conference on Estuarine and Coastal Modeling. Tampa, Florida. This paper is available via anonymous FTP from host: crusty.er.usgs.gov file: pub/netcdf.asce.ps Specific questions about netCDF that are not of interest to the netcdfgroup mailing list may be sent to support@unidata.ucar.edu. Appendix 2 The following FORTRAN subroutine can be used to convert the time values from the COARE netCDF files to two-digit year, month, day, hour, and minute values. The routine processes individual time values (timestamp), but could be easily modified to handle an entire time array. The code can be acquired electronically from: ftp coaremet.fsu.edu login anonymous cd pub/coare/src get invtime.f and any problems that occur while using the code can be addressed to coaremet@coaps.fsu.edu. subroutine invtime(timestamp,yr,mon,day,hr,min) c c This subroutine will convert a minutes timestamp to a year/month c date. Based on the function convtime by Shawn Smith (COAPS). c c Written the spring of 1995, several iterations. c James N. Stricherz (stricherz@coaps.fsu.edu) c c This code returns correct results for the range of 01 Jan 1980 0000GMT c thru 31 Dec 1999 2359GMT. I know it does, because I tried each minute c of that range. c integer year(1980:2000), month(13), leap_mon(13), min_day, + min_hr, yr, mon, day, hr, min,timestamp,itime,tmon,ttime, + thour data year /0, 527040, 1052640, 1578240, 2103840, 2630880, 3156480, + 3682080, 4207680, 4734720, 5260320, 5785920, 6311520, + 6838560, 7364160, 7889760, 8415360, 8942400, 9468000, + 9993600,10519200/ data month /0, 44640, 84960, 129600, 172800, 217440, 260640, + 305280, 349920, 393120, 437760, 480960,525600/ data leap_mon /0, 44640, 86400, 131040, 174240, 218880, 262080, + 306720, 351360, 394560, 439200, 482400,527040/ data min_day, min_hr /1440, 60/ * * ok, lets inverse the effects of the years -- subtract off the * number of minutes per year until it goes negative. iyr * then gives the year that the time (in minutes) occurs... * if (timestamp.ge.year(2000)) then yr=-9999 return endif iyr=1979 itime=timestamp 10 iyr=iyr+1 ttime=itime-year(iyr) if (ttime.le.0) then if (iyr.eq.1980) iyr=iyr+1 iyr=iyr-1 itime=itime-year(iyr) else goto 10 endif * * assign the return variable * yr=iyr * * ok, the remaining time is less than one full year, so convert * by the same method as above into months: * imon=0 * * that darn leap month! * if (mod(iyr,4).ne.0) then * * increment the month, and subtract off the minutes from the * remaining time for a non-leap year * 20 imon=imon+1 tmon=itime-month(imon) if (tmon.gt.0) then goto 20 else if (tmon.lt.0) then imon=imon-1 itime=itime-month(imon) else if (imon.gt.12) then imon=imon-12 yr=yr+1 endif mon=imon day=1 hr=0 min=0 return endif else * * same thing, same code, but for a leap year * 30 imon=imon+1 tmon=itime-leap_mon(imon) if (tmon.gt.0) then goto 30 elseif (tmon.lt.0) then imon=imon-1 itime=itime-month(imon) else if (imon.gt.12) then imon=imon-12 yr=yr+1 endif mon=imon day=1 hr=0 min=0 return endif endif * * assign the return variable * mon=imon * * any remaining minutes will belong to day/hour/minutes * ok, let's get those pesky days! * iday=0 40 iday=iday+1 ttime=itime-min_day if (ttime.ge.0) then itime=ttime goto 40 endif * * assign the return variable * if (mod(iyr,4).eq.0.and.mon.gt.2) then day=iday-1 else day=iday endif * * pick off the hours of the days...remember, hours can be 0, so * we start at -1 * ihour=-1 50 ihour=ihour+1 thour=itime-min_hr if (thour.ge.0) then itime=thour goto 50 endif * * assign the return variables * hr=ihour * * the remainder at this point is the minutes, so return them directly! * min=itime return end