Skip to content

Conversation

@MDHDZ91
Copy link
Contributor

@MDHDZ91 MDHDZ91 commented Feb 13, 2023

update the from_cnv reading options to include "prM" without a space as a key, update the prkey error conditional statements to be able to read files that may have more than 1 key (such as both depth and pressure)

MDHDZ91 and others added 2 commits February 13, 2023 17:14
update the from_cnv reading options to include "prM" without a space as a key, update the prkey error conditional statements to be able to read files that may have more than 1 key (such as both depth and pressure)
@ocefpaf
Copy link
Member

ocefpaf commented Feb 14, 2023

update the from_cnv reading options to include "prM" without a space as a key, update the prkey error conditional statements to be able to read files that may have more than 1 key (such as both depth and pressure)

Do you have an example file that we can add to the tests? I made a small modification to your PR that hopefully will cover more future cases too.

@ocefpaf ocefpaf merged commit fbdcbc2 into pyoceans:main Feb 14, 2023
@MDHDZ91
Copy link
Contributor Author

MDHDZ91 commented Feb 14, 2023

This is a portion of the .cnv in which I have "prM" a =s my key, that you can use a test.

# nquan = 20
# nvalues = 11177                   
# units = specified
# name 0 = prM: Pressure [db]
# name 1 = depFM: Depth [fresh water, m]
# name 2 = tnc90C: Temperature [ITS-90, deg C]
# name 3 = c0uS/cm: Conductivity [uS/cm]
# name 4 = specc: Specific Conductance [uS/cm]
# name 5 = sal00: Salinity, Practical [PSU]
# name 6 = wetStar: Fluorescence, WET Labs WETstar [mg/m^3]
# name 7 = sbeox0Mg/L: Oxygen, SBE 43 [mg/l]
# name 8 = sbeox0PS: Oxygen, SBE 43 [% saturation]
# name 9 = wetCDOM: Fluorescence, WET Labs CDOM [mg/m^3]
# name 10 = CStarTr0: Beam Transmission, WET Labs C-Star [%]
# name 11 = par: PAR/Irradiance, Biospherical/Licor
# name 12 = orp: Oxidation Reduction Potential [mV]
# name 13 = ph: pH
# name 14 = dz/dtM: Descent Rate [m/s]
# name 15 = timeS: Time, Elapsed [seconds]
# name 16 = altM: Altimeter [m]
# name 17 = latitude: Latitude [deg]
# name 18 = longitude: Longitude [deg]
# name 19 = flag: Flag
# span 0 =      0.490,     54.682       
# span 1 =      0.499,     55.760       
# span 2 =     4.1088,     9.9882       
# span 3 = 176.587563, 207.364740       
# span 4 =    294.781,    304.471       
# span 5 =     0.1369,     0.1393       
# span 6 =     0.0113,     1.2216       
# span 7 =    11.3867,    13.2770       
# span 8 =     94.508,    107.251       
# span 9 =     1.1405,     1.5722       
# span 10 =    91.7138,    98.5304      
# span 11 = 1.1166e+01, 5.6520e+03      
# span 12 =   204.6193,   232.3960      
# span 13 =      8.230,      8.433      
# span 14 =     -0.874,      0.546      
# span 15 =      0.000,    465.667      
# span 16 =       1.34,      58.27      
# span 17 =   43.21532,   43.21630      
# span 18 =  -87.56762,  -87.56750      
# span 19 = 0.0000e+00, 0.0000e+00      
# interval = seconds: 0.5
# start_time = Sep 26 2022 16:33:27
# bad_flag = -9.990e-29
# asciiin_in = E:\Maria_CTD_to_process\BH2019\NEbAsc1.asc
# file_type = ascii
*END*
      1.047      1.067     9.9408 206.872828    296.014     0.1388     0.0186    11.4219    101.134     1.2401    95.1742 4.2428e+03   232.3960      8.350 1.6364e-15      0.000      57.85   43.21532  -87.56750 0.0000e+00
      1.045      1.066     9.9409 206.811344    295.924     0.1388     0.0186    11.4219    101.134     1.2069    95.1742 4.2190e+03   232.3960      8.350     -0.000      0.042      57.90   43.21532  -87.56750 0.0000e+00
      1.037      1.058     9.9409 206.934311    296.100     0.1389     0.0186    11.4218    101.134     1.2069    95.1742 4.1954e+03   232.3960      8.350     -0.001      0.083      57.90   43.21532  -87.56750 0.0000e+00
      1.025      1.045     9.9411 206.872827    296.011     0.1388     0.0186    11.4218    101.133     1.2069    95.1742 4.1954e+03   232.3960      8.350     -0.002      0.125      57.92   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9409 206.872827    296.012     0.1388     0.0186    11.4286    101.193     1.2401    95.1742 4.1836e+03   232.3960      8.350     -0.004      0.167      57.92   43.21532  -87.56750 0.0000e+00
      1.026      1.047     9.9410 206.934311    296.099     0.1389     0.0186    11.4226    101.140     1.2069    95.1742 4.1719e+03   232.3960      8.355     -0.005      0.208      57.92   43.21532  -87.56750 0.0000e+00
      1.025      1.045     9.9411 206.934311    296.098     0.1389     0.0186    11.4157    101.080     1.2401    95.1742 4.1601e+03   232.3960      8.350     -0.006      0.250      57.90   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9411 206.934311    296.098     0.1389     0.0186    11.4149    101.073     1.2401    95.1742 4.1719e+03   231.7922      8.355     -0.007      0.292      57.88   43.21532  -87.56750 0.0000e+00
      1.016      1.036     9.9411 206.934311    296.098     0.1389     0.0186    11.4142    101.066     1.2401    95.1481 4.1719e+03   232.3960      8.350     -0.009      0.333      57.90   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9409 206.872827    296.012     0.1388     0.0186    11.4135    101.060     1.2401    95.1481 4.1836e+03   232.3960      8.355     -0.010      0.375      57.90   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9412 206.872827    296.010     0.1388     0.0186    11.4128    101.054     1.2401    95.1481 4.1719e+03   232.3960      8.350     -0.011      0.417      57.90   43.21532  -87.56750 0.0000e+00
      1.016      1.036     9.9408 206.811344    295.926     0.1388     0.0186    11.4122    101.048     1.2401    95.2002 4.1719e+03   232.3960      8.350     -0.013      0.458      57.90   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9411 206.934311    296.098     0.1389     0.0186    11.4115    101.043     1.2401    95.1742 4.1719e+03   232.3960      8.355     -0.014      0.500      57.92   43.21532  -87.56750 0.0000e+00
      1.006      1.026     9.9408 206.934311    296.102     0.1389     0.0186    11.4110    101.037     1.2069    95.1742 4.1719e+03   232.3960      8.350     -0.015      0.542      57.92   43.21532  -87.56750 0.0000e+00
      1.017      1.037     9.9409 206.872827    296.012     0.1388     0.0186    11.4104    101.033     1.2069    95.1742 4.1719e+03   232.3960      8.350     -0.016      0.583      57.92   43.21532  -87.56750 0.0000e+00
      1.008      1.027     9.9408 207.088022    296.321     0.1390     0.0186    11.4167    101.088     1.2069    95.1481 4.1719e+03   232.3960      8.355     -0.018      0.625      57.92   43.21532  -87.56750 0.0000e+00

@ocefpaf
Copy link
Member

ocefpaf commented Feb 14, 2023

Thanks! I'll add a test as soon as possible. Do you mind checking if a dev install of the library solves ir for you though? I can cut a release as soon as you do.

@MDHDZ91
Copy link
Contributor Author

MDHDZ91 commented Feb 14, 2023

calling the updated libraries from my git branch solved my issues, it was really that space in "prM"

@ocefpaf
Copy link
Member

ocefpaf commented Feb 14, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants