Dekadal timeframe #4
martinedoesgis
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
Nice @martinedoesgis , that's definitely useful and good to archive for future reference. I would suggest creating a new folder called /implementations and saving the .js script there. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I've been asked to produce dekadal rainfall data. It's an odd but apparently common timeframe especially for meteorological analysis, calculated like this: every month has three dekads, such that the first two dekads have 10 days (i.e., 1-10, 11-20), and the third is comprised of the remaining days of the month. See : http://iridl.ldeo.columbia.edu/maproom/Food_Security/Locusts/Regional/Dekadal_Rainfall/index.html?Set-Language=en. The main added value is that the same dekad for different years will always be the same days in the calendar (except for end of February), unlike for weeks as week 1 doesn't always start on Jan 1st.
Coding it directly in Google Earth Engine was quite difficult so I made a small script using Moment.js to produce the list of the dekads for a given timeframe, see here : https://jsfiddle.net/38bL1q09/3/. Let me know if/where I can store it on the GitHub for archiving.
It creates in the console a JSON object (that can be converted to CSV and used in Google Earth Engine as a table to loop in) with the following fields:
Example:
Beta Was this translation helpful? Give feedback.
All reactions