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

Dimension of variable dates in input dara file #10

Closed
ctroupin opened this issue Mar 20, 2023 · 2 comments
Closed

Dimension of variable dates in input dara file #10

ctroupin opened this issue Mar 20, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@ctroupin
Copy link
Member

If I understand well the doc at

DINCAE.jl/src/points.jl

Lines 492 to 508 in ef26b38

netcdf all-sla.train {
dimensions:
track = 9628 ;
time = 7445528 ;
variables:
int64 size(track) ;
size:sample_dimension = "time" ;
double dates(track) ;
dates:units = "days since 1900-01-01 00:00:00" ;
float sla(time) ;
float lon(time) ;
float lat(time) ;
int64 id(time) ;
double dtime(time) ;
dtime:long_name = "time of measurement" ;
dtime:units = "days since 1900-01-01 00:00:00" ;
}

the variable size, with dimension track, indicates the number of observations in each track (altimetry).

But then dates is defined as the time instance of the gridded field and has also track as a dimension.

It's not clear to me why it's the case, i.e. why the time instances of the gridded field should correspond to the tracks?
On a given day there are several tracks?

@ctroupin ctroupin added the help wanted Extra attention is needed label Mar 20, 2023
@Alexander-Barth
Copy link
Member

dates(track) essentially records to which time instance of the gridded field a particular track corresponds to.

Here are the number of the altimetry test case: 9628 time instance of the gridded field

Load the data:

julia> values = NCDatasets.loadragged(ds["sla"],:);

julia> typeof(values)
Vector{SubArray{Float32, 1, Vector{Float32}, Tuple{UnitRange{Int64}}, true}} (alias for Array{SubArray{Float32, 1, Array{Float32, 1}, Tuple{UnitRange{Int64}}, true}, 1})

julia> length(values)
9628

julia> length.(values)[1:10]
10-element Vector{Int64}:
 301
 491
 644
[...]

length(values) is the number of time instance (for the gridded field) and length.(values) the number of values at a particular time instance.

Maybe it is better to discuss this off-line?

@ctroupin
Copy link
Member Author

OK now clear:

  • the observations are sorted by time
  • the variable dates will store the time where we want the analysis (12 months for ex)
  • the number of observations for each time instance will be stored as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

2 participants