-
Notifications
You must be signed in to change notification settings - Fork 13
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
adapt ODV files "load" function for WOD data[👆] #136
Comments
Hello Quitterie, I haven't read (yet) the solution you proposed in details (due to other constrains right now), however when you say
we can in fact get the @time obsvalwod,obslonwod,obslatwod,obsdepthwod,obstimewod,obsidwod =
WorldOceanDatabase.load(Float64,woddatadir,varname,prefixid = "1977-"); where julia> obsid
2046877-element Vector{String}:
"1977-wod_007663161O"
"1977-wod_007663161O"
⋮
"1977-wod_018508837O"
"1977-wod_018508837O" and the function |
Thank you, Charles, for your answer. |
yes indeed, strange it's empty. Just in case: have you followed this?
I must admit I haven't used this function a lot but in the notebooks from the |
Hi, |
Thanks, good it was too difficult to solve ;) |
Dear DIVAnd developers,
I am looking for duplicates between EMODNet Chemistry and the WOD.
To do so, I use the DIVAnd.Quadtrees.checkduplicates function as a first guess but then refine the duplicate detection focusing on consistent profiles instead of looking at each observation as if it were independent from the others.
For this, I decided to use the information given by the "id" output variable of the function "load" (from NCODV and/or from PhysOcean.WorldOceanDatabase) but there is a problem with the measurements from the WOD : they do not have information for the "LOCAL_CDI_ID" metadata. The "id" output variable is thus an empty variable.
Would it be possible to add an option in the "load" function so that if the "LOCAL_CDI_ID" is not available, then another parameter can be used (like the "Station" parameter for example, in the case of the WOD) ?
I created locally a development package for DIVAnd to adapt the NCODV.load function (see code below). I was wondering whether it would be possible to modify the "official" packages accordingly (or maybe in a smarter way) ?
Thanks
Quitterie
Following is the way I adapted the function:
function load_WOD(T, fname, long_name; qv_flags = ["good_value", "probably_good_value"],
nchunk = 10)
[...]
char metavar4(N_STATIONS, STRING20) ;
metavar4:long_name = "Station" ;
[...]
We use the empty string for LOCAL_CDI_ID instead.
"""
end
[...]
char metavar4(N_STATIONS, STRING36) ;
metavar4:long_name = "LOCAL_CDI_ID" ;
[...]
We use the station name instead.
"""
ncvar_LOCAL_CDI_ID = varbyattrib_first(ds, long_name = "Station")
if ndims(ncvar_LOCAL_CDI_ID) == 2
LOCAL_CDI_ID = chararray2strings(ncvar_LOCAL_CDI_ID.var[:])
else
@warn """The variable with the long_name attribute 'Station' is expected to have two dimensions. For example the output of 'ncdump -h' of $fname should contain:
[...]
char metavar4(N_STATIONS, STRING20) ;
metavar4:long_name = "Station" ;
[...]
end
The text was updated successfully, but these errors were encountered: