Back to home page

MITgcm

 
 

    


File indexing completed on 2023-03-29 05:10:01 UTC

view on githubraw file Latest commit cda1c18f on 2023-03-28 22:31:47 UTC
2f1693fad8 Patr*0001 #include "PACKAGES_CONFIG.h"
2dcaa8b9a5 Patr*0002 
                0003 c     ==================================================================
                0004 c     HEADER COST
                0005 c     ==================================================================
                0006 c
                0007 c     o Header for model-data comparison.
                0008 c
                0009 c     The individual cost function contributions are multiplied by
                0010 c     factors mult_"var" which allow to switch off these contributions
                0011 c     without removing them in the adjoint code. This is useful for
                0012 c     doing tests with the adjoint and perhaps useful in assimilation
                0013 c     experiments where individual contributions are successively
                0014 c     switched on. For future applications it would be better to place
                0015 c     the initialisation of the multipliers somewhere else, for example
                0016 c     in a namelist, which is read in at the start of the model.
                0017 c
                0018 c     started: Christian Eckert eckert@mit.edu  24-Feb-1999
                0019 c     changed: Christian Eckert eckert@mit.edu
2f1693fad8 Patr*0020 c     heimbach@mit.edu 05-Nov-2003 Modularize cost package
2dcaa8b9a5 Patr*0021 c
                0022 c     ==================================================================
                0023 c     HEADER COST
                0024 c     ==================================================================
                0025 
                0026 c     The cost function, its contributions, and multipliers:
                0027 c     ======================================================
                0028 c
                0029 c     fc         - Final cost function.
8a270036d8 Gael*0030 c     glofc      - contributions from global mean constraints
2dcaa8b9a5 Patr*0031 c     mult_"var" - multipliers for the individual cost
                0032 c                  function contributions.
                0033 
                0034       common /cost_r/
8a270036d8 Gael*0035      &                fc, glofc
2f1693fad8 Patr*0036       _RL  fc
8a270036d8 Gael*0037       _RL  glofc
2f1693fad8 Patr*0038 
29f6025d09 Jean*0039 C     tile_fc   :: Final cost function contribution from this tile
                0040       COMMON /COST_FINAL_R/ tile_fc
                0041       _RL  tile_fc (nSx,nSy)
                0042 
2f1693fad8 Patr*0043       common /cost_objf/
2dcaa8b9a5 Patr*0044      &                objf_atl,
bbf42b7711 Patr*0045      &                objf_test,
00c59bf6d0 Patr*0046      &                objf_tracer,
                0047      &                objf_entropy,
                0048      &                objf_t_misfit,
616600b8d2 Patr*0049 #ifdef ALLOW_COST_DEPTH
                0050      &                objf_depth,
                0051 #endif
00c59bf6d0 Patr*0052      &                objf_eflux
11c3150c71 Mart*0053 #ifdef ALLOW_COST_HFLUXM
14021e1fda Davi*0054      &               ,objf_hflux_tut
                0055      &               ,objf_temp_tut
11c3150c71 Mart*0056 #endif
2dcaa8b9a5 Patr*0057 
cda1c18f72 Jean*0058       _RL  objf_atl  (nSx,nSy)
                0059       _RL  objf_test (nSx,nSy)
                0060       _RL  objf_tracer (nSx,nSy)
                0061       _RL  objf_entropy (nSx,nSy)
                0062       _RL  objf_t_misfit (nSx,nSy)
                0063       _RL  objf_eflux (nSx,nSy)
616600b8d2 Patr*0064 #ifdef ALLOW_COST_DEPTH
cda1c18f72 Jean*0065       _RL  objf_depth (nSx,nSy)
616600b8d2 Patr*0066 #endif
11c3150c71 Mart*0067 #ifdef ALLOW_COST_HFLUXM
cda1c18f72 Jean*0068       _RL  objf_hflux_tut (nSx,nSy)
                0069       _RL  objf_temp_tut (nSx,nSy)
11c3150c71 Mart*0070 #endif
00c59bf6d0 Patr*0071 
449f3c105b Patr*0072       common /cost_param_r/
                0073      &                lastinterval
                0074       _RL lastinterval
                0075 
9eb96e5404 Patr*0076 #ifdef ALLOW_COST_STATE_FINAL
                0077       common /cost_state_final_r/
                0078      &                objf_state_final
a8da18f773 Patr*0079 cph      _RL  objf_state_final (snx,sny,nsx,nsy)
cda1c18f72 Jean*0080       _RL  objf_state_final (sNx,sNy,nSx,nSy,4*Nr+1)
00c59bf6d0 Patr*0081 #endif
2dcaa8b9a5 Patr*0082 
720be40b89 Patr*0083 #ifdef ALLOW_COST_VECTOR
9eb96e5404 Patr*0084       common /cost_vector_r/
720be40b89 Patr*0085      &                objf_vector
cda1c18f72 Jean*0086       _RL  objf_vector (sNx,nSx,nSy)
720be40b89 Patr*0087 #endif
                0088 
2dcaa8b9a5 Patr*0089       common /cost_aux_r/
                0090      &                    mult_atl,
bbf42b7711 Patr*0091      &                    mult_test,
00c59bf6d0 Patr*0092      &                    mult_tracer,
                0093      &                    mult_entropy,
                0094      &                    mult_t_misfit,
586ad2dc56 Patr*0095      &                    mult_eflux,
                0096      &                    multTheta,
                0097      &                    multSalt,
                0098      &                    multUvel,
                0099      &                    multVvel,
616600b8d2 Patr*0100 #ifdef ALLOW_COST_DEPTH
                0101      &           mult_depth,
                0102 #endif
586ad2dc56 Patr*0103      &                    multEtan
11c3150c71 Mart*0104 #ifdef ALLOW_COST_HFLUXM
14021e1fda Davi*0105      &                   ,mult_hflux_tut
                0106      &                   ,mult_temp_tut
11c3150c71 Mart*0107 #endif
2dcaa8b9a5 Patr*0108 
                0109       _RL  mult_atl
                0110       _RL  mult_test
bbf42b7711 Patr*0111       _RL  mult_tracer
00c59bf6d0 Patr*0112       _RL  mult_entropy
                0113       _RL  mult_t_misfit
                0114       _RL  mult_eflux
586ad2dc56 Patr*0115       _RL  multTheta
                0116       _RL  multSalt
                0117       _RL  multUvel
                0118       _RL  multVvel
                0119       _RL  multEtan
616600b8d2 Patr*0120 #ifdef ALLOW_COST_DEPTH
                0121       _RL  mult_depth
                0122 #endif
11c3150c71 Mart*0123 #ifdef ALLOW_COST_HFLUXM
14021e1fda Davi*0124       _RL  mult_hflux_tut
                0125       _RL  mult_temp_tut
11c3150c71 Mart*0126 #endif
2dcaa8b9a5 Patr*0127 
                0128 #ifdef ALLOW_COST_TEST
                0129       common /cost_test_i/
                0130      &                           iLocOut
                0131      &                         , jLocOut
                0132      &                         , kLocOut
                0133       integer iLocOut
                0134       integer jLocOut
                0135       integer kLocOut
                0136 #endif
                0137 
4a2a8da507 Davi*0138 #ifdef ALLOW_COST
449f3c105b Patr*0139       COMMON /COST_MEAN_R/
781d8676b2 Patr*0140      &                     cMeanTheta, cMeanUVel, cMeanVVel,
                0141      &                     cMeanThetaUVel, cMeanThetaVVel
449f3c105b Patr*0142       _RL cMeanTheta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0143       _RL cMeanUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0144       _RL cMeanVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
781d8676b2 Patr*0145       _RL cMeanThetaUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0146       _RL cMeanThetaVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
449f3c105b Patr*0147 #endif
                0148 
2dcaa8b9a5 Patr*0149 c     ==================================================================
                0150 c     END OF HEADER COST
                0151 c     ==================================================================