** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=MITgcm at /usr/local/share/lxr/lib/LXR/Common.pm line 1224.

Last-Modified: Tue, 20 May 2024 05:11:26 GMT Content-Type: text/html; charset=utf-8 MITgcm/MITgcm/pkg/autodiff/AUTODIFF_PARAMS.h
Back to home page

MITgcm

 
 

    


File indexing completed on 2022-08-15 05:09:07 UTC

view on githubraw file Latest commit cf705a6c on 2022-08-14 22:40:32 UTC
3c287b198c Jean*0001 CBOP
                0002 C     !ROUTINE: AUTODIFF_PARAMS.h
                0003 C     !INTERFACE:
                0004 C     #include AUTODIFF_PARAMS.h
                0005 
                0006 C     !DESCRIPTION:
                0007 C     Header file defining pkg/autodiff "parameters".  The values
                0008 C     from the pkg input file are stored into the variables held
                0009 C     here. Notes describing the parameters can also be found here.
                0010 
                0011 CEOP
                0012 
                0013 C--   COMMON /AUTODIFF_PARM_L/ Logical valued parameters used by the pkg.
0d75a51072 Mart*0014 C     inAdMode  :: F:= in forward simulation, T:= in backward sweep,
                0015 C                  set/unset in autodiff_inadmode_set/unset_ad.F
                0016 C     inAdExact :: get an exact adjoint (no approximation), default = .TRUE.
                0017 C                  if .FALSE. it implies useApproxAdvectionInAdMode = .TRUE.
                0018 C     useApproxAdvectionInAdMode :: use different (but stable) advection in AD;
aecc8b0f47 Mart*0019 C                  only implemented for flux limited DST3 (33); default=.FALSE.
0d75a51072 Mart*0020       LOGICAL inAdMode, inAdExact
                0021       LOGICAL useApproxAdvectionInAdMode
3c287b198c Jean*0022 
                0023 C-    Logical flags for turning off parts of the code in adjoint mode
aecc8b0f47 Mart*0024 C     SEAICEuseFREEDRIFTswitchInAd :: switch on/off Free-Drift
                0025 C                                     in adjoint mode (def=F)
                0026 C     SEAICEuseDYNAMICSswitchInAd  :: switch on/off seaice Dyn
                0027 C                                     in adjoint mode (def=F)
                0028 C     cg2dFullAdjoint :: use the full hand written adjoint of cg2d instead of
                0029 C                        the approximate lineared form (def=F)
3c287b198c Jean*0030       LOGICAL useKPPinAdMode,    useKPPinFwdMode
                0031       LOGICAL useGMRediInAdMode, useGMRediInFwdMode
                0032       LOGICAL useSEAICEinAdMode, useSEAICEinFwdMode
b5f6e47484 Gael*0033       LOGICAL useGGL90inAdMode,    useGGL90inFwdMode
                0034       LOGICAL useSALT_PLUMEinAdMode, useSALT_PLUMEInFwdMode
6b07e0a584 Jean*0035       LOGICAL SEAICEuseFREEDRIFTswitchInAd, SEAICEuseFREEDRIFTinFwdMode
                0036       LOGICAL SEAICEuseDYNAMICSswitchInAd, SEAICEuseDYNAMICSinFwdMode
aecc8b0f47 Mart*0037       LOGICAL cg2dFullAdjoint
3c287b198c Jean*0038 
6b07e0a584 Jean*0039 C-    Logical for ad dump format (if true then write all records
816e6857b6 Gael*0040 C       to one file per variable; else write one file per record)
                0041       LOGICAL dumpAdByRec
                0042 
3c287b198c Jean*0043       COMMON /AUTODIFF_PARM_L/
0d75a51072 Mart*0044      &       inAdMode, inAdExact,
                0045      &       useApproxAdvectionInAdMode,
3c287b198c Jean*0046      &       useKPPinAdMode,    useKPPinFwdMode,
                0047      &       useGMRediInAdMode, useGMRediInFwdMode,
8cbe658cd1 Jean*0048      &       useSEAICEinAdMode, useSEAICEinFwdMode,
b5f6e47484 Gael*0049      &       useGGL90inAdMode,    useGGL90inFwdMode,
                0050      &       useSALT_PLUMEinAdMode, useSALT_PLUMEInFwdMode,
6b07e0a584 Jean*0051      &       SEAICEuseFREEDRIFTswitchInAd, SEAICEuseFREEDRIFTinFwdMode,
                0052      &       SEAICEuseDYNAMICSswitchInAd, SEAICEuseDYNAMICSinFwdMode,
aecc8b0f47 Mart*0053      &       cg2dFullAdjoint,
6b07e0a584 Jean*0054      &       dumpAdByRec
3c287b198c Jean*0055 
                0056 C--   COMMON /AUTODIFF_PARM_I/ Integer valued parameters used by the pkg.
59af019e97 Jean*0057 C     dumpAdVarExch :: control ad-variables exchange before dumping output
                0058 C     mon_AdVarExch :: control ad-variables exchange before monitor output
                0059 C      - for both   :: =0 : no exch ; =1 : apply adexch ;
                0060 C      *AdVarExch - :: =2 : do adexch on a local copy.
a661e4ae05 Gael*0061 C     SEAICEapproxLevInAd :: level of approximation in seaice adjoint
                0062 C       -1 (and .NOT.useSEAICEinAdMode) : use seaice_fake adjoint
914da317ef jm-c 0063 C       0 (and .NOT.useSEAICEinAdMode)  : omit all of seaice thermo adjoint
a661e4ae05 Gael*0064 C       0 (and useSEAICEinAdMode)       : use all of seaice thermo adjoint
914da317ef jm-c 0065 C       >= 1 (and useSEAICEinAdMode)    : omit pieces of seaice thermo adjoint
59af019e97 Jean*0066       INTEGER dumpAdVarExch
                0067       INTEGER mon_AdVarExch
a661e4ae05 Gael*0068       INTEGER SEAICEapproxLevInAd
59af019e97 Jean*0069       COMMON /AUTODIFF_PARM_I/
a661e4ae05 Gael*0070      &       dumpAdVarExch, mon_AdVarExch, SEAICEapproxLevInAd
3c287b198c Jean*0071 
                0072 C--   COMMON /AUTODIFF_PARM_R/ "Real" valued parameters used by the pkg.
4240547d2d Mart*0073 C     viscFacInAd  :: viscosity factor for adjoint
                0074 C     viscFacInFw  :: viscosity factor for forward model
914da317ef jm-c 0075 C     SIregFacInAd :: Factor for over shoots in AD
dc54d31829 Ian *0076 C     SIregFacInFw :: Factor for over shoots in FW
4240547d2d Mart*0077       _RL viscFacInAd, viscFacInFw
dc54d31829 Ian *0078       _RL SIregFacInAd, SIregFacInFw
                0079       COMMON /AUTODIFF_PARM_R/
4240547d2d Mart*0080      &  viscFacInAd, viscFacInFw, SIregFacInAd, SIregFacInFw
914da317ef jm-c 0081 
3c287b198c Jean*0082 C--   COMMON /AUTODIFF_PARM_C/ Character valued parameters used by the pkg.
                0083 
                0084 CEH3 ;;; Local Variables: ***
                0085 CEH3 ;;; mode:fortran ***
                0086 CEH3 ;;; End: ***