castelao / seabird

Python parser for Sea-Bird CTD outputs, usually .cnv files.
BSD 3-Clause "New" or "Revised" License
49 stars 30 forks source link

fProfileQC failed #74

Open guillotp opened 1 year ago

guillotp commented 1 year ago

my system (conda-forge): seabird 0.12.0 cotede 0.23.7

import seabird from seabird.cnv import fCNV profile = fCNV('dCTD_2022_10_009.cnv') pqc = fProfileQC('dCTD_2022_10_009.cnv')

and I have this error:

time not found Multiple lat/lon positions but too close to each other so it will be considered a single position for the WOA comparison. lat: 49.5462570272259, lon: -64.4931517218543 depth not found

TypeError Traceback (most recent call last) Untitled-3.ipynb Cell 4 line 1 ----> 1 pqc = fProfileQC('dCTD_2022_10_009.cnv')

File ~/miniconda3/envs/ctds/lib/python3.10/site-packages/seabird/qc.py:33, in fProfileQC.init(self, inputfile, cfg, saveauxiliary, verbose, logger) 30 logging.error(e.msg) 31 raise ---> 33 super().init(profile, cfg=cfg, saveauxiliary=saveauxiliary, verbose=verbose)

File ~/miniconda3/envs/ctds/lib/python3.10/site-packages/cotede/qc.py:100, in ProfileQC.init(self, input, cfg, saveauxiliary, verbose, attributes) 97 if re.match("(%s)2?$" % c, vv): 98 module_logger.debug(" %s - evaluating: %s, as type: %s" % 99 (self.name, v, c)) --> 100 self.evaluate(v, self.cfg['variables'][c]) 101 break

File ~/miniconda3/envs/ctds/lib/python3.10/site-packages/cotede/qc.py:226, in ProfileQC.evaluate(self, v, cfg) 224 Procedure = qctests.catalog(cfg[criterion]["procedure"]) 225 if issubclass(Procedure, qctests.QCCheckVar): --> 226 y = Procedure(self.input, varname=v, cfg=cfg[criterion], autoflag=True) 227 elif issubclass(Procedure, qctests.QCCheck): 228 y = Procedure(self.input, cfg=cfg[criterion], autoflag=True)

File ~/miniconda3/envs/ctds/lib/python3.10/site-packages/cotede/qctests/woa_normbias.py:180, in WOA_NormBias.init(self, data, varname, cfg, autoflag) ... ---> 93 idx = ~ma.getmaskarray(depth) & (np.array(depth) >= 0) & np.isfinite(depth) 94 if not idx.any(): 95 module_logger.error("Invalid depth(s) for WOA comparison: {}".format(depth))

TypeError: '>=' not supported between instances of 'NoneType' and 'int'

castelao commented 1 year ago

Hi @guillotp , is this data (dCTD_2022_10_009.cnv) public? Where may I find it? Cheers,

guillotp commented 1 year ago

From: Guilherme Castelão @.> Sent: Friday, September 22, 2023 11:03 AM To: castelao/seabird @.> Cc: Guillot Pascal @.>; Mention @.> Subject: Re: [castelao/seabird] fProfileQC failed (Issue #74)

Hi @guillotphttps://github.com/guillotp , is this data (dCTD_2022_10_009.cnv) public? Where may I find it? Cheers,

— Reply to this email directly, view it on GitHubhttps://github.com/castelao/seabird/issues/74#issuecomment-1731575031, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEN4MCSB7HFR56PGJKFSFB3X3WSDZANCNFSM6AAAAAA5B3YYD4. You are receiving this because you were mentioned.Message ID: @.**@.>>

guillotp commented 1 year ago

I've just sent you the file. Hope you have it. Thank you