Skip to content

Commit

Permalink
fix QDM_mov!
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Dec 3, 2023
1 parent d22e073 commit a25c3d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/BiasCorrection/QDM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function QDM_mov!(y_adj::AbstractVector{T},
year_beg = max(year - half, year_min)
year_end = min(year + half, year_max)

inds_target = years == year
inds_mov = years in year_beg:year_end
inds_target = years .== year
inds_mov = year_beg .<= years .<= year_end

_y_target = y_pred[inds_target]
_y_mov = y_pred[inds_mov]
Expand All @@ -106,6 +106,7 @@ function QDM_mov!(y_adj::AbstractVector{T},
end


# inds: spatial index
function QDM_main(arr_obs::AbstractArray{T,3},
arr_calib::AbstractArray{T,3},
arr_pred::AbstractArray{T,3}, dates;
Expand Down
2 changes: 1 addition & 1 deletion src/utilize/nc_aggregate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function nc_aggregate(f::AbstractString, fout=nothing; by="year", fun=mean,

fout === nothing && (fout = "$outdir/$(basename(f))")
if isfile(fout) && !overwrite
println("[ok] file downloaded already!")
println("[ok] file already finished!")
return
end
verbose && (println("[running] : $(basename(fout))"))
Expand Down

0 comments on commit a25c3d1

Please sign in to comment.