cioos-siooc / ocean-data-parser

A Python package for parsing oceanographic proprietary data formats to xarray Dataset.
https://cioos-siooc.github.io/ocean-data-parser/
GNU General Public License v3.0
4 stars 1 forks source link

IOS Conversion - moored currentmeter data issues #82

Open guanlu129 opened 4 months ago

guanlu129 commented 4 months ago

For IOS moored Current meter data, I’ve compared the netCDF file generated by ODPY and by the old ios_data_tranform, and would like to suggest a few items for discussion and potential modification:

JessyBarrette commented 4 months ago

Few comments from above

Varaible record_number is set as float in moored CTD file. The variable type should be consistent in moored CTD and moored current meter files. To do: change the record number from int to float.

the parser relies on the original file CHANNEL DETAIL to define the variable data type. As an example from A1_20130707_20140626_0185m.ctd:

    $TABLE: CHANNELS
    ! No Name            Units        Minimum        Maximum
    !--- --------------- ------------ -------------- --------------
       1 Record_Number   n/a          1              16979
       2 Date            YYYY/MM/DD   0              354
       3 Time            HH:MM:SS     0.2314815E-04  0.9791898
       4 Temperature     'deg C'      6.1785         8.1052
       5 Pressure        decibar      180.469        184.555
       6 Salinity        PSS-78       33.6531        33.9793
       7 Speed:Sound     m/s          1477.139       1484.307
    $END

    $TABLE: CHANNEL DETAIL
    ! No  Pad   Start  Width  Format      Type  Decimal_Places
    !---  ----  -----  -----  ----------  ----  --------------
       1  -99   ' '        8  F           R4      1
       2  -99   ' '    ' '    YYYY/MM/DD  D     ' '
       3  -99   ' '    ' '    HH:MM:SS    T     ' '
       4  ' '   ' '        9  f           R4      4
       5  ' '   ' '        9  f           R4      3
       6  ' '   ' '        9  f           R4      4
       7  ' '   ' '        9  f           R4      3
    $END

The difference you observed is likely related to the a different format defined within each source files. We could potentially start mapping each individual variables data type via the vocabulary file but I could see this been a lot of work for not much reward. ERDDAP and other softwares are able to handle a mix of float/int back into int as long as those floats do not have decimals.

Variable names in the ODPY version are not BODC standard names. In ODPY version old version standard name in the old version

I'm surprised that those variables were added yet in the vocabulary. You can certainly add them to the vocabulary or I can do. It can be a good practice for you to familiarize yourself with all the git world 😄

JessyBarrette commented 4 months ago

@guanlu129 you can either make changes on your own computer by pulling the branch fix-74-dfo-ios-update and pushing them back.

or by making the changes directly via the GitHub interface here: https://github.com/cioos-siooc/ocean-data-parser/blob/fix-74-dfo-ios-update/ocean_data_parser/vocabularies/dfo_ios_vocabulary.csv

The second is probably the simplest.