From e48e78d3c5bfe4c2f0206618b51182de9de01c03 Mon Sep 17 00:00:00 2001
From: sbiri <sbiri@noc.ac.uk>
Date: Fri, 29 Jul 2022 15:07:51 +0000
Subject: [PATCH] Update AirSeaFluxCode/src/util_subs.py,
 AirSeaFluxCode/src/cs_wl_subs.py files

---
 AirSeaFluxCode/src/cs_wl_subs.py | 4 ++--
 AirSeaFluxCode/src/util_subs.py  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/AirSeaFluxCode/src/cs_wl_subs.py b/AirSeaFluxCode/src/cs_wl_subs.py
index b6d54c2..3b36649 100644
--- a/AirSeaFluxCode/src/cs_wl_subs.py
+++ b/AirSeaFluxCode/src/cs_wl_subs.py
@@ -224,9 +224,9 @@ def delta(aw, Q, usr, grav):
     # u* in the water
     usr_w = np.maximum(usr, 1e-4)*np.sqrt(1.2/rhow)  # rhoa=1.2
     rcst_cs = 16*grav*np.power(visw, 3)/np.power(tcw, 2)
-    lm = 6*(1+np.maximum(Q*aw*rcst_cs/np.power(usr_w, 4), 0)**0.75)**(-1/3)
+    lm = 6*(1+(np.abs(Q)*aw*rcst_cs/np.power(usr_w, 4))**0.75)**(-1/3)
     ztmp = visw/usr_w
-    delta = np.where(Q > 0, np.minimum(6*ztmp, 0.007), lm*ztmp)
+    delta = np.where(Q > 0, np.minimum(6*ztmp, 0.007), np.minimum(lm*ztmp, 0.007))
     return delta
 # ---------------------------------------------------------------------
 
diff --git a/AirSeaFluxCode/src/util_subs.py b/AirSeaFluxCode/src/util_subs.py
index ddf4f2e..275161a 100644
--- a/AirSeaFluxCode/src/util_subs.py
+++ b/AirSeaFluxCode/src/util_subs.py
@@ -186,7 +186,7 @@ def get_outvars(out_var, cskin, gust):
                         "usr", "psim", "psit", "psiq", "psim_ref", "psit_ref",
                         "psiq_ref", "u10n", "t10n", "q10n", "zo", "zot", "zoq",
                         "uref", "tref", "qref", "dter", "dqer", "dtwl", "tkt",
-                        "Rl", "Rs", "Rnl""qair", "qsea", "Rb", "rh", "rho",
+                        "Rl", "Rs", "Rnl", "qair", "qsea", "Rb", "rh", "rho",
                         "cp", "lv", "theta", "itera")
         elif cskin == 0 and gust[0] != 0:  # skin OFF and gust ON
             res_vars = ("tau", "sensible", "latent", "monob", "cd", "cd10n",
-- 
GitLab