cioos-siooc / cioos-pacific-erddap

CIOOS Pacific ERDDAP main repository used to maintain, develop and integrate ERDDAP datasets.
https://data.cioospacific.ca/erddap
2 stars 0 forks source link

Failed to convert TOB file #10

Closed JessyBarrette closed 1 year ago

JessyBarrette commented 1 year ago

The following failed to be converted www.waterproperties.ca/osd_data_archive/Cruise_Data/2016/2016-017/Underway/TSG_20160717_2119.tob

Traceback (most recent call last):
  File "/home/cioos/cioos-siooc_data_transform/projects/ios_data_transform/ios_data_transform_script.py", line 108, in unpack_file_convert_threads
    convert_files_threads(*inputs)
  File "/home/cioos/cioos-siooc_data_transform/projects/ios_data_transform/ios_data_transform_script.py", line 128, in convert_files_threads
    if fdata.import_data():
  File "/home/cioos/cioos-siooc_data_transform/cioos_data_transform/cioos_data_transform/IosObsFile.py", line 1253, in import_data
    self.channels = self.get_channels()
  File "/home/cioos/cioos-siooc_data_transform/cioos_data_transform/cioos_data_transform/IosObsFile.py", line 443, in get_channels
    info["Maximum"] = [l[4] for l in ch]
  File "/home/cioos/cioos-siooc_data_transform/cioos_data_transform/cioos_data_transform/IosObsFile.py", line 443, in <listcomp>
    info["Maximum"] = [l[4] for l in ch]
IndexError: list index out of range

I suspect this is because the original file is missing a white space in the line: 3 Temperature:Intake 'deg C (ITS90)' -0.9854 8.3422
Between Intake and 'deg C.

*2020/10/05 16:57:41.31
*IOS HEADER VERSION 2.0      2016/04/28 2016/06/13 IVF16

*FILE
    START TIME          : UTC 2016/07/17 21:19:17.000
    END TIME            : UTC 2016/07/20 19:55:12.000
    TIME INCREMENT      : 0 0 0 5 0  ! (day hr min sec ms)
    TIME ZERO           : UTC 2015/12/31 00:00:00.000
    NUMBER OF RECORDS   : 50832
    DATA DESCRIPTION    : Thermosalinograph
    FILE TYPE           : ASCII
    DATA TYPE           : n/a
    CRC                 : CFF9FE80
    NUMBER OF CHANNELS  : 10

    $TABLE: CHANNELS
    ! No Name                        Units           Minimum        Maximum
    !--- --------------------------- --------------- -------------- --------------
       1 Date                        n/a             564            567
       2 Time                        HH:MM:SS        0.2314815E-04  0.9999653
       3 Temperature:Intake         'deg C (ITS90)' -0.9854        8.3422
       4 Temperature:Primary         'deg C (ITS90)' -0.6155        8.5401
       5 Salinity:T0:C0              PSS-78          22.7245        32.1349
       6 Fluorescence:URU:Seapoint   mg/m^3          0.114          2.135
       7 Conductivity:Primary        S/m             1.93801        3.294913
       8 Latitude                    degrees         68.96226       71.61986
       9 Longitude                   degrees         -167.8049      -157.501
      10 Time:Julian                 days            198.8885       201.8301
    $END
JessyBarrette commented 1 year ago

related to HakaiInstitute/cioos-pacific-erddap-public#20

guanlu129 commented 1 year ago

Added a white space in the line: 3 Temperature:Intake 'deg C (ITS90)' -0.9854 8.3422 between Intake and 'deg C. The updated .tob file should be rsynced to CIOOS server tonight.

JessyBarrette commented 1 year ago

Awesome I can close that issue then :)