Open dbarneche opened 1 year ago
Yes. Two ways to do this. The better way would be to use an alternative (and simpler) plotting function if it is AIMS data service data. The alternative would be to use the same plotting functions but calculate the grid cell corners for the AIMS regraded data, and save that in sysdata.rda
[1520817071662_PastedImage]
From: Diego Barneche @.> Sent: 23 November 2022 13:56 To: open-AIMS/ereefs @.> Cc: Barbara Robson @.>; Assign @.> Subject: [open-AIMS/ereefs] Add functions to work with AIMS data? (Issue #33)
CAUTION: This email originated from outside of AIMS. DO NOT click links or open attachments in unsolicited emails, call and confirm the content is safe with the sender first. To report any suspicious emails, use the Report Message outlook add-in or send to @.***
Would it be possible to also work with AIMS eReefs data servicehttps://hyrax.ereefs.aims.gov.au/? This is probably a high priority function as this might affect a lot the inner working of multiple functions. If so we could create a function for this, or expand capacity of all functions.
— Reply to this email directly, view it on GitHubhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopen-AIMS%2Fereefs%2Fissues%2F33&data=05%7C01%7CB.Robson%40aims.gov.au%7C5d08cd5e6dc443dabe8e08dacd06c080%7Ce054a73b40dc4ae39fce60c537aa6fac%7C0%7C0%7C638047726134611611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=A6L3%2Fw%2BkNJ%2FbyYZ%2BfH5k2%2FoUjyeoAbamgYNPizcnlYE%3D&reserved=0, or unsubscribehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIT3CIOSGP2E23WYP36BBXLWJWIYBANCNFSM6AAAAAASIQLASE&data=05%7C01%7CB.Robson%40aims.gov.au%7C5d08cd5e6dc443dabe8e08dacd06c080%7Ce054a73b40dc4ae39fce60c537aa6fac%7C0%7C0%7C638047726134767828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O%2BJ8%2B0nTA%2FRmo0tb%2BANt11K1AjGNrSC5frGc%2BAVvFwo%3D&reserved=0. You are receiving this because you were assigned.Message ID: @.***>
Would it be possible to split the internal functionality of, e.g. map_ereefs
into:
If we take my second suggested approach (calculating and storing the locations of grid cell corners for AIMS data) then yes, we could do it that way.
The original ereefs model data (and that on the NCI server) is on an irregular (curvilinear) grid. We have the locations of the cell centres but also need the locations of the cell corners to plot it accurately. When plotted on the scale of the whole GBR, it doesn't matter much and we could just use the cell centre locations and could probably use ggplot2::geom_contour_filled() to plot it, but when zooming in to small areas of coastal or near-island waters, this can be inaccurate. Therefore, I have instead used ggplot2::geom_polygon() to plot the data after first setting up a polygon for every grid cell in the model domain. This is quite slow, but accurate around the edges.
The AIMS data centre version has regridded the original model output onto a regular grid (evenly spaced, rectangular grid cells). It won't be quite as accurate in the edge cases that I am concerned about above, but is much easier to handle. We can simply use ggplot2::geom_tile() to map it (or alternatively, could use geom_contour_filled() or even the functions that come with the raster package. If we do it this way, it will be much faster, especially plotting gifs for animations. (Alternatively, we could treat it in the same way as the NCI-served data after first calculating the locations of the grid corners, but doing it that way is slower for no advantage).
I think using a different plotting function for the AIMS regridded data would be better -- faster and cleaner.
Barbara
From: Diego Barneche @.> Sent: 23 November 2022 14:13 To: open-AIMS/ereefs @.> Cc: Barbara Robson @.>; Assign @.> Subject: Re: [open-AIMS/ereefs] Add functions to work with AIMS data? (Issue #33)
CAUTION: This email originated from outside of AIMS. DO NOT click links or open attachments in unsolicited emails, call and confirm the content is safe with the sender first. To report any suspicious emails, use the Report Message outlook add-in or send to @.***
Would it be possible to split the internal functionality of, e.g. map_ereefs into:
— Reply to this email directly, view it on GitHubhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopen-AIMS%2Fereefs%2Fissues%2F33%23issuecomment-1324527557&data=05%7C01%7CB.Robson%40aims.gov.au%7C258b6c0f0deb48bf821108dacd091f58%7Ce054a73b40dc4ae39fce60c537aa6fac%7C0%7C0%7C638047736314177517%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FNv%2FIoup2LnNdmhiHLKUegv%2FuCHGBPc%2FQ6IEOEMsAvo%3D&reserved=0, or unsubscribehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIT3CIOOUCONSKHV77VQOPTWJWKXVANCNFSM6AAAAAASIQLASE&data=05%7C01%7CB.Robson%40aims.gov.au%7C258b6c0f0deb48bf821108dacd091f58%7Ce054a73b40dc4ae39fce60c537aa6fac%7C0%7C0%7C638047736314333731%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7jVBWk5ud55z2YU2%2BFpioco46zjxvsAI8UyFybJVSbo%3D&reserved=0. You are receiving this because you were assigned.Message ID: @.***>
Would it be possible to also work with AIMS eReefs data service? This is probably a high priority function as this might affect a lot the inner working of multiple functions. If so we could create a function for this, or expand capacity of all functions.