Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
9197 lines (6643 sloc) 460 KB
!------------------------------------------------------------------------------
! IST/MARETEC, Water Modelling Group, Mohid modelling system
!------------------------------------------------------------------------------
!
! TITLE : Mohid Model
! PROJECT : Mohid Base 1
! MODULE : WaterQuality
! URL : http://www.mohid.com
! AFFILIATION : IST/MARETEC, Marine Modelling Group
! DATE : May 2003
! REVISION : Luis Fernandes - v4.0
! DESCRIPTION : Zero-dimensional model for primary production, nitrogen and phosphorus cycle
!
!------------------------------------------------------------------------------
!
!This program is free software; you can redistribute it and/or
!modify it under the terms of the GNU General Public License
!version 2, 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, write to the Free Software
!Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
!
!------------------------------------------------------------------------------
Module ModuleWaterQuality
use ModuleGlobalData
use ModuleLUD
use ModuleEnterData
use ModuleFunctions, only: OxygenSaturation, PhytoLightLimitationFactor
implicit none
private
!Subroutines---------------------------------------------------------------
!Constructor
public :: StartWaterQuality
private :: AllocateInstance
private :: WQReadData
private :: WaterQualityOptions
private :: WQPropertyIndexNumber
private :: WQReadCalcOptions
private :: WQOptionsConsistencyVerif
private :: WQConfiguration
private :: WQReadFileConstants
private :: WQReadSilicaFileConstants !aqui
private :: WQReadDiatomsFileConstants !aqui
private :: AllocateVariables
private :: Add_PropRateFlux
private :: Add_EquaRateFlux
public :: Construct_WQRateFlux
!Selector
public :: GetDTWQM
public :: GetWQOptions
public :: GetWaterQualitySize
public :: GetWQPropIndex
public :: GetWQPropRateFlux
public :: UnGetWQPropRateFlux
public :: GetNCRatio
!Modifier
public :: WaterQuality
private :: StartWaterQualityIteration
private :: WQCoeficientsCalculation
private :: WQOxygen
private :: WQOxygenSaturation
private :: WQOxygenCalculation
private :: WQBOD
private :: WQLarvae
private :: WQAge
private :: WQZooplankton
private :: WQPhytoplankton
private :: WQBacteria
private :: WQCiliate
private :: WQDiatoms
private :: WQSilica
private :: WQBiogenicSilica
private :: WQDissolvedSilica
private :: WQNitrogen
private :: WQAmmonia
private :: WQNitrite
private :: WQNitrate
private :: WQOrganicNitrogen
private :: WQParticulateOrganicNitrogen
private :: WQDONRefractory
private :: WQDONNonRefractory
private :: WQPhosphorus
private :: WQOrganicPhosphorus
private :: WQInorganicPhosphorus
private :: WQPOMpools
private :: WQSystemResolution
private :: WQRatesCalculation
!Destructor
public :: KillWaterQuality
private :: DeallocateInstance
!Management
private :: Ready
private :: LocateObjWaterQuality
!Parameter-----------------------------------------------------------------
!WQConfigurations definition
integer, parameter :: ZooPhy = 1
integer, parameter :: ZooPhyDia = 2
integer, parameter :: ZooPhyDiaCil = 3
integer, parameter :: ZooPhyDiaCilBac = 4
integer, parameter :: ZooDia = 5
integer, parameter :: ZooDiaCilBac = 6
integer, parameter :: ZooPhyCil = 7
integer, parameter :: ZooPhyCilBac = 8
!Types---------------------------------------------------------------------
type T_PropIndex
integer :: Zoo = null_int
integer :: Larvae = null_int
integer :: Age = null_int
integer :: Phyto = null_int
integer :: Bacteria = null_int
integer :: Ciliate = null_int
integer :: Diatoms = null_int !aqui
integer :: BiogenicSilica = null_int !aqui
integer :: DissolvedSilica = null_int !aqui
integer :: Ammonia = null_int
integer :: Nitrate = null_int
integer :: Nitrite = null_int
integer :: DissOrganicNitrogenRefractory = null_int
integer :: DONNonRefractory = null_int
integer :: PartOrganicNitrogen = null_int
integer :: PONitrogen1 = null_int
integer :: PONitrogen2 = null_int
integer :: PONitrogen3 = null_int
integer :: PONitrogen4 = null_int
integer :: PONitrogen5 = null_int
integer :: POPhosphorus1 = null_int
integer :: POPhosphorus2 = null_int
integer :: POPhosphorus3 = null_int
integer :: POPhosphorus4 = null_int
integer :: POPhosphorus5 = null_int
integer :: PartOrganicNitrogenRefractory = null_int
integer :: Oxygen = null_int
integer :: BOD = null_int
integer :: DissOrganicPhosphorusRefractory = null_int
integer :: DOPNonRefractory = null_int
integer :: PartOrganicPhosphorus = null_int
integer :: InorganicPhosphorus = null_int
end type T_PropIndex
type T_PropRateFlux
integer :: ID = null_int !initialization: jauch - or should be set to 0 (zero)?
real, pointer, dimension(:) :: Field => null()
type(T_PropRateFlux), pointer :: Next => null()
type(T_PropRateFlux), pointer :: Prev => null()
end type T_PropRateFlux
type T_EquaRateFlux
integer :: ID = null_int !initialization: jauch - or should be set to 0 (zero)?
real :: scalar = null_real
logical :: TimeSerie = .false. !initialization: jauch
type(T_EquaRateFlux), pointer :: next => null()
type(T_EquaRateFlux), pointer :: prev => null()
type(T_PropRateFlux), pointer :: FirstPropRateFlux => null()
type(T_PropRateFlux), pointer :: LastPropRateFlux => null()
end type T_EquaRateFlux
type T_ExtraRate
integer :: ID = null_int !initialization: jauch - or should be set to 0 (zero)?
real, pointer, dimension(:) :: Field => null()
end type T_ExtraRate
type T_PropCalc
logical :: Zoo = OFF
logical :: Larvae = OFF
logical :: Age = OFF
logical :: Phyto = OFF
logical :: Bacteria = OFF
logical :: Ciliate = OFF
logical :: Diatoms = OFF !aqui
logical :: Silica = OFF !aqui
logical :: Nitrogen = OFF
logical :: Phosphorus = OFF
logical :: Oxygen = OFF
logical :: Salinity = OFF
logical :: BOD = OFF
logical :: Pompools = OFF
end type T_PropCalc
type T_CalcMethod
logical :: ExplicitMethod = OFF
logical :: ImplicitMethod = OFF
logical :: SemiImpMethod = OFF !ppina
end type T_CalcMethod
type T_External
real, pointer, dimension(: ) :: Salinity => null()
real, pointer, dimension(: ) :: Temperature => null()
real, pointer, dimension(: ) :: ShortWaveRadiation => null()
real, pointer, dimension(: ) :: LightExtCoefField => null()
real, pointer, dimension(: ) :: Thickness => null()
real, pointer, dimension(:,:) :: Mass => null()
real, pointer, dimension(: ) :: FishFood => null()
end type T_External
type T_SilicaCycle !aqui
real :: KSiBiogenicDissRate = null_real
real :: BiogenicDissTCoef = null_real
end type T_SilicaCycle !aqui
type T_Diatoms !aqui
real :: DiaGrowMaxRate = null_real
real :: DiaGrossGrowRate = null_real
real :: DiaEndogRepConst = null_real
real :: DiaPhotorespFactor = null_real
real :: DiaExcretionConstant = null_real
real :: DiaMortMaxRate = null_real
real :: DiaMortSatConst = null_real
real :: DiaE = null_real
real :: DiaNSatConst = null_real
real :: DiaPSatConst = null_real
real :: DiaSiSatConst = null_real
real :: DiaPhotoinhibition = null_real
real :: DiaTOptMin = null_real
real :: DiaTOptMax = null_real
real :: DiaTMin = null_real
real :: DiaTMax = null_real
real :: DiaK1 = null_real
real :: DiaK2 = null_real
real :: DiaK3 = null_real
real :: DiaK4 = null_real
real :: DiaAlfaNC = null_real
real :: DiaAlfaPC = null_real
real :: DiaAlfaSiC = null_real
real :: DiaSolublInorgExcreFraction = null_real
real :: DiaExcreDissOrgFraction = null_real
real :: GrazDiaMin = null_real
real :: DiaRatioIngestionZoo = null_real
real :: DiaZooAssimilationRate = null_real
real :: ZooEfficiencyCaptureDiatoms = null_real
real :: DiaLightLimitationFactor = null_real
real :: DiaNutrientsLimitationFactor = null_real
real :: DiaNLimitationFactor = null_real
real :: DiaPLimitationFactor = null_real
real :: DiaSiLimitationFactor = null_real
real :: DiaTempLimitationFactor = null_real
type(T_ExtraRate ), pointer :: DiaGrossProduction => null()
type(T_ExtraRate ), pointer :: DiaTempLimitation => null()
type(T_ExtraRate ), pointer :: DiaNutLimitation => null()
type(T_ExtraRate ), pointer :: DiaNLimitation => null()
type(T_ExtraRate ), pointer :: DiaSiLimitation => null()
type(T_ExtraRate ), pointer :: DiaPLimitation => null()
type(T_ExtraRate ), pointer :: DiaLightLimitation => null()
end type T_Diatoms !aqui
type T_WaterQuality
private
integer :: InstanceID
type(T_Size1D ) :: Prop
type(T_PropIndex ) :: PropIndex
type(T_PropCalc ) :: PropCalc
type(T_CalcMethod ) :: CalcMethod
type(T_External ) :: ExternalVar
type(T_EquaRateFlux), pointer :: FirstEquaRateFlux => null()
type(T_EquaRateFlux), pointer :: LastEquaRateFlux => null()
type(T_ExtraRate ), pointer :: GrossProduction => null()
type(T_ExtraRate ), pointer :: TempLimitation => null()
type(T_ExtraRate ), pointer :: NutLimitation => null()
type(T_ExtraRate ), pointer :: NLimitation => null()
type(T_ExtraRate ), pointer :: PLimitation => null()
type(T_ExtraRate ), pointer :: LightLimitation => null()
!aqui
type(T_SilicaCycle ) :: SilicaCycle
!aqui
type(T_Diatoms ) :: Diatoms
real, pointer, dimension(:) :: NewProd => null()
real, pointer, dimension(:) :: RegeneratedProd => null()
real, pointer, dimension(:) :: NitrateUptake => null()
real, pointer, dimension(:) :: AmmoniaUptake => null()
real :: DTDay = null_real
real :: DTSecond = null_real
real :: NSatConst = null_real
real :: PhytoNutRegenerationSatConst = null_real
real :: AlfaPhytoNC = null_real
real :: AlfaZooNC = null_real
real :: AlfaCilNC = null_real
real :: AlfaBacteriaNC = null_real
real :: OMAlfaNC = null_real
real :: OMAlfaPC = null_real
real :: BactAlfaOC = null_real
real :: PlanktonOxygenCarbonRatio = null_real
real :: KRefrAmmoniaMinRate = null_real !KRefrAmmoniaMinRate
real :: KNonRefrAmmoniaMinRate = null_real !KNonRefrAmmoniaMinRate
real :: NonRefrAmmoniaMinRate
real :: KDenitrificationRate = null_real
real :: KNitrificationRateK1 = null_real !FIRST NITRIFICATION STEP (NH3-»NO2)
real :: KNitrificationRateK2 = null_real !SECOND NITRIFICATION STEP (NO2-»NO3)
real :: KPartDecompRate = null_real
real :: PhytoAvaibleDecomp = null_real
real :: TRefrAmmoniaMin = null_real !TRefractoryAmmoniaMineralization
real :: TNonRefrAmmoniaMin = null_real !TNonRefractoryAmmoniaMineralization
real :: TDenitrification = null_real
real :: TNitrification = null_real
real :: TPartDecomposition = null_real
real :: NitrificationSatConst = null_real
real :: DenitrificationSatConst = null_real
real :: KDOPnrMinRate = null_real
real :: TDOPnrMin = null_real
real :: KDOPrMinRate = null_real
real :: TDOPrMin = null_real
real :: AlfaPhytoPC = null_real
real :: AlfaZooPC = null_real
real :: PSatConst = null_real
real :: AlfaCilPC = null_real
real :: AlfaBacteriaPC = null_real
real :: AlfaSubstratPC = null_real
real :: PhytoLightLimitationFactor = null_real
real :: PhytoNutrientsLimitationFactor = null_real
real :: TPhytoLimitationFactor = null_real
real :: PhytoPLimitationFactor = null_real
real :: PhytoNLimitationFactor = null_real
real :: GrowMaxPhytoRate = null_real
real :: PhytoMortMaxRate = null_real
real :: PhytoGrossGrowRate = null_real
real :: E = null_real
real :: TOptPhytoMin = null_real
real :: TOptPhytoMax = null_real
real :: TPhytoMin = null_real
real :: TPhytoMax = null_real
real :: FK1 = null_real
real :: FK2 = null_real
real :: FK3 = null_real
real :: FK4 = null_real
real :: Photoinhibition = null_real
real :: FMortSatConst = null_real
real :: PhotorespFactor = null_real
real :: PhytoExcretionConstant = null_real
real :: PhytoEndogRepConst = null_real !PhytoEndogenousRepirationConstant
real :: PhotosynthesisOxygenCarbonRatio = null_real
real :: ONMineralizationRatio = null_real !Ratio between organic nitrogen and
real :: MinOxygen = null_real !minimum oxygen possible to allow aerobic
!reactions
real :: POPDecompRate = null_real
real :: TPOPDecompRate = null_real
real :: GrowMaxZooRate = null_real
real :: RatioOxygenCarbonZooRespiration = null_real
real :: RatioOxygenCarbonCilRespiration = null_real
real :: TOptZooMin = null_real
real :: TOptZooMax = null_real
real :: TZooMin = null_real
real :: TZooMax = null_real
real :: ZK1 = null_real
real :: ZK2 = null_real
real :: ZK3 = null_real
real :: ZK4 = null_real
real :: GrazPhytoMin = null_real
real :: GrazCiliateMin = null_real
real :: GrazPreyMin = null_real
real :: IvlevGrazConst = null_real
real :: ZPredMortalityRate = null_real
real :: TZooLimitationFactor = null_real
real :: ZooExcretionFactor = null_real
real :: ZooExcretionConst = null_real
real :: ZooIngestionConst = null_real
real :: ZooEfficiencyCapturePhyto = null_real
real :: ZooEfficiencyCaptureCiliate = null_real
real :: ZooIngestionMax = null_real
real :: ZooAssimilationPhytoRate = null_real
real :: ZooAssimilationCiliateRate = null_real
real :: PhytoRatioIngestionZoo = null_real
real :: CiliatesRatioIngestionZoo = null_real
real :: BactRatioIngestionCiliates = null_real
real :: PhytoRatioIngestionCiliates = null_real
real :: BacteriaNonGrazingMortalityRate = null_real
real :: BacteriaExcretionRate = null_real
real :: NitrogenSaturationConstBacteria = null_real
real :: BacteriaMaxUptake = null_real
real :: BacteriaMinSubstrate = null_real
real :: TOptbacteriaMin = null_real
real :: TOptBacteriaMax = null_real
real :: TBacteriaMin = null_real
real :: TBacteriaMax = null_real
real :: BK1 = null_real
real :: BK2 = null_real
real :: BK3 = null_real
real :: BK4 = null_real
real :: ZooNaturalMortalityRate = null_real
real :: ZooMortalityCoef = null_real
real :: ZooMinMortalityRate = null_real
real :: ZooMaxMortalityRate = null_real
real :: PhytoExcreDissOrgFraction = null_real
real :: ZooExcreDissOrgFraction = null_real
real :: PhytoSolublInorgExcreFraction = null_real
real :: ZooSolublInorgExcreFraction = null_real
real :: CiliateNaturalMortalityRate = null_real
real :: CiliateMortalityCoef = null_real
real :: CiliateMinMortalityRate = null_real
real :: CiliateMaxMortalityRate = null_real
real :: CiliateExcretionConst = null_real
real :: CiliateExcretionFactor = null_real
real :: CiliateIngestionConst = null_real
real :: CiliateEfficiencyCaptureBact = null_real
real :: CiliateEfficiencyCapturePhyto = null_real
real :: CiliateIngestionMax = null_real
real :: CiliateAssimilationBacteriaRate = null_real
real :: CiliateAssimilationPhytoRate = null_real
real :: CiliateGrazBactMin = null_real
real :: CiliateGrazPhytoMin = null_real
real :: CiliateGrazPreyMin = null_real
real :: CiliateReferenceRespirationRate = null_real
real :: BODOxidationCoefficient = null_real
real :: BODOxidationReferenceRate = null_real
real :: BODOxygenSSatConstant = null_real
real :: NConsOxyNitRatio = null_real !NitrateConsumptionOxygenNitrateRatio
real :: NitrificationK1_ON_ratio = null_real ! NH4 -> NO2 O:N Ratio
real :: NitrificationK2_ON_ratio = null_real ! NO2 -> NO3 O:N Ratio
real :: PConsOxyPhosphorusRatio = null_real !PhosphateConsumptionOxygenPhosphorusRatio (Rosa)
real :: PhytoTotalRespirationLossesRate = null_real
real :: NitrificationRateK1 = null_real
real :: NitrificationRateK2 = null_real
real :: BODOxidationRate = null_real
real :: OxyCarbonRatio = null_real !O:C Ratio in Co2
real :: DenitrificationRate = null_real
real :: PhytoNonGrazingMortalityRate = null_real
real :: ZooReferenceRespirationRate = null_real
real :: PhytoExcretionsRate = null_real
integer :: NPhases = null_int
real :: Awg = null_real
real :: Bwg = null_real
real :: Awz = null_real
real :: Bwz = null_real
real :: Atg = null_real
real :: Btg = null_real
real :: Atz = null_real
real :: Btz = null_real
real :: Ldensity = null_real
real :: Lshape = null_real
real :: Init_age = null_real
real :: Inter_age = null_real
real :: Final_age = null_real
real :: Init_length = null_real
real :: Inter_length = null_real
real :: Final_length = null_real
real :: FishFood_ref = null_real
real :: Temperature_ref = null_real
real :: Afg = null_real
real :: POMIngestVmax = null_real
real :: PONIngestKs = null_real
real :: POPIngestKs = null_real
real :: PON_CNratio = null_real
real :: PON_CPratio = null_real
!aqui_10
integer :: WQConfiguration =0
double precision, pointer, dimension(:,:) :: Matrix => null()
real, pointer, dimension(: ) :: IndTerm => null()
real, pointer, dimension(: ) :: NewMass => null() !Used with Explicit method
!Instance of Module_EnterData
integer :: ObjEnterData = 0
!Instance of ModuleLUD
integer :: ObjLUD = 0
type(T_WaterQuality ), pointer :: Next => null()
end type T_WaterQuality
!Global Module Variables
type (T_WaterQuality), pointer :: FirstObjWaterQuality => null()
type (T_WaterQuality), pointer :: Me => null()
!--------------------------------------------------------------------------
contains
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!CONSTRUCTOR CONSTRUCTOR CONSTRUCTOR CONSTRUCTOR CONSTRUCTOR CONSTRUCTOR CO
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
subroutine StartWaterQuality(WaterQualityID, FileName, STAT)
!Arguments-------------------------------------------------------------
integer :: WaterQualityID
character(LEN = *) :: FileName
integer, optional, intent(OUT) :: STAT
!External--------------------------------------------------------------
integer :: STAT_CALL
integer :: ready_
!Local-----------------------------------------------------------------
integer :: STAT_
!----------------------------------------------------------------------
STAT_ = UNKNOWN_
!Assures nullification of the global variable
if (.not. ModuleIsRegistered(mWaterQuality_)) then
nullify (FirstObjWaterQuality)
call RegisterModule (mWaterQuality_)
endif
call Ready(WaterQualityID, ready_)
cd0 : if (ready_ .EQ. OFF_ERR_) then
call AllocateInstance
call Nullify_all_Sub_Type_Pointers
call ConstructEnterData(Me%ObjEnterData, FileName, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) stop 'StartWaterQuality - ModuleWaterQuality - ERR01'
call WQReadData
call AllocateVariables
cd2: if (.NOT. Me%CalcMethod%ExplicitMethod) then
call StartLUD(Me%ObjLUD, &
Me%Prop%ILB, &
Me%Prop%IUB, &
Me%Prop%ILB, &
Me%Prop%IUB, &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) stop 'StartWaterQuality - ModuleWaterQuality - ERR02'
end if cd2
call KillEnterData(Me%ObjEnterData, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) stop 'StartWaterQuality - ModuleWaterQuality - ERR03'
!Returns ID
WaterQualityID = Me%InstanceID
STAT_ = SUCCESS_
else
stop 'ModuleWaterQuality - StartWaterQuality - ERR99'
end if cd0
if (present(STAT)) &
STAT = STAT_
!----------------------------------------------------------------------
end subroutine StartWaterQuality
!--------------------------------------------------------------------------
subroutine AllocateInstance
!Local-----------------------------------------------------------------
type (T_WaterQuality), pointer :: NewObjWaterQuality
type (T_WaterQuality), pointer :: PreviousObjWaterQuality
!Allocates new instance
allocate (NewObjWaterQuality)
nullify (NewObjWaterQuality%Next)
!Insert New Instance into list and makes Current point to it
if (.not. associated(FirstObjWaterQuality)) then
FirstObjWaterQuality => NewObjWaterQuality
Me => NewObjWaterQuality
else
PreviousObjWaterQuality => FirstObjWaterQuality
Me => FirstObjWaterQuality%Next
do while (associated(Me))
PreviousObjWaterQuality => Me
Me => Me%Next
enddo
Me => NewObjWaterQuality
PreviousObjWaterQuality%Next=> NewObjWaterQuality
endif
Me%InstanceID = RegisterNewInstance (mWATERQUALITY_)
end subroutine AllocateInstance
!--------------------------------------------------------------------------
Subroutine Nullify_all_Sub_Type_Pointers
nullify(Me%ExternalVar%Salinity )
nullify(Me%ExternalVar%Temperature )
nullify(Me%ExternalVar%Mass )
nullify(Me%ExternalVar%FishFood )
nullify(Me%NewProd )
nullify(Me%RegeneratedProd )
nullify(Me%NitrateUptake )
nullify(Me%AmmoniaUptake )
nullify(Me%Matrix )
nullify(Me%IndTerm )
nullify(Me%NewMass )
end Subroutine Nullify_all_Sub_Type_Pointers
!--------------------------------------------------------------------------
subroutine Construct_WQRateFlux(WaterQualityID, WQArrayLB, WQArrayUB, STAT)
!Arguments---------------------------------------------------------------
integer :: WaterQualityID
type(T_EquaRateFlux) , pointer :: EquaRateFluxX
integer, optional :: STAT
!External----------------------------------------------------------------
integer :: WQArrayLB,WQArrayUB
!Local-------------------------------------------------------------------
type (T_PropRateFlux), pointer :: NewPropRateFlux
type (T_EquaRateFlux), pointer :: NewEquaRateFlux
!Begin-------------------------------------------------------------------
integer :: STAT_CALL
integer :: PropLB, PropUB
integer :: NumAM
integer :: NumPON
integer :: NumPONr
integer :: NumZoo
integer :: NumPhyto
integer :: NumDONnr
integer :: NumNI
integer :: NumNA
integer :: NumDONr
integer :: NumO
integer :: NumBOD
integer :: NumIP
integer :: NumDOPr
integer :: NumDOPnr
integer :: NumPOP
integer :: NumPON1
integer :: NumPON2
integer :: NumPON3
integer :: NumPON4
integer :: NumPON5
integer :: NumPOP1
integer :: NumPOP2
integer :: NumPOP3
integer :: NumPOP4
integer :: NumPOP5
integer :: NumAge
integer :: numLarvae
integer :: NumCiliate
integer :: NumBacteria
integer :: NumDiatom
integer :: NumSiBio !aqui
integer :: NumSiDiss !aqui
logical, pointer, dimension (:) :: LogicalEqua
integer :: equa,countequa
integer :: STAT_, ready_
logical :: CheckName
!----------------------------------------------------------------------
STAT_ = UNKNOWN_
call Ready(WaterQualityID, ready_)
cd0 : if (ready_ .EQ. IDLE_ERR_) then
numPhyto = Me%PropIndex%Phyto
numAM = Me%PropIndex%Ammonia
numNI = Me%PropIndex%Nitrite
numNA = Me%PropIndex%Nitrate
numPON = Me%PropIndex%PartOrganicNitrogen
numPONr = Me%PropIndex%PartOrganicNitrogenRefractory
numDONnr = Me%PropIndex%DONNonRefractory
numDONr = Me%PropIndex%DissOrganicNitrogenRefractory
numZoo = Me%PropIndex%Zoo
numBOD = Me%PropIndex%BOD
numO = Me%PropIndex%Oxygen
numDOPr = Me%PropIndex%DissOrganicPhosphorusRefractory
numDOPnr = Me%PropIndex%DOPNonRefractory
numPOP = Me%PropIndex%PartOrganicPhosphorus
numIP = Me%PropIndex%InorganicPhosphorus
numPON1 = Me%PropIndex%PONitrogen1
numPON2 = Me%PropIndex%PONitrogen2
numPON3 = Me%PropIndex%PONitrogen3
numPON4 = Me%PropIndex%PONitrogen4
numPON5 = Me%PropIndex%PONitrogen5
numPOP1 = Me%PropIndex%POPhosphorus1
numPOP2 = Me%PropIndex%POPhosphorus2
numPOP3 = Me%PropIndex%POPhosphorus3
numPOP4 = Me%PropIndex%POPhosphorus4
numPOP5 = Me%PropIndex%POPhosphorus5
numAge = Me%PropIndex%Age
numLarvae = Me%PropIndex%Larvae
NumCiliate = Me%PropIndex%Ciliate
NumBacteria= Me%PropIndex%Bacteria
NumDiatom = Me%PropIndex%Diatoms !aqui
NumSiBio = Me%PropIndex%BiogenicSilica !aqui
NumSiDiss = Me%PropIndex%DissolvedSilica !aqui
PropUB = Me%Prop%IUB
PropLB = Me%Prop%ILB
allocate(LogicalEqua(PropLB:PropUB))
LogicalEqua =.false.
countequa=0
!oxigen is always computed
Logicalequa(NumO) =.true.
countequa = countequa + 1
if (Me%PropCalc%Nitrogen) then
Logicalequa(NumAM )=.true.
Logicalequa(NumNI )=.true.
Logicalequa(NumPON )=.true.
Logicalequa(NumDONnr )=.true.
Logicalequa(NumDONr )=.true.
Logicalequa(NumNA )=.true.
countequa = countequa + 6
endif
if (Me%PropCalc%Age) then
Logicalequa(NumAge )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%Bacteria) then
Logicalequa(NumBacteria)=.true.
countequa = countequa + 1
if(Me%PropCalc%Nitrogen)then
Logicalequa(NumPONr)=.true.
countequa = countequa + 1
end if
endif
if (Me%PropCalc%Ciliate) then
Logicalequa(NumCiliate )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%Larvae) then
Logicalequa(NumLarvae )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%Phosphorus) then
Logicalequa(numDOPr )=.true.
Logicalequa(numDOPnr)=.true.
Logicalequa(NumPOP )=.true.
Logicalequa(NumIP )=.true.
countequa = countequa + 4
endif
if(Me%Propcalc%Pompools) then
if (Me%PropCalc%Nitrogen) then
Logicalequa(NumPON1 )=.true.
Logicalequa(NumPON2 )=.true.
Logicalequa(NumPON3 )=.true.
Logicalequa(NumPON4 )=.true.
Logicalequa(NumPON5 )=.true.
countequa = countequa + 5
endif
if (Me%PropCalc%Phosphorus) then
Logicalequa(NumPOP1 )=.true.
Logicalequa(NumPOP2 )=.true.
Logicalequa(NumPOP3 )=.true.
Logicalequa(NumPOP4 )=.true.
Logicalequa(NumPOP5 )=.true.
countequa = countequa + 5
endif
endif
if (Me%PropCalc%Silica) then
Logicalequa(NumSiBio )=.true.
Logicalequa(NumSiDiss)=.true.
countequa = countequa + 2
endif
if (Me%PropCalc%Phyto) then
Logicalequa(NumPhyto )=.true.
countequa = countequa + 1
endif
!aqui
if (Me%PropCalc%Diatoms) then
Logicalequa(NumDiatom )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%Zoo) then
Logicalequa(NumZOO )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%BOD) then
Logicalequa(NumBOD )=.true.
countequa = countequa + 1
endif
if (Me%PropCalc%Phyto) then
!if phyto then gross production and growth limitations parameter output are available
!GrossProduction
allocate (Me%GrossProduction, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR01.'
CheckName = CheckPropertyName('grossprod', number = Me%GrossProduction%ID)
nullify(Me%GrossProduction%Field)
allocate(Me%GrossProduction%Field (WQArrayLB:WQArrayUB))
!These "rates" need to be initialized or in no openpoints they will be filled with
!negative values. This may cause errors if in between WaterQuality computations a closed
!cell turns into open point and uses the negative "rate" values. David
Me%GrossProduction%Field = 0.0
!TempLimitation
allocate (Me%TempLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR02.'
CheckName = CheckPropertyName('temperaturelim', number = Me%TempLimitation%ID)
nullify(Me%TempLimitation%Field)
allocate(Me%TempLimitation%Field (WQArrayLB:WQArrayUB))
!Limiting factors initialized as zero are consistent with zero gross production and avoid
!filling with other values (e.g. 1 * DT) that in no water points will not be transformed back to
![0-1] in recieving modules (water properties, drainage network). David
Me%TempLimitation%Field = 0.0
!NutLimitation
allocate (Me%NutLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR03.'
CheckName = CheckPropertyName('nutrientlim', number = Me%NutLimitation%ID)
nullify(Me%NutLimitation%field)
allocate(Me%NutLimitation%field (WQArrayLB:WQArrayUB))
Me%NutLimitation%field = 0.0
!NLimitation
allocate (Me%NLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR03.'
CheckName = CheckPropertyName('nitrogenlim', number = Me%NLimitation%ID)
nullify(Me%NLimitation%field)
allocate(Me%NLimitation%field (WQArrayLB:WQArrayUB))
Me%NLimitation%field = 0.0
!PLimitation
allocate (Me%PLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR03.'
CheckName = CheckPropertyName('phosphoruslim', number = Me%PLimitation%ID)
nullify(Me%PLimitation%field)
allocate(Me%PLimitation%field (WQArrayLB:WQArrayUB))
Me%PLimitation%field = 0.0
!LightLimitation
allocate (Me%LightLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR04.'
CheckName = CheckPropertyName('lightlim', number = Me%LightLimitation%ID)
nullify(Me%LightLimitation%field)
allocate(Me%LightLimitation%field (WQArrayLB:WQArrayUB))
Me%LightLimitation%field = 0.0
endif
!aqui_1
if (Me%PropCalc%Diatoms) then
!if diatoms then gross production and growth limitations parameter output are available
!DiaGrossProduction
allocate (Me%Diatoms%DiaGrossProduction, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR11.'
CheckName = CheckPropertyName('diagrossprod', number = Me%Diatoms%DiaGrossProduction%ID)
nullify(Me%Diatoms%DiaGrossProduction%Field)
allocate(Me%Diatoms%DiaGrossProduction%Field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaGrossProduction%Field = 0.0
!TempLimitation
allocate (Me%Diatoms%DiaTempLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR12.'
CheckName = CheckPropertyName('diatemperaturelim', number = Me%Diatoms%DiaTempLimitation%ID)
nullify(Me%Diatoms%DiaTempLimitation%Field)
allocate(Me%Diatoms%DiaTempLimitation%Field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaTempLimitation%Field = 0.0
!NutLimitation
allocate (Me%Diatoms%DiaNutLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR13.'
CheckName = CheckPropertyName('dianutrientlim', number = Me%Diatoms%DiaNutLimitation%ID)
nullify(Me%Diatoms%DiaNutLimitation%field)
allocate(Me%Diatoms%DiaNutLimitation%field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaNutLimitation%field = 0.0
!DiaNLimitation
allocate (Me%Diatoms%DiaNLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR13.'
CheckName = CheckPropertyName('dianitrogenlim', number = Me%Diatoms%DiaNLimitation%ID)
nullify(Me%Diatoms%DiaNLimitation%field)
allocate(Me%Diatoms%DiaNLimitation%field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaNLimitation%field = 0.0
!DiaSiLimitation
allocate (Me%Diatoms%DiaSiLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR13.'
CheckName = CheckPropertyName('diasilicalim', number = Me%Diatoms%DiaSiLimitation%ID)
nullify(Me%Diatoms%DiaSiLimitation%field)
allocate(Me%Diatoms%DiaSiLimitation%field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaSiLimitation%field = 0.0
!DiaPLimitation
allocate (Me%Diatoms%DiaPLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR13.'
CheckName = CheckPropertyName('diaphosphoruslim', number = Me%Diatoms%DiaPLimitation%ID)
nullify(Me%Diatoms%DiaPLimitation%field)
allocate(Me%Diatoms%DiaPLimitation%field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaPLimitation%field = 0.0
!LightLimitation
allocate (Me%Diatoms%DiaLightLimitation, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR14.'
CheckName = CheckPropertyName('dialightlim', number = Me%Diatoms%DiaLightLimitation%ID)
nullify(Me%Diatoms%DiaLightLimitation%field)
allocate(Me%Diatoms%DiaLightLimitation%field (WQArrayLB:WQArrayUB))
Me%Diatoms%DiaLightLimitation%field = 0.0
endif
if (countequa.ne.PropUB) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR20.'
do equa = PropLB,PropUB
if (Logicalequa(equa)) then
allocate (NewEquaRateFlux, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR30.'
nullify(NewEquaRateFlux%Prev,NewEquaRateFlux%Next)
nullify(NewEquaRateFlux%FirstPropRateFlux,NewEquaRateFlux%LastPropRateFlux)
! Add new Property to the WaterProperties List
call Add_EquaRateFlux(NewEquaRateFlux)
NewEquaRateFlux%ID = equa
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR40.'
endif
enddo
EquaRateFluxX => Me%FirstEquaRateFlux
do1: do while (associated(EquaRateFluxX))
do equa = PropLB,PropUB
if (LogicalEqua(equa)) then
allocate (NewPropRateFlux, STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR50.'
nullify(NewPropRateFlux%field)
nullify(NewPropRateFlux%Prev,NewPropRateFlux%Next)
allocate(NewPropRateFlux%Field (WQArrayLB:WQArrayUB))
! Add new Prop
call Add_PropRateFlux(EquaRateFluxX, NewPropRateFlux)
NewPropRateFlux%ID = equa
NewPropRateFlux%Field = 0.
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine Construct_WQRateFlux - ModuleWaterQuality. ERR60.'
endif
enddo
EquaRateFluxX => EquaRateFluxX%Next
enddo do1
nullify(EquaRateFluxX)
STAT_ = SUCCESS_
else
STAT_ = ready_
end if cd0
if (present(STAT)) &
STAT = STAT_
end subroutine Construct_WQRateFlux
!----------------------------------------------------------------------------
!This subroutine adds a new property rateflux to the Rate Fluxes List
subroutine Add_EquaRateFlux(NewEquaRateFlux)
!Arguments-------------------------------------------------------------
type(T_EquaRateFlux),pointer :: NewEquaRateFlux
!----------------------------------------------------------------------
if (.not.associated(Me%FirstEquaRateFlux)) then
Me%FirstEquaRateFlux => NewEquaRateFlux
Me%LastEquaRateFlux => NewEquaRateFlux
else
NewEquaRateFlux%Prev => Me%LastEquaRateFlux
Me%LastEquaRateFlux%Next => NewEquaRateFlux
Me%LastEquaRateFlux => NewEquaRateFlux
end if
end subroutine Add_EquaRateFlux
!--------------------------------------------------------------------------
subroutine Add_PropRateFlux(EquaRateFluxX, NewPropRateFlux)
!Arguments-------------------------------------------------------------
type(T_EquaRateFlux),pointer :: EquaRateFluxX
type(T_PropRateFlux),pointer :: NewPropRateFlux
!----------------------------------------------------------------------
if (.not.associated(EquaRateFluxX%FirstPropRateFlux)) then
EquaRateFluxX%FirstPropRateFlux => NewPropRateFlux
EquaRateFluxX%LastPropRateFlux => NewPropRateFlux
else
NewPropRateFlux%Prev => EquaRateFluxX%LastPropRateFlux
EquaRateFluxX%LastPropRateFlux%Next => NewPropRateFlux
EquaRateFluxX%LastPropRateFlux => NewPropRateFlux
end if
end subroutine Add_PropRateFlux
!--------------------------------------------------------------------------
subroutine WaterQualityOptions
!External--------------------------------------------------------------
integer :: flag
integer :: FromFile
integer :: STAT_CALL
!----------------------------------------------------------------------
call GetExtractType(FromFile = FromFile)
call GetData(Me%PropCalc%Nitrogen, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='NITROGEN', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR01.'
call GetData(Me%PropCalc%Phosphorus, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='PHOSPHOR', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR02.'
call GetData(Me%PropCalc%Phyto, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='PHYTO', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR03.'
call GetData(Me%PropCalc%Zoo, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='ZOO', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR04.'
call GetData(Me%PropCalc%Larvae, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='LARVAE', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR07.'
call GetData(Me%PropCalc%Age, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='AGE', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR08.'
call GetData(Me%PropCalc%Oxygen, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='OXYGEN', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR09.'
if (Me%PropCalc%Oxygen) then
Me%PropCalc%Salinity = .FALSE.
else
Me%PropCalc%Salinity = .TRUE.
endif
call GetData(Me%PropCalc%BOD, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='BOD', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR10.'
call GetData(Me%PropCalc%Bacteria, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='BACTERIA', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR11.'
call GetData(Me%PropCalc%Ciliate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='CILIATE', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR12.'
call GetData(Me%PropCalc%Diatoms, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='DIATOMS', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR13.'
call GetData(Me%PropCalc%Silica, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='SILICA', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR14.'
call GetData(Me%PropCalc%Pompools, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='POMPOOLS', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WaterQualityOptions - ModuleWaterQuality. ERR15.'
end subroutine WaterQualityOptions
!--------------------------------------------------------------------------
!A subroutine WQPropertyIndexNumber serve para atribuir indices as propriedades a ser
!calculadas no modulo de Qualidade da Agua
!
!Ricardo C. Miranda, 1996
subroutine WQPropertyIndexNumber
!----------------------------------------------------------------------
Me%Prop%ILB = 1
Me%Prop%IUB = 0
!Nitrogen index number
if (Me%PropCalc%Nitrogen) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Ammonia = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Nitrate = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Nitrite = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PartOrganicNitrogen = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%DissOrganicNitrogenRefractory = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%DONNonRefractory = Me%Prop%IUB
endif !Nitrogen
!Phosphorus index number
if (Me%PropCalc%Phosphorus) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PartOrganicPhosphorus = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%DissOrganicPhosphorusRefractory = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%DOPNonRefractory = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%InorganicPhosphorus = Me%Prop%IUB
endif !Phosphorus
if (Me%PropCalc%Pompools) then
if (Me%PropCalc%Nitrogen) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PONitrogen1 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PONitrogen2 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PONitrogen3 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PONitrogen4 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PONitrogen5 = Me%Prop%IUB
endif
if (Me%PropCalc%Phosphorus) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%POPhosphorus1 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%POPhosphorus2 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%POPhosphorus3 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%POPhosphorus4 = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%POPhosphorus5 = Me%Prop%IUB
endif
endif !POMpools
!Silica index number
if (Me%PropCalc%Silica) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%BiogenicSilica = Me%Prop%IUB
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%DissolvedSilica = Me%Prop%IUB
endif !Silica
!Phytoplankton index number
if (Me%PropCalc%Phyto) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Phyto = Me%Prop%IUB
endif !Phyto
!Zooplankton index number
if (Me%PropCalc%Zoo) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Zoo = Me%Prop%IUB
endif !Zoo
!Larvae index number
if (Me%PropCalc%Larvae) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Larvae = Me%Prop%IUB
endif !Larvae
!Age index number
if (Me%PropCalc%Age) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Age = Me%Prop%IUB
endif !Age
!Bacteria index number
if (Me%PropCalc%Bacteria) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Bacteria = Me%Prop%IUB
if (Me%PropCalc%Nitrogen) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%PartOrganicNitrogenRefractory= Me%Prop%IUB
endif
endif !Bacteria
!Ciliate index number
if (Me%PropCalc%Ciliate) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Ciliate = Me%Prop%IUB
endif !Ciliate
!Oxygen index number -> The oxygen is always calculated.
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Oxygen = Me%Prop%IUB
!BOD index number
if (Me%PropCalc%BOD) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%BOD = Me%Prop%IUB
endif !BOD
!Diatoms index number
if (Me%PropCalc%Diatoms) then
Me%Prop%IUB = Me%Prop%IUB + 1
Me%PropIndex%Diatoms = Me%Prop%IUB
endif !Diatoms
end subroutine WQPropertyIndexNumber
!--------------------------------------------------------------------------
subroutine WQReadData
!Local-----------------------------------------------------------------
logical :: Consistent
!----------------------------------------------------------------------
call WaterQualityOptions
call WQPropertyIndexNumber
call WQReadCalcOptions
Consistent = WQOptionsConsistencyVerif ()
if (Consistent) then
call WQConfiguration
call WQReadFileConstants
else
write(*,*)
write(*,*) 'The Water Quality Options were not consistent, verify file data.'
stop 'SUBROUTINE WQReadData - ModuleWaterQuality. ERR01'
endif !Consistent
!----------------------------------------------------------------------
end subroutine WQReadData
!--------------------------------------------------------------------------
subroutine WQReadCalcOptions
!External--------------------------------------------------------------
integer :: FromFile
integer :: STAT_CALL
!Local-----------------------------------------------------------------
integer :: flag
!----------------------------------------------------------------------
call GetExtractType(FromFile = FromFile)
!Verifica se se pretende calcular usando um metodo EXPLICITO
call GetData( Me%CalcMethod%ExplicitMethod, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='EXPLICIT', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadCalcOptions - ModuleWaterQuality. ERR01.'
!Verifica se se pretende calcular usando um metodo IMPLICITO
call GetData(Me%CalcMethod%ImplicitMethod, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='IMPLICIT', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadCalcOptions - ModuleWaterQuality. ERR02.'
!Verifica se se pretende calcular usando um metodo IMPLICITO/EXPLICITO
call GetData(Me%CalcMethod%SemiimpMethod, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword='SEMIIMP', &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadCalcOptions - ModuleWaterQuality. ERR03.'
end subroutine WQReadCalcOptions
!--------------------------------------------------------------------------
logical function WQOptionsConsistencyVerif ()
!Local-----------------------------------------------------------------
integer :: aux
!----------------------------------------------------------------------
cd3 : if (Me%PropCalc%Nitrogen .OR. Me%PropCalc%Phosphorus) then
!aqui_2
cd4 : if (Me%PropCalc%Phyto .OR. Me%PropCalc%Diatoms ) then
WQOptionsConsistencyVerif = .TRUE.
else
cd5 : if (Me%PropCalc%Zoo) then
write(*,*)
write(*,*) 'It is not possible to simulate the Water Quality with zooplankton '
write(*,*) 'and without phytoplankton or diatoms. '
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN01.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
else
WQOptionsConsistencyVerif = .TRUE.
end if cd5
end if cd4
else if (Me%PropCalc%Age .or. Me%PropCalc%Larvae .or. (Me%PropCalc%BOD .AND. Me%PropCalc%Oxygen)) then
WQOptionsConsistencyVerif = .TRUE.
else
!aqui_22
write(*,*)
write(*,*) 'It is just possible to simulate the Water Quality with nutrients.'
write(*,*) 'Or simple AGE or LARVAE'
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN02.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if cd3
!! ------- M&M -------
!Para simular as bacterias é obrigatório simular os ciliados (e vice-versa)
!A condição para simular estes dois grupos é a existência de Fito e Zoo na simulção
!e de se estar a simular o ciclo do azoto
cd8 : if (WQOptionsConsistencyVerif.AND.Me%PropCalc%Zoo.AND.Me%PropCalc%Nitrogen) then
cd9 : if (Me%PropCalc%Bacteria) then
cd10 : if (Me%PropCalc%Ciliate) then
WQOptionsConsistencyVerif = .TRUE.
else
write(*,*)
write(*,*) 'It is not possible to simulate Bacteria without Ciliate. '
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN04.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if cd10
else
cd11 : if (Me%PropCalc%Ciliate) then
if (Me%PropCalc%Phyto) then
WQOptionsConsistencyVerif = .TRUE.
else
write(*,*)
write(*,*) 'It is not possible to simulate Ciliate without Bacteria or Phytoplankton. '
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN05.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
endif
else
WQOptionsConsistencyVerif = .TRUE.
end if cd11
end if cd9
else
cd12 : if (Me%PropCalc%Bacteria.OR.Me%PropCalc%Ciliate) then
write(*,*)
write(*,*) 'It is not possible to simulate Ciliate and Bacteria without Phytoplankton and Zooplankton. '
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN05.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
else
WQOptionsConsistencyVerif = .TRUE.
end if cd12
end if cd8
! ------- M&M -------
cd7 : if (WQOptionsConsistencyVerif) then
cd2 : if (Me%PropCalc%BOD .AND. (.NOT. Me%PropCalc%Oxygen)) then
write(*,*)
write(*,*) 'It is not possible to simulate the Water Quality with BOD and without Oxygen.'
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN03.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if cd2
end if cd7
!aqui_222
if (WQOptionsConsistencyVerif) then
if (Me%PropCalc%Diatoms .AND. (.NOT. Me%PropCalc%Silica)) then
write(*,*)
write(*,*) 'It is not possible to simulate the Water Quality with Diatoms and without Silica.'
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN04.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if
end if
cd6 : if (WQOptionsConsistencyVerif) then
aux = 0
if (Me%CalcMethod%ExplicitMethod) aux = aux + 1
if (Me%CalcMethod%ImplicitMethod) aux = aux + 1
if (Me%CalcMethod%SemiImpMethod ) aux = aux + 1
cd1 : if (aux .EQ. 1) then
WQOptionsConsistencyVerif = .TRUE.
else
WQOptionsConsistencyVerif = .FALSE.
end if cd1
end if cd6
cd90 : if (WQOptionsConsistencyVerif) then
cd91 : if (Me%PropCalc%Pompools) then
if ((.NOT. Me%PropCalc%Nitrogen) .AND. (.NOT. Me%PropCalc%Phosphorus)) then
write(*,*)
write(*,*) 'Impossible to simulate the Water Quality with POM pools without'
write(*,*) 'at least one nutrient cycle (N or P).'
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN06a.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if
if (WQOptionsConsistencyVerif .AND. (.NOT. Me%PropCalc%Oxygen)) then
write(*,*)
write(*,*) 'Impossible to simulate the Water Quality with POM pools without oxygen.'
write(*,*) 'FUNCTION WQOptionsConsistencyVerif - ModuleWaterQuality. WARN06b.'
write(*,*)
WQOptionsConsistencyVerif = .FALSE.
end if
end if cd91
end if cd90
!----------------------------------------------------------------------
end function WQOptionsConsistencyVerif
!--------------------------------------------------------------------------
subroutine WQConfiguration
!External--------------------------------------------------------------
!Local-----------------------------------------------------------------
!----------------------------------------------------------------------
cd110 : if (Me%PropCalc%Zoo) then
cd21 : if (Me%PropCalc%Phyto) then
cd31 : if (Me%PropCalc%Diatoms) then
cd41 : if (Me%PropCalc%Ciliate) then
cd51 : if (Me%PropCalc%Bacteria) then
Me%WQConfiguration = 4
else cd51
Me%WQConfiguration = 3
endif cd51
else cd41
Me%WQConfiguration = 2
endif cd41
else cd31
cd61 : if (Me%PropCalc%Ciliate) then
cd71 : if (Me%PropCalc%Bacteria) then
Me%WQConfiguration = 8
else cd71
Me%WQConfiguration = 7
endif cd71
else cd61
Me%WQConfiguration = 1
endif cd61
endif cd31
else cd21
cd81 : if (Me%PropCalc%Diatoms) then
cd91 : if (Me%PropCalc%Ciliate) then
cd100 : if (Me%PropCalc%Bacteria) then
Me%WQConfiguration = 6
endif cd100
else cd91
Me%WQConfiguration = 5
endif cd91
endif cd81
endif cd21
else cd110
Me%WQConfiguration = 0
end if cd110
end subroutine WQConfiguration
!--------------------------------------------------------------------------
subroutine WQReadFileConstants
!External--------------------------------------------------------------
integer :: FromFile
integer :: STAT_CALL
!Local-----------------------------------------------------------------
integer :: flag
!----------------------------------------------------------------------
call GetExtractType(FromFile = FromFile)
cd1 : if (Me%DTSecond .LE. 0.0) then
!DTSecond, time step, in seconds, between 2 WaterQuality calls
call GetData( Me%DTSecond, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='DTSECONDS', &
default = 60.0 * 60.0, & !1 hour
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR00.'
cd22 : if (flag .EQ. 0) then
write(*,*)
write(*,*) 'Keyword DTSECONDS not found in Water quality data file.'
write(*,*) 'Subroutine WQReadFileConstants - ModuleWaterQuality. WRN01.'
write(*,*) 'Assumed ', Me%DTSecond, &
'seconds (', Me%DTSecond / 3600.0, 'hour).'
write(*,*)
end if cd22
end if cd1
!For compatibility with the rest of the program, !DTSeconds converted to day!
Me%DTDay = Me%DTSecond / 24.0 / 60.0 / 60.0
!Reads non specific rates & constants--------------------------------------
!NSatConst, nitrogen half-saturation constant, mgN/l
call GetData( Me%NSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='NSATCONS', &
default = 0.014, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR01.'
!Photoinhibition, phytoinhibition, W/m2
call GetData( Me%Photoinhibition, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PHOTOIN', &
default = 121.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR02.'
!PhytoNutRegenerationSatConst, phytoplankton nutrient regeneration half saturation rate,
!mgC/l
call GetData( Me%PhytoNutRegenerationSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='FREGSATC', &
default = 1.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if ( STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR03.'
!AlfaPhytoNC, phytoplankton ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%AlfaPhytoNC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='FRATIONC', &
default = 0.18, & !Redfield ratio
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR04.'
!Reads rates & constants to the Nitrogen simulation------------------------
!OMAlfaNC, organic matter ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%OMAlfaNC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='OMRATIONC', &
default = 0.18, & !Redfield ratio
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR04a.'
!BactAlfaOC, organic matter ratio between Oxygen and Carbon, mgO/mgC
call GetData( Me%BactAlfaOC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='BACTRATIOOC', &
default = 1.4, & !Redfield ratio
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR04a.'
!OMAlfaPC, organic matter ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%OMAlfaPC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='OMRATIOPC', &
default = 0.024, & !Redfield ratio
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR04b.'
!AlfaZooNC, zooplankton ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%AlfaZooNC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='ZRATIONC', &
default = 0.15, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR07.'
!KRefrAmmoniaMinRate, reference ammonia mineralization rate of the
! refractory DON, 1/T
call GetData( Me%KRefrAmmoniaMinRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NMINR', &
default = 0.01, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR08.'
!KPartDecompRate, reference particulate organic Nitrogen decomposition rate, 1/T
call GetData( Me%KPartDecompRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NOPREF', &
default = 0.1, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR10.'
!PhytoAvaibleDecomp: Fraction of PON available for mineralization
call GetData( Me%PhytoAvaibleDecomp, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='PHDECOMP', &
default = 0.7, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR11.'
!KDenitrificationRate, reference denitirfication rate, 1/T
call GetData( Me%KDenitrificationRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='DENITREF', &
default = 0.125, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR12.'
!KNitrificationRateK1, reference nitrification rate, 1/T
call GetData( Me%KNitrificationRateK1, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NITRIREFK1', &
default = 0.02, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR13.'
!KNitrificationRateK2, reference nitrification rate, 1/T
call GetData( Me%KNitrificationRateK2, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NITRIREFK2', &
default = 0.25, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR14.'
!TRefrAmmoniaMin, DONren mineralization temperature coefficient
! of the refractory DON
call GetData( Me%TRefrAmmoniaMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword= 'TMINR', &
default = 1.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR15.'
!TPartDecomposition, particulate organic Nitrogen decomposition temperature
!coefficient
call GetData( Me%TPartDecomposition, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NOPCOEF', &
default = 1.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR16.'
!TDenitrification, denitirfication temperature coefficient
call GetData( Me%TDenitrification, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TDENCOEF', &
default = 1.045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR17.'
!TNitrification, nitrification temperature coefficient
call GetData( Me%TNitrification, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TNITCOEF', &
default = 1.047, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR18.'
!NitrificationSatConst, nitrification semi-saturation constant, mgO2/l
call GetData( Me%NitrificationSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='NITSATCO', &
default = 2.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR19.'
!DenitrificationSatConst, denitrification semi-saturation constant, mgO2/l
call GetData( Me%DenitrificationSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='DENSATCO', &
default = 0.1, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR20.'
!PhytoSolublInorgExcreFraction, soluble inorganic fraction of the plankton excretions
call GetData( Me%PhytoSolublInorgExcreFraction, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='FSOLEXCR', &
default = 0.4, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR21.'
!ExcreDissOrgFraction, dissolved organic fraction of the plankton excretions
call GetData( Me%PhytoExcreDissOrgFraction, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='FDISSDON', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR22.'
! ------- M&M -------
! Pergunta para determinar se o programa vai ler as taxas e constantes referentes à opção
! de simulação com ou sem Bact. & Cil.
!PlanktonOxygenCarbonRatio
call GetData( Me%PlanktonOxygenCarbonRatio, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='PLANK_OC_RAT', &
default = 32./12., &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR23.'
!ZooSolublInorgExcreFraction, soluble inorganic fraction of the zooplankton excretions
call GetData( Me%ZooSolublInorgExcreFraction, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='ZSOLEXCR', &
default = 0.4, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR24.'
!ZooExcreDissOrgFraction, dissolved organic fraction of the zooplankton excretions
call GetData( Me%ZooExcreDissOrgFraction, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='ZDISSDON', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR25.'
!KNonRefrAmmoniaMinRate, reference ammonia mineralization rate of the
! non refractory DON, 1/T
call GetData( Me%KNonRefrAmmoniaMinRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword='NMINENR', &
default = 0.1, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR26.'
!TNonRefrAmmoniaMin, Nitrogen mineralization temperature coefficient
! of the non refractory DON
call GetData( Me%TNonRefrAmmoniaMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword='TMINNR', &
default = 1.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR27.'
!Reads rates & constants to the Phosphorus simulation------------------------
!KDOPnrMinRate, reference DOPnr mineralization rate, 1/T
call GetData( Me%KDOPnrMinRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PMINNR', &
default = 0.1, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR28.'
!TDOPnrMin, Phosphorus mineralization temperature coefficient
call GetData( Me%TDOPnrMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PMINNRCOEF',&
default = 1.064, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR29.'
!KDOPrMinRate, reference DOPrefractary mineralization rate, 1/T
call GetData( Me%KDOPrMinRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PMINR', &
default = 0.03, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR30.'
!TDOPnrMin, Phosphorus mineralization temperature coefficient
call GetData( Me%TDOPrMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PMINRCOEF', &
default = 1.064, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR31.'
!POPDecompRate, reference POP mineralization rate, 1/T
call GetData( Me%POPDecompRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PPARTMIN', &
default = 0.2, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR32.'
!TPOPMin, Phosphorus mineralization temperature coefficient
call GetData( Me%TPOPDecompRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword ='TPPARTMINCOEF',&
default = 1.08, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR33.'
!AlfaPhytoPC, phytoplankton ratio between Phosphorus and Carbon, mgP/mgC
call GetData( Me%AlfaPhytoPC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='FRATIOPC', &
default = 0.024, & !Redfield ratio
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR34.'
!AlfaZooPC, zooplankton ratio between Phosphorus and Carbon, mgP/mgC
call GetData( Me%AlfaZooPC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='ZRATIOPC', &
default = 0.024, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR35.'
!Reads the rates & constants to the Phytoplankton simulation---------------
!PSatConst, Phosphorus half-saturation constant, phosphorus, M/L^3
call GetData( Me%PSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PSATCONS', &
default = 0.001, & !mgP/l
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR36.'
!GrowMaxPhytoRate, maximum phytoplankton growth rate, 1/T
call GetData( Me%GrowMaxPhytoRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='GROWMAXF', &
default = 2., & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR37.'
!PhytoMortMaxRate, phytoplankton maximum mortality, carbon, M/(L^3.T)
call GetData( Me%PhytoMortMaxRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='FMORTMAX', &
default = 0.02, & !mgC/l/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR38.'
!TOptPhytoMin, minimum temperature of the optimal interval for the phytoplankton
!growth, oC
call GetData( Me%TOptPhytoMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TOPTFMIN', &
default = 25.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR39.'
!TOptPhytoMax, maximum temperature of the optimal interval for the phytoplankton
!growth, oC
call GetData( Me%TOptPhytoMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TOPTFMAX', &
default = 26.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR40.'
!TPhytoMin, minimum tolerable temperature of the interval for the phytoplankton
!growth, oC
call GetData( Me%TPhytoMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFMIN', &
default = 4.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR41.'
!TPhytoMax, maximum tolerable temperature of the interval for the phytoplankton
!growth, oC
call GetData( Me%TPhytoMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFMAX', &
default = 37.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR42.'
!FK1, constant to control temperature response curve shape
call GetData( Me%FK1, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFCONST1', &
default = 0.05, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR43.'
!FK2, constant to control temperature response curve shape
call GetData( Me%FK2, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFCONST2', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR44.'
!FK3, constant to control temperature response curve shape
call GetData( Me%FK3, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFCONST3', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR45.'
!FK4, constant to control temperature response curve shape
call GetData( Me%FK4, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='TFCONST4', &
default = 0.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR46.'
!FMortSatConst, mortality half saturation rate, M/(L^3.T)
call GetData( Me%FMortSatConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='FMORTCON', &
default = 0.3, & !mgC/l/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR47.'
!PhotorespFactor, fraction of actual photosynthesis which is oxidised by
!photorespiration
call GetData( Me%PhotorespFactor, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='PHOTORES', &
default = 0.018, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR48.'
!PhytoEndogRepConst, Phytoplankton endogenous respiration constant,
!1 / T
call GetData( Me%PhytoEndogRepConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='FENDREPC', &
default = 0.0175, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR49.'
!PhytoExcretionConstant, excretion constant
call GetData( Me%PhytoExcretionConstant, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'EXCRCONS', &
default = 0.08, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR50.'
! ------- M&M -------
! Pergunta para determinar se o programa vai ler as taxas e constantes referentes à opção
! de simulação com ou sem Bact. & Cil.
!E, assimilation efficiency of the phytoplankton by the zooplankton
call GetData( Me%E, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='ASS_EFIC', &
default = 0.8, & !60%
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR51.'
!Reads the rates & constants to the Zooplankton simulation-----------------
!TOptZooMin, minimum temperature of the optimal interval for the zooplankton growth,
!oC
call GetData( Me%TOptZooMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TOPTZMIN', &
default = 24.8, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR52.'
!TOptZooMax, maximum temperature of the optimal interval for the zooplankton growth,
!oC
call GetData( Me%TOptZooMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TOPTZMAX', &
default = 25.1, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR53.'
!TZooMin, minimum tolerable temperature of the interval for the zooplankton growth,
!oC
call GetData( Me%TZooMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZMIN', &
default = 5.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR54.'
!TZooMax, maximum tolerable temperature of the interval for the zooplankton growth,
!oC
call GetData( Me%TZooMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZMAX', &
default = 35.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR55.'
!ZK1, constant to control temperature response curve shape
call GetData( Me%ZK1, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZCONST1', &
default = 0.05, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR56.'
!ZK2, constant to control temperature response curve shape
call GetData( Me%ZK2, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZCONST2', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR57.'
!ZK3, constant to control temperature response curve shape
call GetData( Me%ZK3, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZCONST3', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR58.'
!ZK4, constant to control temperature response curve shape
call GetData( Me%ZK4, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TZCONST4', &
default = 0.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR59.'
!ZooReferenceRespirationRate, rate of consumption of Carbon by respiration and
!non-predatory mortality at the reference temperature, 1/T
call GetData( Me%ZooReferenceRespirationRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZREFRESP', &
default = 0.02, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR60.'
!GrazPhytoMin, minimum phytoplankton concentration for the existence of grazing, mgC/l
call GetData( Me%GrazPhytoMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'GRAZFITOMIN',&
default = 0.0045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR50.'
!GrazPreyMin, minimum phytoplankton concentration for the existence of grazing, mgC/l
call GetData( Me%GrazPreyMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZOOPREYMIN',&
default = 0.045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR50.'
!Reads the rates & constants to the Ciliates and Bacteria simulation-----------------
!GrazCiliateMin, minimum phytoplankton concentration for the existence of grazing, mgC/l
call GetData( Me%GrazCiliateMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'GRAZCILMIN', &
default = 0.0045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR61.'
!ZooExcretionFactor, Zooplankton Excretion Rate
call GetData( Me%ZooExcretionFactor, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZEXCFAC', &
default = 0.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR62.'
!ZooExcretionConstant, excretion constant
call GetData( Me%ZooExcretionConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZEXCCONS', &
default = 1.0305, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR63.'
!ZooMortalityCoef
call GetData( Me%ZooMortalityCoef, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MORTZCOEF', &
default = 0.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR64.'
!ZooMinMortalityRate
call GetData( Me%ZooMinMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MINMORTZ', &
default = 0.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR65.'
!ZooMaxMortalityRate
call GetData( Me%ZooMaxMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MAXMORTZ', &
default = 0.040, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR66.'
!ZooIngestionConst, Half-Saturation Constant for Grazing
call GetData(Me%ZooIngestionConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'INGCONSZ', &
default = 0.85, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR67.'
!ZooEfficiencyCapturePhyto
call GetData( Me%ZooEfficiencyCapturePhyto, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZOOEFFCAPHY', &
default = 0.8, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR68.'
!ZooEfficiencyCaptureCiliate
call GetData( Me%ZooEfficiencyCaptureCiliate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZOOEFFCAPCIL' , &
default = 0.2, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR69.'
!ZooIngestionMax
call GetData( Me%ZooIngestionMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZINGMAX', &
default = 2., &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR70.'
!ZooAssimilationPhytoRate
call GetData( Me%ZooAssimilationPhytoRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'ZOPHYASS', &
default = 0.8, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR71.'
!ZooAssimilationCiliateRate
call GetData( Me%ZooAssimilationCiliateRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'ZOCILASS', &
default = 0.8, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR72.'
!PhytoRatioIngestionZoo
call GetData( Me%PhytoRatioIngestionZoo, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'PHYRATING', &
default = 0.3, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR673.'
!PhytoRatioIngestionZoo
call GetData( Me%CiliatesRatioIngestionZoo, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILRATINGZOO',&
default = 0.3, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR673.'
!GrowMaxZooRate, maximum zooplankton growth rate, 1/T
call GetData( Me%GrowMaxZooRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'GROWMAXZ', &
default = 0.3, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR74.'
!IvlevGrazConst, Ivlev grazing constant
call GetData( Me%IvlevGrazConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'IVLEVCON', &
default = 1.6, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR75.'
!ZPredMortalityRate, predatory mortality rate, 1/T
call GetData( Me%ZPredMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'ZPREDMOR', &
default = 0.0077, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR76.'
!Reads the rates & constants to the Oxygen simulation----------------------
!PhotosynthesisOxygenCarbonRatio, Photosynthesis Oxygen:Carbon ratio, (M/L^3)/(M/L^3)
call GetData( Me%PhotosynthesisOxygenCarbonRatio, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'PHOTOSOC', &
default = 32.0 / 12.0, & !mgO2 / mgC
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR77.'
!RatioOxygenCarbonZooRespiration, Zooplankton respiration Oxygen:Carbon ratio,
!mgO2 / mgC
call GetData( Me%RatioOxygenCarbonZooRespiration, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'ZOCRATIO', &
default = 32.0 / 12.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR78.'
!NConsOxyNitRatio, secondary Oxygen production due to Nitrate
!consumption, (M/L^3)/(M/L^3)
call GetData( Me%NConsOxyNitRatio, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'NITONRAT', &
default = 48.0 / 14.0, & !mgO2 / mgN
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR79a.'
call GetData( Me%NitrificationK1_ON_ratio, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'NITK1_ONRAT', &
default = (1.5*32) / 14.0, & !mgO2 / mgN
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR79b.'
call GetData( Me%NitrificationK2_ON_ratio, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'NITK2_ONRAT', &
default = (0.5*32) / 14.0, & !mgO2 / mgN
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR79c.'
! if (flag .EQ. 0) &
! Me%NConsOxyNitRatio = 48.0 / 14.0 !mgO2 / mgN
! NO3 -> N +O3
! Me%NConsOxyNitRatio = 32.0 / 14.0 !mgO2 / mgN
!Rosa
!PConsOxyPhosphorusRatio, secondary Oxygen production due to phosphate consumption
call GetData( Me%PConsOxyPhosphorusRatio, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'PHOSOPRAT', &
default = 64.0 / 31.0, & !mgO2 / mgN
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR80.'
call GetData( Me%MinOxygen, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'MINOXYGEN', &
default = 10E-5, & !mgO2 /L
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR83.'
!O:C Ratio in CO2
call GetData( Me%OxyCarbonRatio, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'OCRATIO', &
default = 32.0 / 12.0, & !mgO2/mgC
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR84a.'
!Reads the rates & constants to the BOD simulation-------------------------
!BODOxidationCoefficient, BOD oxidation coefficient
call GetData( Me%BODOxidationCoefficient, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BODCOEF', &
default = 1.047, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR85.'
!BODOxidationReferenceRate, reference BOD oxidation, 1/T
call GetData( Me%BODOxidationReferenceRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BODREF', &
default = 0.18, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR86.'
!BODOxygenSSatConstant, Oxygen limitation half-saturation constant, 1/T
call GetData( Me%BODOxygenSSatConstant, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BODOSSAT', &
default = 0.5, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR87.'
!AlfaCilNC, ciliate ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%AlfaCilNC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CRATIONC', &
default = 0.16, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR88a.'
!AlfaCilPC, ciliate ratio between Phosp and Carbon, mgP/mgC
call GetData( Me%AlfaCilPC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CRATIOPC', &
default = 0.024, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR88b.'
!Bacteria-----------------------------------------------------------------------------------------
!AlfaBacteriaNC, bacteria ratio between Nitrogen and Carbon, mgN/mgC
call GetData( Me%AlfaBacteriaNC, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BRATIONC', &
default = 0.2, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR89.'
!Reads the rates & constants to the Bacteria simulation----------------------
!BacteriaNonGrazingMortalityRate
call GetData( Me%BacteriaNonGrazingMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword ='NATMORB', &
default = 0.1, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR91.'
!BacteriaExcretionRate day-1
call GetData( Me%BacteriaExcretionRate , &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BARESPCO', &
default = 2.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR92.'
!BacteriaMaxUptake
call GetData( Me%BacteriaMaxUptake, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BMAXUPTA', &
default = 0.25, & ! 6.6 day-1 /24
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR93.'
!BacteriaMinSubstrate
call GetData( Me%BacteriaMinSubstrate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BACMINSUB', &
default = 0.010, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR95.'
!NitrogenSaturationConstBacteria
call GetData( Me%NitrogenSaturationConstBacteria, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BACNCONS', &
default = 0.0008, & ! mgN/l
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR96.'
!TOptBacteriaMin, minimum temperature of the optimal interval for the Bacteria growth,
!oC
call GetData( Me%TOptBacteriaMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TOPTBMIN', &
default = 24.8, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR97.'
!TOptBacteriaMax, maximum temperature of the optimal interval for the Bacteria growth,
!oC
call GetData( Me%TOptBacteriaMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TOPTBMAX', &
default = 25.1, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR98.'
!TBacteriaMin, minimum tolerable temperature of the interval for the Bacteria growth,
!oC
call GetData( Me%TBacteriaMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBMIN', &
default = 5.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR99.'
!TBacteriaMax, maximum tolerable temperature of the interval for the Bacteria growth,
!oC
call GetData( Me%TBacteriaMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBMAX', &
default = 35.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR100.'
!BK1, constant to control temperature response curve shape
call GetData( Me%BK1, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBCONST1', &
default = 0.05, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR101.'
!BK2, constant to control temperature response curve shape
call GetData( Me%BK2, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBCONST2', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR102.'
!BK3, constant to control temperature response curve shape
call GetData( Me%BK3, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBCONST3', &
default = 0.98, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR103.'
!BK4, constant to control temperature response curve shape
call GetData( Me%BK4, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'TBCONST4', &
default = 0.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR104.'
!Reads the rates & constants to the Ciliate simulation-----------------
!CiliateGrazBactMin, minimum ciliates concentration for the existence of grazing, mgC/l
call GetData( Me%CiliateGrazBactMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'GRAZBACMIN', &
default = 0.0045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR105.'
!CiliateGrazPhytoMin, minimum phytoplankton concentration for the existence of grazing, mgC/l
call GetData( Me%CiliateGrazPhytoMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILGRAZPHYMIN', &
default = 0.0045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR105.'
!CiliateGrazPreyMin, minimum phytoplankton concentration for the existence of grazing, mgC/l
call GetData( Me%CiliateGrazPreyMin, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILPREYMIN', &
default = 0.0045, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR105.'
!CiliateReferenceRespirationRate, rate of consumption of Carbon by respiration and
call GetData( Me%CiliateReferenceRespirationRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CREFRESP', &
default = 0.02, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR106.'
!CiliateExcretionFactor, excretion constant
call GetData( Me%CiliateExcretionFactor, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CEXCFAC', &
default = 0.02, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR107.'
!CiliateExcretionConstant, excretion constant
call GetData( Me%CiliateExcretionConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CEXCCONS', &
default = 1.0305, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR108.'
!CiliateMortalityCoef
call GetData( Me%CiliateMortalityCoef, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MORTCICOEF', &
default = 0.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR109.'
!CiliateMinMortalityRate
call GetData( Me%CiliateMinMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MINMORTCI', &
default = 0.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR110.'
!CiliateMaxMortalityRate
call GetData( Me%CiliateMaxMortalityRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'MAXMORTCI', &
default = 0.044, & !1/day
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR111.'
!CiliateIngestionConst, 1/2 sat
call GetData( Me%CiliateIngestionConst, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'INGCONSC', &
default = 0.85, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR112.'
!CiliateEfficiencyCaptureBacteria
call GetData( Me%CiliateEfficiencyCaptureBact, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILEFFCAPBA', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR113.'
!CiliateEfficiencyCapturePhyto
call GetData( Me%CiliateEfficiencyCapturePhyto, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILEFFCAPPHY', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR113.'
!CiliateIngestionMax
call GetData( Me%CiliateIngestionMax, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CINGMAX', &
default = 2., &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR114.'
!CiliateAssimilationBacteriaRate
call GetData( Me%CiliateAssimilationBacteriaRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'CILBACASS', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR115.'
!CiliateAssimilationPhytoRate
call GetData( Me%CiliateAssimilationPhytoRate, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'CILPHYASS', &
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
!RatioOxygenCarbonCilRespiration, Ciliates respiration Oxygen:Carbon ratio,
!mgO2 / mgC
call GetData( Me%RatioOxygenCarbonCilRespiration, &
Me%ObjEnterData, flag, &
SearchType = FromFile,keyword = 'CILOCRATIO', &
default = 32.0 / 12.0, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR78.'
!
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR115.'
!PhytoRatioIngestionZoo
call GetData( Me%BactRatioIngestionCiliates, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'BACINGCIL',&
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR673.'
!PhytoRatioIngestionZoo
call GetData( Me%PhytoRatioIngestionCiliates, &
Me%ObjEnterData, flag, &
SearchType = FromFile, keyword = 'PHYINGCIL',&
default = 0.5, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR673.'
!Reads the rates & constants to the Larvae simulation-------------------------
! Awg Growth coefficient dependent of larvae weight
call GetData( Me%Awg, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'AWG', &
default = 0.1344, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR674.'
! Bwg Growth coefficient dependent of larvae weight
call GetData( Me%Bwg, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'BWG', &
default = 0.061, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR674.'
! Awz Death coefficient dependent of larvae weight
call GetData( Me%Awz, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'AWZ', &
default = 1.073, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR675.'
! Bwz Death coefficient dependent of larvae weight
call GetData( Me%Bwz, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'BWZ', &
default = 0.353, &
ClientModule = 'ModuleWaterQuality', &
STAT = STAT_CALL)
if (STAT_CALL .NE. SUCCESS_) &
stop 'Subroutine WQReadFileConstants - ModuleWaterQuality. ERR675.'
! Atg Growth coefficient dependent of temperature
call GetData( Me%Atg, &
Me%ObjEnterData, flag, &
SearchType = FromFile, &
keyword = 'ATG', &
default