/[MITgcm]/MITgcm/pkg/dic/dic_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/dic/dic_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by jmc, Wed Apr 9 00:44:03 2008 UTC revision 1.12 by jmc, Tue Nov 4 17:15:52 2014 UTC
# Line 22  C     === Global variables === Line 22  C     === Global variables ===
22  #include "SIZE.h"  #include "SIZE.h"
23  #include "EEPARAMS.h"  #include "EEPARAMS.h"
24  #include "PARAMS.h"  #include "PARAMS.h"
 #include "GRID.h"  
 #include "DYNVARS.h"  
25  #include "DIC_VARS.h"  #include "DIC_VARS.h"
26    
27  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
# Line 39  C     msgBuf    :: Informational/error m Line 37  C     msgBuf    :: Informational/error m
37  C     iUnit     :: Work variable for IO unit number  C     iUnit     :: Work variable for IO unit number
38        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
39        INTEGER iUnit        INTEGER iUnit
       INTEGER i,j,bi,bj  
       _RL alphaloc, rain_ratioloc  
40    
41  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
42    
# Line 57  C             1 Atm = 1.01325e5 Pa = 101 Line 53  C             1 Atm = 1.01325e5 Pa = 101
53    
54  C-- Biotic dic parameters:  C-- Biotic dic parameters:
55  C   DOPfraction :: fraction of new production going to DOP  C   DOPfraction :: fraction of new production going to DOP
56  C   KDOPRemin   :: DOP remineralization rate (s) = 1/(6 month)  C   KDOPRemin   :: DOP remineralization rate (1/s) = 1/(6 month)
57  C   KRemin      :: remin power law coeff  C   KRemin      :: remin power law coeff
58  C   zcrit       :: Minimum Depth (m) over which biological activity  C   zcrit       :: Minimum Depth (m) over which biological activity
59  C                  is computed --> determines nlev as the indice of the  C                  is computed --> determines nlev as the indice of the
# Line 74  C   KPO4        :: half saturation phosp Line 70  C   KPO4        :: half saturation phosp
70  C   KFE         :: half saturation fe constant (mol/m3)  C   KFE         :: half saturation fe constant (mol/m3)
71  CC Iron chemisty values  CC Iron chemisty values
72  C   alpfe       :: solubility of aeolian fe  C   alpfe       :: solubility of aeolian fe
73    C   fesedflux_pcm :: ratio of sediment iron to sinking organic matter
74    C   FeIntSec    :: y-axis crossing for Fe_flux = fesedflux_pcm*pflux + FeIntSec
75  C   freefemax   :: max solubility of free iron (mol/m3)  C   freefemax   :: max solubility of free iron (mol/m3)
76  CC Control variables  CC Control variables
77  C   KScav       :: iron scavenging rate QQ  C   KScav       :: iron scavenging rate QQ
78  C   ligand_stab :: ligand-free iron stability constant (m3/mol)  C   ligand_stab :: ligand-free iron stability constant (m3/mol)
79  C   ligand_tot  :: total free ligand  (mol/m3)  C   ligand_tot  :: total free ligand  (mol/m3)
80  C   alpha       :: timescape for biological activity  C   alpha       :: timescale for biological activity
81  C                  read in alphaloc and filled in 2d array alpha  C                  read in alphaUniform and filled in 2d array alpha
82  C   rain_ratio  :: inorganic/organic carbon rain ratio  C   rain_ratio  :: inorganic/organic carbon rain ratio
83  C                  read in rain_ratioloc and filled in 2d array rain_ratio  C                  read in rainRatioUniform and filled in 2d array rain_ratio
84    
85        NAMELIST /BIOTIC_PARMS/        NAMELIST /BIOTIC_PARMS/
86       & DOPfraction, KDOPRemin, KRemin, zcrit,       & DOPfraction, KDOPRemin, KRemin, zcrit,
87       & O2crit, R_OP, R_CP, R_NP, R_FeP, zca,       & O2crit, R_OP, R_CP, R_NP, R_FeP, zca,
88       & parfrac, k0, lit0, KPO4, KFE,       & parfrac, k0, lit0, KPO4, KFE, kchl,
89       & alpfe, freefemax,       & alpfe, fesedflux_pcm, FeIntSec, freefemax,
90       & KScav, ligand_stab, ligand_tot,       & KScav, ligand_stab, ligand_tot,
91       & alphaloc, rain_ratioloc       & alphaUniform, rainRatioUniform
92  #endif  #endif
93    
94        NAMELIST /DIC_FORCING/        NAMELIST /DIC_FORCING/
95       &          WindFileDic, AtmospFileDic, IceFileDic,       &          DIC_windFile, DIC_atmospFile, DIC_iceFile,
96       &          IronFileDic, SilicaFileDic,       &          DIC_ironFile, DIC_silicaFile, DIC_parFile,
97       &          dic_ForcingPeriod, dic_ForcingCycle,       &          DIC_chlaFile,
98         &          DIC_forcingPeriod, DIC_forcingCycle,
99       &          dic_int1, dic_int2, dic_int3, dic_int4, dic_pCO2       &          dic_int1, dic_int2, dic_int3, dic_int4, dic_pCO2
100    
101  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
# Line 118  C---+----1----+----2----+----3----+----4 Line 117  C---+----1----+----2----+----3----+----4
117         zca         = 3500. _d 0         zca         = 3500. _d 0
118         parfrac     = 0.4 _d 0         parfrac     = 0.4 _d 0
119         k0          = 0.02 _d 0         k0          = 0.02 _d 0
120           kchl        = 0.02 _d 0
121         lit0        = 30. _d 0         lit0        = 30. _d 0
122         KPO4        = 5. _d -4         KPO4        = 5. _d -4
123         KFE         = 1.2 _d -7         KFE         = 1.2 _d -7
124         alpfe       = 0.01 _d 0         alpfe       = 0.01 _d 0
125           fesedflux_pcm = 6.8 _d -4 * 106. _d 0
126           FeIntSec    = 0.5 _d -6 / 86400. _d 0
127         freefemax   = 3. _d -7         freefemax   = 3. _d -7
128         KScav       = 0.19 _d 0/(360. _d 0*86400. _d 0)         KScav       = 0.19 _d 0/(360. _d 0*86400. _d 0)
129         ligand_stab = 1. _d 8         ligand_stab = 1. _d 8
130         ligand_tot  = 1. _d -6         ligand_tot  = 1. _d -6
131         alphaloc    = 2. _d -3/(360. _d 0 * 86400. _d 0)         alphaUniform     = 2. _d -3/(360. _d 0 * 86400. _d 0)
132         rain_ratioloc = 7. _d -2         rainRatioUniform = 7. _d -2
133  #endif  #endif
134         WindFileDic  = ' '         DIC_windFile  = ' '
135         AtmospFileDic= ' '         DIC_atmospFile= ' '
136         IceFileDic   = ' '         DIC_iceFile   = ' '
137         IronFileDic  = ' '         DIC_ironFile  = ' '
138         SilicaFileDic= ' '         DIC_silicaFile= ' '
139           DIC_parFile   = ' '
140           DIC_chlaFile  = ' '
141         dic_int1    = 0         dic_int1    = 0
142         dic_int2    = 0         dic_int2    = 0
143         dic_int3    = 0         dic_int3    = 0
144         dic_int4    = 0         dic_int4    = 0
145         dic_pCO2    = 0. _d 0         dic_pCO2    = 278. _d -6
146  c default periodic forcing to same as for physics  c default periodic forcing to same as for physics
147         dic_ForcingPeriod = externForcingPeriod         DIC_forcingPeriod = externForcingPeriod
148         dic_ForcingCycle  = externForcingCycle         DIC_forcingCycle  = externForcingCycle
149    
150        WRITE(msgBuf,'(A)') ' DIC_READPARMS: opening data.dic'        WRITE(msgBuf,'(A)') ' DIC_READPARMS: opening data.dic'
151        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
# Line 186  C taken into account Line 190  C taken into account
190  #endif  #endif
191  #endif /* DIC_BIOTIC */  #endif /* DIC_BIOTIC */
192    
193    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
194    C--   Print out parameter values :
195    
196          iUnit = standardMessageUnit
197          WRITE(msgBuf,'(A)') ' '
198          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
199          WRITE(msgBuf,'(A)') '// ==================================='
200          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
201          WRITE(msgBuf,'(A)') '// DIC package parameters :'
202          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
203          WRITE(msgBuf,'(A)') '// ==================================='
204          CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,myThid)
205    
206    C- namelist ABIOTIC_PARMS
207           CALL WRITE_0D_RL( permil, INDEX_NONE,'permil =',
208         &  ' /* Ref. density to convert mol/m3 to mol/kg */')
209           CALL WRITE_0D_RL( Pa2Atm, INDEX_NONE,'Pa2Atm =',
210         &  ' /* Atmosph. pressure conversion coeff (to Atm) */')
211    
212    #ifdef DIC_BIOTIC
213    C- namelist BIOTIC_PARMS
214           CALL WRITE_0D_RL( DOPfraction, INDEX_NONE,'DOPfraction =',
215         &  ' /* Fraction of new production going to DOP */')
216           CALL WRITE_0D_RL( KDOPRemin, INDEX_NONE,'KDOPRemin =',
217         &  ' /* DOP remineralization rate (1/s) */')
218           CALL WRITE_0D_RL( KRemin, INDEX_NONE,'KRemin =',
219         &  ' /* Remin power law coeff. */')
220           CALL WRITE_0D_RL( zcrit, INDEX_NONE,'zcrit =',
221         &  ' /* Minimum depth for biological activity (m) */')
222           CALL WRITE_0D_RL( O2crit, INDEX_NONE,'O2crit =',
223         &  ' /* Critical oxygen level (mol/m3) */')
224           CALL WRITE_0D_RL( R_OP, INDEX_NONE,'R_OP =',
225         &  ' /* Stochiometric ratio R_OP */')
226           CALL WRITE_0D_RL( R_CP, INDEX_NONE,'R_CP =',
227         &  ' /* Stochiometric ratio R_CP */')
228           CALL WRITE_0D_RL( R_NP, INDEX_NONE,'R_NP =',
229         &  ' /* Stochiometric ratio R_NP */')
230           CALL WRITE_0D_RL( R_FeP, INDEX_NONE,'R_FeP =',
231         &  ' /* Stochiometric ratio R_FeP */')
232           CALL WRITE_0D_RL( zca, INDEX_NONE,'zca =',
233         &  ' /* Scale depth for CaCO3 remineralization (m) */')
234           CALL WRITE_0D_RL( parfrac, INDEX_NONE,'parfrac =',
235         &  ' /* Fraction of Qsw that is PAR */')
236           CALL WRITE_0D_RL( k0, INDEX_NONE,'k0 =',
237         &  ' /* Light attentuation coefficient, water (1/m) */')
238           CALL WRITE_0D_RL( kchl, INDEX_NONE,'kchl =',
239         &  ' /* Light attentuation coefficient, chlorophyll (m2/mg) */')
240           CALL WRITE_0D_RL( lit0, INDEX_NONE,'lit0 =',
241         &  ' /* Half saturation light constant (W/m2) */')
242           CALL WRITE_0D_RL( KPO4, INDEX_NONE,'KPO4 =',
243         &  ' /* Half saturation phosphate constant (mol/m3) */')
244           CALL WRITE_0D_RL( KFE, INDEX_NONE,'KFE =',
245         &  ' /* Half saturation fe constant (mol/m3) */')
246           CALL WRITE_0D_RL( alpfe, INDEX_NONE,'alpfe =',
247         &  ' /* Solubility of aeolian fe */')
248           CALL WRITE_0D_RL( fesedflux_pcm, INDEX_NONE,'fesedflux_pcm =',
249         &  ' /* Sediment Fe flux = fesedflux_pcm*pflux+FeIntSec */')
250           CALL WRITE_0D_RL( FeIntSec, INDEX_NONE,'FeIntSec =',
251         &  ' /* Sediment Fe flux = fesedflux_pcm * pflux + FeIntSec */')
252           CALL WRITE_0D_RL( freefemax, INDEX_NONE,'freefemax =',
253         &  ' /* Max solubility of free iron (mol/m3) */')
254           CALL WRITE_0D_RL( KScav, INDEX_NONE,'KScav =',
255         &  ' /* Iron scavenging rate */')
256           CALL WRITE_0D_RL( ligand_stab, INDEX_NONE,'ligand_stab =',
257         &  ' /* Ligand-free iron stability constant (m3/mol) */')
258           CALL WRITE_0D_RL( ligand_tot, INDEX_NONE,'ligand_tot =',
259         &  ' /* Total free ligand  (mol/m3) */')
260           CALL WRITE_0D_RL( alphaUniform, INDEX_NONE,'alphaUniform =',
261         &  ' /* Timescale for biological activity */')
262           CALL WRITE_0D_RL(rainRatioUniform,INDEX_NONE,'rainRatioUniform=',
263         &  ' /* Inorganic/organic carbon rain ratio */')
264    
265           CALL WRITE_0D_L( QSW_underice, INDEX_NONE, 'QSW_underice  =',
266         &  '  /* Flag for Qsw under Sea-Ice (i.e. SI fract included) */')
267    #endif
268    
269    C- namelist DIC_FORCING
270           CALL WRITE_0D_C( DIC_windFile, -1, INDEX_NONE, 'DIC_windFile =',
271         & '  /* File name of wind speeds */')
272           CALL WRITE_0D_C( DIC_atmospFile, -1,INDEX_NONE,'DIC_atmospFile=',
273         & '  /* File name of atmospheric pressure*/')
274           CALL WRITE_0D_C( DIC_iceFile, -1, INDEX_NONE, 'DIC_iceFile =',
275         & '  /* File name of seaice fraction */')
276           CALL WRITE_0D_C( DIC_ironFile, -1, INDEX_NONE, 'DIC_ironFile =',
277         & '  /* File name of aeolian iron flux */')
278           CALL WRITE_0D_C( DIC_silicaFile, -1,INDEX_NONE,'DIC_silicaFile=',
279         & '  /* File name of surface silica */')
280           CALL WRITE_0D_C( DIC_parFile, -1,INDEX_NONE,'DIC_parFile=',
281         & '  /* File name of photosynthetically available radiation */')
282           CALL WRITE_0D_C( DIC_chlaFile, -1,INDEX_NONE,'DIC_chlaFile=',
283         & '  /* File name of chlorophyll climatology */')
284           CALL WRITE_0D_RL( DIC_forcingPeriod,
285         &   INDEX_NONE,'DIC_forcingPeriod =',
286         &  ' /* Periodic forcing parameter specific for DIC (s) */')
287           CALL WRITE_0D_RL( DIC_forcingCycle,
288         &   INDEX_NONE,'DIC_forcingCycle =',
289         &  ' /* Periodic forcing parameter specific for DIC (s) */')
290           CALL WRITE_0D_I( dic_int1, INDEX_NONE, 'dic_int1 =',
291         &  '  /*  */')
292           CALL WRITE_0D_I( dic_int2, INDEX_NONE, 'dic_int2 =',
293         &  '  /*  */')
294           CALL WRITE_0D_I( dic_int3, INDEX_NONE, 'dic_int3 =',
295         &  '  /*  */')
296           CALL WRITE_0D_I( dic_int4, INDEX_NONE, 'dic_int4 =',
297         &  '  /*  */')
298           CALL WRITE_0D_RL( dic_pCO2, INDEX_NONE,'dic_pCO2 =',
299         &  ' /* Atmospheric pCO2 to be read in data.dic */')
300    
301    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
302    
303          IF ( dic_int1.EQ.0 .AND. dic_pCO2.NE.278. _d -6 ) THEN
304            WRITE(msgBuf,'(A)')
305         &    'DIC_READPARMS: cannot change default dic_pCO2 if dic_int1=0'
306            CALL PRINT_ERROR( msgBuf, myThid )
307            STOP 'ABNORMAL END: S/R DIC_READPARMS: dic_pCO2 error'
308          ENDIF
309    
310        _END_MASTER(myThid)        _END_MASTER(myThid)
311    
312  C--   Everyone else must wait for the parameters to be loaded  C--   Everyone else must wait for the parameters to be loaded
313        _BARRIER        _BARRIER
314    
 #ifdef DIC_BIOTIC  
        DO bj = myByLo(myThid), myByHi(myThid)  
         DO bi = myBxLo(myThid), myBxHi(myThid)  
          DO j=1-Oly,sNy+Oly  
           DO i=1-Olx,sNx+Olx  
             alpha(i,j,bi,bj)     = alphaloc  
             rain_ratio(i,j,bi,bj)= rain_ratioloc  
           ENDDO  
          ENDDO  
         ENDDO  
        ENDDO  
 #endif /* DIC_BIOTIC */  
   
315  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
316    
317  #endif /* ALLOW_DIC */  #endif /* ALLOW_DIC */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22