From 76fc422ba040321ff42400ddcfe12fc58197f9eb Mon Sep 17 00:00:00 2001
From: Gildas Cambon <gildas.cambon@ird.fr>
Date: Mon, 18 Mar 2024 14:04:31 +0100
Subject: [PATCH] In Preprocessing_tools, during geostrophic calculation, add
 the Ekman transport only of forcing file (containing wind strss) exists

---
 Preprocessing_tools/geost_currents.m     | 4 ++--
 Preprocessing_tools/geost_currents_bry.m | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Preprocessing_tools/geost_currents.m b/Preprocessing_tools/geost_currents.m
index 73026f9b..2363074b 100644
--- a/Preprocessing_tools/geost_currents.m
+++ b/Preprocessing_tools/geost_currents.m
@@ -162,8 +162,8 @@ for l=1:tlen
 %
 % Ekman transport
 %
-  if ~isempty(frcname)
-%    disp('Add the Ekman transport')
+  if exist(frcname)
+    disp('Add the Ekman transport')
     sustr(:,:)=nfrc{'sustr'}(l,:,:);
     svstr(:,:)=nfrc{'svstr'}(l,:,:);
 %    rhoA=1.3; Cd=1.4e-3;
diff --git a/Preprocessing_tools/geost_currents_bry.m b/Preprocessing_tools/geost_currents_bry.m
index cc0f2e0a..eaad7517 100644
--- a/Preprocessing_tools/geost_currents_bry.m
+++ b/Preprocessing_tools/geost_currents_bry.m
@@ -193,8 +193,8 @@ for l=1:tlen
 %
 % Ekman transport
 %
-  if ~isempty(frcname)
-%    disp('Add the Ekman transport')
+   if exist(frcname)
+      disp('Add the Ekman transport')
     if obcndx==1
       tmp=squeeze(nfrc{'sustr'}(l,1,:));
       sustr=0*h; 
-- 
GitLab