I realize I did not provide enough context in previous, which led to a misunderstanding.To clarify: I am not simulating the egg stage. I am simulating an adult viper that faces a long period of fasting.The food is available only around day 50.The decline in WETMASS I observed was the expected result of costing of reserve during the fast. I have two specific questions regarding the dynamics of this mass loss.
1. The change in rate of WETMASS loss (dW/dt)I observed two distinct phases during first fasting period (before it got food and immediately rise WETMASS). dW/dt is steady at first, then slows down significantly after a specific point (the red dashed line in my plot). I thought this might be temperature-driven, as all energy flux follow arrhenius relationship. However, in the period before the red line, dW/dt remains constant even though the temperature fluctuates. If temperature is not the main driver here, is this sudden change in slope due to a state switch?
2. Another question also about the calculation of WETMASS. I understand that the gut is part of Structure. The help document said "WETMASS - Wet mass total (reserve, structure, reproduction buffer, stomach contents) (g)". Can I understand that WETMASS is the sum of dV*V, WETGUT and w_E/mu_E * (E+ER) ?
Your insight would be very helpful for me.
Here is my code. The microclimate input is too large to upload in the attachment... I also can not using micro_global() to simulate a similar conditions. I put the local air tempeature in the plot previously. And I can send the microclimate file via email if you want to see it.
# parameters of ectotherm model ===
weight <- 140.6
pct_wet <- 0.02
pct_cond <- 10
alpha_max <- 0.8
alpha_min <- 0.8 #
shape <- 1
shape_b <- 10
T_F_min = 13.94
T_F_max = 28.29
T_B_min = 12
T_RB_min = 12
T_pref <- 25
CT_max <- 35.7
CT_min <- 1
mindepth <- 2
maxdepth <- 10
shade_seek <- 1
burrow <- 1
climb <- 1
minshade <- 0
nocturn <- 1
crepus <- 1
diurn <- 1
postur <- 0
M1 <- 0.000878; M2 <- 1.501; M3 <- 0.0165
# parameters of deb module ===
load('allstat.Rda')
species <- 'Gloydius.blomhoffii'
allDEB.species<-unlist(labels(allStat$allStat)) # get all the species names
allDEB.species<-allDEB.species[1:(length(allDEB.species)-2)] # last two elements are not species
species.slot <- which(allDEB.species == species)
par.names <- unlist(labels(allStat$allStat[[species.slot]]))
for(i in 1:length(par.names)){
assign(par.names[i], unlist(allStat$allStat[[species.slot]][i]))
}
amp.param <- data.frame(param=NA, value=NA)
for(i in 1:length(par.names)) {
amp.param[i,] <- c(par.names[i], unlist(allStat$allStat[[species.slot]][i]))
}
if(exists("E.Hj")==FALSE){E.Hj <- E.Hb}
if(exists("E.He")==FALSE){E.He <- E.Hb}
if(exists("L.j")==FALSE){L.j <- L.b}
kap.X <- 0.85
p.Xm <- p.Am / kap.X
z.mult <- 1
del_M <- 0.069345
T.L <- 1 + 273.15
T.H <- 40 + 273.15
T.AL <- 5E04
T.AH <- 9E04
ArrFunc5 <- function(x, T_A, T_AL, T_AH, T_L, T_H, T_REF, kdot_ref){
#exp(T_A * (1 / T_REF - 1 / x)) / (1 + exp(T_AL * (1 / x - 1 / T_L)) + exp(T_AH * (1 / T_H - 1 / x))) * kdot_ref
exp(T_A / T_REF - T_A / x) * ((1 + exp(T_AL / T_REF - T_AL / T_L) + exp(T_AH / T_H - T_AH / T_REF)) / (1 + exp(T_AL / x - T_AL / T_L) + exp(T_AH / T_H - T_AH / x))) * kdot_ref
}
Tbs <- seq(0, 50) + 273.15
TempCorr <- ArrFunc5(Tbs, T.A,
T.AL, T.AH, T.L, T.H, T.ref, 1)
n.NC <- 1
n.NH <- 4/5
n.NO <- 3/5
n.NN <- 4/5
del.M <- 0.21957
V_init <- L.p^3
E_init <- E.m
E_H_init <- E.Hp+2
stage <- 2
viviparous <- 1
clutchsize <- 5
photostart <- 3
photofinish <- 2
E_sm <- 2400 / 0.3
foodmode <- 1
gutfill <- 20
J.prey <- V_init * E_sm / 4
N.prey <- 1
# read microclimate model ===
# we simulate the microclimate from September to following April
micro.recent <- readRDS('microclimate/2000.rds')
micro.warm <- readRDS('microclimate/2000_warm1.rds')
# hourly food ===
# based on observed count of prey of that year, we define which day the species can have prey (food_daily=1)
food.daily <- data.frame(
yday = c(299:308, 310, 311),
food_daily = 1
)
# convert to hourly energy that can be taken in
X <- rep(0, length=micro.recent$ndays)
X[food.daily$yday - micro.recent$soil[1,"DOY"]] <- 1
X <- X * J.prey*N.prey
X<-rep(X, each=24)
micro <- micro.recent
ecto <- ectotherm(DEB=1, starvemode = 1, intmethod=1, arrhen_mode = 1, aestivate = 1, depress = .2, aestdepth = 7, viviparous=viviparous, clutchsize=clutchsize, z.mult=z.mult, shape=shape, alpha_max=alpha_max, alpha_min=alpha_min, T_F_min=T_F_min, T_F_max=T_F_max, T_B_min=T_B_min, T_RB_min=T_RB_min, T_pref=T_pref, CT_max=CT_max, CT_min=CT_min, diurn=diurn, nocturn=nocturn, crepus=crepus, shade_seek=shade_seek, burrow=burrow, climb=climb, postur=postur, mindepth=mindepth, maxdepth=maxdepth, pct_wet=pct_wet, pct_cond=pct_cond, z=z*z.mult, E_sm = E_sm, foodmode=foodmode, gutfill=gutfill, X=X, del_M=del_M, p_Xm=p.Xm, kap_X=kap.X, v=v/24, kap=kap, p_M=p.M/24, E_G=E.G, kap_R=kap.R, k_J=k.J/24, E_Hb=E.Hb*z.mult^3, E_Hj=E.Hj*z.mult^3, E_Hp=E.Hp*z.mult^3, E_He=E.He*z.mult^3, h_a=h.a/(24^2), s_G=s.G, T_REF=T.ref, T_A=T.A, T_AL=
T.AL, T_AH=T.AH, T_L=T.L, T_H=T.H, E_0=E.0*z.mult^4, f=f, d_V=d.V, d_E=d.E, d_Egg=d.E, mu_X=mu.X, mu_E=mu.E, mu_V=mu.V, mu_P=mu.P, kap_X_P=kap.P, n_X=c(n.CX,n.HX,n.OX,n.NX), n_E=c(n.CE,n.HE,n.OE,n.NE), n_V=c(n.CV,n.HV,n.OV,n.NV), n_P=c(n.CP,n.HP,n.OP,n.NP), n_M_nitro=c(n.CN,n.HN,n.ON,n.NN), L_b=L.b, V_init=V_init, E_init=E_init, E_H_init=E_H_init, stage=stage, K_egg = 0, pct_cond_egg = 100, spec_hyd_egg = 0, photostart = photostart, photofinish = photofinish, M_1=M1, M_2=M2, M_3=M3, write_input = 0)
micro <- micro.warm
ecto.warm <- ectotherm(DEB=1, starvemode = 1, intmethod=1, arrhen_mode = 1, aestivate = 1, depress = .2, aestdepth = 7, viviparous=viviparous, clutchsize=clutchsize, z.mult=z.mult, shape=shape, alpha_max=alpha_max, alpha_min=alpha_min, T_F_min=T_F_min, T_F_max=T_F_max, T_B_min=T_B_min, T_RB_min=T_RB_min, T_pref=T_pref, CT_max=CT_max, CT_min=CT_min, diurn=diurn, nocturn=nocturn, crepus=crepus, shade_seek=shade_seek, burrow=burrow, climb=climb, postur=postur, mindepth=mindepth, maxdepth=maxdepth, pct_wet=pct_wet, pct_cond=pct_cond, z=z*z.mult, E_sm = E_sm, foodmode=foodmode, gutfill=gutfill, X=X, del_M=del_M, p_Xm=p.Xm, kap_X=kap.X, v=v/24, kap=kap, p_M=p.M/24, E_G=E.G, kap_R=kap.R, k_J=k.J/24, E_Hb=E.Hb*z.mult^3, E_Hj=E.Hj*z.mult^3, E_Hp=E.Hp*z.mult^3, E_He=E.He*z.mult^3, h_a=h.a/(24^2), s_G=s.G, T_REF=T.ref, T_A=T.A, T_AL=
T.AL, T_AH=T.AH, T_L=T.L, T_H=T.H, E_0=E.0*z.mult^4, f=f, d_V=d.V, d_E=d.E, d_Egg=d.E, mu_X=mu.X, mu_E=mu.E, mu_V=mu.V, mu_P=mu.P, kap_X_P=kap.P, n_X=c(n.CX,n.HX,n.OX,n.NX), n_E=c(n.CE,n.HE,n.OE,n.NE), n_V=c(n.CV,n.HV,n.OV,n.NV), n_P=c(n.CP,n.HP,n.OP,n.NP), n_M_nitro=c(n.CN,n.HN,n.ON,n.NN), L_b=L.b, V_init=V_init, E_init=E_init, E_H_init=E_H_init, stage=stage, K_egg = 0, pct_cond_egg = 100, spec_hyd_egg = 0, photostart = photostart, photofinish = photofinish, M_1=M1, M_2=M2, M_3=M3, write_input = 0)
# Question 1: why does the wetmass loss rate slow down around Day 30?
# is this because the sudden drop in temperature led to a decrease in metabolism?
plot(x = ecto$debout[, "DAY"],
y = ecto$debout[, "WETMASS"],
type = "l",
xlab = "Day",
ylab = "Wet Mass (g)",
cex.lab = 2,
cex.axis = 1.5
)
abline(v = 32, lty = 2, col = "red", lwd = 2)
# body temperature
plot(x = ecto$environ[, "DAY"],
y = ecto$environ[, "TC"],
type = "l",
xlab = "Day",
ylab = "Body Temperature",
cex.lab = 2,
cex.axis = 1.5
)
abline(v = 32, lty = 2, col = "red", lwd = 2)
# environment temperature
metout <- micro.recent$metout
metout <- cbind(metout, DAY=rep(1:242, each=24))
plot(x = metout[,"DAY"],
y = metout[, "TALOC"],
type = 'l')
abline(v = 32, lty = 2, col = "red", lwd = 2)
mean.ta <- aggregate(
x = metout[, "TALOC"],
by = list(DAY = metout[, "DAY"]),
FUN = mean
)
plot(x =mean.ta$DAY,
y = mean.ta$x,
type = 'l',
xlab = "Day",
ylab = "Daily averaged TALLOC",
cex.lab = 2,
cex.axis = 1.5)
abline(v = 32, lty = 2, col = "red", lwd = 2)