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

AMSR2 file versions #34

Open
raymondben opened this issue Jan 20, 2025 · 1 comment
Open

AMSR2 file versions #34

raymondben opened this issue Jan 20, 2025 · 1 comment
Assignees

Comments

@raymondben
Copy link
Member

> raadfiles::amsr2_daily_files() %>% dplyr::filter(date == as.POSIXct("2014-12-03")) %>% pull(fullname)
[1] "/rdsi/PUBLIC/raad/data/seaice.uni-bremen.de/data/amsr2/asi_daygrid_swath/s6250/2014/dec/Antarctic/asi-AMSR2-s6250-20141203-v5.tif"

is using the v5 file version, but the 5.4 exists:

> file.exists("/rdsi/PUBLIC/raad/data/seaice.uni-bremen.de/data/amsr2/asi_daygrid_swath/s6250/2014/dec/Antarctic/asi-AMSR2-s6250-20141203-v5.4.tif")
[1] TRUE

The v5 files have a different extent to the v5.4 (actually they probably do not in reality, maybe it's a file metadata problem):

> ext(rast("/rdsi/PUBLIC/raad/data/seaice.uni-bremen.de/data/amsr2/asi_daygrid_swath/s6250/2014/dec/Antarctic/asi-AMSR2-s6250-20141203-v5.4.tif"))
SpatExtent : -3950000, 3950000, -3950000, 4350000 (xmin, xmax, ymin, ymax)

> ext(rast("/rdsi/PUBLIC/raad/data/seaice.uni-bremen.de/data/amsr2/asi_daygrid_swath/s6250/2014/dec/Antarctic/asi-AMSR2-s6250-20141203-v5.tif"))
SpatExtent : -3946875, 3953125, -3953125, 4346875 (xmin, xmax, ymin, ymax)

(which means that read_amsr2_ice will fail if some files resolve to v5 and others to v5.4, because the extents differ).

I don't think I can force bowerbird to only retrieve 5.4 files, because some v5 files don't have a 5.4 version available. I assume that raadfiles is reducing the full directory listing to one file per date: can we get it to choose the highest version for each file?

The same issue might be affecting other seaice.de data sets but I have not checked.

@mdsumner
Copy link
Member

this definitely needs a more careful check, and I should remove some functions but this is the one used by raadtools::read_amsr2_3k_ice

amsr2_3k_daily_files

I have left in various versions for reasons I cannot remember now, so I should clean this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants