Back to home page

MITgcm

 
 

    


File indexing completed on 2024-11-07 06:10:56 UTC

view on githubraw file Latest commit 9f85ea26 on 2024-11-06 14:50:55 UTC
13d362b8c1 Ou W*0001 CBOP
                0002 C    !ROUTINE: ECCO.h
                0003 C    !INTERFACE:
                0004 C #include ECCO.h
                0005 
                0006 C    !DESCRIPTION: \bv
                0007 C     ==================================================================
                0008 C     ECCO.h
                0009 C     o Main header file for the ECCO pkg.
                0010 C       started: Christian Eckert eckert@mit.edu  23-Feb-1999
                0011 C     ==================================================================
                0012 C     \ev
                0013 CEOP
                0014 
                0015 C     Version of the release and versions of used packages:
                0016 C     =====================================================
                0017 C
                0018 C     eccoVersion                - ecco release version.
                0019 C     usesCalendarVersion        - version of the calendar that has to
                0020 C                                  be used.
                0021 C     usesExternalForcingVersion - version of the external forcing that
                0022 C                                  has to be used.
                0023 C     usesAdjointSupportVersion  - version of the adjoint support routines
                0024 C                                  that have to be used.
                0025 C     usesOptimizationVersion    - version of the oof-line optimization
                0026 C                                  that has to be used.
                0027 
                0028       CHARACTER*(5) eccoVersion
                0029       CHARACTER*(5) eccoUsesCalVersion
                0030       CHARACTER*(5) eccoUsesExfVersion
                0031       CHARACTER*(5) eccoUsesAdsuppVersion
                0032       CHARACTER*(5) eccoUsesOptimVersion
                0033 
                0034       PARAMETER(    eccoVersion           = '0.1.0' )
                0035       PARAMETER(    eccoUsesCalVersion    = '0.1.4' )
                0036       PARAMETER(    eccoUsesExfVersion    = '0.1.1' )
                0037       PARAMETER(    eccoUsesAdsuppVersion = '0.1.0' )
                0038       PARAMETER(    eccoUsesOptimVersion  = '2.1.0' )
                0039 
                0040 C     Experiment name:
                0041 C     ================
                0042 
                0043       COMMON /ECCO_C/
                0044      &                expId
                0045       CHARACTER*(10)  expId
                0046 
                0047 C     Integration information:
                0048 C     ========================
                0049 C
                0050 C     nyears - number of calendar years that are affected by the
                0051 C              current integration.
                0052 
                0053       COMMON /ECCO_I/
                0054      &                nyears, nmonths, ndays, numsteps,
                0055      &                eccoiter, ecco_prevcall
                0056       INTEGER nyears
                0057       INTEGER nmonths
                0058       INTEGER ndays
                0059       INTEGER numsteps
                0060       INTEGER eccoiter
                0061       INTEGER ecco_prevcall
                0062 
                0063 C     Averaging counters:
                0064 C     ===================
                0065 C
                0066 C     sum1day :: counter for the daily averaging
                0067 C     sum1mon :: counter for the monthly averaging
                0068 C     dayrec  :: number of averaged surface pressure records.
                0069 C     monrec  :: number of averaged theta and salinity records.
                0070 
                0071       COMMON /AVERAGE_I/
                0072      &                   sum1day,sum1mon,sum1year,
                0073      &                   dayrec,monrec,yearrec
                0074       INTEGER sum1day
                0075       INTEGER sum1mon
                0076       INTEGER sum1year
                0077       INTEGER dayrec
                0078       INTEGER monrec
                0079       INTEGER yearrec
                0080 
                0081 C     Flags used in the model-data comparison:
                0082 C     ========================================
                0083 C
                0084 C     using_ers :: flag that indicates the use of ERS data
                0085 
                0086       COMMON /ECCO_COST_DATA_FLAGS/
                0087      &                         using_mdt,
                0088      &                         using_tpj,
                0089      &                         using_topex,
                0090      &                         using_ers,
                0091      &                         using_gfo,
                0092      &                         using_cost_altim,
                0093      &                         using_cost_sst,
cda1c18f72 Jean*0094      &                         using_cost_seaice,
                0095      &                         using_cost_transp
13d362b8c1 Ou W*0096       LOGICAL using_mdt
                0097       LOGICAL using_tpj
                0098       LOGICAL using_topex
                0099       LOGICAL using_ers
                0100       LOGICAL using_gfo
                0101       LOGICAL using_cost_altim
                0102       LOGICAL using_cost_sst
                0103       LOGICAL using_cost_seaice
                0104       LOGICAL using_cost_transp
                0105 
                0106 C     Record counters relevant for the cost function evaluation.
                0107 C     ==========================================================
                0108 C
                0109 C     nyearsrec:: number of yearly records that will be generated by
                0110 C                 the current model integration.
                0111 C     nmonsrec :: number of monthly records that will be generated by
                0112 C                 the current model integration.
                0113 C     ndaysrec :: number of  daily  records that will be generated by
                0114 C                 the current model integration.
                0115 
                0116       COMMON /ECCO_I/
                0117      &                nyearsrec,
                0118      &                nmonsrec,
                0119      &                ndaysrec
                0120       INTEGER nyearsrec
                0121       INTEGER nmonsrec
                0122       INTEGER ndaysrec
                0123 
                0124       COMMON /ECCO_R/
b0b45f2373 Ou W*0125      &                    m_eta, m_UE, m_VN, m_bp,
                0126      &                    trVol, trHeat, trSalt,
35c4fdc74b Emma*0127      &                    frame
b0b45f2373 Ou W*0128       _RL m_eta    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,   nSx,nSy)
                0129       _RL m_UE     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0130       _RL m_VN     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0131       _RL m_bp     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,   nSx,nSy)
                0132       _RL trVol    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0133       _RL trHeat   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0134       _RL trSalt   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0135       _RL frame    (1-OLx:sNx+OLx,1-OLy:sNy+OLy           )
                0136 
13d362b8c1 Ou W*0137 #ifdef ALLOW_PSBAR_STERIC
b0b45f2373 Ou W*0138       COMMON /ECCO_R2/
13d362b8c1 Ou W*0139      &                    sterGloH,
                0140      &                    VOLsumGlob_0, VOLsumGlob,
b0b45f2373 Ou W*0141      &                    RHOsumGlob_0, RHOsumGlob
13d362b8c1 Ou W*0142       _RL sterGloH
b0b45f2373 Ou W*0143       _RL VOLsumGlob_0, VOLsumGlob, RHOsumGlob_0, RHOsumGlob
                0144 
35c4fdc74b Emma*0145 #endif
13d362b8c1 Ou W*0146 #ifdef ATMOSPHERIC_LOADING
                0147 #ifdef ALLOW_IB_CORR
b0b45f2373 Ou W*0148       COMMON /ECCO_R3/
                0149      &                    m_bp_nopabar,
                0150      &                    m_eta_dyn
13d362b8c1 Ou W*0151       _RL m_bp_nopabar(1-OLx:sNx+OLx,1-OLy:sNy+OLy,   nSx,nSy)
b0b45f2373 Ou W*0152       _RL m_eta_dyn   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,   nSx,nSy)
35c4fdc74b Emma*0153 
                0154 #endif
13d362b8c1 Ou W*0155 #endif
35c4fdc74b Emma*0156 #ifndef ECCO_VARIABLE_AREAVOLGLOB
                0157       COMMON /ECCO_R4/ eccoVol_0
                0158       _RL eccoVol_0(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
13d362b8c1 Ou W*0159 #endif
                0160 
                0161 C     Two runtime parameters related to outputting sterGloH
                0162 C     ecco_output_sterGloH :: output sterGloH at each time step if true
                0163 C     ecco_keepTSeriesOutp_open :: keep the sterGloH file open if true
9f85ea262e Mart*0164 C     eccoWriteCostFunction :: internal flag to suppress writing
                0165 C                       costfunction multiple times (e.g. with grdchk-pkg)
13d362b8c1 Ou W*0166       COMMON /ECCO_L/
9f85ea262e Mart*0167      &     ecco_output_sterGloH, ecco_keepTSeriesOutp_open,
                0168      &     eccoWriteCostFunction
13d362b8c1 Ou W*0169       LOGICAL ecco_output_sterGloH, ecco_keepTSeriesOutp_open
9f85ea262e Mart*0170       LOGICAL eccoWriteCostFunction
13d362b8c1 Ou W*0171 
                0172 C     file precision
                0173       COMMON /PREC_TYPE_COST/
                0174      &                        cost_iprec
                0175       INTEGER cost_iprec
                0176 
                0177 C     empty pre/post-processing :
                0178 C     =========================
                0179       COMMON /ECCO_NOGENCOST_C/
                0180      &       no_preproc,
                0181      &       no_preproc_c,
                0182      &       no_posproc,
                0183      &       no_posproc_c,
                0184      &       clim_preproc,
                0185      &       anom_preproc
                0186       CHARACTER*(MAX_LEN_FNAM) no_preproc(NGENPPROC)
                0187       CHARACTER*(MAX_LEN_FNAM) no_preproc_c(NGENPPROC)
                0188       CHARACTER*(MAX_LEN_FNAM) no_posproc(NGENPPROC)
                0189       CHARACTER*(MAX_LEN_FNAM) no_posproc_c(NGENPPROC)
                0190       CHARACTER*(MAX_LEN_FNAM) clim_preproc(NGENPPROC)
                0191       CHARACTER*(MAX_LEN_FNAM) anom_preproc(NGENPPROC)
                0192 
                0193       COMMON /ECCO_NOGENCOST_R/
                0194      &       no_preproc_r, no_posproc_r
                0195       _RL no_preproc_r(NGENPPROC)
                0196       _RL no_posproc_r(NGENPPROC)
                0197 
                0198       COMMON /ECCO_NOGENCOST_I/
                0199      &       no_preproc_i, no_posproc_i, clim_preproc_i
                0200       INTEGER no_preproc_i(NGENPPROC)
                0201       INTEGER no_posproc_i(NGENPPROC)
                0202       INTEGER clim_preproc_i(NGENPPROC)
                0203 
                0204 C     gencost common blocs:
                0205 C     =====================
                0206 
                0207 #ifdef ALLOW_GENCOST_CONTRIBUTION
                0208 C     objf_gencost :: gencost user defined contribution
                0209       COMMON /ECCO_GENCOST_CTRL/
                0210      &       gencost_dummy
                0211       _RL  gencost_dummy(NGENCOST)
                0212 
                0213       COMMON /ECCO_GENCOST_R_1/
                0214      &       objf_gencost, num_gencost, mult_gencost, gencost_storefld,
                0215      &       gencost_barfld, gencost_modfld, gencost_weight,
                0216      &       gencost_mskCsurf, gencost_mskWsurf, gencost_mskSsurf,
                0217      &       gencost_mskVertical,
                0218 #ifdef ALLOW_GENCOST3D
                0219      &       gencost_bar3d, gencost_mod3d, gencost_wei3d,
                0220      &       gencost_mskC, gencost_mskW, gencost_mskS,
                0221 #endif
aa93ca8e85 Ciar*0222      &       gencost_refPressure, gencost_sigmaLow, gencost_sigmaHigh,
                0223      &       gencost_tanhScale,
13d362b8c1 Ou W*0224      &       gencost_spmin, gencost_spmax, gencost_spzero,
                0225      &       gencost_period, gencost_preproc_r, gencost_posproc_r,
                0226      &       gencost_wei1d, gencost_1ddata
                0227 
                0228       _RL  objf_gencost(nSx,nSy,NGENCOST)
                0229       _RL  num_gencost(nSx,nSy,NGENCOST)
                0230       _RL  mult_gencost(NGENCOST)
                0231       _RL  gencost_spmin(NGENCOST)
                0232       _RL  gencost_spmax(NGENCOST)
                0233       _RL  gencost_spzero(NGENCOST)
                0234       _RL  gencost_period(NGENCOST)
                0235       _RL  gencost_storefld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0236      &       nSx,nSy,NGENCOST)
                0237       _RL  gencost_barfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0238      &       nSx,nSy,NGENCOST)
                0239       _RL  gencost_modfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0240      &       nSx,nSy,NGENCOST)
                0241       _RL  gencost_weight(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0242      &       nSx,nSy,NGENCOST)
                0243       _RL  gencost_mskCsurf(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0244      &       nSx,nSy,NGENCOST)
                0245       _RL  gencost_mskWsurf(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0246      &       nSx,nSy,NGENCOST)
                0247       _RL  gencost_mskSsurf(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
                0248      &       nSx,nSy,NGENCOST)
0cd0083da8 Ou W*0249       _RL  gencost_mskVertical(Nr,NGENCOST)
aa93ca8e85 Ciar*0250       _RL  gencost_sigmaLow(NGENCOST)
                0251       _RL  gencost_sigmaHigh(NGENCOST)
                0252       _RL  gencost_refPressure(NGENCOST)
                0253       _RL  gencost_tanhScale(NGENCOST)
13d362b8c1 Ou W*0254 #ifdef ALLOW_GENCOST3D
                0255       _RL  gencost_bar3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0256      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0257       _RL  gencost_mod3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0258      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0259       _RL  gencost_wei3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0260      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0261       _RL  gencost_mskC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0262      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0263       _RL  gencost_mskW(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0264      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0265       _RL  gencost_mskS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,
0cd0083da8 Ou W*0266      &       Nr,nSx,nSy,NGENCOST3D)
13d362b8c1 Ou W*0267 #endif
                0268       _RL gencost_preproc_r(NGENPPROC,NGENCOST)
                0269       _RL gencost_posproc_r(NGENPPROC,NGENCOST)
                0270       _RL gencost_wei1d(NGENCOST)
                0271       _RL gencost_1ddata(N1DDATA, NGENCOST)
                0272 
                0273 C     gencost_kLev_select :: selected vertical level of a 3D model field to use
                0274 C                            to compute a cost term contribution (default = 1).
                0275 C                            Note: currently only used in drifter velocity cost
                0276 
                0277       COMMON /ECCO_GENCOST_I_1/
                0278      &       gencost_nrec, gencost_nrecperiod,
                0279      &       gencost_flag, gencost_outputlevel,
                0280      &       gencost_startdate1, gencost_startdate2,
                0281      &       gencost_enddate1, gencost_enddate2,
                0282      &       gencost_startdate, gencost_enddate,
                0283      &       gencost_pointer3d, gencost_smooth2Ddiffnbt,
                0284      &       gencost_preproc_i, gencost_posproc_i,
                0285      &       gencost_msk_pointer3d, gencost_itracer,
                0286      &       gencost_kLev_select
                0287 
                0288       INTEGER gencost_nrec(NGENCOST)
                0289       INTEGER gencost_nrecperiod(NGENCOST)
                0290       INTEGER gencost_flag(NGENCOST)
                0291       INTEGER gencost_outputlevel(NGENCOST)
                0292       INTEGER gencost_startdate1(NGENCOST)
                0293       INTEGER gencost_startdate2(NGENCOST)
                0294       INTEGER gencost_startdate(4,NGENCOST)
                0295       INTEGER gencost_enddate1(NGENCOST)
                0296       INTEGER gencost_enddate2(NGENCOST)
                0297       INTEGER gencost_enddate(4,NGENCOST)
                0298       INTEGER gencost_pointer3d(NGENCOST)
                0299       INTEGER  gencost_smooth2Ddiffnbt(NGENCOST)
                0300       INTEGER gencost_preproc_i(NGENPPROC,NGENCOST)
                0301       INTEGER gencost_posproc_i(NGENPPROC,NGENCOST)
                0302       INTEGER gencost_msk_pointer3d(NGENCOST)
                0303       INTEGER gencost_itracer(NGENCOST)
                0304       INTEGER gencost_kLev_select(NGENCOST)
                0305 
                0306       COMMON /ECCO_GENCOST_L_1/
                0307      &       gencost_timevaryweight, gencost_barskip,
                0308      &       using_gencost, gencost_is3d, gencost_msk_is3d,
aa93ca8e85 Ciar*0309      &       gencost_is1d, gencost_useDensityMask
13d362b8c1 Ou W*0310       LOGICAL using_gencost(NGENCOST)
                0311       LOGICAL gencost_is3d(NGENCOST)
                0312       LOGICAL gencost_is1d(NGENCOST)
                0313       LOGICAL gencost_msk_is3d(NGENCOST)
aa93ca8e85 Ciar*0314       LOGICAL gencost_useDensityMask(NGENCOST)
13d362b8c1 Ou W*0315       LOGICAL gencost_timevaryweight(NGENCOST)
                0316       LOGICAL gencost_barskip(NGENCOST)
                0317 
                0318       COMMON /ECCO_GENCOST_C/
                0319      &       gencost_name,
                0320      &       gencost_scalefile,
                0321      &       gencost_errfile,
                0322      &       gencost_datafile,
                0323      &       gencost_barfile,
                0324      &       gencost_avgperiod,
                0325      &       gencost_preproc,
                0326      &       gencost_preproc_c,
                0327      &       gencost_posproc,
                0328      &       gencost_posproc_c,
                0329      &       gencost_mask
                0330       CHARACTER*(MAX_LEN_FNAM) gencost_name(NGENCOST)
                0331       CHARACTER*(MAX_LEN_FNAM) gencost_scalefile(NGENCOST)
                0332       CHARACTER*(MAX_LEN_FNAM) gencost_errfile(NGENCOST)
                0333       CHARACTER*(MAX_LEN_FNAM) gencost_datafile(NGENCOST)
                0334       CHARACTER*(MAX_LEN_FNAM) gencost_barfile(NGENCOST)
                0335       CHARACTER*(5)            gencost_avgperiod(NGENCOST)
                0336       CHARACTER*(MAX_LEN_FNAM) gencost_preproc(NGENPPROC,NGENCOST)
                0337       CHARACTER*(MAX_LEN_FNAM) gencost_posproc_c(NGENPPROC,NGENCOST)
                0338       CHARACTER*(MAX_LEN_FNAM) gencost_posproc(NGENPPROC,NGENCOST)
                0339       CHARACTER*(MAX_LEN_FNAM) gencost_preproc_c(NGENPPROC,NGENCOST)
                0340       CHARACTER*(MAX_LEN_FNAM) gencost_mask(NGENCOST)
                0341 
                0342 #endif /* ALLOW_GENCOST_CONTRIBUTION */
                0343 
                0344 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|