Fortran program krigph.f has now been successfully compiled in a sun solaris unix machine using fortran 90 compiler. All times in files are in julian days since 1979, thus 1-Jan-1979 = day 1 Subroutines in krigph.f rdirfl20: This routine reads in directory file into array: dir icnt holds the total number of entries in file. file name: dirfl20.dat, Sequential, unformatted file. The directory file, holds: buoy_id, wmo, prog, type, deployment Time, Dep Lat, Dep lon, Last fix Time, Last fix lat, last fix lon, min lat, max lat, min lon, max lon, drogue off date, Sensor 1, Sensor 2, Sensor 3, Sensor 4, Sensor 5, Sensor 6, Type of Death. (Some of these fields may not be of interest to you, ex Sensor 1-6 and min lat max lat min lon and max lon, they are not used in the context of krigph or for hardly any other application). rgr: This routine reads a file that contains: id, st, et The st and et correspond to periods of time for which we don't want to interpolate, we just want to put 999.999 (NaN) for the period of time contained from st to et, because either the buoy was stalled and not moving but started drifting after a while, or buoy was picked up and redeployed shortly. input file name: gr.dat, Sequential, formatted file. rbadstmpfl: this routine will read a file that has: id, stime, etime of a period in which tmp should be ignored at the begining of the buoy's life. (not to be interpolated), mostly because files or formats were not set up correctly at the beginning of deployment, but sensor is good after a certain time. input file name: badstmpfl.dat, Sequential, formatted file. You may decide to do this differently, or may not have this case. input file name: badstmpfl.dat, Sequential, formatted file loadkrcoef: This routine will read and load a file containig kriging coefficients. Years from 1979 to 2020 corresponds to: 79:120 dimensions. Half years: 1=first half, 2=second half (second dimension=2) regions: 1-6, 1=North Pacific, 2=Tropical Pacific, 3=South Pacific, 4= North Atlantic, 5=South Atlantic, 6-Indian Ocean. (third dimension) b,c coefficients: Blon, blat, clon, clat (4th dimension) These coefficients are adjusted twice a year as we add more data into the database, then kriging coefficients are added and data is kriged using specific coefficients. If no specific coefficients are found for a specific time, generic coefficients are used, hardwired in the program. input file nameL krigcoefl.dat, sequantial, formatted file This routine is inside the krigph.f program idip: This routine, given and id, it returns the position (pointer) of that id in the directory file. Parameters: Input: id= buoy id, integer returned:ip= position of that id in the directory file dfname: This routine will find a file anem and directory name, given a buoy id and file type inputs: id= buoy id ityp= file name: 1-raw,2-edited position file 3- edited sensor file, 4-kriged returns: fname: file name, ex: b99999 for raw type dname: directory name ex:/d2/prg/data/raw/ readfl2: This routine reads in data from any file, by record number of by time interval parameters: input: iu: unit number to open ik: =1 if giving start and end times to read. =2 if giving start and end records to read dname: directory path (name) fname: file name ktyp: type of file to read, 1-raw,2=position edited, 3- sensor edited, 4-kriged st,et: start and end time or record (depending on ik) outputs: nrec: # of good points read in dat: array with all data nwd: # of words in file read in allname: This routine appends together to form a file name with directory path and file name. parameters: dname (input): directory path, ex: /d2/prg/data/raw fname (input): file name, ex: b22122 allfname (returned):, ex: /d2/prg/data/raw/b22122.dat ddate2000: This routine accepts a julian day with base year added (date), and base year of reference (iyr) NOTE*** REMEMBER TO REINITIALIZE IYR EVERY TIME BEFORE CALLING THE ROUTINE, OTHERWISE, IT KEEPS ADDING TO IYR Input: date (in julian days since 1979) RETUNRS: IYR: YEAR OF JULIAN DATE JULIAN: JULIAN DAY OF THE YEAR MON: MONTH OF THE YEAR IDAY: DAY OF THE MONTH