JGCRI/RCMIP5

filerDimensions with an absolute value

cahartin opened this issue · 2 comments

I am having some difficulty with the new filterDimensions. I want to find all values from -90 to -55 and 90 to 55. I used to use absolute value of the lat values but now I am having a hard time with that.

area_ll <- filterDimensions(oarea, latRange=c(abs<55) )
area_ll <- filterDimensions(oarea, latRange=c(0, 55 & 0,-55) )

any thoughts on how I can do this? Thanks.

Yeah, this change has made things more consistent with the rest of the code, and simpler in some respects, but at the cost of removing some power in cases like this. I think you're going to have to process the two hemispheres separately, then combine the data at the end:

area_ll_sh <- filterDimensions(oarea, latRange=c(-90, -55) )
area_ll_nh <- filterDimensions(oarea, latRange=c(55, 90) )

...alternatively, was this change a mistake? Again, it makes things consistent with the loadCMIP5, etc., but means we can't filter for non-contiguous blocks.