Skip to content

Add CTD thermal lag correction, YAML constants reader, and GSW salini…#234

Closed
lauryntalbot wants to merge 8 commits into
c-proof:mainfrom
lauryntalbot:ctd-adjustment
Closed

Add CTD thermal lag correction, YAML constants reader, and GSW salini…#234
lauryntalbot wants to merge 8 commits into
c-proof:mainfrom
lauryntalbot:ctd-adjustment

Conversation

@lauryntalbot
Copy link
Copy Markdown

…ty updates

Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Comment thread pyglider/ncprocess.py Outdated
Copy link
Copy Markdown
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this would have some documentation and an example as part of pyglider. As it is, it's a bit mysterious. Bonus points if you have a test.

Comment thread pyglider/ncprocess.py.save
Comment thread .ipynb_checkpoints/Untitled-checkpoint.ipynb Outdated
Comment thread Untitled.ipynb
@@ -0,0 +1,6 @@
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not include junk!

Comment thread docs/adjust_CTD.md
@@ -0,0 +1,118 @@
# PyGlider: Adjust CTD variables
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be incorporated in the rest of the docs somehow.

@jklymak
Copy link
Copy Markdown
Member

jklymak commented Mar 20, 2026

This is going to have a doc warning because your new markdown is not in a table of contents anywhere. Please add to the toc in index.md

Comment thread pyglider/ncprocess.py.save
Comment thread pyglider/ncprocess.py
Vertical grid spacing in meters. Ignored if ``depth_bins`` is not None
Vertical grid spacing in meters.

maskfunction : callable or None, optional
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the other PR. Why is it here?

Comment thread pyglider/ncprocess.py
accuracy = None,
maskfunction = None,
interp_variables = None):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a docstring!

Comment thread pyglider/ncprocess.py
return interp

def correct_sal(ds, fn, alpha, tau, interpolate_filter = None):
"""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in utils

Comment thread pyglider/ncprocess.py


def CPROOF_sal_interpolate_filter(ds):
"""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name is "sal" but then talks about temperature.

This should also be moved to utils

Comment thread pyglider/ncprocess.py


def get_conductivity_clean(ts0, dT, dz, flag_stdev, clean_stdev, accuracy=None):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra carriage return.

This is a bit vague about what actually gets returned here. "flagged" is vague. You create a new variable in the time series "conductivity_QC" and set to 1 or four, right?

Comment thread pyglider/ncprocess.py
ts['temperature_QC'] =(('time'), np.ones_like(ts.temperature) )

#added to C-PROOF files for gridding function
vars_ = ['conductivity_QC','salinity_QC','temperature_QC']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do these originally get added?

Comment thread pyglider/ncprocess.py
ts['salinity_adjusted'] = sal_adj

############# Update metadata
ts.attrs['processing_details'] = 'Processing details are located on the C-PROOF website for this mission under the reports tab.'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't have all this c-proof stuff injected here. pyglider is for everyone, not just C-PROOF. These things should be handled in the yaml.

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