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

Work on BGC from 2024 LOV visit #356

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open

Work on BGC from 2024 LOV visit #356

wants to merge 99 commits into from

Conversation

gmaze
Copy link
Member

@gmaze gmaze commented Jun 4, 2024

Place holder for work kicked off during 2024 LOV visit.
Closes #361
Adressed #363

What's in this PR:

  • Implement machinery to be able to post-process data according to user modes for BGC from the erddap
    • This includes a new transform_data_mode, that is doing what was doing the filter_data_mode method before, but this method was very badly named: merge PARAM with PARAM_ADJUSTED according to DATA_MODE values
    • The already existing filter_data_mode is now really doing what is was supposed to do: filter points according to data mode values
    • Refactor the postprocessing method in the data fetcher facade, so that it clearly implement user mode requirements for 'phy' and 'bgc' dataset
  • Implement support for another index file, the auxiliary index in the ``etc` GDAC folder
  • Implement nutrients and carbonate system predictions for the Mediterranean Sea using the CANYON-MED model. This brings in a new submodule in argopy to easily support argo accessor extensions.

Poke @Sauzede and @catsch

Breaking changes in the API:

  • Argo xarray dataset attribute history is replaced by Processing_history
  • change in signature for the xarray.argo accessor method filter_data_mode
  • refactorised datafetcher prototype method filter_data_mode as transform_data_mode

@gmaze gmaze added the argo-BGC About biogeochemical variables label Jun 4, 2024
@gmaze gmaze requested review from catsch and Sauzede June 4, 2024 09:18
@gmaze gmaze self-assigned this Jun 4, 2024
@gmaze gmaze removed request for catsch and Sauzede June 4, 2024 09:35
@gmaze
Copy link
Member Author

gmaze commented Jun 4, 2024

Hi folks, @catsch @Sauzede @grgdll @HCBScienceProducts,

Could I have some advice with regard to how can I easily identify all variables related to Radiometry in the Erddap list of variables below (the BGC dataset filling the Erddap is from synthetic profiles).

I would need this in order to filter out radiometry variables not in R data mode for the "Standard user mode", following recommendation in this issue #280 (comment)

List of variables to filter List of erddap BGC dataset from synthetic profile files:
['wmo_inst_type',
 'data_type',
 'date_update',
 'pi_name',
 'bbp470',
 'bbp470_qc',
 'bbp470_adjusted',
 'bbp470_adjusted_qc',
 'bbp470_adjusted_error',
 'bbp532',
 'bbp532_qc',
 'bbp532_adjusted',
 'bbp532_adjusted_qc',
 'bbp532_adjusted_error',
 'bbp700',
 'bbp700_qc',
 'bbp700_adjusted',
 'bbp700_adjusted_qc',
 'bbp700_adjusted_error',
 'bbp700_2',
 'bbp700_2_qc',
 'bbp700_2_adjusted',
 'bbp700_2_adjusted_qc',
 'bbp700_2_adjusted_error',
 'bisulfide',
 'bisulfide_qc',
 'bisulfide_adjusted',
 'bisulfide_adjusted_qc',
 'bisulfide_adjusted_error',
 'cdom',
 'cdom_qc',
 'cdom_adjusted',
 'cdom_adjusted_qc',
 'cdom_adjusted_error',
 'chla',
 'chla_qc',
 'chla_adjusted',
 'chla_adjusted_qc',
 'chla_adjusted_error',
 'cndc',
 'cndc_qc',
 'cndc_adjusted',
 'cndc_adjusted_qc',
 'cndc_adjusted_error',
 'cp660',
 'cp660_qc',
 'cp660_adjusted',
 'cp660_adjusted_qc',
 'cp660_adjusted_error',
 'downwelling_par',
 'downwelling_par_qc',
 'downwelling_par_adjusted',
 'downwelling_par_adjusted_qc',
 'downwelling_par_adjusted_error',
 'down_irradiance380',
 'down_irradiance380_qc',
 'down_irradiance380_adjusted',
 'down_irradiance380_adjusted_qc',
 'down_irradiance380_adjusted_error',
 'down_irradiance412',
 'down_irradiance412_qc',
 'down_irradiance412_adjusted',
 'down_irradiance412_adjusted_qc',
 'down_irradiance412_adjusted_error',
 'down_irradiance443',
 'down_irradiance443_qc',
 'down_irradiance443_adjusted',
 'down_irradiance443_adjusted_qc',
 'down_irradiance443_adjusted_error',
 'down_irradiance490',
 'down_irradiance490_qc',
 'down_irradiance490_adjusted',
 'down_irradiance490_adjusted_qc',
 'down_irradiance490_adjusted_error',
 'down_irradiance555',
 'down_irradiance555_qc',
 'down_irradiance555_adjusted',
 'down_irradiance555_adjusted_qc',
 'down_irradiance555_adjusted_error',
 'down_irradiance665',
 'down_irradiance665_qc',
 'down_irradiance665_adjusted',
 'down_irradiance665_adjusted_qc',
 'down_irradiance665_adjusted_error',
 'down_irradiance670',
 'down_irradiance670_qc',
 'down_irradiance670_adjusted',
 'down_irradiance670_adjusted_qc',
 'down_irradiance670_adjusted_error',
 'doxy',
 'doxy_qc',
 'doxy_adjusted',
 'doxy_adjusted_qc',
 'doxy_adjusted_error',
 'doxy2',
 'doxy2_qc',
 'doxy2_adjusted',
 'doxy2_adjusted_qc',
 'doxy2_adjusted_error',
 'doxy3',
 'doxy3_qc',
 'doxy3_adjusted',
 'doxy3_adjusted_qc',
 'doxy3_adjusted_error',
 'nitrate',
 'nitrate_qc',
 'nitrate_adjusted',
 'nitrate_adjusted_qc',
 'nitrate_adjusted_error',
 'ph_in_situ_total',
 'ph_in_situ_total_qc',
 'ph_in_situ_total_adjusted',
 'ph_in_situ_total_adjusted_qc',
 'ph_in_situ_total_adjusted_error',
 'pres',
 'pres_qc',
 'pres_adjusted',
 'pres_adjusted_qc',
 'pres_adjusted_error',
 'psal',
 'psal_qc',
 'psal_adjusted',
 'psal_adjusted_qc',
 'psal_adjusted_error',
 'temp',
 'temp_qc',
 'temp_adjusted',
 'temp_adjusted_qc',
 'temp_adjusted_error',
 'turbidity',
 'turbidity_qc',
 'turbidity_adjusted',
 'turbidity_adjusted_qc',
 'turbidity_adjusted_error',
 'up_radiance412',
 'up_radiance412_qc',
 'up_radiance412_adjusted',
 'up_radiance412_adjusted_qc',
 'up_radiance412_adjusted_error',
 'up_radiance443',
 'up_radiance443_qc',
 'up_radiance443_adjusted',
 'up_radiance443_adjusted_qc',
 'up_radiance443_adjusted_error',
 'up_radiance490',
 'up_radiance490_qc',
 'up_radiance490_adjusted',
 'up_radiance490_adjusted_qc',
 'up_radiance490_adjusted_error',
 'up_radiance555',
 'up_radiance555_qc',
 'up_radiance555_adjusted',
 'up_radiance555_adjusted_qc',
 'up_radiance555_adjusted_error',
 'latitude',
 'longitude',
 'position_qc',
 'time',
 'time_qc',
 'direction',
 'platform_number',
 'platform_type',
 'cycle_number',
 'config_mission_number',
 'data_centre',
 'profile_bbp470_qc',
 'profile_bbp532_qc',
 'profile_bbp700_2_qc',
 'profile_bbp700_qc',
 'profile_bisulfide_qc',
 'profile_cdom_qc',
 'profile_chla_qc',
 'profile_cndc_qc',
 'profile_cp660_qc',
 'profile_down_irradiance380_qc',
 'profile_down_irradiance412_qc',
 'profile_down_irradiance443_qc',
 'profile_down_irradiance490_qc',
 'profile_down_irradiance555_qc',
 'profile_down_irradiance665_qc',
 'profile_down_irradiance670_qc',
 'profile_downwelling_par_qc',
 'profile_doxy_qc',
 'profile_doxy2_qc',
 'profile_doxy3_qc',
 'profile_nitrate_qc',
 'profile_ph_in_situ_total_qc',
 'profile_pres_qc',
 'profile_psal_qc',
 'profile_temp_qc',
 'profile_turbidity_qc',
 'profile_up_radiance412_qc',
 'profile_up_radiance443_qc',
 'profile_up_radiance490_qc',
 'profile_up_radiance555_qc']

@gmaze gmaze marked this pull request as draft June 4, 2024 12:07
@HCBScienceProducts
Copy link

HCBScienceProducts commented Jun 4, 2024 via email

@gmaze
Copy link
Member Author

gmaze commented Jun 4, 2024

awesome ! thanks @HCBScienceProducts !

gmaze added 4 commits June 5, 2024 09:29
- also fix a bug in pyarrow search_params
- fix deprec warning
- sort private _minimal_vlist property
@gmaze
Copy link
Member Author

gmaze commented Jun 5, 2024

one more question @catsch @Sauzede @grgdll @HCBScienceProducts :

what about CDOM ?
it's all in real time data mode, so how can we consider it in "standard" user mode ?

@catsch
Copy link

catsch commented Jun 5, 2024

We are presently waiting for new calibration factors for CDOM or a list of QC=4 from Seabird
so presently, it should not be used at all,
more to come at the next ADMT...

@gmaze
Copy link
Member Author

gmaze commented Jun 5, 2024

so presently, it should not be used at all,

thanks @catsch !

@gmaze
Copy link
Member Author

gmaze commented Jun 5, 2024

do you think we can keep Radiometry in the 'research' user mode ?

@catsch
Copy link

catsch commented Jun 5, 2024

Most of the time, Radiometry is good data (in R mode)
and Radiometry exists in D and (1,2,5,8) is Ok
Do I answer the question ?

@HCBScienceProducts
Copy link

HCBScienceProducts commented Jun 5, 2024 via email

gmaze added 9 commits June 6, 2024 16:31
- fix bug with shortcuts in ArgoIndex file and convention
- the ArgoIndex now support the "etc/argo-index/argo_aux-profile_index.txt" index file
- start support for more user mode in BGC
- don't remember why these variables were included, not consistant ...
- based on new utility merge_param_with_param_adjusted
- fix bug in to_index data fetcher method whereby the index could differ from the dataset
This assume that this branch will be merged for the v1.0.0
- fix bug whereby dataset without PSAL would raise errors with filters assuming all core parameters
- and refactored argo_accessor into _argo
- fix bug whereby user mode was not passed to downstream instances when URI was split
- list_standard_variables now return list for phy or bgc dataset
- improve consistency of the "variable" vs "parameter" terms usage
- fix bug whereby transforming the dataset according to data mode was not allowing delayed mode only and adjusted only variables in a dataset
- improve docstrings
- limit use of explicit list of parameters, fall back on using the utility list functions
- describe BGC support for expert and research user modes
- fix bug whereby pressure constraint was on pres_adjusted rather than pres for researcu user mode erddap uri
- fix bugs whereby list of parameters was not created when the list of params was in the args
/home/runner/micromamba/envs/argopy-tests/lib/python3.10/site-packages/fsspec/registry.py:279: UserWarning: Your installed version of s3fs is very old and known to cause severe performance issues, see also dask/dask#10276
@gmaze gmaze marked this pull request as ready for review September 13, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-BGC About biogeochemical variables
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring CANYON-MED to argopy
3 participants