From 882506c9dd26cfdf372b6e14ffad2a1a39d637f6 Mon Sep 17 00:00:00 2001
From: Brian Groenke <brian.groenke@awi.de>
Date: Sun, 9 Jan 2022 19:22:22 +0100
Subject: [PATCH] Rename n-factor params to 'nf' and 'nt'

---
 src/Physics/HeatConduction/heat_bc.jl                | 8 ++++----
 test/Physics/HeatConduction/heat_conduction_tests.jl | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Physics/HeatConduction/heat_bc.jl b/src/Physics/HeatConduction/heat_bc.jl
index e7ea2fdf..4b793ee3 100644
--- a/src/Physics/HeatConduction/heat_bc.jl
+++ b/src/Physics/HeatConduction/heat_bc.jl
@@ -15,12 +15,12 @@ BoundaryStyle(::Type{<:TemperatureGradient{<:Damping}}) = Neumann()
 @inline boundaryvalue(bc::TemperatureGradient, l1, p2, l2, s1, s2) = bc.T(s1.t)
 
 @with_kw struct NFactor{W,S} <: BoundaryEffect
-    winterfactor::W = Param(1.0, bounds=(0.0,1.0)) # applied when Tair <= 0
-    summerfactor::S = Param(1.0, bounds=(0.0,1.0)) # applied when Tair > 0
+    nf::W = Param(1.0, bounds=(0.0,1.0)) # applied when Tair <= 0
+    nt::S = Param(1.0, bounds=(0.0,1.0)) # applied when Tair > 0
 end
 @inline function boundaryvalue(bc::TemperatureGradient{<:NFactor}, l1, ::Heat, l2, s1, s2)
-    let nfw = bc.effect.winterfactor,
-        nfs = bc.effect.summerfactor,
+    let nfw = bc.effect.nf,
+        nfs = bc.effect.nt,
         Tair = bc.T(s1.t),
         nf = (Tair <= zero(Tair))*nfw + (Tair > zero(Tair))*nfs;
         nf*Tair # apply damping factor to air temperature
diff --git a/test/Physics/HeatConduction/heat_conduction_tests.jl b/test/Physics/HeatConduction/heat_conduction_tests.jl
index 50cffb06..91b11c12 100644
--- a/test/Physics/HeatConduction/heat_conduction_tests.jl
+++ b/test/Physics/HeatConduction/heat_conduction_tests.jl
@@ -74,7 +74,7 @@ end
 	@testset "n-factors" begin
 		ts = DateTime(2010,1,1):Hour(1):DateTime(2010,1,1,4)
 		forcing = TimeSeriesForcing([1.0,0.5,-0.5,-1.0,0.1], ts, :Tair)
-		tgrad = TemperatureGradient(forcing, NFactor(winterfactor=0.5, summerfactor=1.0))
+		tgrad = TemperatureGradient(forcing, NFactor(nf=0.5, nt=1.0))
 		sub = TestGroundLayer()
 		heat = Heat()
 		f1(t) = boundaryvalue(tgrad,Top(),heat,sub,(t=t,),(t=t,))
-- 
GitLab