From 48724b8fe11818b65734352d65243f49b654cfda Mon Sep 17 00:00:00 2001 From: Yuri Artioli Date: Thu, 10 Nov 2022 10:00:58 +0000 Subject: [PATCH] moved getting om_cal only if ISWCAL not equal to 0 when ISWCAL=0 the dependency is not defined (because is not needed) --- src/benthic_calcite.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/benthic_calcite.F90 b/src/benthic_calcite.F90 index 515f79e..d1cf4e1 100644 --- a/src/benthic_calcite.F90 +++ b/src/benthic_calcite.F90 @@ -82,13 +82,14 @@ subroutine do_bottom(self,_ARGUMENTS_DO_BOTTOM_) _HORIZONTAL_LOOP_BEGIN_ _GET_HORIZONTAL_(self%id_c, bL2c) - _GET_(self%id_om_cal, om_cal) if (self%iswcal==0) then ! NB select case would be cleaner but makes vectorization impossible for ifort 14 fdiss = 0._rk elseif (self%iswcal==1) then + _GET_(self%id_om_cal, om_cal) fdiss = (max(1._rk-om_cal,0._rk))**self%ndiss else + _GET_(self%id_om_cal, om_cal) fdiss = max(0._rk,(1._rk-om_cal)/(1._rk-om_cal+self%KcalomX)) end if