Commit 5a5d4762 authored by aho's avatar aho
Browse files

Add 'lat' in .NAO()

parent 36b9fcd5
......@@ -307,13 +307,15 @@ NAO <- function(exp = NULL, obs = NULL, lat, lon, time_dim = 'sdate',
target_dims = list(exp = c(memb_dim, time_dim, space_dim),
obs = c(time_dim, space_dim)),
fun = .NAO,
obsproj = obsproj, wght = wght, add_member_back = add_member_back,
lat = lat, wght = wght,
obsproj = obsproj, add_member_back = add_member_back,
ncores = ncores)
} else if (!is.null(exp)) {
res <- Apply(list(exp = exp),
target_dims = list(exp = c(memb_dim, time_dim, space_dim)),
fun = .NAO,
obsproj = obsproj, wght = wght, obs = NULL, add_member_back = FALSE,
lat = lat, wght = wght, obs = NULL,
obsproj = obsproj, add_member_back = FALSE,
ncores = ncores)
} else if (!is.null(obs)) {
if (add_member_back) {
......@@ -325,13 +327,14 @@ NAO <- function(exp = NULL, obs = NULL, lat, lon, time_dim = 'sdate',
target_dims = list(obs = c(time_dim, space_dim)),
output_dims = output_dims,
fun = .NAO,
obsproj = obsproj, wght = wght, exp = NULL, add_member_back = add_member_back,
lat = lat, wght = wght, exp = NULL,
obsproj = obsproj, add_member_back = add_member_back,
ncores = ncores)
}
return(res)
}
.NAO <- function(exp = NULL, obs = NULL, wght, obsproj = TRUE, add_member_back = FALSE) {
.NAO <- function(exp = NULL, obs = NULL, lat, wght, obsproj = TRUE, add_member_back = FALSE) {
# exp: [memb_exp, sdate, lat, lon]
# obs: [sdate, lat, lon]
# wght: [lat, lon]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment