Commit 56ba5894 authored by ph290's avatar ph290
Browse files

changed read in of data so that nutrient data is red from the correct line of...

changed read in of data so that nutrient data is red from the correct line of the file now that we are producing files without lines for depths we are not interested in
parent 392cf27d
......@@ -26,7 +26,7 @@ met_data_location = '/gpfs/ts0/projects/Research_Project-148395/s2p3_rv2.0/test/
met_data_temporary_location = base_directory+'met/spatial_data/' # The location that met data for each year will be un tar.gziped into
start_year = 2006
end_year = 2006 # same as start year resuls in a 1 year run
depth_min = 10
depth_min = 10 # NOTE that these numbers MUST be the same as those used in the scripts used to produce the meterology and nutrient files, otherwse data will not be taken for teh correct lats/lons and/or the script will fail
depth_max = 100
write_error_output = False
......@@ -99,6 +99,7 @@ smin4=[]
smaj5=[]
smin5=[]
woa_nutrient=[]
counter = 0
for i,line in enumerate(lines[1::]):
depth = float(line[77:84])
if ((depth >= depth_min) & (depth <= depth_max) & (depth > 0.0)):
......@@ -115,7 +116,8 @@ for i,line in enumerate(lines[1::]):
smin4.append(line[58:64])
smaj5.append(line[64:70])
smin5.append(line[70:76])
woa_nutrient.append(lines2[i][16:22])
woa_nutrient.append(lines2[counter][16:22])
counter += counter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment