Closed serbinsh closed 6 years ago
Here is a bit more of the code preceding:
#--------------------------------------------------------------------------------------------------#
#+++ Partition NEE into GPP and respiration --- Processing with ustar filtering before
#EddyProc.C <- sEddyProc$new(paste0(site), EddyDataWithPosix.F, c('NEE','Rg','Tair','VPD', 'Ustar'),DTS.n = freq)
EddyProc.C <- sEddyProc$new(paste0(site), EddyDataWithPosix.F, c('NEE','LE','H','Rg','Tair','VPD', 'Ustar'),DTS.n = freq)
# estimating the thresholds based on the data
uStarTh <- EddyProc.C$sEstUstarThreshold()$uStarTh
uStarTh
# plot saturation of NEE with UStar for one season
EddyProc.C$sPlotNEEVersusUStarForSeason( levels(uStarTh$season)[4], Dir.s = out.dir, Format.s = "pdf" )
# Gapfilling by default it takes the annually aggregated estimate to mark periods with low uStar
EddyProc.C$sMDSGapFill('NEE', FillAll.b=FALSE, Suffix.s='NoUstar') # Gap fill without ustar
EddyProc.C$sMDSGapFillAfterUstar('NEE') # Gap fill NEE with ustar
colnames(EddyProc.C$sExportResults()) # Note the collumns with suffix _WithUstar
EddyProc.C$sMDSGapFill('Tair', FillAll.b=FALSE) # Gap-filled Tair needed for partitioning
#+++ Flux partitioning
EddyProc.C$sMRFluxPartition(Lat_deg.n=latitude, Long_deg.n=longitude, TimeZone_h.n=TimeZone, Suffix.s='NoUstar')
EddyProc.C$sMRFluxPartition(Lat_deg.n=latitude, Long_deg.n=longitude, TimeZone_h.n=TimeZone, Suffix.s='WithUstar')
#+++ Export gap filled and partitioned data to standard data frame
FilledEddyData.F <- EddyProc.C$sExportResults()
You need to re-run EddyProc.C$sSetLocationInfo
when you create a new class by EddyProc.C <- sEddyProc$new
before you call EddyProc.C$sMRFluxPartition
.
In your previous comment I do not see a call to sSetLocationInfo
.
Closing this outdated issue.
Hello
We have been successfully running v 0.8-2 but recently we installed 1.0.0 on a new computer and are running into an error midway through our gapfill/partition script:
Start flux partitioning for variable NEE_NoUstar_f with temperature Tair_f. Error in .self$sCalcPotRadiation(useSolartime.b = !isTRUE(debug.l$useLocaltime.b)) : Need to set valid location information (sSetLocationInfo) before calling sCalcPotRadiation.
When running "sMRFluxPartition"
We noticed that we now need to run:
Which we have done but we still get this error. This code used to work so it seems we may be missing a flag/switch or some other setting to get this to run. We have tried to add/remove the debug flag which hasn't fixed it for us
Any help would be much appreciated. Thanks!