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

VCP in ODIM files is always 0 #38

Closed
peterdesmet opened this issue Dec 13, 2022 · 5 comments
Closed

VCP in ODIM files is always 0 #38

peterdesmet opened this issue Dec 13, 2022 · 5 comments
Labels
bug Something isn't working question Further information is requested

Comments

@peterdesmet
Copy link
Member

@adokter we defined Volume coverage pattern (https://aloftdata.eu/vpts-csv/#vcp) as having the following valid values:

12, 212, 112, 215, 121, 31, 32, 35

All BALTRAD files @stijnvanhoey has encountered so far however, have value 0 for VCP and thus fail validation. Can 0 be added to the valid values?

# download https://aloft.s3-eu-west-1.amazonaws.com/baltrad/hdf5/bejab/2022/08/19/bejab_vp_20220819T235500Z_0x9.h5
file <- "bejab_vp_20220819T235500Z_0x9.h5"
library(bioRad)
vp <- read_vpfiles(file)
vp$attributes$how$vcp
# 0
@peterdesmet peterdesmet added bug Something isn't working question Further information is requested labels Dec 13, 2022
@adokter
Copy link
Collaborator

adokter commented Dec 13, 2022

sure that works - vcp codes are mostly used in the US, which is why they are missing in EU files. I just checked the code and in case no vcp attribute is found in the file, a value of zero is returned:
https://github.com/adokter/vol2bird/blob/2810f331f039b9f7a28ad4afe06d1f7bf05ecb2c/lib/libvol2bird.c#L4753
Therefore currently 0 denotes missing

@stijnvanhoey
Copy link

@peterdesmet should we keep them as 0 or rather convert them to ""?

@peterdesmet
Copy link
Member Author

“” makes more sense than 0. Can be part of the conversion (cf. 0/1 to FALSE/TRUE).

@adokter
Copy link
Collaborator

adokter commented Dec 13, 2022

I can also change vol2bird to store NULL instead of 0, let me know.

@peterdesmet in historical data I have seen a few more VCP codes than the valid values listed above (11, 211, 21, 221, and there might be more). We may want to have the flexibility to assign our own VCP codes at some point for countries that do not have a pre-defined VCP classification. Checking whether VCP is a number may be sufficient.

@peterdesmet
Copy link
Member Author

  1. @adokter Would be good if vol2bird set it to NULL, makes more sense to me.
  2. @stijnvanhoey conversion to NULL for data with 0 would still be good
  3. @adokter ok, I will remove enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants