boshek / rsoi

Import Climate Indices into R
https://boshek.github.io/rsoi/
18 stars 5 forks source link

Phases wrong in download_oni #13

Closed boshek closed 5 years ago

boshek commented 5 years ago

If we compared this output from rsoi:

image

with the description:

http://www.cpc.ncep.noaa.gov/products/analysis_monitoring/lanina/enso_evolution-status-fcsts-web.pdf

it seems very clear that I have mis-assigned the phases. phase shuld likely be changed to provisional phase and directly users here:

http://www.cpc.ncep.noaa.gov/products/precip/CWlink/MJO/enso.shtml

Here is the offending piece of code: https://github.com/boshek/rsoi/blob/3348e144988e11bc6240c976d8bb9bdd4feb2243/R/download-oni.R#L56-L57

Write a test so that this is caught

chanse-ford commented 4 years ago

Hey, I've been using your package recently and came across a bug similar to this. When using the "download_enso" function phases are categorized incorrectly with negative ONI values listed as warm phase and positive listed as cool phase.

boshek commented 4 years ago

Ahh yes. I've been lax in pushing the most recent version out to CRAN. Trying install the version from here using remotes::install_github("boshek/rsoi"). That should fix it. Thanks for the report.

chanse-ford commented 4 years ago

No worries. Caught it while going through the outputs and was just checking to see an issue had been opened for it. Thanks for the useful package.