GLOBEC - timedateparams job 20070315 The task is to add a time column like yrday_local, yrday_gmt, gmt_date and gmt_time (and eventually time_epoch) to all the data objects in globec (also soglo, NEC, NEPac) in order for the data to be plotted over time periods. We'll start with SOGLOBEC, alongtrack. There are 11 cruises. These are all in gmt so we'll add gmt_date and gmt_time to the front of the list. If the PI porvided yrday_local, we'd use that. This data is located in /data12/sodata. Each cruise has its own subdirectory. *.ind contains: (see defgb manual for list) datafile name, removals, transvar, dispwidths, datafieldopts alongtrack.ind /data12/sodata/lmg0103/JGOF/JGOF/ this is where Compare variables in original dat file, ind file (transvar list). The transvar list result is what appears online. Keep all the unique variables whether or not they're used. For alongtrack, we added a variable to varlist for yrday_gmt, day_gmt, month_gmt --------------------------- lmg0106alongtrack.ind file: datafile = /data12/sodata/lmg0106/rvdas/JGOF/lmg0106.alongtrack datafieldopts = \ separators = '\t \n' removals = \ gmtdate; dummy1; gmttime; day_gmt; month_gmt; gmttime; day_gmt; month_gmt can added after you test timedateparams = /data12/sodata/lmg0103/JGOF/JGOF/lmg0103.timedateparams transvar = \ date = date_gmt; mPAR = par_d; sstemp = temp_ss; sscond = cond_ss; sssal = sal_ss; wspd_t = wind_speed_c; wdir_t = wind_dir_c; airtemp = temp_air; rel_hum = humidity; metpress = press_bar; PSP = radiation_l; PIR = radiation_s -------------------------- lmg01003.timedateparams: invar1name = gmtdate invar1template = dd*mm*yy invar2name = gmttime invar2template = HH:MM:SS #invar3name = ampm #invar3template = p #outyearname = year outdayname = day_gmt outmonthname = month_gmt outtimename = time_gmt outjulianname = yrday_gmt outjulianformat = v ------------------------ put all variables in the top-level .dat file (eg. lmg0103.alongtrack) yrday_gmt month_gmt day_gmt time_gmt example: # # R. Limeburner, Ch. Scientist date > gmtdate gmttime lat[width=8] lon[width=9] sog[width=5] head[width=6] head2[width=6] cmg[width=6] mPAR[width=7] sstemp[width=7] sscond[width=7] sssal[width=7] depth_w wspd_t wdir_t[width=6] airtemp rel_hum metpress flvolt dummy1 PSP PIR yrday_gmt month_gmt day_gmt time_gmt mar18_2001 jg077.dat mar19_2001 jg078.dat mar20_2001 jg079.dat mar21_2001 jg080.dat mar22_2001 jg081.dat mar23_2001 jg082.dat ... ------------------------ Step by step: * open a previously edited (good) .ind file eg. lmg0103alongtrack.ind * open a not yet fixed .ind file * make current .ind match good one: 1. change datafile = name and path 2. edit removals 3. don't include....?? 4. add timedateparams = /data12/sodata/lmg0103/JGOF/JGOF/lmg0103.timedateparams * open *.alongtrack and put new varnames at end. Save file. yrday_gmt month_gmt day_gmt time_gmt * test in a second xterm window so you can change the ind file name. go to the current directory: eg. cd /data12/sodata/lmg0103/JGOF/JGOF/ /data5/globec/methods/defgb "@lmg0103alongtrack.ind" use !! to repeat last command (or arrow-up in bash) * test in web window. Look for presence of new time columns, lined up columns, no errors.