This file contains a summary of changes made and why.
2023-02-10 fdrudg.f.  Changed maximum schedule name length to 16. Output file to 18. 
2023-02-10 proc_thread.f Typographic change in datastrean.
2022-10-07 vlbah.f, wrhead.f.  Changed handling of octal constant so that new compiler would not complain. 
2022-10-07 Makefile.  Modified so that compiler would not complain about argument mismatch in calls to subroutines. 
2022-05-26 Fixed bug in snap.f that affected disk2file. Was not copying iscan_gap to iscan_gap_prev at end of loop
2022-05-06 ../skdrut/errormsg.f:  Removed hardcoding of length of one character argument. 
2022-04-26 Update copyright year, by WEH: proc_thread.f
2022-04-08 Fix endef for thread procedure, by WEH: proc_thread.f
2022-03-29 Don't include ready procedure for recorder=none, by WEH: snap.f
2022-02-19 ../skdrut/readf_asc.f   Completely rewritten
2022-02-18 ../skdrut/trimlen.f     Modified to avoid a bounds error if string is blank. 
2022-02-10 fdrudg.f. Handling of equip_override.  If ON will use stuff from skedf.ctl. 
           If OFF will use schedule file. If no information in schedule, then will use skedf.ctl.
2022-02-10 stinp.f, vstinp.f. AND newroutine store_rack_and_recorder.f. make making of reading rack and recorder consistent
           between VEX and SKD schedules
2022-02-09 fdrudg.f:  Fixed error in logic of using equip_override. Missing paren in logic evaluation
2022-02-08 proc_setup.f, proc_exper_initi.f. Fixed a couple of revision bugs. fdrudg.f. If EVLBI, remove 'fila10g' from rack type
2022-02-05 ../skdrut/vunpdas.f: increased crec from 8 chars to 12. Capitalize on input.  (Sleeping bug.)
2022-02-05 ../skdrut/kvalid_rec.f.  Fixed bug. Got rid of temp variable.  ../skdrut/kvalid_rac.f Got rid of temp variable
2021-02-03 Changed to core3h_mode from core3h_modeN, by WEH: proc_core3h.f
2021-12-28 Fixed too 'bounds errors'.  skdrut/unpvh.f skdrut/readline_skdrut.f.  ../skdrlnfch/pchar-linux.f  Never caused problems bug caught in runtime
2021-12-28 drudg/proc_exper_init.f. No fb=ss_rev? for flexbuff.  Output mk5_status only for MK5A, MK5B, MK5C or MK6 disks
2021-12-28 drset.f.  Now only parse variables that drudg uses. 
2021-12-28 Removed obsolete variables ipartm (parity time), imtptm (mid tape), ihdtm (headstack time). Affected following:
           skdrincl/skobs.ftni. skdrut/vread.f, skdrut/skdrini.f, drudg/sread.f, 
2021-12-24 snap.f.  Fixed error if Mark6 recorder and NOT generated by sked. (isink_mbs was not set  leading to divide by 0.
2021-12-24 find_num_chans_rec.f.  Changed way rounding up was done. 
2021-12-24 lstsumo.f. More space in Gbyte column so that columns dont bleed together in 16 Mbyte mode. 
2021-12-22 snap.f Minor cleanup getting scan_close to work correctly.
2021-12-22 lstsum.f Minor change to write 'REC' in the case of MK6 recorder
2021-12-22 proc_vracks_bbc.f, proc_lo.f: Now use drudg_write to write lines to PRC file. Eliminates trailing blanks.
2021-12-20 snap.f, drudg_rdctl.F, drcom.ftni. Changes associated with allowing snap to 
           close out scans if there gaps in schedule.
2021-12-18 snap_check.f: New routine that emits 'checkmk5, checmk6 etc'.
2021-12-18 find_recorder_speed.f.  Incorrect reporting of recorder speed for VGOS schedules produced by sked.        
2021-12-15 ../skdrut/slew_time.f.  Fixed bug for short distances. 
2021-12-13 Modified snap.f to write checkfb. 
2021-12-13 Got rid of some refernces to "recorder 2". drudg/snapintr.f, drudg/procintr.f 
2021-12-13 Removed unused variables. Changed name of cnewtap to cinfo. drudg/lstsum.f, drudg/lstsumo.f 
2021-12-04 If E-VBLI_OVERRIDE is set in skedf.ctl, and CORRNAME has string 'e-vlbi' recorder set to none
2021-12-04 Put version date in ISO format. write_drudg_version_line.f 
2021-12-04 Write out GB in listing of recorder  is none. lstsum.f lstsumo.f 
2021-12-04 Changed some handling of flexbuff. proc_exper_initi.f, proc_threads.f, proc_mk5_init2.f 
2021-12-03 Parametrize slew by 3 parameters: Offset, rate, acceleration:  skdrincl/statn.ftni, 
           drudg/lists.f, drudg/snapintr.f, skdrut/slewo.f, skdrut/stinp.f,skdrut/vstinp.f, skdrut/vunpant.f 
2021-12-03 Got rid of calls to lnfch that caused problems in some compilers: skdrut/addscan.f, skdrut/newscan.f
2021-12-03 Put octal constants in their own common block. Affected routines: 
           skdrincl/octal_constants.ftni,skdrincl/skparm.ftni, drudg/prcov.f, drudg./prcov_vex.f, 
           In skdrut: reads.f, searl.f, selev.f, unpbar.f,unpco.f, unpfcat.f, 
           unpfmt.f,unpfsk.f, unplo.f,unpvh.o, unpvt.f
2021-12-03 Fixed line that caused problems in some compilers by getting rid of lnfch call. skdrut/wrdur.f
2021-11-20 Vex was not correctly handling step function horizon masks. skdrut/vunpant.f, skdrut/vunpsit.f
2021-09-29 skdrut/vunptrk.f.  Kludge for LBA stations where lowest track # is 0.  Add an offset of 1. 
2021-09-28 procs.f: Was truncating racks longer than 8 characters.
2021-09-28 exper_initi.f. Use jive5ab if the recorder is  flexbuf.
2021-09-16 skdrut/ttape.f  Was changing media to wrong type for schedules written by VieSched++
2021-05-17 skdrut/vunptrk.f.  If no track format trudge on and change track frame format to "N/A"
2021-05-04 proc_vc_cmd.f. Initilize rfvc_max to 0. Previosly uninitialized
2021Apr02 changed slew offset istcon from integer to real. Affected routines
2021Apr02 ../skdrincl/statn.ftni drudg/snapintr. skdrut/slewo.f skdrut/stinp.f,vstinp.f,vunpant.f,lists.f 
2020Nov20 snap.f: If  no observations return with warning. Previously could crash
2020Nov17 cvpos.f. Replaced repeated code with call to subroutine iwhere_in_range4.f
2020Nov17 lists.f, label.f: Got rid of hollerith that indicated tape direction. Got rid of some S2 tests. 
2020Oct02 Got rid of references and code dealing with S2 stations:  prout.f
          In skdrut: frinit.f , speed.f, stinp.f, ttape.f, unpvt.f vstinp.f, vunpdas.f
          In skdrincl: freqs.ftni, statn.f 
2020Oct02 vmoinp.f Got read of references to passes, headstacks, S2       
2020Sep14 reads.f; Fixed bug in sread.f that happened if $HEAD was last section in file.
          ../skdrut/readf_asc.f.  Simplifiled and got rid of etraneous code. 
2020Jun30 snapintr.f. Got rid of residual line that put out #passes, length. Instead now puts out recorder type.
          Got rid of 'kmissing' and tests that depend on it in fdrudg.f, proc.f, snap.f, drcom.ftni
          ../skdrut/gnpas.f. Got rid of obsolete iserr argument 
2020Jun22 Removed bug in frinp.f introduced on 2018OCT?. Changed documented in source code but not below. 
2020Jun17 lstsum.f. Initilize itime_start,itime_stop,itime_start_p,itime_stop_p
2020Jun16 ../skdrut/gnpas.f Got rid of a bunch of stuff dealing with headstacks.
          drudg/*.f and ../skdrut/*.f.  Added implicit none to all routines EXCEPT xat.f
          Fixed some variables that were not defined
2020Jun09 ../skdrincl/ttape.f. got rid of "THIN","THICK","SHORT", added "MARK6","FLEXBUFF"
2020Jun08 Removed broadband stuff from ../skdrincl/statn.ftni and put in ../skdrincl/broadband.
2020Jun08 Added station dependent parameter ibb_off for extra time in writing: 
          skrdrini.f, sanp.f, read_broadband_section.f. Also initialize to 0 broadband stuff in skdrini.f
2020May29 snap.f. Fixed bug where if a station had early start then there would be no PREOB. 
2020Feb20 proc_dbbc_bbc.f, proc_lba_ifp.f, proc_mracks_vc.f proc_vracks_bbc.f,proc_vc_cmd.f. Added implicit none.
          Also added luscn to routines invalid_if
2019Nov20 Several changes to replace f90 code by f77 code(by Ed Himwich):
          skdrini.f, snap.f, ../skdrut/vmoinp.f, vobinp.f, frinp.f, iwhere_in_string_list_nocase.f
2019Nov20 Bug fixes in snap.f and in sdrini.f.  Indices of arrays used wrong variables, eg. foo(ic) should be foo(i)
2019Sep23 proc_disk_tracks.f: If recorder=none do not round up channels recorded to power of 2. 
2019Aug15-Sep23.  Many changes merging VGOS and S/X branch together. Some bug fixes. About 20 files changed. 
2018Nov13 proc_disk_tracks.f: Removed checking of BW/samplerate. This will now be handled by the FS. 
2018Sep25 Makefile, drudg_rdctl.f: Location of skedf.ctl varies depending on whether computer is PC-FS or not. 
2018Sep11
   proc_disk_tracks.f: Comments modified based on email from WEH 2018Sep06. Also if fila10g, use 64 bit mask for Mark5C.  
   proc_dbbc_pfb_tracks.f: Fixed an error in writing out a mask. 
   proc_track_mask_lines.f: New routine.  writes out the mask lines for the proc_disk_tracks.f and proc_dbbc_pfb_tracks.f
2018Sep05 
   New routine: drudg_write_comment.f.  This outputs comment lines in files. 
   proc_mk5_init1.f:  Got rid of extraneous '"'  (double quotes) at end of comment lines.           
   proc_disk_tracks.f: Better debug info. Now if it doesn't find a valid mode, will write 
   all the "CSB" info (Channel-Sideband-Bit) info that was in the sked file. 
2018Sep04 

   get_version.f Removed line that wrote debug info. This was printing spurious "32". 
2018Aug18 
   Added support for modes that vsi2
   check_csb_list.f:    Increased mask from 32 bits to 64 bits
   proc_disk_tracks.f:  Added wastro2 and geo2 modes which can use 64 tracks. Also output comments 
   if DBBC_DDC or  DBBC_DDC/FILA10G saying how things should be setup for recorder. 
2018Jul20 
  New subroutine write_drudge_release_line for use by procintr.f and snapintf.f. Removed this functionality from both.
  Put all version information in common file  drver_com.f
Hi Dtni. Added this include file to fdrudg.f.
  Introduced  new char*32  string crel_FS which contains release info. 
  Modified get_version to get crel_fs (which is specified at compile time).  
  New function crelease.c gets RELEASE string at compile time. 
  fdrudg.f and write_drudge_release_line.f will include crel_fs if it is non-blank.  
  Makefile was modified to correctly get the RELEASE      
2018Jun19 
  proc_setup.f: Fixed bug in cont_cal. If Rack is DBBC_DDC and 'cont_cal off' emit cont_cal=off;
2018Jun17 
  sread.f: When reading in a VEX file printed an extra blank line when it was done reading in the schedule. 
  his showed up as a blank line between "$SOURCES" and "Experiment name: ",
  drudg_rdctl.f:  Removed erroneous report of error in label command.
  Also made sure there were spaces between all sections when it was writing out progrees of reading skedf.ctl. 
  fdrudg.f: Removed debugging statement that wrote out first recorder
2018Jun05 vobinp.f: Modified so if a station in the scan is not in the station list, then program 
          aborts with warning message.
2018Jun05 ivgtst.f: Version in drudg had bug where if station were missing in station list, set the value 
          to # of stations. This had been fixed in 2014 in sked, but not propagated here. Now it is.           
2018May02 snap.f: Fine tuning staggered start. If the station offset for OUR station is zero, assume non-staggered.
2018May02 snap.f: Take account of staggered start in calculating recording 
2018Apr02 snap.f: Fixed staggered start. I hope. 
2017Dec23 snap.f:  If staggered start (different stations start at different times) then change handling of 
          calibrations.  A.) Uses nomimal data_valid_time to start recording data and do calibration. 
          B.) ical_time later sets data valid flag.  
          ical_time is either nominal cal_time (10 sec) or ical_time_staggered, or if cont_cal is on, then 1.
2017Dec20 proc_dbbc_pfb_tracks.f, proc_disk_tracks.f.  Got rid of extra "," before mask in 'bit_streams=' command. 
2017Dec20 proc_mk5_init2.f.  Changed 'bank_set?' to 'mk5=bank_set?'
2017Oct24 proc_dbbc_pfb_tracks.f, proc_disk_tracks.f 
          If 'bit_streams' then only care about mask. Everything else is null.
20178ct24 proc_mk5_int2.f:  Added 'bank_set?'  after bank_check
2017Oct24 MAX_SOR-->5000, MAX_CEL-->4990
2017Oct24 vlbah.f  Fixed output bugs in writing vlba pointing file. 
2017Oct24 wrsos.f  Fixed bug in vlba pointing file. if RA seconds is >59.65s, then used to write out as 60.0s. 
!********************************
2016Dec05 ../skdrut/frinp.f.  Was not correctly applying sample rate from "R" line to all stations 
2016Dec05 ../skdrut/count_freq_tracks.f. Fixed bug in how it was setting the sample-rate if it was absent in the schedule. 
2016Nov29 ../skdrut/kvalid_rack.f.  Fixed sleeping bug. In second check of valid rack type was using unitialized variable. Corrected and added 'implicit none'.
2016Nov29 ../skdrut/kvalid_rec.f.  Added 'implicit none' for consistency with kvalid_rack.f 
2016Nov29 ../skdrut/vstinp.f, vunpdas.f. Changed crack from character*8 to character*10 to handle longer rack names. 
2016Nov29 ../skdrut/unpvt.f, skdrut/vunpdas.f  Map rack DBBC -->DBBC_DDC, DBBC/FILA10G-->DBBC_DDC/FILA10G upon input. Done for backwards compatibility. 
2016Nov21 ../skdrut/stinp.f  Set default RACK, RECORDER types before checking for error condition. Previously if there was an error these would not be set.
2016Nov21 proc_dbbc_bbc.f. Don't check what the ORIGINAL (in schedule) rack type was. Should not matter
2016Sep11 proc_setup.f.  Made input for cont_cal, cont_cal_parity appear on same line as prompt.
2016Sep11 proc_dbbc_pfb_tracks.f  Made input for proc_dbbc_pfb_tracks.f appear on same line as prompt.
2016Sep11 proc_disk_tracks.  Doubled size of lsked_csb to 64. Was running out of space.
2016Sep08 New keyword "vsi_align" in skedf.ctl. Following files changed: proc_dbbc_pfb_tracks.f, drudg_rdctl.f, drcom.ftni.
2016Sep08  proc_mk5_init2.f:  Output 'jiveab' commands if >2GBS
2016Sep06  proc_exper_initi.f:  Replace 'mk5=status?' with 'mk5_status'
2016Aug23  ../skdrut/stinp.f. 2016Jul28 fix did not work. (index of cfirstrec(i) was unitialized). This fixes it.  
2016Jul28
1. drudg_rdctl.f  Added 'cfirstrec_def' to capture default recorder if 'equipment override' is on in skedf.ctl
2. fdrudg.f       Use 'cfirstrec_def' if 'equipment override' is on in skedf.ctl.
3. ../skdrut/stinp.f   Initialize cfirstrec="1 " even if you  have an error in reading in terminal line. Changed dimension of crack to char*20
4. ../skdrut/unpvt.f   Changed dimension ofrack_type to char*20.

2016Apr07.
1. Fixed typographic bug in proc_disk_tracks with filag10 mode. 

2016Jan19 Lots of changes having to do with supporting DBBC_PFB. Here is a quick summary.
1. ../skdrincl/skparm.ftni: Max_bbc=16-->32
2. proc_setup.f:  Different handling of DBBC_DDC and DBBC_PFB. Modifed to not emit BBC commands if DBBC_PFB. 
3. proc_tracks.f: Call proc_dbbc_pfb_tracks instead of proc_disk_tracks for DBBC_PFB. 
3. proc_dbbc_pfb_tracks.f: New routine to handle various track stuff for DBBC_PFB
4. proc_ifd.f:  Fixed so that emit commands for all IFs. The issue is that DBBCs can re-use the same BBC number.
5. proc_mracks_vc.f:  Changed initialization of some variables since max_bbc-->32.
6. proc_vc_name.f.  Only write out command if cname_vc<> " ". (if DBBC_PFB/* then cname_vc=" ")
7. ../skdrincl/statn.ftni, ../skdrincl/valid_hardware.ftni.  dimensions of cstrack and cstrack_cap increased to handle longer names.
8. ../skdrincl/valid_hardware.ftni.  Increased number of valid racks. 
9. ../skdrut/valid_hardware_blk.f.   DBBC-->DBBC_DDC, added DBBC_PFB, DBBC_PFB/fila10g
10. ../skdrut/vmoinp.f, vunptrk.f  max_tracks-->2*max_tracks. This is because sign, magnitude can now be on same track (but drudg expects to be on different tracks.
11. ../skdrut/indexx_int2.f.   New routine. Sort an integer*2 array.
12. ../skdrut/indexx_string.f  New routine. Sort an array of strings. Used by proc_dbbc_pfb_tracks.f


2015Aug31 fdrudg.f Previously quit if first character of filename was "q" or "Q".  
2015Aug20 snap.f.  Allow disk2file for flexbuff.
2015Aug13 proc_norack.f    Output more information about lo, sidebands, etc.  proc_exper_initi.f  Minor changes.  
2015Jul29 proc_disk_tracks.f. Emit 'fila10g_mode' after "fila10g_mode=xxxx..."
2015Jul20. proc_exper_initi.f  Added "jiveab=version?" in exper_initi for Mark5C. 
2015Jul20. proc_setup.f    Don't output cont_cal_parity if turning cont_call off.
2015Jul17. Added support for cont_cal_polarity for DBBC racks.  drudg_rdctl.f, drcom.ftni, proc_setuup.f 
20145Jul06 proc_disk_tracks.f  Changed "geo_r" to "geo-r" and "geo_t" to "geo-t" for Chinese
          drudg_rdctl.f.  Initialized "dr_rack_Type, crec_default to " ". 
          fdrudg.f        If rack or recorder is "UNKNOWN" set to "none".  Onyly use equipment from skedf.ctl if explicitly called. 
2015Jun30 unpvt.f, stinp.f    Had to increase space for rack, recorder since size went char*8-->char*12
2015Jun19 proc_disk_tracks.f  Reorganized after adding CDAS and VLBAC rack types.  
          Checking tracks in (proc_disk_tracks) moved to subroutine check_csb_list.f 
          Modified init_hardware_commo to add CDAS and VLBAC types. 
2015Jun05. Replace "squeezewrite" by "drudg_write" which  a.) Remove spaces; B.)Lower case; C.) write it out. Affected routines:
   proc_disk_tracks.f, proc_patch.f snap.f,  snap_in2net_connect.f,  snap_pcalf.f,  snap_ready.f, snap.recp.f, snap_rollform.f,   
   snap_setup.f, snap_systracks.f, snap_tpicd.f
   drudg_rdctl.f:  Changed dimensions of variables that hold 'rack' and 'recorder' to char*12. (See 2015May19)
   proc_exper_initi.f:  Added 'dbbc=version' and 'fila10g=version' if appropriate.     
 
2015May29 proc_disk_tracks.f  Was using vdif for dbbc/fila10g and recorder Mark5B. Vdif is valid only for Mark6.
                    
2015May19 Added support for dbbc/fila10g rack and Mark6. Mostly minor changes. 
          Also changed size or variables that hold 'rack' and 'recorder' type: char*8-->char*12 Routines affected:          
  hardware.ftni 
  init_hardware_common.f 
  proc_disk_tracks.f 
  proc_mk5_init2.f
  proc_tracks.f
  snap.f
  snap_monitor.f
 ../skdrut/valid_hardware_blk.f 
 ../skdrincl/valid_hardware.ftni

2015Apr04 snap.f  Removed special treatment if two consecutive scans involve the same source. 
2015Mar31 snap.f  Fixed several problmems with phase-referencing. These occured in going from 9.11.4-->9.11.5 when the logic was simplified.
2015Mar30.  Got rid of obsolete parameter 'iperm' in call to drchmod.f
  drchmod.f, poiont.f, procs.f, prtmp.f, skdshft.f, snap.f
2015Jan29.  
../vmoinp.f  2014Dec09 change removed. Now all sidebands are treated as if normal LO. 
proc_disk_trakcs.f:   Flip sideband if inverted LOs. 
     
proc_trkf.f           Flip sideband for VEX if inverted LO. Previously only did for SKD files
proc_ifd.f            Added warning message if it doesn't find any valid LO inputs.
proc_mracks_vc.f      Added support for inverted Los. 
proc_disk_tracks.f, proc_trakcs.f 
                      Also added "ignore_mark5b_bad_mask"  flag. If mask is bad, will issue warning and continue. 
                      User needs to set flag in $misc section of skedf.ctl
procs.f               Previously did silent 'abort' if BBC frequencies were wrong. Now mushes on. 
---------------------------------------------------------------------------------------------------------------
2015Jan22 (Incorporate changes made from Jan13) Changes by JMG and JFHQ
Modifications to support astro2 and astro3 modes with DBBC 
BW written out to 3 places. Abort conditions all go to label 900.
../proc_disk_tracks.f 

2014Dec09 Changes to support 'inverted' IF.
../vmoinp.f.   Flip Sideband if LO freq>sky_freqls 

2014Dec06  Changes to support Mark5C. Affected files were:
proc_disk_tracks.f
fdrudg.f
proc_setup.f
proc_mk5_init1.f
proc_mk5_init2.f
proc_exper_initi.f
init_hardware_common.f
hardware.ftni
equip_type.ftni
../skdrut/stinp.f
../skdrut/ttape.f

2014Sep24
Increased number of modes from 20 to 40.  
../skdrincl/skparm.ftni  (max_frq =>40).
Removed warning message for about mode being not defined for a station.
../skdrut/itras.f
Fixed bug if VEX file did not define any passes, ie, PASS_ORDER not defined. 
../skdrut/gnpas.f

2014Jun02 proc_mracks_vc.f
This routine is called: call proc_mracks_vc(icode,ic,ib,ichan)
ic=channel #
ib=BBC #

The main idea is that this routine cycles through all channels one at a time and write lines like:
vc11=245.99,8.00,u
or
vc01=210.00,8.0,ul


To determine whether to write out "u", "l", or "ul" it checks to see if there are any channels that have the same channel # and bbc # that it was called with.  The code fragment that did the checking was:
        DO ichanx=ic,nchan(istn,icode) !remaining channels
           icx=invcx(ichanx,istn,icode) ! channel number
           if (ib.eq.ibbcx(icx,istn,icode)) then ! Same BBC?               
             if(itras(1,1,1,icx,1,istn,icode).ne.-99 .or. 
     >          itras(1,1,2,icx,1,istn,icode).ne.-99) ku=.true. 
             if(itras(2,1,1,icx,1,istn,icode).ne.-99 .or.
     >          itras(2,1,2,icx,1,istn,icode).ne.-99) kl=.true.                  
           endif
        enddo

This normally works because usually ic=ichan.   However in some cases ic>ichan, and hence it would not find the appropriate sideband in doing the check. (It would miss the channel number it was called with.) The routine was changed to start at 1.
Bug check:  Easiest to see the effect if you change the order of the 'codes' lines in a sked file. 






