Hallo,
after implementing my complete workflow in R, I will now start translating everything to JULIA. In order to do this, one of my first steps is to extract my reference variables from a dataset that I have offline. At a later stage, I might try to integrate this dataset also in the datacube but for the moment, I would just like to prepare this locally.
So, my strategy to was to first derive the grid coordinates of the datacube and then create my own polygonshapefile with polygons matching the gridcells of the datacube.
One of my earlier attempts was this:
tair = getCubeData(c,variable=“air_temperature_2m”, longitude = (70,108), **
** latitude = (25, 40),)
Data Cube view with the following dimensions
Lon Axis with 152 Elements from 70.125 to 107.875
Lat Axis with 60 Elements from 39.875 to 25.125
Time Axis with 506 Elements from 20010101 to 20111227
Total size: 22.0 MB
z = tair.lonAxis
z
Lon Axis with 152 Elements from 70.125 to 107.875
writecsv(“lon.dat”, z)
MethodError: no method matching start(::ESDL.Cubes.Axes._RangeAxis{Float64,:Lon,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}})
Closest candidates are:
start(::SimpleVector) at essentials.jl:258
start(::Base.MethodList) at reflection.jl:560
start(::ExponentialBackOff) at error.jl:107
…
Stacktrace:
[1] #writedlm#18(::Array{Any,1}, ::Function, ::IOStream, ::ESDL.Cubes.Axes._RangeAxis{Float64,:Lon,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}, ::Char) at ./datafmt.jl:673
[2] #20 at ./datafmt.jl:683 [inlined]
[3] open(::Base.DataFmt.##20#21{Array{Any,1},ESDL.Cubes.Axes._RangeAxis{Float64,:Lon,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}},Char}, ::String, ::String) at ./iostream.jl:152
[4] #writecsv#23(::Array{Any,1}, ::Function, ::String, ::ESDL.Cubes.Axes._RangeAxis{Float64,:Lon,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}) at ./datafmt.jl:705
[5] writecsv(::String, ::ESDL.Cubes.Axes._RangeAxis{Float64,:Lon,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}) at ./datafmt.jl:705
[6] include_string(::String, ::String) at ./loading.jl:522
I wanted to try out some more right now, but at the moment I get an error message right from the start (I used the same code I used before, so I am quite sure that it should not be a problem of my computer or the code):
So again a summary of my questions:

How can I export the Lat/Lon values for the individual grid cells of the data cube to use them offline  plus another question: Are the given Lat/Lon values the centers of the grid, or the upper right corner or … ?

What about the error message appearing right at the start?
Thanks! I will have more question in the next days, while translating my Rproject to JULIA.
Best wishes,
Fabian