Back to home page

MITgcm

 
 

    


File indexing completed on 2024-06-06 05:10:32 UTC

view on githubraw file Latest commit af61e5eb on 2024-06-06 03:30:35 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 
af61e5eb16 Mart*0089       common /cost_fname_c/
                0090      &     cost_mask_file
                0091       CHARACTER*(MAX_LEN_FNAM) cost_mask_file
                0092 
2dcaa8b9a5 Patr*0093       common /cost_aux_r/
                0094      &                    mult_atl,
bbf42b7711 Patr*0095      &                    mult_test,
00c59bf6d0 Patr*0096      &                    mult_tracer,
                0097      &                    mult_entropy,
                0098      &                    mult_t_misfit,
586ad2dc56 Patr*0099      &                    mult_eflux,
                0100      &                    multTheta,
                0101      &                    multSalt,
                0102      &                    multUvel,
                0103      &                    multVvel,
616600b8d2 Patr*0104 #ifdef ALLOW_COST_DEPTH
                0105      &           mult_depth,
                0106 #endif
586ad2dc56 Patr*0107      &                    multEtan
11c3150c71 Mart*0108 #ifdef ALLOW_COST_HFLUXM
14021e1fda Davi*0109      &                   ,mult_hflux_tut
                0110      &                   ,mult_temp_tut
11c3150c71 Mart*0111 #endif
2dcaa8b9a5 Patr*0112 
                0113       _RL  mult_atl
                0114       _RL  mult_test
bbf42b7711 Patr*0115       _RL  mult_tracer
00c59bf6d0 Patr*0116       _RL  mult_entropy
                0117       _RL  mult_t_misfit
                0118       _RL  mult_eflux
586ad2dc56 Patr*0119       _RL  multTheta
                0120       _RL  multSalt
                0121       _RL  multUvel
                0122       _RL  multVvel
                0123       _RL  multEtan
616600b8d2 Patr*0124 #ifdef ALLOW_COST_DEPTH
                0125       _RL  mult_depth
                0126 #endif
11c3150c71 Mart*0127 #ifdef ALLOW_COST_HFLUXM
14021e1fda Davi*0128       _RL  mult_hflux_tut
                0129       _RL  mult_temp_tut
11c3150c71 Mart*0130 #endif
2dcaa8b9a5 Patr*0131 
                0132 #ifdef ALLOW_COST_TEST
                0133       common /cost_test_i/
                0134      &                           iLocOut
                0135      &                         , jLocOut
                0136      &                         , kLocOut
                0137       integer iLocOut
                0138       integer jLocOut
                0139       integer kLocOut
                0140 #endif
                0141 
4a2a8da507 Davi*0142 #ifdef ALLOW_COST
449f3c105b Patr*0143       COMMON /COST_MEAN_R/
781d8676b2 Patr*0144      &                     cMeanTheta, cMeanUVel, cMeanVVel,
                0145      &                     cMeanThetaUVel, cMeanThetaVVel
449f3c105b Patr*0146       _RL cMeanTheta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0147       _RL cMeanUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0148       _RL cMeanVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
781d8676b2 Patr*0149       _RL cMeanThetaUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0150       _RL cMeanThetaVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
449f3c105b Patr*0151 #endif
                0152 
2dcaa8b9a5 Patr*0153 c     ==================================================================
                0154 c     END OF HEADER COST
                0155 c     ==================================================================