C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/bling/pkg/bling_readparms.F,v 1.2 2014/06/05 21:26:26 mmazloff Exp $ C $Name: $ #include "BLING_OPTIONS.h" CBOP subroutine BLING_READPARMS( myThid ) C ========================================================== C | subroutine bling_readparms C | o Initialise and read parameters for BLING model C ========================================================== implicit none C === Global variables === #include "SIZE.h" #include "EEPARAMS.h" #include "PARAMS.h" #include "BLING_VARS.h" C === Routine arguments === C myThid :: My Thread Id. number INTEGER myThid CEOP #ifdef ALLOW_BLING C === Local variables === C msgBuf :: Informational/error message buffer C iUnit :: Work variable for IO unit number CHARACTER*(MAX_LEN_MBUF) msgBuf INTEGER iUnit C ========================================================== C Abiotic parameters C ========================================================== NAMELIST /ABIOTIC_PARMS/ & permil, Pa2Atm C ========================================================== C BLING parameters C ========================================================== NAMELIST /BIOTIC_PARMS/ & Pstar, & Pc_0, & lambda_0, & resp_frac, & chl_min, & CtoP, & NtoP, & O2toP, & CatoP, & NUTfac, & alpha_max, & alpha_min, & theta_Fe_max_hi, & theta_Fe_max_lo, & gamma_biomass, & gamma_irr_mem, & gamma_DOM, & gamma_POM, & k_Fe, & k_O2, & k_NUT, & k_FetoP, & KFeLeq_max, & KFeLeq_min, & Fe_min, & IFeL, & kFe_org, & kFe_inorg, & FetoP_max, & FetoPsed, & Fe_lim_min, & remin_min, & O2_min, & ligand, & b_const, & kappa_eppley, & kappa_remin, & ca_remin_depth, & phi_DOM, & phi_sm, & phi_lg, & wsink0z, & wsink0, & wsinkacc, & parfrac, & alpfe, & k0, & epsln C ========================================================== C BLING forcing C ========================================================== NAMELIST /BLING_FORCING/ & bling_windFile, bling_atmospFile, bling_iceFile, & bling_ironFile, bling_silicaFile, & bling_forcingPeriod, bling_forcingCycle, & bling_pCO2, riverconc_dic, riverconc_alk, & riverconc_nut, riverconc_dom, riverconc_o2, & riverconc_fe C ========================================================== C permil :: set carbon mol/m3 <---> mol/kg conversion factor C default permil = 1024.5 kg/m3 C Pa2Atm :: Conversion factor for atmospheric pressure pLoad C (when coupled to atmospheric model) into Atm. C Default assumes pLoad in Pascal C 1 Atm = 1.01325e5 Pa = 1013.25 mb C C CtoP :: Carbon to phosphorus ratio in organic matter C NtoP :: Nitrogen to phosphorus ratio in organic matter C O2toP :: Oxygen to phosphorus for biological activity C CatoP :: Calcium to phosphorus uptake by small phyto C NUTfac :: If using nitrogen as macro-nutrient instead of , C phosphate, NUTfac is stoichiometric ratio N:P, C otherwise equal to 1. C Pstar :: Pivotal phytoplankton biomass C Pc_0 :: Maximum carbon-specific growth rate at 0C C lambda_0 :: Carbon-specific phytoplankton mortality rate C resp_frac :: fraction of production that is respired C chl_min :: minimum chlorophyll concentration C alpha_max :: Quantum yield under low light, abundant iron C alpha_min :: Quantum yield under low light, iron limited C theta_Fe_max_hi :: Maximum Chl:c ratio, abundant iron C theta_Fe_max_lo :: Maximum Chl:c ratio, extreme iron limitation C gamma_biomass :: Biomass adjustment time scale C gamma_irr_mem :: Photoadaptation time scale C gamma_DOM :: Decay timescale of DOM C gamma_POM :: Remineralization rate of sinking POM C k_Fe :: Dissolved Fe uptake half-saturation constant C k_O2 :: Half-saturation constant for aerobic respiration C k_NUT :: Macro-nutrient uptake half-saturation constant C k_FetoP :: Half-saturation cellular Fe:P C FetoP_max :: Maximum Fe:P uptake ratio C FetoP_sed :: Fe:P in sediments C KFeLeq_max :: Maximum Fe-ligand stability constant C KFeLeq_min :: Minimum Fe-ligand stability constant C Fe_min :: Constant having to do with photodissociation C IFeL :: Iron ligand stability constant C kFe_org :: Organic-matter dependent scavenging rate C kFe_inorg :: Inorganic scavenging rate C Fe_lim_min :: Minimum iron limitation C remin_min :: Minimum anaerobic respiration rate C O2_min :: Minimum O2 concentration for aerobic respiration C Ligand :: Ligand concentration C b_const :: Constant in ligand stability estimate C kappa_eppley :: Temperature dependence of growth C kappa_remin :: Temperature dependence of remineralization C ca_remin_depth :: CaCO3 remineralization lengthscale C phi_DOM :: Fraction of non-sinking production to DOM C phi_sm :: Fraction of small phytoplankton biomass converted to detritus C phi_lg :: Fraction of large phytoplankton biomass converted to detritus C wsink0z :: Depth at which sinking rate starts increasing C wsink0 :: Initial sinking rate C wsinkacc :: Acceleration rate of sinking with depth C parfrac :: fraction of Qsw avail for photosynthesis C alpfe :: solubility of aeolian iron C k0 :: Light attentuation coefficient C epsln :: a very small number C secperday :: seconds in a day = 24*60*60 _RL secperday _BEGIN_MASTER(myThid) C ========================================================== C Default values secperday = 86400. _d 0 permil = 1. _d 0 / 1024.5 _d 0 Pa2Atm = 1.01325 _d 5 CtoP = 106. _d 0 NtoP = 16. _d 0 O2toP = -150. _d 0 CatoP = 106.0 _d 0 * 0.015 _d 0 #ifdef NITROGEN_CURRENCY NUTfac = NtoP #else NUTfac = 1. _d 0 #endif Pstar = 1.9 _d -3 / 1028. _d 0 / CtoP / permil & * NUTfac Pc_0 = 1. _d -5 lambda_0 = 0.19 _d 0 / secperday resp_frac = 0. _d 0 chl_min = 1. _d -11 alpha_max = 1.6 _d -5 * 2.77 _d 18 / 6.022 _d 17 alpha_min = 0.4 _d -5 * 2.77 _d 18 / 6.022 _d 17 theta_Fe_max_hi = 0.04 _d 0 theta_Fe_max_lo = 0.01 _d 0 gamma_biomass = 0.5 _d 0 / secperday gamma_irr_mem = 1. _d 0 / secperday gamma_DOM = 0.25 _d 0 / (365.25 _d 0 * secperday) gamma_POM = 0.12 _d 0 / secperday k_Fe = 8. _d -10 / permil k_O2 = 20. _d -6 / permil k_NUT = 1. _d -7 * NUTfac / permil k_FetoP = 7. _d -6 * CtoP FetoP_max = 28. _d -6 * CtoP FetoPsed = 0.0106 _d 0 KFeLeq_max = 8.0 _d 10 * permil KFeLeq_min = 8.0 _d 9 * permil Fe_min = 0.05 _d -9 / permil IFeL = 0.1 _d 0 kFe_org = 0.5 _d 0 / secperday * permil**(0.58) kFe_inorg = 1. _d 3 / secperday * permil**(0.5) Fe_lim_min = 0. _d 0 remin_min = 0.3 _d 0 O2_min = 1. _d -6 / permil Ligand = 1. _d -9 / permil b_const = 1.2 _d 0 kappa_eppley = 0.063 _d 0 kappa_remin = 0.032 _d 0 ca_remin_depth = 1343. _d 0 phi_DOM = 0.1 _d 0 phi_sm = 0.18 _d 0 phi_lg = 1. _d 0 wsink0z = 80. _d 0 wsink0 = 16. _d 0 / secperday wsinkacc = 0.05 _d 0 / secperday parfrac = 0.4 _d 0 alpfe = 0.01 _d 0 k0 = 0.05 _d 0 epsln = 1. _d -30 bling_windFile = ' ' bling_atmospFile= ' ' bling_iceFile = ' ' bling_ironFile = ' ' bling_silicaFile= ' ' bling_pCO2 = 278. _d -6 riverconc_dic = 2. _d 0 riverconc_alk = 2. _d 0 riverconc_nut = 0. _d 0 * NUTfac riverconc_dom = 0. _d 0 riverconc_o2 = 0. _d 0 riverconc_fe = 0. _d 0 c default periodic forcing to same as for physics bling_forcingPeriod = externForcingPeriod bling_forcingCycle = externForcingCycle WRITE(msgBuf,'(A)') ' BLING_READPARMS: opening data.bling' CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, I SQUEEZE_RIGHT, myThid ) CALL OPEN_COPY_DATA_FILE( 'data.bling', 'BLING_READPARMS', O iUnit, myThid ) C-- Read parameters from open data file: C- Abiotic parameters READ(UNIT=iUnit,NML=ABIOTIC_PARMS) C- BLING parameters READ(UNIT=iUnit,NML=BIOTIC_PARMS) C- forcing filenames and parameters READ(UNIT=iUnit,NML=BLING_FORCING) WRITE(msgBuf,'(A)') & ' BLING_READPARMS: finished reading data.BLING' CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, I SQUEEZE_RIGHT, myThid ) C-- Close the open data file CLOSE(iUnit) C- derive other parameters: QSW_underice = .FALSE. #ifdef USE_QSW_UNDERICE QSW_underice = .TRUE. #elif (defined (USE_QSW)) C if using Qsw and seaice, then ice fraction is already C taken into account IF ( useSEAICE ) QSW_underice = .TRUE. IF ( useThSIce ) QSW_underice = .TRUE. #endif _END_MASTER(myThid) C-- Everyone else must wait for the parameters to be loaded _BARRIER #endif /* ALLOW_BLING */ RETURN END