!! Copyright (C) Stichting Deltares, 2012-2014. !! !! This program is free software: you can redistribute it and/or modify !! it under the terms of the GNU General Public License version 3, !! as published by the Free Software Foundation. !! !! This program is distributed in the hope that it will be useful, !! but WITHOUT ANY WARRANTY; without even the implied warranty of !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the !! GNU General Public License for more details. !! !! You should have received a copy of the GNU General Public License !! along with this program. If not, see . !! !! contact: delft3d.support@deltares.nl !! Stichting Deltares !! P.O. Box 177 !! 2600 MH Delft, The Netherlands !! !! All indications and logos of, and references to registered trademarks !! of Stichting Deltares remain the property of Stichting Deltares. All !! rights reserved. subroutine swoxy ( pmsa , fl , ipoint , increm , noseg , & noflux , iexpnt , iknmrk , noq1 , noq2 , & noq3 , noq4 ) !>\file !> Partitioning switch in WC, S1 and S2 based on actual and critical oxygen concentration C********************************************************************** C +----------------------------------------+ C | D E L F T H Y D R A U L I C S | C | WAter Resources and Environment | C +----------------------------------------+ C C*********************************************************************** C C Project : STANDAARDISATIE PROCES FORMULES IMPAQT M4.70 C Author : C Date : 960501 Version : 0.01 C C History : C C Date Author Description C ------ -------------- ----------------------------------- C 000519 Jos van Gils Set switches oxic/sulfidic based on OXY C C*********************************************************************** C C Description of the module : C C Name T L I/O Description Units C ---- --- - - ------------------- ----- C OXY R*4 1 I oxygen concentration [gO/m3] C CROXY R*4 1 I critical oxygen concentration [gO/m3] C SWITCH R*4 1 O switch for partitioning [-] C Logical Units : - C Modules called : - C Name Type Library C ------ ----- ------------ IMPLICIT NONE REAL PMSA ( * ) , FL (*) INTEGER IPOINT( * ) , INCREM(*) , NOSEG , NOFLUX, + IEXPNT(4,*) , IKNMRK(*) , NOQ1, NOQ2, NOQ3, NOQ4 INTEGER ISEG, IKMRK1, + IP1, IP2, IP3, IP4, IP5, IP6, + IN1, IN2, IN3, IN4, IN5, IN6 INTEGER ISWWK, ISWS1, ISWS2 REAL OXY, CROXY, POROS IP1 = IPOINT(1) IP2 = IPOINT(2) IP3 = IPOINT(3) IP4 = IPOINT(4) IP5 = IPOINT(5) IP6 = IPOINT(6) IN1 = INCREM(1) IN2 = INCREM(2) IN3 = INCREM(3) IN4 = INCREM(4) IN5 = INCREM(5) IN6 = INCREM(6) C DO 9000 ISEG = 1 , NOSEG !! CALL DHKMRK(1,IKNMRK(ISEG),IKMRK1) !! IF (IKMRK1.GT.0) THEN IF (BTEST(IKNMRK(ISEG),0)) THEN C OXY = PMSA(IP1) CROXY = PMSA(IP2) POROS = PMSA(IP3) C******************************************************************************* C**** if OXY > CROXY ISWOXY = 1 in Water Column and S1 (poriewater) C**** else ISWOXY = 0 in Water Column and S1 (poriewater) C**** ISWOXY = 0 always in S2 C*********************************************************************** IF (OXY/POROS.LE.CROXY) THEN ISWWK = 0 ISWS1 = 0 ISWS2 = 0 ELSE ISWWK = 1 ISWS1 = 1 ISWS2 = 0 ENDIF PMSA(IP4) = ISWWK PMSA(IP5) = ISWS1 PMSA(IP6) = ISWS2 ENDIF C IP1 = IP1 + IN1 IP2 = IP2 + IN2 IP3 = IP3 + IN3 IP4 = IP4 + IN4 IP5 = IP5 + IN5 IP6 = IP6 + IN6 C 9000 CONTINUE C RETURN C END