dklinges9 / mcera5

mcera5
12 stars 9 forks source link

extract_clim() output throws error when used with microclima::runauto() #18

Closed admahood closed 1 year ago

admahood commented 1 year ago

It's an easy fix though. The error is as follows:

Error in if (class(hourlydata) == "logical") { : the condition has length > 1

Took a quick look at the class:

class(point_out) [1] "tbl_df" "tbl" "data.frame"

Easily fixed by:

class(point_out) <- "data.frame"

I'm not sure if this is a bug to be fixed by the microclima package or this one.

dklinges9 commented 1 year ago

Hi Adam, thanks for bringing this to our attention. I'll peel through things and conference with Ilya to decide where is the best place to make the fix, more soon!

Best, Dave

dklinges9 commented 1 year ago

Hi Adam,

I think this is indeed best handled within microclima, as this error applies to more instances than just the classes of mcera5 objects. I suggested a fix to Ilya via this pull request, and will close this issue as there shouldn't be changes made to mcera5 for this. Thanks again!