To use this program, follow these steps:
  1. Open an SPSS syntax window (or another text editor)
  2. COPY the program below and PASTE it into the editor window
  3. Edit the program so that the FILE= specification points to where the data file is stored on your system
  4. Save the modified program file and RUN it using SPSS
The program is below this line. If no program is listed, the URL to the EML document may be in error. If the EML file does not include all the information needed, the SPSS program will have errors or be incomplete.

Comment Package ID: knb-lter-vcr.17.3 Cataloging System:VCR.
Comment Data set title: A study of water quality conditions in the tidal creeks of Northampton County, Vs.
Comment  Data set creator:  Luis Lagera -  
Comment  Metadata Provider:    - Virginia Coast Reserve Long-Term Ecological Research Project 
Comment  Contact: Dr Luis Lagera -    - 
Comment  Contact:    - Information manager - Virginia Coast Reserve Long-Term Ecological Research Project   - jporter@lternet.edu
        
        
Title ' A study of water quality conditions in the tidal creeks of Northampton County, Vs' . 

Comment You should replace 'PUT-LOCAL-PATH-TO-DATA-FILE-HERE'  (below) with the appropriate path.   
Comment    to your data file (e.g., c:\mydata\datafile.txt).                 
GET DATA  /TYPE=TXT/
               / FILE="PUT-LOCAL-PATH-TO-DATA-FILE-HERE" 
                        /ARRANGEMENT=Fixed 
                    /VARIABLES= 
                    DATE 4-11 A  TIME 14-18 A  SITEID 20-22 A  REPC 27-28 F2.0 NH4 30-32 F  NO2 37-39 F  NOX 41-44 F  TIN 47-50 F  PO4 55-57 F  CHLA 60-63 F  PHAE 66-69 F  TSSW 71-74 F  TSSM 77-80 F  TSSO 83-85 F  TSSOPER 90-93 F  BOD5 95-98 F  .
execute.                
                

                
VAR LABELS   DATE 'date when measurements were taken- ' .
VAR LABELS   TIME 'time when measurements were taken- ' .
VAR LABELS   SITEID 'site/station when measurements where taken- ' .
VAR LABELS   REPC 'sample replicate number- ' .
VAR LABELS   NH4 'dissolved ammonium concentration- umoles/lit' .
VAR LABELS   NO2 'nitrite concentration- umoles/lit' .
VAR LABELS   NOX 'nitrite plus nitrate concentration- umoles/lit' .
VAR LABELS   TIN 'total inorganic nitrogen- umoles/lit' .
VAR LABELS   PO4 'dissolved phosphate concentration (orthophosphate)- umoles/lit' .
VAR LABELS   CHLA 'chllrophyll a concentration- ug/l' .
VAR LABELS   PHAE 'phaeophytin concentration- ug/l' .
VAR LABELS   TSSW 'total suspended solids (whole fractions)- mg/l' .
VAR LABELS   TSSM 'total suspended solids (mineral fraction)- mg/l' .
VAR LABELS   TSSO 'total suspended solids (organic fraction)- mg/l' .
VAR LABELS   TSSOPER 'total suspended solids (organic fraction as % of TSSW)- %' .
VAR LABELS   BOD5 'biochemical oxygen demand- mg/l' .
                
                
comment The analyses below are basic descriptions of the variables. After testing, they should be replaced.                 
        
                 
Frequencies   variables=DATE /order=analysis.  
Frequencies   variables=TIME /order=analysis.  
Frequencies   variables=SITEID /order=analysis.  
Frequencies   variables=REPC /order=analysis.  
Descriptives   variables=NH4 .  
Descriptives   variables=NO2 .  
Descriptives   variables=NOX .  
Descriptives   variables=TIN .  
Descriptives   variables=PO4 .  
Descriptives   variables=CHLA .  
Descriptives   variables=PHAE .  
Descriptives   variables=TSSW .  
Descriptives   variables=TSSM .  
Descriptives   variables=TSSO .  
Descriptives   variables=TSSOPER .  
Descriptives   variables=BOD5 . 
Execute. 
                
                  
COMMENT List cases where data is out of range.  
COMMENT Note: if no out of range cases are detected, the variable names will be listed, but no actual cases.  
TEMPORARY .               
STRING BADVARS (A255).
IF ((NOT MISSING(NH4)) AND (NH4 LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NH4","-min").
IF ((NOT MISSING(NH4)) AND (NH4 GT 100)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NH4","-max").
IF ((NOT MISSING(NO2)) AND (NO2 LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NO2","-min").
IF ((NOT MISSING(NO2)) AND (NO2 GT 10)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NO2","-max").
IF ((NOT MISSING(NOX)) AND (NOX LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NOX","-min").
IF ((NOT MISSING(NOX)) AND (NOX GT 500)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "NOX","-max").
IF ((NOT MISSING(TIN)) AND (TIN LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TIN","-min").
IF ((NOT MISSING(TIN)) AND (TIN GT 500)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TIN","-max").
IF ((NOT MISSING(PO4)) AND (PO4 LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "PO4","-min").
IF ((NOT MISSING(PO4)) AND (PO4 GT 5)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "PO4","-max").
IF ((NOT MISSING(CHLA)) AND (CHLA LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "CHLA","-min").
IF ((NOT MISSING(CHLA)) AND (CHLA GT 100)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "CHLA","-max").
IF ((NOT MISSING(PHAE)) AND (PHAE LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "PHAE","-min").
IF ((NOT MISSING(PHAE)) AND (PHAE GT 20)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "PHAE","-max").
IF ((NOT MISSING(TSSW)) AND (TSSW LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSW","-min").
IF ((NOT MISSING(TSSW)) AND (TSSW GT 200)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSW","-max").
IF ((NOT MISSING(TSSM)) AND (TSSM LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSM","-min").
IF ((NOT MISSING(TSSM)) AND (TSSM GT 200)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSM","-max").
IF ((NOT MISSING(TSSO)) AND (TSSO LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSO","-min").
IF ((NOT MISSING(TSSO)) AND (TSSO GT 200)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSO","-max").
IF ((NOT MISSING(TSSOPER)) AND (TSSOPER LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSOPER","-min").
IF ((NOT MISSING(TSSOPER)) AND (TSSOPER GT 100)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "TSSOPER","-max").
IF ((NOT MISSING(BOD5)) AND (BOD5 LT 0)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "BOD5","-min").
IF ((NOT MISSING(BOD5)) AND (BOD5 GT 20)) BADVARS=CONCAT(RTRIM(BADVARS)," ", "BOD5","-max").
SELECT IF (BADVARS NE ""). 
LIST VARIABLES=ALL.
Execute.