00001 !
00002 ! $Id: ncscrum.h,v 1.17 2005/10/11 12:37:02 pmarches Exp $
00003 !
00004 ! This is include file "ncscrum.h".
00005 ! ==== == ======= ==== ============
00006 !
00007 !===================================================================
00008 ! indices in character array "vname", which holds variable names
00009 ! and attributes.
00010 ! indxTime time
00011 ! indxZ free-surface
00012 ! indxUb,indxVb vertically integrated 2D U,V-momentum components
00013 !
00014 ! indxU,indxV 3D U- and V-momenta.
00015 ! indxT,indxS,.., indxZoo tracers (temperature, salinity,
00016 ! biological tracers.
00017 ! indxsand,silt sand & silt sediment tracers
00018 ! indxO,indeW omega vertical mass flux and true vertical velocity
00019 ! indxR density anomaly
00020 !
00021 ! indxVisc Horizontal viscosity coefficients
00022 ! indxDiff Horizontal diffusivity coefficients
00023 ! indxAkv,indxAkt,indxAks vertical viscosity/diffusivity coefficients
00024 ! indxHbl depth of planetary boundary layer in KPP model
00025 ! indxHbbl depth of bottom planetary boundary layer in KPP model
00026 ! indxHel depth of euphotic layer
00027 ! indxChC Chlorophyll/Carbon ratio
00028 !
00029 ! indxSSH observed sea surface height (from climatology)
00030 ! indxSUSTR,indxSVSTR surface U-, V-momentum stress (wind forcing)
00031 ! indxSHFl net surface heat flux.
00032 ! indxSWRad shortwave radiation flux
00033 ! indxSST sea surface temperature
00034 ! indxdQdSST Q-correction coefficient dQdSST
00035 ! indxSSS sea surface salinity
00036 ! indxSSFl surface fresh water flux
00037 ! indxSSFl surface fresh water flux
00038 !
00039 ! indxAi fraction of cell covered by ice
00040 ! indxUi,indxVi U,V-components of sea ice velocity
00041 ! indxHi,indxHS depth of ice cover and depth of snow cover
00042 ! indxTIsrf temperature of ice surface
00043 !
00044 ! indxBSD,indxBSS bottom sediment grain Density and Size
00045 ! to be read from file if(!defined ANA_BSEDIM,
00046 ! && !defined SEDIMENT)
00047 !
00048 ! indxBTHK, sediment bed thickness, porosity, size class fractions
00049 ! indxBPOR,indxBFRA
00050 !
00051 ! indxWWA,indxWWD,indxWWP wind induced wave Amplitude,
00052 ! Direction and Period
00053 !
00054 !=======================================================================
00055 integer indxTime, indxZ, indxUb, indxVb
00056 parameter (indxTime=1, indxZ=2, indxUb=3, indxVb=4)
00057 #ifdef SOLVE3D
00058 integer indxU, indxV, indxT
00059 parameter (indxU=5, indxV=6, indxT=7)
00060
00061 # ifdef SALINITY
00062 integer indxS
00063 parameter (indxS=indxT+1)
00064 # endif
00065 # ifdef PASSIVE_TRACER
00066 integer indxTPAS
00067 parameter (indxTPAS=indxT+ntrc_salt+1)
00068 # endif
00069 # ifdef BIOLOGY
00070 # ifdef PISCES
00071 integer indxDIC, indxTAL, indxOXY, indxCAL, indxPO4,
00072 & indxPOC, indxSIL, indxPHY, indxZOO, indxDOC,
00073 & indxDIA, indxMES, indxBSI, indxFER, indxBFE,
00074 & indxGOC, indxSFE, indxDFE, indxDSI, indxNFE,
00075 & indxNCH, indxDCH, indxNO3, indxNH4
00076 parameter (indxDIC =indxT+ntrc_salt+ntrc_pas+1,
00077 & indxTAL =indxDIC+1, indxOXY=indxDIC+2,
00078 & indxCAL=indxDIC+3, indxPO4=indxDIC+4,
00079 & indxPOC=indxDIC+5, indxSIL=indxDIC+6,
00080 & indxPHY =indxDIC+7, indxZOO=indxDIC+8,
00081 & indxDOC =indxDIC+9, indxDIA=indxDIC+10,
00082 & indxMES =indxDIC+11, indxBSI=indxDIC+12,
00083 & indxFER =indxDIC+13, indxBFE=indxDIC+14,
00084 & indxGOC =indxDIC+15, indxSFE=indxDIC+16,
00085 & indxDFE =indxDIC+17, indxDSI=indxDIC+18,
00086 & indxNFE =indxDIC+19, indxNCH=indxDIC+20,
00087 & indxDCH =indxDIC+21, indxNO3=indxDIC+22,
00088 & indxNH4 =indxDIC+23)
00089 # elif defined BIO_NChlPZD
00090 integer indxNO3, indxChla,
00091 & indxPhy1,indxZoo1,
00092 & indxDet1
00093 # ifdef OXYGEN
00094 & , indxO2
00095 # endif
00096 parameter (indxNO3 =indxT+ntrc_salt+ntrc_pas+1,
00097 & indxChla=indxNO3+1,
00098 & indxPhy1=indxNO3+2,
00099 & indxZoo1=indxNO3+3,
00100 & indxDet1=indxNO3+4)
00101 # ifdef OXYGEN
00102 parameter (indxO2=indxNO3+5)
00103 # endif
00104 # elif defined BIO_N2PZD2
00105 integer indxNO3, indxNH4, indxChla,
00106 & indxPhy1, indxZoo1,
00107 & indxDet1, indxDet2
00108 parameter (indxNO3 =indxT+ntrc_salt+ntrc_pas+1,
00109 & indxNH4 =indxNO3+1, indxChla=indxNO3+2,
00110 & indxPhy1=indxNO3+3,
00111 & indxZoo1=indxNO3+4,
00112 & indxDet1=indxNO3+5, indxDet2=indxNO3+6)
00113 # elif defined BIO_N2P2Z2D2
00114 integer indxNO3, indxNH4,
00115 & indxPhy1, indxPhy2, indxZoo1,
00116 & indxZoo2, indxDet1, indxDet2
00117 # ifdef VAR_CHL_C
00118 & , indxChl1, indxChl2
00119 # endif
00120 parameter (indxNO3 =indxT+ntrc_salt+ntrc_pas+1,
00121 & indxNH4 =indxNO3+1,
00122 # ifdef VAR_CHL_C
00123 & indxChl1=indxNO3+2, indxChl2=indxNO3+3,
00124 & indxPhy1=indxNO3+4, indxPhy2=indxNO3+5,
00125 & indxZoo1=indxNO3+6, indxZoo2=indxNO3+7,
00126 & indxDet1=indxNO3+8, indxDet2=indxNO3+9)
00127 # else
00128 & indxPhy1=indxNO3+2, indxPhy2=indxNO3+3,
00129 & indxZoo1=indxNO3+4, indxZoo2=indxNO3+5,
00130 & indxDet1=indxNO3+6, indxDet2=indxNO3+7)
00131 # endif
00132 # endif
00133 # endif
00134 # ifdef SEDIMENT
00135 integer indxsand, indxsilt
00136 parameter (indxsand=indxT+ntrc_salt+ntrc_pas+ntrc_bio+1,
00137 & indxsilt=indxsand+1)
00138 # endif
00139
00140 # ifdef DIAGNOSTICS_TS
00141 integer indxTXadv,indxTYadv,indxTVadv,
00142 & indxTHmix,indxTVmix,indxTForc,indxTrate,
00143 & indxTXadv_mld,indxTYadv_mld,indxTVadv_mld,
00144 & indxTHmix_mld,indxTVmix_mld,indxTForc_mld,indxTrate_mld,
00145 & indxTentr_mld
00146 parameter (indxTXadv=indxT+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed+1,
00147 & indxTYadv=indxTXadv+NT,
00148 & indxTVadv=indxTYadv+NT,
00149 & indxTHmix=indxTVadv+NT,
00150 & indxTVmix=indxTHmix+NT,
00151 & indxTForc=indxTVmix+NT,
00152 & indxTrate=indxTForc+NT,
00153 & indxTXadv_mld=indxTrate+NT,
00154 & indxTYadv_mld=indxTXadv_mld+NT,
00155 & indxTVadv_mld=indxTYadv_mld+NT,
00156 & indxTHmix_mld=indxTVadv_mld+NT,
00157 & indxTVmix_mld=indxTHmix_mld+NT,
00158 & indxTForc_mld=indxTVmix_mld+NT,
00159 & indxTrate_mld=indxTForc_mld+NT,
00160 & indxTentr_mld=indxTrate_mld+NT )
00161 # endif
00162 # ifdef DIAGNOSTICS_UV
00163 integer indxMXadv,indxMYadv,indxMVadv,indxMCor,
00164 & indxMPrsgrd,indxMHmix,indxMVmix,indxMrate
00165 parameter (indxMXadv=indxT+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed
00166 & +ntrc_diats+1,
00167 & indxMYadv=indxMXadv+2,
00168 & indxMVadv=indxMYadv+2,
00169 & indxMCor=indxMVadv+2,
00170 & indxMPrsgrd=indxMCor+2,
00171 & indxMHmix=indxMPrsgrd+2,
00172 & indxMVmix=indxMHmix+2,
00173 & indxMrate=indxMVmix+2)
00174 # endif
00175 # if defined BIOLOGY && defined DIAGNOSTICS_BIO
00176 integer indxbioFlux, indxbioVSink
00177 # ifdef OXYGEN
00178 & , indxGasExcFlux
00179 # endif
00180 parameter (indxbioFlux=indxT+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed
00181 & +ntrc_diats+ntrc_diauv+1)
00182 parameter (indxbioVSink=indxbioFlux+NumFluxTerms)
00183 # ifdef OXYGEN
00184 parameter (indxGasExcFlux=indxbioFlux+NumFluxTerms+NumGasExcTerms)
00185 # endif
00186 # endif
00187
00188 integer indxO, indxW, indxR, indxVisc, indxDiff, indxAkv, indxAkt
00189 parameter (indxO=indxT+ntrc_salt+ntrc_pas+ntrc_bio+ntrc_sed
00190 & +ntrc_diats+ntrc_diauv+ntrc_diabio+1,
00191 & indxW=indxO+1, indxR=indxO+2, indxVisc=indxO+3,
00192 & indxDiff=indxO+4,indxAkv=indxO+5, indxAkt=indxO+6)
00193
00194 # ifdef SALINITY
00195 integer indxAks
00196 parameter (indxAks=indxAkt+1)
00197 # endif
00198 # ifdef LMD_SKPP
00199 integer indxHbl
00200 parameter (indxHbl=indxAkt+2)
00201 # endif
00202 # ifdef LMD_BKPP
00203 integer indxHbbl
00204 parameter (indxHbbl=indxAkt+3)
00205 # endif
00206 #endif
00207
00208 integer indxSSH
00209 #ifdef BIOLOGY
00210 integer indxHel
00211 # ifdef BIO_NPZD
00212 & , indxChC
00213 # ifdef OXYGEN
00214 & , indxU10, indxKvO2, indxO2sat
00215 # endif
00216 # elif defined BIO_N2P2Z2D2 && defined VAR_CHL_C
00217 & , indxChC1, indxChC2
00218 # endif
00219 #endif
00220 #ifdef SOLVE3D
00221 # ifdef BIOLOGY
00222 parameter (indxHel=indxAkt+4)
00223 # ifdef BIO_NPZD
00224 parameter (indxChC=indxHel+1)
00225 # ifdef OXYGEN
00226 parameter (indxU10=indxChC+1)
00227 parameter (indxKvO2=indxU10+1)
00228 parameter (indxO2sat=indxKvO2+1)
00229 parameter (indxSSH=indxO2sat+1)
00230 # else
00231 parameter (indxSSH=indxChC+1)
00232 # endif
00233 # elif defined BIO_N2P2Z2D2
00234 # if defined VAR_CHL_C
00235 parameter (indxChC1=indxHel+1)
00236 parameter (indxChC2=indxChC1+1)
00237 parameter (indxSSH=indxChC2+1)
00238 # else
00239 parameter (indxSSH=indxHel+1)
00240 # endif
00241 # else
00242 parameter (indxSSH=indxHel+1)
00243 # endif
00244 # else
00245 parameter (indxSSH=indxAkt+4)
00246 # endif
00247 #else
00248 # ifdef BIOLOGY
00249 parameter (indxHel=indxVb+1)
00250 # ifdef BIO_NPZD
00251 parameter (indxChC=indxHel+1)
00252 # ifdef OXYGEN
00253 parameter (indxU10=indxChC+1)
00254 parameter (indxKvO2=indxU10+1)
00255 parameter (indxO2sat=indxKvO2+1)
00256 parameter (indxSSH=indxO2sat+1)
00257 # else
00258 parameter (indxSSH=indxChC+1)
00259 # endif
00260 # elif defined BIO_N2P2Z2D2
00261 # ifdef VAR_CHL_C
00262 parameter (indxChC1=indxHel+1)
00263 parameter (indxChC2=indxChC1+1)
00264 parameter (indxSSH=indxChC2+1)
00265 # else
00266 parameter (indxSSH=indxHel+1)
00267 # endif
00268 # endif
00269 # else
00270 parameter (indxSSH=indxVb+1)
00271 # endif
00272 #endif
00273 integer indxSUSTR, indxSVSTR
00274 parameter (indxSUSTR=indxSSH+1, indxSVSTR=indxSSH+2)
00275 #ifdef SOLVE3D
00276 integer indxSHFl, indxSWRad
00277 parameter (indxSHFl=indxSSH+3)
00278 # ifdef SALINITY
00279 integer indxSSFl
00280 parameter (indxSSFl=indxSHFl+1, indxSWRad=indxSHFl+2)
00281 # else
00282 parameter (indxSWRad=indxSHFl+1)
00283 # endif
00284 integer indxSST, indxdQdSST
00285 parameter (indxSST=indxSWRad+1, indxdQdSST=indxSWRad+2)
00286 # if defined SALINITY && defined SFLX_CORR
00287 integer indxSSS
00288 parameter (indxSSS=indxSST+2)
00289 # endif
00290 # if defined BULK_FLUX
00291 integer indxWSPD,indxTAIR,indxRHUM,indxRADLW,indxRADSW,
00292 & indxPRATE,indxUWND,indxVWND
00293 parameter (indxWSPD=indxSST+3, indxTAIR=indxSST+4,
00294 & indxRHUM=indxSST+5, indxRADLW=indxSST+6,
00295 & indxRADSW=indxSST+7, indxPRATE=indxSST+8,
00296 & indxUWND=indxSST+9, indxVWND=indxSST+10)
00297 integer indxShflx_rsw,indxShflx_rlw,indxShflx_lat,indxShflx_sen
00298 parameter (indxShflx_rsw=indxSST+11, indxShflx_rlw=indxSST+12,
00299 & indxShflx_lat=indxSST+13, indxShflx_sen=indxSST+14)
00300 # endif
00301 integer indxWstr
00302 parameter (indxWstr=indxSUSTR+21)
00303 integer indxBostr
00304 parameter (indxBostr=indxSUSTR+22)
00305 # ifdef SEDIMENT
00306 integer indxSed, indxBTHK, indxBPOR, indxBFRA
00307 parameter (indxSed=indxSUSTR+23,
00308 & indxBTHK=indxSed, indxBPOR=indxSed+1,
00309 & indxBFRA=indxSed+2)
00310 # endif
00311 # ifdef BBL
00312 integer indxBBL, indxAbed, indxHrip, indxLrip, indxZbnot,
00313 & indxZbapp, indxBostrw
00314 # ifdef SEDIMENT
00315 parameter (indxBBL=indxSUSTR+25+NST,
00316 # else
00317 parameter (indxBBL=indxSUSTR+25,
00318 # endif
00319 & indxAbed =indxBBL, indxHrip =indxBBL+1,
00320 & indxLrip =indxBBL+2, indxZbnot =indxBBL+3,
00321 & indxZbapp =indxBBL+4, indxBostrw=indxBBL+5)
00322 # ifndef ANA_WWAVE
00323 integer indxWWA,indxWWD,indxWWP
00324 parameter (indxWWA=indxBBL+6, indxWWD=indxWWA+1,
00325 & indxWWP=indxWWA+2)
00326 # endif
00327 # ifndef ANA_BSEDIM
00328 # endif
00329 # endif
00330 #endif
00331 #ifdef ICE
00332 integer indxAi
00333 parameter (indxAi=????)
00334 integer indxUi, indxVi, indxHi, indxHS, indxTIsrf
00335 parameter (indxUi=indxAi+1, indxVi=indxAi+2, indxHi=indxAi+3,
00336 & indxHS=indxAi+4, indxTIsrf=indxAi+5)
00337 #endif
00338 !
00339 !
00340 !===================================================================
00341 !
00342 !===================================================================
00343 !
00344 ! Grid Type Codes: r2dvar....w3hvar are codes for array types.
00345 ! ==== ==== ====== The codes are set according to the rule:
00346 ! horiz_grid_type+4*vert_grid_type
00347 ! where horiz_grid_type=0,1,2,3 for RHO-,U-,V-,PSI-points
00348 ! respectively and vert_grid_type=0 for 2D fields; 1,2 for
00349 ! 3D-RHO- and W-vertical points.
00350
00351 !
00352 integer r2dvar, u2dvar, v2dvar, p2dvar, r3dvar,
00353 & u3dvar, v3dvar, p3dvar, w3dvar, b3dvar
00354 parameter (r2dvar=0, u2dvar=1, v2dvar=2, p2dvar=3,
00355 & r3dvar=4, u3dvar=5, v3dvar=6, p3dvar=7, w3dvar=8,b3dvar=12)
00356
00357 ! Horizontal array dimensions in netCDF files.
00358 ! xi_rho WARNING!!! In MPI code in the case of PARALLEL_FILES
00359 ! xi_u _and_ NON-Periodicity in either XI- or ETA-direction,
00360 ! eta_rho these depend on corresonding MPI-node indices ii,jj
00361 ! eta_v and therefore become live variables, which are placed
00362 ! into common block below rather than defined here as
00363 ! parameters.
00364
00365 integer xi_rho,xi_u, eta_rho,eta_v
00366 #ifndef AGRIF
00367 # if defined MPI && defined PARALLEL_FILES
00368 # ifdef EW_PERIODIC
00369 parameter (xi_rho=Lm, xi_u=Lm)
00370 # endif
00371 # ifdef NS_PERIODIC
00372 parameter (eta_rho=Mm, eta_v=Mm)
00373 # endif
00374 # else
00375 parameter (xi_rho=LLm+2, xi_u=xi_rho-1,
00376 & eta_rho=MMm+2, eta_v=eta_rho-1)
00377 # endif
00378 #else
00379 # if defined MPI && defined PARALLEL_FILES
00380 # ifdef EW_PERIODIC
00381 common/netCDFhorizdim1/xi_rho,xi_u
00382 # endif
00383 # ifdef NS_PERIODIC
00384 common/netCDFhorizdim2/eta_rho,eta_v
00385 # endif
00386 # else
00387 common/netCDFhorizdim/xi_rho,xi_u, eta_rho,eta_v
00388 # endif
00389 #endif
00390 !
00391 !====================================================================
00392 ! Naming conventions for indices, variable IDs, etc...
00393 !
00394 ! prefix ncid_ means netCDF ID for netCDF file
00395 ! nrec_ record number in netCDF file since initialization
00396 ! nrpf_ maximum number of records per file (output netCDF
00397 ! files only)
00398 ! prefix/ending rst_/_rst refers to restart netCDF file
00399 ! his_/_his history
00400 ! avg_/_avg averages
00401 ! _frc forcing
00402 ! _clm climatology
00403 !
00404 ! endings refer to: ___Time time [in seconds]
00405 ! ___Tstep time step numbers and record numbers
00406 ! all objects ___Z free-surface
00407 ! with these ___Ub vertically integrated 2D U-momentum
00408 ! endings are ___Vb vertically integrated 2D V-momentum
00409 ! either
00410 ! netCDF IDs, ___U 3D U-momentum
00411 ! if occur with ___V 3D V-momentum
00412 ! prefices rst/ ___T(NT) tracers
00413 ! /his/avg ___R density anomaly
00414 ! or ___O omega vertical velocity
00415 ! parameter ___W true vertical velocity
00416 ! indices, if
00417 ! occur with ___Akv vertical viscosity coefficient
00418 ! prefix indx ___Akt vertical T-diffusion coefficient
00419 ! (see above). ___Aks vertical S-diffusion coefficient
00420 ! ___Hbl depth of mixed layer LMD_SKPP.
00421 !
00422 ! Sizes of unlimited time dimensions in netCDF files:
00423 !
00424 ! ntsms surface momentum stress in current forcing file.
00425 ! ntbulk bulk formulation in current forcing file.
00426 ! ntsrf shortwave radiation flux in current forcing file.
00427 ! ntssh sea surface height in current climatology file.
00428 ! ntsst sea surface temperature in current forcing file.
00429 ! ntsss sea surface salinity in current forcing file.
00430 ! ntstf surface flux of tracers in current forcing file.
00431 ! nttclm tracer variables in current climatology file.
00432 ! ntuclm momentum variables in current climatology file.
00433 ! ntww wind induced wave data in current forcing file.
00434 ! ntbulkn bulk formula variables in current forcing file.
00435 !
00436 ! vname character array for variable names and attributes;
00437 !=================================================================
00438 !
00439 integer ncidfrc, ncidbulk, ncidclm, ntsms
00440 & , ntsrf, ntssh, ntsst, ntsss, ntuclm, ntww,
00441 & ntbulk
00442 #ifdef SOLVE3D
00443 integer nttclm(NT), ntstf(NT)
00444 #endif
00445 integer ncidrst, nrecrst, nrpfrst
00446 & , rstTime, rstTstep, rstZ, rstUb, rstVb
00447 #ifdef SOLVE3D
00448 & , rstU, rstV
00449 integer rstT(NT)
00450 # ifdef SEDIMENT
00451 integer rstSed(NST+2)
00452 # endif
00453 #endif
00454 #ifdef BBL
00455 integer rstBBL(2)
00456 #endif
00457 integer ncidhis, nrechis, nrpfhis
00458 & , hisTime, hisTstep, hisZ, hisUb, hisVb
00459 & , hisBostr, hisWstr
00460 #ifdef SOLVE3D
00461 & , hisU, hisV, hisR, hisHbl, hisHbbl
00462 & , hisO, hisW, hisVisc, hisDiff
00463 & , hisAkv, hisAkt, hisAks
00464 # ifdef BULK_FLUX
00465 & , hisShflx_rsw, hisShflx_rlw
00466 & , hisShflx_lat, hisShflx_sen
00467 # endif
00468 # ifdef BIOLOGY
00469 & , hisHel
00470 # ifdef BIO_NPZD
00471 & , hisChC
00472 # ifdef OXYGEN
00473 & , hisU10, hisKvO2, hisO2sat
00474 # endif
00475 # elif defined BIO_N2P2Z2D2 && defined VAR_CHL_C
00476 & , hisChC1, hisChC2
00477 # endif
00478 # endif
00479 integer hisT(NT)
00480 # ifdef SEDIMENT
00481 integer hisSed(NST+2)
00482 # endif
00483 # ifdef BBL
00484 integer hisBBL(6)
00485 # endif
00486 # if defined DIAGNOSTICS_TS
00487 integer nciddia, nrecdia, nrpfdia
00488 & , diaTime, diaTstep
00489 & , diaTXadv(NT), diaTYadv(NT), diaTVadv(NT)
00490 & , diaTHmix(NT), diaTVmix(NT)
00491 & , diaTForc(NT), diaTrate(NT)
00492 & , diaTXadv_mld(NT), diaTYadv_mld(NT), diaTVadv_mld(NT)
00493 & , diaTHmix_mld(NT), diaTVmix_mld(NT)
00494 & , diaTForc_mld(NT), diaTrate_mld(NT), diaTentr_mld(NT)
00495 # endif
00496 # ifdef DIAGNOSTICS_UV
00497 integer nciddiaM, nrecdiaM, nrpfdiaM
00498 & , diaTimeM, diaTstepM
00499 & , diaMXadv(2), diaMYadv(2), diaMVadv(2)
00500 & , diaMCor(2), diaMPrsgrd(2), diaMHmix(2)
00501 & , diaMVmix(2), diaMrate(2)
00502 # endif
00503 # ifdef DIAGNOSTICS_BIO
00504 integer nciddiabio, nrecdiabio, nrpfdiabio
00505 & , diaTimebio, diaTstepbio
00506 & , diabioFlux(NumFluxTerms)
00507 & , diabioVSink(NumVSinkTerms)
00508 & , diabioGasExc(NumGasExcTerms)
00509 # endif
00510 #endif
00511 #ifdef AVERAGES
00512 integer ncidavg, nrecavg, nrpfavg
00513 & , avgTime, avgTstep, avgZ, avgUb, avgVb
00514 & , avgBostr, avgWstr
00515 # ifdef SOLVE3D
00516 & , avgU, avgV, avgR, avgHbl, avgHbbl
00517 & , avgO, avgW, avgVisc, avgDiff
00518 & , avgAkv, avgAkt, avgAks
00519 # ifdef BIOLOGY
00520 & , avgHel
00521 # ifdef BIO_NPZD
00522 & , avgChC
00523 # ifdef OXYGEN
00524 & , avgU10, avgKvO2, avgO2sat
00525 # endif
00526 # elif defined BIO_N2P2Z2D2 && defined VAR_CHL_C
00527 & , avgChC1, avgChC2
00528 # endif
00529 # endif
00530 integer avgT(NT)
00531 # ifdef BULK_FLUX
00532 integer avgShflx_rsw, avgShflx_rlw
00533 & , avgShflx_lat, avgShflx_sen
00534 # endif
00535 # ifdef SEDIMENT
00536 integer avgSed(NST+2)
00537 # endif
00538 # ifdef BBL
00539 integer avgBBL(6)
00540 # endif
00541 # if defined DIAGNOSTICS_TS
00542 integer nciddia_avg, nrecdia_avg, nrpfdia_avg
00543 & , diaTime_avg, diaTstep_avg
00544 & , diaTXadv_avg(NT), diaTYadv_avg(NT), diaTVadv_avg(NT)
00545 & , diaTHmix_avg(NT), diaTVmix_avg(NT)
00546 & , diaTForc_avg(NT), diaTrate_avg(NT)
00547 & , diaTXadv_mld_avg(NT), diaTYadv_mld_avg(NT), diaTVadv_mld_avg(NT)
00548 & , diaTHmix_mld_avg(NT), diaTVmix_mld_avg(NT)
00549 & , diaTForc_mld_avg(NT), diaTrate_mld_avg(NT), diaTentr_mld_avg(NT)
00550 # endif
00551 # ifdef DIAGNOSTICS_UV
00552 integer nciddiaM_avg, nrecdiaM_avg, nrpfdiaM_avg
00553 & , diaTimeM_avg, diaTstepM_avg
00554 & , diaMXadv_avg(2), diaMYadv_avg(2), diaMVadv_avg(2)
00555 & , diaMCor_avg(2), diaMPrsgrd_avg(2), diaMHmix_avg(2)
00556 & , diaMVmix_avg(2), diaMrate_avg(2)
00557 # endif
00558 # ifdef DIAGNOSTICS_BIO
00559 integer nciddiabio_avg, nrecdiabio_avg, nrpfdiabio_avg
00560 & , diaTimebio_avg, diaTstepbio_avg
00561 & , diabioFlux_avg(NumFluxTerms)
00562 & , diabioVSink_avg(NumVSinkTerms)
00563 & , diabioGasExc_avg(NumGasExcTerms)
00564 # endif
00565 # endif
00566 #endif
00567
00568 #ifdef SOLVE3D
00569 # define NWRTHIS 130+NT
00570 #else
00571 # define NWRTHIS 14
00572 #endif
00573 logical wrthis(NWRTHIS)
00574 #ifdef AVERAGES
00575 & , wrtavg(NWRTHIS)
00576 #endif
00577 #if defined DIAGNOSTICS_TS
00578 & , wrtdia
00579 # ifdef AVERAGES
00580 & , wrtdia_avg
00581 # endif
00582 #endif
00583 #if defined DIAGNOSTICS_UV
00584 & , wrtdiaM
00585 # ifdef AVERAGES
00586 & , wrtdiaM_avg
00587 # endif
00588 #endif
00589 #ifdef DIAGNOSTICS_BIO
00590 & , wrtdiabio
00591 # ifdef AVERAGES
00592 & , wrtdiabio_avg
00593 # endif
00594 #endif
00595
00596 common/incscrum/
00597 & ncidfrc, ncidbulk,ncidclm, ntsms, ntsrf, ntssh, ntsst
00598 & , ntuclm, ntsss, ntww, ntbulk
00599 #if defined MPI && defined PARALLEL_FILES
00600 # ifndef EW_PERIODIC
00601 & , xi_rho, xi_u
00602 # endif
00603 # ifndef NS_PERIODIC
00604 & , eta_rho, eta_v
00605 # endif
00606 #endif
00607 #ifdef SOLVE3D
00608 & , nttclm, ntstf
00609 #endif
00610 & , ncidrst, nrecrst, nrpfrst
00611 & , rstTime, rstTstep, rstZ, rstUb, rstVb
00612 #ifdef SOLVE3D
00613 & , rstU, rstV, rstT
00614 # ifdef SEDIMENT
00615 & , rstSed
00616 # endif
00617 #endif
00618 #ifdef BBL
00619 & , rstBBL
00620 #endif
00621 & , ncidhis, nrechis, nrpfhis
00622 & , hisTime, hisTstep, hisZ, hisUb, hisVb
00623 & , hisBostr, hisWstr
00624 #ifdef SOLVE3D
00625 & , hisU, hisV, hisT, hisR
00626 & , hisO, hisW, hisVisc, hisDiff
00627 & , hisAkv, hisAkt, hisAks
00628 & , hisHbl, hisHbbl
00629 # ifdef BULK_FLUX
00630 & , hisShflx_rsw, hisShflx_rlw
00631 & , hisShflx_lat, hisShflx_sen
00632 # endif
00633 # ifdef BIOLOGY
00634 & , hisHel
00635 # ifdef BIO_NPZD
00636 & , hisChC
00637 # ifdef OXYGEN
00638 & , hisU10, hisKvO2, hisO2sat
00639 # endif
00640 # elif defined BIO_N2P2Z2D2 && defined VAR_CHL_C
00641 & , hisChC1, hisChC2
00642 # endif
00643 # endif
00644 # ifdef SEDIMENT
00645 & , hisSed
00646 # endif
00647 #endif
00648 #ifdef BBL
00649 & , hisBBL
00650 #endif
00651 #if defined DIAGNOSTICS_TS
00652 & , nciddia, nrecdia, nrpfdia
00653 & , diaTime, diaTstep
00654 & , diaTXadv, diaTYadv, diaTVadv, diaTHmix
00655 & , diaTVmix, diaTForc, diaTrate
00656 & , diaTXadv_mld, diaTYadv_mld, diaTVadv_mld, diaTHmix_mld
00657 & , diaTVmix_mld, diaTForc_mld, diaTrate_mld, diaTentr_mld
00658 # ifdef AVERAGES
00659 & , nciddia_avg, nrecdia_avg, nrpfdia_avg
00660 & , diaTime_avg, diaTstep_avg
00661 & , diaTXadv_avg, diaTYadv_avg, diaTVadv_avg
00662 & , diaTHmix_avg, diaTVmix_avg, diaTForc_avg
00663 & , diaTrate_avg
00664 & , diaTXadv_mld_avg, diaTYadv_mld_avg, diaTVadv_mld_avg
00665 & , diaTHmix_mld_avg, diaTVmix_mld_avg, diaTForc_mld_avg
00666 & , diaTrate_mld_avg, diaTentr_mld_avg
00667 # endif
00668 #endif
00669 #ifdef DIAGNOSTICS_UV
00670 & , nciddiaM, nrecdiaM, nrpfdiaM
00671 & , diaTimeM, diaTstepM
00672 & , diaMXadv, diaMYadv, diaMVadv, diaMCor
00673 & , diaMPrsgrd, diaMHmix, diaMVmix, diaMrate
00674 # ifdef AVERAGES
00675 & , nciddiaM_avg, nrecdiaM_avg, nrpfdiaM_avg
00676 & , diaTimeM_avg, diaTstepM_avg
00677 & , diaMXadv_avg, diaMYadv_avg, diaMVadv_avg
00678 & , diaMCor_avg, diaMPrsgrd_avg, diaMHmix_avg
00679 & , diaMVmix_avg, diaMrate_avg
00680 # endif
00681 #endif
00682 #ifdef DIAGNOSTICS_BIO
00683 & , nciddiabio, nrecdiabio, nrpfdiabio
00684 & , diaTimebio, diaTstepbio, diabioFlux
00685 & , diabioVSink
00686 & , diabioGasExc
00687 # ifdef AVERAGES
00688 & , nciddiabio_avg, nrecdiabio_avg, nrpfdiabio_avg
00689 & , diaTimebio_avg, diaTstepbio_avg, diabioFlux_avg
00690 & , diabioVSink_avg
00691 & , diabioGasExc_avg
00692 # endif
00693 #endif
00694 #ifdef AVERAGES
00695 & , ncidavg, nrecavg, nrpfavg
00696 & , avgTime, avgTstep, avgZ, avgUb, avgVb
00697 & , avgBostr, avgWstr
00698 # ifdef SOLVE3D
00699 & , avgU, avgV, avgT, avgR
00700 & , avgO, avgW, avgVisc, avgDiff
00701 & , avgAkv, avgAkt, avgAks
00702 & , avgHbl, avgHbbl
00703 # ifdef BIOLOGY
00704 & , avgHel
00705 # ifdef BIO_NPZD
00706 & , avgChC
00707 # ifdef OXYGEN
00708 & , avgU10, avgKvO2, avgO2sat
00709 # endif
00710 # elif defined BIO_N2P2Z2D2 && defined VAR_CHL_C
00711 & , avgChC1, avgChC2
00712 # endif
00713 # endif
00714 # ifdef BULK_FLUX
00715 & , avgShflx_rsw, avgShflx_rlw
00716 & , avgShflx_lat, avgShflx_sen
00717 # endif
00718 # ifdef SEDIMENT
00719 & , avgSed
00720 # endif
00721 # endif
00722 # ifdef BBL
00723 & , avgBBL
00724 # endif
00725 #endif
00726 & , wrthis
00727 #ifdef AVERAGES
00728 & , wrtavg
00729 #endif
00730 #if defined DIAGNOSTICS_TS
00731 & , wrtdia
00732 # ifdef AVERAGES
00733 & , wrtdia_avg
00734 # endif
00735 #endif
00736 #if defined DIAGNOSTICS_UV
00737 & , wrtdiaM
00738 # ifdef AVERAGES
00739 & , wrtdiaM_avg
00740 # endif
00741 #endif
00742 #ifdef DIAGNOSTICS_BIO
00743 & , wrtdiabio
00744 # ifdef AVERAGES
00745 & , wrtdiabio_avg
00746 # endif
00747 #endif
00748
00749 character*80 date_str, title
00750 character*80 ininame, grdname, hisname
00751 & , rstname, frcname, bulkname, usrname
00752 #ifdef AVERAGES
00753 & , avgname
00754 #endif
00755 #ifdef DIAGNOSTICS_TS
00756 & , dianame
00757 # ifdef AVERAGES
00758 & , dianame_avg
00759 # endif
00760 #endif
00761 #ifdef DIAGNOSTICS_UV
00762 & , dianameM
00763 # ifdef AVERAGES
00764 & , dianameM_avg
00765 # endif
00766 #endif
00767 #ifdef DIAGNOSTICS_BIO
00768 & , dianamebio
00769 # ifdef AVERAGES
00770 & , dianamebio_avg
00771 # endif
00772 #endif
00773 #if (defined TCLIMATOLOGY && !defined ANA_TCLIMA)\
00774 || (defined ZCLIMATOLOGY && !defined ANA_SSH)\
00775 || (defined M2CLIMATOLOGY && !defined ANA_M2CLIMA)\
00776 || (defined M3CLIMATOLOGY && !defined ANA_M3CLIMA)
00777 & , clmname
00778 #endif
00779 #ifdef FRC_BRY
00780 & , bry_file
00781 #endif
00782 #ifdef ASSIMILATION
00783 & , aparnam, assname
00784 #endif
00785 #ifdef BIOLOGY
00786 & , bioname
00787 #endif
00788 #ifdef SEDIMENT
00789 & , sedname
00790 #endif
00791
00792 #ifdef SOLVE3D
00793 character*52 vname(4, 300)
00794 #else
00795 character*52 vname(4, 39)
00796 #endif
00797
00798 common /cncscrum/ date_str, title
00799 & , ininame, grdname, hisname
00800 & , rstname, frcname, bulkname, usrname
00801 #ifdef AVERAGES
00802 & , avgname
00803 #endif
00804 #if defined DIAGNOSTICS_TS
00805 & , dianame
00806 # ifdef AVERAGES
00807 & , dianame_avg
00808 # endif
00809 #endif
00810 #if defined DIAGNOSTICS_UV
00811 & , dianameM
00812 # ifdef AVERAGES
00813 & , dianameM_avg
00814 # endif
00815 #endif
00816 #ifdef DIAGNOSTICS_BIO
00817 & , dianamebio
00818 # ifdef AVERAGES
00819 & , dianamebio_avg
00820 # endif
00821 #endif
00822 #if (defined TCLIMATOLOGY && !defined ANA_TCLIMA)\
00823 || (defined ZCLIMATOLOGY && !defined ANA_SSH)\
00824 || (defined M2CLIMATOLOGY && !defined ANA_M2CLIMA)\
00825 || (defined M3CLIMATOLOGY && !defined ANA_M3CLIMA)
00826 & , clmname
00827 #endif
00828 #ifdef FRC_BRY
00829 & , bry_file
00830 #endif
00831 #ifdef ASSIMILATION
00832 & , aparnam, assname
00833 #endif
00834 #ifdef SEDIMENT
00835 & , sedname
00836 #endif
00837 #ifdef BIOLOGY
00838 & , bioname
00839 #endif
00840 & , vname
00841