55using Pkg
66project_path = " projects/Respiration_Fluxnet"
77Pkg. activate (project_path)
8-
9- # Pkg.develop(path=pwd())
8+ Pkg. develop (path= pwd ())
109# Pkg.instantiate()
1110
1211# start using the package
@@ -25,6 +24,8 @@ include("Data/load_data.jl")
2524
2625site = " US-SRG"
2726
27+ fluxnet_data = load_fluxnet_nc (joinpath (project_path, " Data" , " data20240123" , " $site .nc" ), timevar= " date" )
28+
2829# explore data structure
2930println (names (fluxnet_data. timeseries))
3031println (fluxnet_data. scalars)
@@ -77,11 +78,10 @@ parameters = (
7778target_FluxPartModel = [:NEE ]
7879forcing_FluxPartModel = [:SW_IN , :TA ]
7980
80- predictors = (Rb = [:SWC_shallow , :P , :WS ],
81+ predictors = (Rb = [:SWC_shallow , :P , :WS , :cos_dayofyear , :sin_dayofyear ],
8182 RUE = [:TA , :P , :WS , :SWC_shallow , :VPD , :SW_IN_POT , :dSW_IN_POT , :dSW_IN_POT_DAY ])
8283
8384global_param_names = [:Q10 ]
84-
8585hybrid_model = constructHybridModel (
8686 predictors,
8787 forcing_FluxPartModel,
@@ -91,7 +91,7 @@ hybrid_model = constructHybridModel(
9191 global_param_names,
9292 scale_nn_outputs= true ,
9393 hidden_layers = [32 , 32 ],
94- activation = tanh ,
94+ activation = sigmoid ,
9595 input_batchnorm = true ,
9696 start_from_default = false
9797)
@@ -178,7 +178,7 @@ using TidierPlots
178178using WGLMakie
179179beautiful_makie_theme = Attributes (fonts= (;regular= " CMU Serif" ))
180180
181- ggplot (forward_run, aes (x= : GPP_NT , y= : GPP_pred )) + geom_point () + beautiful_makie_theme
181+ ggplot (forward_run, @ aes (x= GPP_NT, y= GPP_pred)) + geom_point () + beautiful_makie_theme
182182
183183idx = .! isnan .(forward_run. GPP_NT) .& .! isnan .(forward_run. GPP_pred)
184184EasyHybrid. poplot (forward_run. GPP_NT[idx], forward_run. GPP_pred[idx], " GPP" , xlabel = " Nighttime GPP" , ylabel = " Hybrid GPP" )
0 commit comments