Closed robynsb closed 6 months ago
Comment 1: Latitude = North-South ( https://en.wikipedia.org/wiki/Latitude ) = y Longitude = East-West ( https://en.wikipedia.org/wiki/Longitude ) = x
Comment 2: "Zonal flow follows a pattern along latitudinal lines, latitudinal circles or in the west–east direction." -> Zonal flow occurs along a fixed latitude (i.e. a line at a given latitude), 'along' meaning here: "on that line". So, this should be U. (I need to correct the H5-description).
"Meridional flow follows a pattern from north to south, or from south to north, along the Earth's longitude lines, longitudinal circles (meridian) or in the north–south direction." -> Meridional flow occurs along a meridian (i.e. a fixed longitude - a line along a meridian, with a meridian always having the same x-coordinate; see the Greenich zero-meridian). So, this should be V. (I need to correct the H5-description).
Suggestion: Now, to check what is what, I suggest the following: a) post here please the coordinates of your test-cases. I'll quickly run them today or tomorrow through parcels, and give you the reference trajectory. b) Maybe please look again on the major-order of your loaded array and your looped indexing. Maybe you switched x- and y indices during your loop, or reading in a column-major order field [time][y][x] as row-major order field [x][y][time] ? This could easily happen sometimes with the memory map.
Comment 1: Latitude = North-South ( https://en.wikipedia.org/wiki/Latitude ) = y Longitude = East-West ( https://en.wikipedia.org/wiki/Longitude ) = x
Ah!! This explains part of my confusion. I was looking at this image and the arrows totally confused me.
A reference trajectory would be greatly appreciated. I tried some more values looking for a good trajectory and I found one that gives me quite strange results so there is definitely still something not right with my implementation.
Please can you send me trajectory for start latitude = 54.832040 and start longitude = 6.187572?
b) Maybe please look again on the major-order of your loaded array and your looped indexing. Maybe you switched x- and y indices during your loop, or reading in a column-major order field [time][y][x] as row-major order field [x][y][time] ? This could easily happen sometimes with the memory map
I think I indeed found an error here that seems to have cleared up at least one problem. So thank you for this!
There are some inconsistencies.
In the
.h5
filesIn
hydrodynamic_V.h5
the header information says "zonal_velocity". Inhydrodynamic_U.h5
the header information says "meridional_velocity".Wikipedia
For what it's worth, wikipedia says
NetCDF files
The
.nc
files in the header information say thatvo
is "Northward Current Velocity in the Water Column" anduo
is "Eastward Current Velocity in the Water Column".Parcels
In advection.py in Parcels,
u
s affect longitude andv
s affect latitude.Experimentally
For what it's worth, I'm currently using
u
s to affect latitude andv
s to affect longitude and the outputs look good.Conclusion - What is the problem?
The original data uses
u
to mean Eastward Velocity (== affects latitude ==x
== zonal velocity) however parcels usesu
to mean affects longitude (== Northward Velocity ==y
== meridional velocity).I suspect that Christian mixed this up as a result when converting the NetCDF files because to me it seems that the
u
s in the hdf5 data are actually indicating zonal velocity and this means that the hdf5 headers are named incorrectly.