-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I was trying to run LER at Toolik Lake in Alaska (elevation 715 m) using GOTM and Simstrat. In format_met() it was returning NAs in the GOTM met file and NaN in the p_air in simstrat.par. There's a bit where it calculates air pressure from a number of constants and air temperature (I think), but returns NaN when the elevation is 715 m (as Toolik is), when the temperature is set to 4 oC which it is.
Here is the code chunk in question:
if (!chck_met$p_surf) {
g <- 9.80665
Pb <- 101325
Lb <- -0.0065
R <- 8.31432
M <- 0.0289644
at_samp <- met[[l_names$airt]]
at_samp[at_samp < 4] <- 4
met[[l_names$p_surf]] <- Pb * (1 + (Lb/at_samp) * (elev))^((-g *
M)/R * Lb)
chck_met$p_surf <- TRUE
}
And this is the code I ran to investigate
g <- 9.80665
Pb <- 101325
Lb <- -0.0065
R <- 8.31432
M <- 0.0289644
elev <- 715
at_samp<- 4
Pb * (1 + (Lb/at_samp) * (elev))^((-g * M)/R * Lb)
It seems that any elevation above 615 m causes this error.
Metadata
Metadata
Assignees
Labels
No labels