How the water depth fixes were accomplished for MassBay LT files. 1/14/09 Brad requested water depth corrections for tripods in the Mass Bay Long Term program where pressure provided a better water depth than the original values. The source of which files needed correction was lta_depth_data_v3.xls. We decided NOT to touch the ADCP files because they compute their own water depth as part of the processing. For all others do_adj_tripod_dep.m (under svn in metatools) was run. This program replaces the global WATER_DEPTH attribute, variable_name.sensor_depth and variable_name.sensor_hab (for instrument height). The depth coordinate variable is replaced with the sensor_depth of the primary kind of measurement in the file. So, all the files for tripods or moorings listed in lta_depth_data_v3.xls were copied from the DDS74 work area to c:/home/data/validation/boston/mods1208_wd. The xls file was saved as csv to lta_newdep_v3.txt, then only one new pressure per tripod was selected, unless there were A and B sections. In cases where more than one pressure mean was available, the longer series, or the higher quality measurement was chosen (a paros is higher quality than a seabird pressure). The edited version of the file was lta_newdep_v3b.txt. The tripods with A and B sections were moved to lta_newdep_v3ab.txt, and treated separately at the end. Chris Sabens added many instrument heights to the MASSBAY mooring log.xls file in columns with _cmab in them. Because of how xlsread works, the contents of the _cmab columns must be all numeric, the others should be text. I extracted just the tripods to be changed and saved to Massbay_cmab_ed2.xls. Matlab's xlsread function only works well on PC, so the program was run on my laptop. I tried for a while to do a platform independent program, but the information in Massbay_cmab_ed2.xls was hard to convert to text or a structure, so to get the job done, I used xlsread to populate the structure passed to adj_tripod_dep. For one or two modifications, it might be easier to populate the input structures by hand from the mooring log. Finally the repetitive part of the process is as follows: The files for tripod ### were copied from mods1208_wd to the directory above, where the runs were done. The script do_adj_tripod_dep(###) was run to read the .txt and .xls files then execute adj_tripod_dep using the appropriate values for tripod ###. For details of operation see comments in the program files. It will ask what values to use, if it can't figure it our. If all went well, the converted files and accompanying log###.txt file were moved to mods1208_wd/fixed and the _old.nc files in /boston were deleted (the contents of mods1208_wd were not changed, so the original could be compared to the new files). This process was repeated for each tripod. As tripods were completed, they were copied onto capecodder in stg/data/Boston/qc_datafiles/wd_corr/jan09 for safekeeping. The ones with A & B parts were done last. The *A's got copied to /boston and duplicate tripod number in the first column in lta_newdep_v3ab.txt was changed to some other number (the program fails if there are two 717's, so each 717 became something else to allow the A & B new depths to be used as appropriate). Then the B files were done, with the first line (for the A part) changed. After the runs the changes were reverted, so the file now has two lines for each tripod id with A & B parts.