00001 !
00002 ! $Id: param.h,v 1.19 2005/10/26 15:18:52 pmarches Exp $
00003 !
00004 ! Dimensions of Physical Grid and array dimensions:
00005 ! =========== == ======== ==== === ===== ============
00006 ! LLm,MMm Number of the internal points of the PHYSICAL grid.
00007 ! in the XI- and ETA-directions [physical side boundary
00008 ! points and peroodic ghost points (if any) are excluded].
00009 !
00010 ! Lm,Mm Number of the internal points [see above] of array
00011 ! covering a Message Passing subdomain. In the case when
00012 ! no Message Passing partitioning is used, these two are
00013 ! the same as LLm,MMm.
00014 !
00015 ! N Number of vertical levels.
00016 !
00017 integer LLm,Lm,MMm,Mm,N, LLm0,MMm0
00018 #if defined AGRIF
00019 integer LLmm2, MMmm2
00020 #endif
00021 #if defined BASIN
00022 parameter (LLm0=60, MMm0=50, N=10)
00023 #elif defined CANYON_A
00024 parameter (LLm0=65, MMm0=48, N=16)
00025 #elif defined CANYON_B
00026 parameter (LLm0=66, MMm0=48, N=16)
00027 #elif defined EQUATOR
00028 parameter (LLm0=40, MMm0=32, N=32) ! 100 km resolution
00029 #elif defined GRAV_ADJ
00030 parameter (LLm0=128, MMm0=4, N=10)
00031 #elif defined INNERSHELF
00032 parameter (LLm0=64, MMm0=3, N=40)
00033 #elif defined OVERFLOW
00034 parameter (LLm0=4, MMm0=128, N=10)
00035 #elif defined RIVER
00036 parameter (LLm0=40, MMm0=80, N=20)
00037 #elif defined SEAMOUNT
00038 parameter (LLm0=64, MMm0=64, N=20)
00039 #elif defined SHELFRONT
00040 parameter (LLm0=4, MMm0=40, N=10)
00041 #elif defined SOLITON
00042 parameter (LLm0=96, MMm0=32, N=10)
00043 #elif defined UPWELLING
00044 parameter (LLm0=16, MMm0=64, N=16)
00045 #elif defined VORTEX
00046 ! parameter (LLm0=179, MMm0=179, N=10) ! 10 km resolution
00047 parameter (LLm0=59, MMm0=59, N=10) ! 30 km resolution
00048 ! parameter (LLm0=69, MMm0=57, N=10) ! 30 km resolution
00049 ! parameter (LLm0=35, MMm0=35, N=10) ! 50 km resolution
00050 ! parameter (LLm0=24, MMm0=24, N=10) ! 70 km resolution
00051 #elif defined REGIONAL
00052 # if defined USWC0
00053 parameter (LLm0=62, MMm0=126, N=40) ! <-- US_West grid15 L0
00054 # elif defined USWC1
00055 parameter (LLm0=60, MMm0=96, N=40) ! <-- US_West grid15 L1
00056 # elif defined USWC2
00057 parameter (LLm0=60, MMm0=120, N=40) ! <-- US_West grid15 L2
00058 # elif defined USWC155
00059 parameter (LLm0=83, MMm0=168, N=20) ! <-- US_West USWC155 L1
00060 # elif defined CANARY
00061 ! parameter (LLm0=97, MMm0=159, N=32) ! <-- Canary 25km
00062 parameter (LLm0=83, MMm0=112, N=30) ! <-- Canary 15km
00063 # elif defined FINISTERE
00064 parameter (LLm0=78, MMm0=100, N=16) ! <-- Finistere
00065 # elif defined RIA
00066 parameter (LLm0=77, MMm0=96, N=28) ! <-- RIA
00067 # elif defined PERU
00068 parameter (LLm0=39, MMm0=32, N=20) ! <-- Peru test
00069 # elif defined SAFE
00070 parameter (LLm0=111, MMm0=96, N=32) ! <-- SAFE
00071 # elif defined PACIFIC
00072 parameter (LLm0=170, MMm0=60, N=30) ! <-- Pacific
00073 # elif defined CORAL
00074 parameter (LLm0=81, MMm0=77, N=32) ! <-- CORAL sea
00075 # else
00076 parameter (LLm0=41, MMm0=42, N=32) ! <-- BenguelaLR
00077 # endif
00078 #else
00079 parameter (LLm0=??, MMm0=??, N=??)
00080 #endif
00081
00082 #ifdef MPI
00083 !
00084 ! MPI related variables
00085 ! === ====== =========
00086
00087 integer Lmmpi,Mmmpi,iminmpi,imaxmpi,jminmpi,jmaxmpi
00088 common /comm_setup_mpi/ Lmmpi,Mmmpi,
00089 & iminmpi,imaxmpi,jminmpi,jmaxmpi
00090 #endif
00091
00092 #ifdef AGRIF
00093 common /scrum_physical_grid/ LLm,Lm,LLmm2,MMm,Mm,MMmm2
00094 #else
00095 parameter (LLm=LLm0, MMm=MMm0)
00096 #endif
00097
00098 !
00099 ! Domain subdivision parameters:
00100 ! ====== =========== ===========
00101 ! NPP Maximum allowed number of parallel threads;
00102 ! NSUB_X,NSUB_E Number of SHARED memory subdomains in XI- and
00103 ! ETA-directions;
00104 ! NNODES Total number of MPI processes (nodes);
00105 ! NP_XI,NP_ETA Number of MPI subdomains in XI- and ETA-directions;
00106 !
00107 integer NSUB_X, NSUB_E, NPP
00108 #ifdef MPI
00109 integer NP_XI, NP_ETA, NNODES
00110 parameter (NP_XI=1, NP_ETA=2, NNODES=NP_XI*NP_ETA)
00111 parameter (NSUB_X=1, NSUB_E=1, NPP=1)
00112 #elif defined OPENMP
00113 parameter (NSUB_X=2, NSUB_E=4, NPP=4)
00114 #else
00115 parameter (NSUB_X=1, NSUB_E=1, NPP=1)
00116 #endif
00117 !
00118 ! Number of tracers and tracer identification indices:
00119 ! ====== == ======= === ====== ============== ========
00120 !
00121 #ifdef SOLVE3D
00122 integer NT, itemp
00123 & , ntrc_salt, ntrc_pas, ntrc_bio, ntrc_sed
00124 & , ntrc_diats, ntrc_diauv, ntrc_diabio
00125 # ifdef BIOLOGY
00126 & , itrc_bio
00127 # endif
00128 # ifdef SEDIMENT
00129 & , itrc_sed
00130 # endif
00131 # ifdef SALINITY
00132 & , isalt
00133 # endif
00134 # ifdef PASSIVE_TRACER
00135 & , itpas
00136 # endif
00137 # ifdef BIOLOGY
00138 # ifdef PISCES
00139 & , iDIC_, iTAL_, iOXY_, iCAL_, iPO4_
00140 & , iPOC_, iSIL_, iPHY_, iZOO_, iDOC_
00141 & , iDIA_, iMES_, iBSI_, iFER_
00142 & , iBFE_, iGOC_, iSFE_, iDFE_, iDSI_
00143 & , iNFE_, iNCH_, iDCH_, iNO3_, iNH4_
00144 # ifdef DIAGNOSTICS_BIO
00145 # ifdef key_trc_dia3d
00146 & , Nhi,Nco3,Naksp,Netot,Nprorca
00147 & , Nprorca2,Npronew,Npronew2
00148 & , Nprorca3,Nprorca4,Nprorca5
00149 # endif
00150 # ifdef key_trc_diaadd
00151 & , Nfld,Nflu16,Nkgco2,Natcco2,Nsinking
00152 & , Nsinking2,Nsinkfer,Nsinkfer2,Nsinksil
00153 & , Nsinkcal,Nzmeu,Nirondep,Nnitrpot
00154 # endif
00155 # endif
00156 & , NumFluxTerms,NumVSinkTerms,NumGasExcTerms
00157 # elif defined BIO_NPZD
00158 & , iNO3_, iChla, iPhy1, iZoo1
00159 & , iDet1
00160 # ifdef OXYGEN
00161 & , iO2
00162 # endif
00163 & , NFlux_NewProd, NFlux_Grazing, NFlux_SlopFeed
00164 & , NFlux_Pmort, NFlux_Zmetab, NFlux_Zmort, NFlux_ReminD
00165 & , NumFluxTermsN, NumFluxTerms, NumGasExcTerms
00166 & , NFlux_VSinkChl, NFlux_VSinkP1, NFlux_VSinkD1
00167 & , NumVSinkTerms
00168 # ifdef OXYGEN
00169 & , OGain_NewProd, OLoss_Zmetab
00170 & , OLoss_ReminD, NumFluxTermsO, OFlux_GasExc
00171 # endif
00172 # elif defined BIO_N2PZD2
00173 & , iNO3_, iNH4_, iChla, iPhy1, iZoo1
00174 & , iDet1, iDet2
00175 # elif defined BIO_N2P2Z2D2
00176 & , iNO3_, iNH4_, iPhy1, iPhy2, iZoo1, iZoo2
00177 & , iDet1, iDet2
00178 # ifdef VAR_CHL_C
00179 & , iChl1, iChl2
00180 # endif
00181 & , NFlux_NewProd1, NFlux_NewProd2, NFlux_RegProd1
00182 & , NFlux_RegProd2, NFlux_Nitrific, NFlux_P1Z1Grazing
00183 & , NFlux_P2Z1Grazing, NFlux_P1Z2Grazing, NFlux_P2Z2Grazing
00184 & , NFlux_Z1Z2Grazing, NFlux_SlopFeedZ1, NFlux_SlopFeedZ2
00185 & , NFlux_P1mort, NFlux_P2mort, NFlux_Z1metab
00186 & , NFlux_Z2metab, NFlux_Z1mort, NFlux_Z2mort
00187 & , NFlux_ReminD1, NFlux_ReminD2, NumFluxTermsN
00188 & , NumFluxTerms, NumGasExcTerms, NFlux_VSinkChl
00189 & , NFlux_VSinkP1, NFlux_VSinkP2, NFlux_VSinkD1
00190 & , NFlux_VSinkD2, NumVSinkTerms
00191 # endif
00192 # endif
00193
00194 # ifdef SEDIMENT
00195 & , isand, isilt
00196 & , NST, NLAY
00197 # endif
00198
00199 parameter (itemp=1)
00200 # ifdef SALINITY
00201 parameter (ntrc_salt=1)
00202 parameter (isalt=itemp+1)
00203 # else
00204 parameter (ntrc_salt=0)
00205 #endif
00206 # ifdef PASSIVE_TRACER
00207 parameter (ntrc_pas=1)
00208 parameter (itpas=itemp+ntrc_salt+1)
00209 # else
00210 parameter (ntrc_pas=0)
00211 # endif
00212
00213 # ifdef BIOLOGY
00214 # ifdef PISCES
00215 parameter (ntrc_bio=24,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00216 parameter (iDIC_=itrc_bio, iTAL_=iDIC_+1,
00217 & iOXY_=iDIC_+2, iCAL_=iDIC_+3, iPO4_=iDIC_+4,
00218 & iPOC_=iDIC_+5, iSIL_=iDIC_+6, iPHY_=iDIC_+7,
00219 & iZOO_=iDIC_+8, iDOC_=iDIC_+9, iDIA_=iDIC_+10,
00220 & iMES_=iDIC_+11, iBSI_=iDIC_+12, iFER_=iDIC_+13,
00221 & iBFE_=iDIC_+14, iGOC_=iDIC_+15, iSFE_=iDIC_+16,
00222 & iDFE_=iDIC_+17, iDSI_=iDIC_+18, iNFE_=iDIC_+19,
00223 & iNCH_=iDIC_+20, iDCH_=iDIC_+21, iNO3_=iDIC_+22,
00224 & iNH4_=iDIC_+23)
00225 # ifdef key_trc_dia3d
00226 parameter (Nhi = 1,
00227 & Nco3 = 2,
00228 & Naksp = 3,
00229 & Netot = 4,
00230 & Nprorca = 5,
00231 & Nprorca2 = 6,
00232 & Npronew = 7,
00233 & Npronew2 = 8,
00234 & Nprorca3 = 9,
00235 & Nprorca4 = 10,
00236 & Nprorca5 = 11,
00237 & NumFluxTerms = Nprorca5)
00238 # else
00239 parameter (NumFluxTerms = 0)
00240 # endif
00241 # ifdef key_trc_diaadd
00242 parameter (Nfld = 1,
00243 & Nflu16 = 2,
00244 & Nkgco2 = 3,
00245 & Natcco2 = 4,
00246 & Nsinking = 5,
00247 & Nsinking2 = 6,
00248 & Nsinkfer = 7,
00249 & Nsinkfer2 = 8,
00250 & Nsinksil = 9,
00251 & Nsinkcal = 10,
00252 & Nzmeu = 11,
00253 & Nirondep = 12,
00254 & Nnitrpot = 13,
00255 & NumGasExcTerms = 0,
00256 & NumVSinkTerms = Nnitrpot)
00257 # else
00258 parameter (NumGasExcTerms = 0, NumVSinkTerms = 0)
00259 # endif
00260 # elif defined BIO_NPZD
00261 # ifdef OXYGEN
00262 parameter (ntrc_bio=6,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00263 # else
00264 parameter (ntrc_bio=5,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00265 # endif
00266 parameter (iNO3_=itrc_bio, iChla=iNO3_+1,
00267 & iPhy1=iNO3_+2,
00268 & iZoo1=iNO3_+3,
00269 & iDet1=iNO3_+4)
00270 # ifdef OXYGEN
00271 parameter (iO2=iNO3_+5)
00272 # endif
00273 parameter (NFlux_NewProd = 1,
00274 & NFlux_Grazing = 2,
00275 & NFlux_SlopFeed = 3,
00276 & NFlux_Pmort = 4,
00277 & NFlux_Zmetab = 5,
00278 & NFlux_Zmort = 6,
00279 & NFlux_ReminD = 7,
00280 & NumFluxTermsN = NFlux_ReminD,
00281 # ifdef OXYGEN
00282 & OGain_NewProd = NFlux_ReminD+1,
00283 & OLoss_Zmetab = OGain_NewProd+1,
00284 & OLoss_ReminD = OLoss_Zmetab+1,
00285 & NumFluxTermsO = OLoss_ReminD - NumFluxTermsN,
00286 & NumFluxTerms = NumFluxTermsN + NumFluxTermsO,
00287 & OFlux_GasExc = 1,
00288 & NumGasExcTerms = 1,
00289 # else
00290 & NumFluxTerms = NumFluxTermsN,
00291 & NumGasExcTerms = 0,
00292 # endif
00293 & NFlux_VSinkP1 = 1,
00294 & NFlux_VSinkD1 = 2,
00295 & NumVSinkTerms = 2)
00296 # elif defined BIO_N2PZD2
00297 parameter (ntrc_bio=7,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00298 parameter (iNO3_=itrc_bio, iNH4_=iNO3_+1, iChla=iNO3_+2,
00299 & iPhy1=iNO3_+3,
00300 & iZoo1=iNO3_+4,
00301 & iDet1=iNO3_+5, iDet2=iNO3_+6)
00302 # elif defined BIO_N2P2Z2D2
00303 # ifdef VAR_CHL_C
00304 parameter (ntrc_bio=10,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00305 parameter (iNO3_=itrc_bio, iNH4_=iNO3_+1,
00306 & iChl1=iNO3_+2, iChl2=iNO3_+3,
00307 & iPhy1=iNO3_+4, iPhy2=iNO3_+5,
00308 & iZoo1=iNO3_+6, iZoo2=iNO3_+7,
00309 & iDet1=iNO3_+8, iDet2=iNO3_+9)
00310 # else
00311 parameter (ntrc_bio=8,itrc_bio=itemp+ntrc_salt+ntrc_pas+1)
00312 parameter (iNO3_=itrc_bio, iNH4_=iNO3_+1,
00313 & iPhy1=iNO3_+2, iPhy2=iNO3_+3,
00314 & iZoo1=iNO3_+4, iZoo2=iNO3_+5,
00315 & iDet1=iNO3_+6, iDet2=iNO3_+7)
00316 # endif
00317 parameter (NFlux_NewProd1 = 1,
00318 & NFlux_NewProd2 = 2,
00319 & NFlux_RegProd1 = 3,
00320 & NFlux_RegProd2 = 4,
00321 & NFlux_Nitrific = 5,
00322 & NFlux_P1Z1Grazing = 6,
00323 & NFlux_P2Z1Grazing = 7,
00324 & NFlux_P1Z2Grazing = 8,
00325 & NFlux_P2Z2Grazing = 9,
00326 & NFlux_Z1Z2Grazing = 10,
00327 & NFlux_SlopFeedZ1 = 11,
00328 & NFlux_SlopFeedZ2 = 12,
00329 & NFlux_P1mort = 13,
00330 & NFlux_P2mort = 14,
00331 & NFlux_Z1metab = 15,
00332 & NFlux_Z2metab = 16,
00333 & NFlux_Z1mort = 17,
00334 & NFlux_Z2mort = 18,
00335 & NFlux_ReminD1 = 19,
00336 & NFlux_ReminD2 = 20,
00337 & NumFluxTermsN = NFlux_ReminD2,
00338 & NumFluxTerms = NumFluxTermsN,
00339 & NumGasExcTerms = 0,
00340 & NFlux_VSinkP2 = 1,
00341 & NFlux_VSinkD1 = 2,
00342 & NFlux_VSinkD2 = 3,
00343 & NumVSinkTerms = 3)
00344 # endif
00345 # if defined DIAGNOSTICS_BIO && !defined BIO_N2PZD2
00346 parameter (ntrc_diabio=NumFluxTerms+
00347 & NumGasExcTerms+NumVSinkTerms)
00348 # else
00349 ! config N2PZD2: fluxes not implemented yet
00350 parameter (ntrc_diabio=0)
00351 # endif
00352 # else
00353 parameter (ntrc_bio=0,ntrc_diabio=0)
00354 # endif
00355
00356 # ifdef SEDIMENT
00357 ! NST Number of sediment (tracer) size classes
00358 ! NLAY Number of layers in sediment bed
00359 parameter (NST=2, NLAY=2)
00360 parameter (ntrc_sed=NST,
00361 & itrc_sed=itemp+ntrc_salt+ntrc_pas+ntrc_bio+1)
00362 parameter (isand=itrc_sed, isilt=isand+1)
00363 # else
00364 parameter (ntrc_sed=0)
00365 # endif
00366 parameter (NT=itemp+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed)
00367 # ifdef DIAGNOSTICS_TS
00368 parameter (ntrc_diats=15*NT)
00369 # else
00370 parameter (ntrc_diats=0)
00371 # endif
00372 # ifdef DIAGNOSTICS_UV
00373 parameter (ntrc_diauv=16)
00374 # else
00375 parameter (ntrc_diauv=0)
00376 # endif
00377 #endif
00378 #ifdef STATIONS
00379 integer NS ! Number of output stations (if any).
00380 parameter (NS=5) ! ====== == ====== ======== === =====
00381 #endif
00382 #ifdef PSOURCE
00383 integer Msrc ! Number of point sources, if any
00384 parameter (Msrc=10) ! ====== == ====== ======== === =
00385 #endif
00386 #ifdef FLOATS
00387 integer Mfloats ! Maximum number of floats
00388 parameter (Mfloats=32000)! ====== == ====== ========
00389 #endif
00390 #ifdef STATIONS
00391 integer Msta ! Maximum of stations
00392 parameter (Msta=1000) ! ======= == ========
00393 #endif
00394 #if defined SSH_TIDES || defined UV_TIDES
00395 integer Ntides
00396 parameter (Ntides=8)
00397 #endif
00398 !
00399 ! Derived dimension parameters.
00400 !
00401 integer stdout, Np, padd_X,padd_E
00402 #ifdef AGRIF
00403 common/scrum_deriv_param/padd_X,padd_E
00404 #endif
00405 parameter (stdout=6, Np=N+1)
00406 #ifndef AGRIF
00407 !
00408 ! Domain subdivision parameters:
00409 ! ====== =========== ===========
00410
00411 # ifdef MPI
00412 parameter (Lm=(LLm+NP_XI-1)/NP_XI, Mm=(MMm+NP_ETA-1)/NP_ETA)
00413 # else
00414 parameter (Lm=LLm, Mm=MMm)
00415 # endif
00416 !
00417 ! Derived dimension parameters.
00418 !
00419 parameter (padd_X=(Lm+2)/2-(Lm+1)/2)
00420 parameter (padd_E=(Mm+2)/2-(Mm+1)/2)
00421 #endif
00422 #ifdef AGRIF
00423 integer NSA, N2d,N3d,N1dXI,N1dETA
00424 parameter (NSA=28)
00425 common /scrum_private_param/ N2d,N3d,N1dXI,N1dETA
00426 #else
00427 integer NSA, N2d,N3d, size_XI,size_ETA
00428 integer se,sse, sz,ssz
00429 parameter (NSA=28)
00430 # ifdef ALLOW_SINGLE_BLOCK_MODE
00431 parameter (size_XI=6+Lm, size_ETA=6+Mm)
00432 # else
00433 parameter (size_XI=7+(Lm+NSUB_X-1)/NSUB_X)
00434 parameter (size_ETA=7+(Mm+NSUB_E-1)/NSUB_E)
00435 # endif
00436 parameter (sse=size_ETA/Np, ssz=Np/size_ETA)
00437 parameter (se=sse/(sse+ssz), sz=1-se)
00438 parameter (N2d=size_XI*(se*size_ETA+sz*Np))
00439 parameter (N3d=size_XI*size_ETA*Np)
00440 #endif
00441 !
00442 ! Number maximum of weights for the barotropic mode
00443 !
00444 integer NWEIGHT
00445 parameter (NWEIGHT=137)