Back to home page

MITgcm

 
 

    


File indexing completed on 2025-12-15 06:14:26 UTC

view on githubraw file Latest commit ad59256d on 2025-12-15 00:05:36 UTC
ad59256d7d aver*0001 #include "OBSFIT_OPTIONS.h"
                0002 C--  File obsfit_active_file_ad.F:
                0003 C--   Contents
                0004 C--   o adactive_read_obs_tile
                0005 C--   o adactive_write_obs_tile
                0006 C--   o adactive_read_obs_glob
                0007 C--   o adactive_write_obs_glob
                0008 
                0009 CBOP
                0010 C     !ROUTINE: ADACTIVE_READ_OBS_TILE
                0011 
                0012 C     !INTERFACE:
                0013       SUBROUTINE ADACTIVE_READ_OBS_TILE(
                0014      I                                   active_num_file,
                0015      O                                   adactive_var,
                0016      I                                   irec,
                0017      I                                   lAdInit,
                0018      I                                   myIter,
                0019      I                                   bi,
                0020      I                                   bj,
                0021      I                                   myThid )
                0022 
                0023 C     !DESCRIPTION:
                0024 C     ==================================================================
                0025 C     | Adjoint of active_read_obs_tile
                0026 C     ==================================================================
                0027 
                0028 C     !USES:
                0029       IMPLICIT NONE
                0030 C     == Global variables ===
                0031 #include "EEPARAMS.h"
                0032 #include "SIZE.h"
                0033 #ifdef ALLOW_OBSFIT
                0034 # include "OBSFIT_SIZE.h"
                0035 # include "OBSFIT.h"
                0036 #endif
                0037 
                0038 C     !INPUT PARAMETERS:
                0039 C     active_num_file: file number
                0040 C     adactive_var:    array
                0041 C     irec:            record number
                0042 C     myIter:          number of optimization iteration (default: 0)
                0043 C     myThid:          my thread ID number
                0044 C     lAdInit:         initialisation of corresponding adjoint
                0045 C                      variable and write to active file
                0046       INTEGER active_num_file
                0047       _RL     adactive_var
                0048       INTEGER irec
                0049       INTEGER myIter
                0050       INTEGER bi, bj, myThid
                0051       LOGICAL lAdInit
                0052 CEOP
                0053 
                0054 #ifdef ALLOW_OBSFIT
                0055       CALL ACTIVE_READ_OBS_TILE_RL(
                0056      I     fidadj_obs(active_num_file,bi,bj), active_num_file,
                0057      O     adactive_var,
                0058      I     lAdInit, irec, sample_ind_glob(active_num_file,irec,bi,bj),
                0059      I     REVERSE_SIMULATION, myIter, bi, bj, myThid )
                0060 
                0061 #endif
                0062 
                0063       END
                0064 
                0065 C     ==================================================================
                0066 
                0067 CBOP
                0068 C     !ROUTINE: ADACTIVE_WRITE_OBS_TILE
                0069 
                0070 C     !INTERFACE:
                0071       SUBROUTINE ADACTIVE_WRITE_OBS_TILE(
                0072      I                                    active_num_file,
                0073      I                                    adactive_var,
                0074      I                                    irec,
                0075      I                                    myIter,
                0076      I                                    bi,
                0077      I                                    bj,
                0078      I                                    myThid,
                0079      I                                    dummy )
                0080 
                0081 C     !DESCRIPTION:
                0082 C     ==================================================================
                0083 C     | Adjoint of active_write_obs_tile
                0084 C     ==================================================================
                0085 
                0086 C     !USES:
                0087       IMPLICIT NONE
                0088 C     == Global variables ===
                0089 #include "EEPARAMS.h"
                0090 #include "SIZE.h"
                0091 #ifdef ALLOW_OBSFIT
                0092 # include "OBSFIT_SIZE.h"
                0093 # include "OBSFIT.h"
                0094 #endif
                0095 
                0096 C     !INPUT PARAMETERS:
                0097 C     active_num_file: file number
                0098 C     adactive_var:    array
                0099 C     irec:            record number
                0100 C     myIter:          number of optimization iteration (default: 0)
                0101 C     myThid:          my thread ID number
                0102 C     lAdInit:         initialisation of corresponding adjoint
                0103 C                      variable and write to active file
                0104       INTEGER active_num_file
                0105       _RL     adactive_var
                0106       INTEGER irec
                0107       INTEGER myIter
                0108       INTEGER bi, bj, myThid
                0109       _RL     dummy
                0110 CEOP
                0111 
                0112 #ifdef ALLOW_OBSFIT
                0113 
                0114       CALL ACTIVE_WRITE_OBS_TILE_RL(
                0115      I     fidadj_obs(active_num_file,bi,bj),
                0116      I     active_num_file, adactive_var,
                0117      I     irec, sample_ind_glob(active_num_file,irec,bi,bj),
                0118      I     REVERSE_SIMULATION, myIter, bi, bj, myThid )
                0119 
                0120 #endif
                0121 
                0122       END
                0123 
                0124 C     ==================================================================
                0125 
                0126 CBOP
                0127 C     !ROUTINE: ADACTIVE_READ_OBS_GLOB
                0128 
                0129 C     !INTERFACE:
                0130       SUBROUTINE ADACTIVE_READ_OBS_GLOB(
                0131      I                                   active_num_file,
                0132      O                                   adactive_var,
                0133      O                                   adactive_mask,
                0134      I                                   irec,
                0135      I                                   lAdInit,
                0136      I                                   myIter,
                0137      I                                   myThid )
                0138 
                0139 C     !DESCRIPTION:
                0140 C     ==================================================================
                0141 C     | Adjoint of active_read_obs_glob
                0142 C     ==================================================================
                0143 
                0144 C     !USES:
                0145       IMPLICIT NONE
                0146 C     == Global variables ===
                0147 #include "EEPARAMS.h"
                0148 #include "SIZE.h"
                0149 #ifdef ALLOW_OBSFIT
                0150 # include "OBSFIT_SIZE.h"
                0151 # include "OBSFIT.h"
                0152 #endif
                0153 
                0154 C     !INPUT PARAMETERS:
                0155 C     active_num_file: file number
                0156 C     adactive_var:    array
                0157 C     adactive_mask:   array mask
                0158 C     irec:            record number
                0159 C     myIter:          number of optimization iteration (default: 0)
                0160 C     myThid:          my thread ID number
                0161 C     lAdInit:         initialisation of corresponding adjoint
                0162 C                      variable and write to active file
                0163       INTEGER active_num_file
                0164       _RL     adactive_var
                0165       _RL     adactive_mask
                0166       INTEGER irec
                0167       INTEGER myIter
                0168       INTEGER myThid
                0169       LOGICAL lAdInit
                0170 CEOP
                0171 
                0172 #ifdef ALLOW_OBSFIT
                0173 
                0174       CALL ACTIVE_READ_OBS_GLOB_RL(
                0175      I     fidadglobal(active_num_file), active_num_file,
                0176      O     adactive_var, adactive_mask,
                0177      I     lAdInit, irec, obs_ind_glob(active_num_file,irec),
                0178      I     REVERSE_SIMULATION, myIter, myThid )
                0179 
                0180 #endif
                0181 
                0182       END
                0183 
                0184 C     ==================================================================
                0185 
                0186 CBOP
                0187 C     !ROUTINE: ADACTIVE_WRITE_OBS_GLOB
                0188 
                0189 C     !INTERFACE:
                0190       SUBROUTINE ADACTIVE_WRITE_OBS_GLOB(
                0191      I                                    active_num_file,
                0192      I                                    adactive_var,
                0193      I                                    adactive_mask,
                0194      I                                    irec,
                0195      I                                    myIter,
                0196      I                                    myThid,
                0197      I                                    dummy )
                0198 
                0199 C     !DESCRIPTION:
                0200 C     ==================================================================
                0201 C     | Adjoint of active_write_obs_glob
                0202 C     ==================================================================
                0203 
                0204 C     !USES:
                0205       IMPLICIT NONE
                0206 C     == Global variables ===
                0207 #include "EEPARAMS.h"
                0208 #include "SIZE.h"
                0209 #ifdef ALLOW_OBSFIT
                0210 # include "OBSFIT_SIZE.h"
                0211 # include "OBSFIT.h"
                0212 #endif
                0213 
                0214 C     !INPUT PARAMETERS:
                0215 C     active_num_file: file number
                0216 C     adactive_var:    array
                0217 C     adactive_mask:   array mask
                0218 C     irec:            record number
                0219 C     myIter:          number of optimization iteration (default: 0)
                0220 C     myThid:          my thread ID number
                0221 C     lAdInit:         initialisation of corresponding adjoint
                0222 C                      variable and write to active file
                0223       INTEGER active_num_file
                0224       _RL     adactive_var
                0225       _RL     adactive_mask
                0226       INTEGER irec
                0227       INTEGER myIter
                0228       INTEGER myThid
                0229       _RL     dummy
                0230 CEOP
                0231 
                0232 #ifdef ALLOW_OBSFIT
                0233       CALL ACTIVE_WRITE_OBS_GLOB_RL(
                0234      I     fidadglobal(active_num_file), active_num_file,
                0235      I     adactive_var, adactive_mask,
                0236      I     irec, obs_ind_glob(active_num_file,irec),
                0237      I     REVERSE_SIMULATION, myIter,myThid )
                0238 
                0239 #endif
                0240 
                0241       END
                0242 
                0243 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|