Open s-kganz opened 1 year ago
Just poking around the repo, it seems like it would take a little effort to make the UTC offsets available when parsing the timestamp. One idea might be to add another field at the site_display/Ameriflux
endpoint so they are available through amf_site_info
. If that's not feasible, I would suggest clarifying in the documentation that the user has to set the timezone themselves.
Hi Keenan Ganz --
Thanks for writing and sharing this. All NEON data downloaded from AmeriFlux are in local standard time, unlike from the NEON portal.
As you pointed out, there's currently no straightforward way to assign the time zone when parsing the BASE file itself. UTC_OFFSET needs to be parsed from downloaded metadata (BADM). That's why I had to compromise and force the time zone to UTC (even they are not) for the amf_read_base() TIMESTAMP output. I hinted at it in the document https://search.r-project.org/CRAN/refmans/amerifluxr/html/amf_read_base.html, but I could be more specific. I thought about dropping TIMESTAMP output entirely to avoid this. Adding UTC_OFFSET to the API might be a good direction. I'll look into the possibility.
Thanks --
On Fri, Nov 3, 2023 at 3:28 PM Keenan Ganz @.***> wrote:
Just poking around the repo, it seems like it would take a little effort to make the UTC offsets available when parsing the timestamp. One idea might be to add another field at the site_display/Ameriflux endpoint so they are available through amf_site_info. If that's not feasible, I would suggest clarifying in the documentation that the user has to set the timezone themselves.
— Reply to this email directly, view it on GitHub https://github.com/chuhousen/amerifluxr/issues/95#issuecomment-1793191522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBZDAYOB2KJJTOVWNKT4Y3YCVV2LAVCNFSM6AAAAAA65BHSJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTGE4TCNJSGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Housen Chu
Research Scientist Climate and Ecosystem Sciences Division Lawrence Berkeley National Lab email: @. / @. phone: 510-486-6138 website: https://eesa.lbl.gov/profiles/housen-chu/
Hello,
I'm working on joining Ameriflux EC data with quality flags from NSF NEON. The NEON data portal always exports data in UTC, while Ameriflux encodes data in local standard time (ignoring daylight savings). However,
amf_read_base
sets the timestamp field to UTC without applying an offset, so timestamps downloaded withamerifluxr
andneonUtilities
will be misaligned. I understand this may be intended behavior and the user is supposed to set the timestamp themselves, but the documentation foramf_read_base
reads as if the timestamp is converted (to me, at least).We can verify this is the case by subtracting the appropriate UTC offset from timestamps in
amerifluxr
downloads. After doing so, these align with equivalent data downloaded withneonUtilities
. Here is a reprex, just set the user/email in theamf_download_base
call: