Skip to content

Commit

Permalink
Place Topp equation function in conditional wrapper
Browse files Browse the repository at this point in the history
Fixes wsular#4

(cherry picked from commit cfbfa2e)
  • Loading branch information
patricktokeeffe committed Feb 16, 2024
1 parent 86999a4 commit 8ae3aee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Significant realignment means users will need to modify current deployments to c
* Modifies fifth footprint integration segment to increase scale factor of aerodynamic height used to calculate max range by factor of 5 (200→1000)
and to iterate up to a fixed number of times instead of estimating number of steps required.

It also includes a number of fixes and enhancements:

* Eliminate compiler warning about unused Topp equation function if not using Decagon 5TM sensors. Fixes [#4]

[#4]: https://github.com/wsular/EasyFlux-DL-CR3000/issues/4


## [ProgSig 40826] 2018-11-29

Expand Down
14 changes: 5 additions & 9 deletions src/EasyFlux-DL.cr3
Original file line number Diff line number Diff line change
Expand Up @@ -1952,6 +1952,11 @@ Units profile_5TM_tmpr = C
Units profile_5TM_wc = frac_v_wtr
'*** End of 5TM profile constants and variables ***
#EndIf
#If ((SENSOR_5TM) OR (PROFILE_5TM)) Then
Function Topp_equation( dielectric )
Return 4.3e-6*dielectric^3 - 5.5e-4*dielectric^2 + 2.92e-2*dielectric - 5.3e-2
EndFunction
#EndIf
#If ((SENSOR_HFP) AND (SENSOR_CS6XX) AND (SENSOR_SOIL_T)) Then

'*** Beginning of variables for calculation of soil heat flux at soil surface ***
Expand Down Expand Up @@ -4641,15 +4646,6 @@ Sub Separation_Lag_Lateral_Distances (wnd_dir, separation_x, separation_y, separ
separation_lat_dis = -separation_x*SIN(wnd_dir) + separation_y*COS(wnd_dir)
EndSub


'*****************'
'*** FUNCTIONS ***'
'*****************'
Function Topp_equation( dielectric )
Return 4.3e-6*dielectric^3 - 5.5e-4*dielectric^2 + 2.92e-2*dielectric - 5.3e-2
EndFunction


'********************'
'*** MAIN PROGRAM ***'
'*********************'
Expand Down

0 comments on commit 8ae3aee

Please sign in to comment.