Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create working example that simply updates DOXY_QC from 1 to 3 in BR or BD files #66

Open
cgrdn opened this issue Jan 23, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cgrdn
Copy link
Collaborator

cgrdn commented Jan 23, 2023

I think this is close to existing already, with the exception that the HISTORY variables are a little too hard coded in export_files() (see #65). But something like:

import bgcArgoDMQC as bgc

flt = bgc.sprof(my_wmo)
flt.update_field('DOXY_QC', where=flt.DOXY_QC == 1)
flt.export_files(data_mode='D')

should work.

Population of SCIENTIFIC_CALIB_COMMENT and HISTORY variables is definitely over specific right now. Perhaps an argument for use cases in export_files would fix this.

@cgrdn cgrdn self-assigned this Jan 23, 2023
@cgrdn cgrdn changed the title Create working example that simply updated DOXY_QC from 1 to 3 in BR or BD files Create working example that simply updates DOXY_QC from 1 to 3 in BR or BD files Jan 23, 2023
@cgrdn
Copy link
Collaborator Author

cgrdn commented Jan 24, 2023

Further to this, I think a something like a flt.bio_prof(wmo, cycles=[]) would be good for this. Loading the sprof to adjust flags of BR files makes no sense semantically, the purpose of the sprof is to calculate gain.

@cgrdn cgrdn added the enhancement New feature or request label Jan 24, 2023
@cgrdn
Copy link
Collaborator Author

cgrdn commented Jan 24, 2023

Effective script:

import bgcArgoDMQC as bgc

index = bgc.get_index()
meds  = index.loc[index.institution == 'ME']

for wmo in meds['WMO'].unique():
    profs = bgc.bio_prof(wmo)
    profs.update_field('DOXY_QC', 3, where=profs,.DOXY_QC == 1)
    profs.export_files(mode='R')

@cgrdn cgrdn added this to the Version 0.2.15 milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant