Skip to content

Commit

Permalink
remove placeholder columns in CRU downscaling function
Browse files Browse the repository at this point in the history
This is not needed anymore, since vpd is now computed after downscaling in any case.
  • Loading branch information
fabern committed Dec 19, 2024
1 parent 83b902f commit 8bd761a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions R/ingest_globalfields.R
Original file line number Diff line number Diff line change
Expand Up @@ -1101,18 +1101,7 @@ expand_clim_cru_monthly_byyr <- function( yr, mdf, cruvars ){
mutate( vap = monthly2daily( mvap, "polynom", mvap_pvy[nmonth], mvap_nxt[1], leapyear = lubridate::leap_year(yr) ) ) %>%
right_join( ddf, by = c("date") )

# vpd: vpd for daily cru output is recomputed outside of this function
# generate placeholder column:
if ("vpd" %in% names(mdf)){
ddf <- ddf %>% mutate(vpd = NA_real_)
}
}

# ppfd: ppfd for cru is recomputed outside of this function

# generate placeholder column:
if ("ppfd" %in% names(mdf)){
ddf <- ddf %>% mutate(ppfd = NA_real_)
# vpd: vpd for daily cru output is computed outside of this function based on downscaled vap, tmin, tmax
}

return( ddf )
Expand Down

0 comments on commit 8bd761a

Please sign in to comment.