[MITgcm-support] Model jump at forward --> adjoint transition

Matthew Mazloff mmazloff at ucsd.edu
Tue Feb 16 13:05:48 EST 2016


Hello

Just a guess: maybe you are running the gradient check:

make sure
useGrdchk = .FALSE., 
in data.pkg

Matt


> On Feb 16, 2016, at 9:18 AM, Nora Loose <Nora.Loose at uib.no> wrote:
> 
> Hi all,
> 
> I am looking at the verification experiment global_ocean.90x40x15 (checkpoint65o) and observe a strange jump in velocities and tracer fields once I switch from the spinup to the adjoint run. Can’t see what goes wrong since my forward spinup and my adjoint run use the same package configurations so hopefully the same forward code (?). 
> 
> Here is a more detailed outline of what I did:
> 
> 1.) compilation of forward code with modifications from global_ocean.90x40x15/code (compiling with the packages oceanic, exch2, cd_code, down_slope, ggl90, ptracers, sbo, timeave, diagnostics), but setting the following grid parameters:
> 
>     &	          sNx =  45,
>     &           sNy =  20,
>     &           OLx =   3,
>     &           OLy =   3,
>     &           nSx =   1,
>     &           nSy =   1,
>     &           nPx =   2,
>     &           nPy =   2,
>     &           Nr  =  15)
> 
> 2.) spinup of 1000 years using
> a) the packages gmredi, diagnostics, generic_advdiff, mom_common, mom_vecinv, cd_code, monitor, exch2, rw and mdsio (according to the standard output) and 
> b) basically the parameters from verification/global_ocean.90x40x15/code_ad/data:
> 
> &PARM01
> tRef = 15*20.,
> sRef = 15*35.,
> viscAr=1.E-3,
> diffKhT=0.,
> diffKhS=0.,
> diffKrS=3.E-5,
> viscC4Leith=1.5,
> viscC4Leithd=1.5,
> viscA4GridMax=0.5,
> useAreaViscLength=.TRUE.,
> bottomDragQuadratic = 0.0021,
> rhoConst=1035.,
> gravity=9.81,
> eosType = 'JMD95Z',
> ivdc_kappa=10.,
> implicitDiffusion=.TRUE.,
> allowFreezing=.TRUE.,
> useRealFreshWaterFlux=.TRUE.,
> useCDscheme=.TRUE.,
> exactConserv=.TRUE.,
> hFacMin=.05,
> hFacMinDr=50.,
> vectorInvariantMomentum=.TRUE.,
> hFacInf=0.2,
> hFacSup=2.0,
> nonlinFreeSurf=2,
> staggerTimeStep=.TRUE.,
> tempAdvScheme=30,
> saltAdvScheme=30,
> tempVertAdvScheme=20,
> saltVertAdvScheme=20,
> tempImplVertAdv=.TRUE.,
> saltImplVertAdv=.TRUE.,
> readBinaryPrec=32,
> useSingleCpuIO=.TRUE.,
> &
> 
> &PARM02
> cg2dMaxIters=500,
> cg2dTargetResidual=1.E-13,
> &
> 
> &PARM03
> # do 1000 years of spinup
> nIter0 = 0
> nTimeSteps = 360000,
> deltaTmom = 1800.,
> tauCD =     321428.,
> deltaTtracer= 86400.0,
> deltaTClock = 86400.0,
> abEps = 0.1,
> # pickup every 10 years
> pChkptFreq= 311040000.,
> adjMonitorFreq=1.,
> monitorFreq=1.,
> # 2 months restoring timescale for temperature
> tauThetaClimRelax =  5184000.0,
> # 6 months restoring timescale for salinity
> tauSaltClimRelax = 15552000.0,
> periodicExternalForcing=.TRUE.,
> externForcingPeriod=2592000.,
> externForcingCycle=31104000.,
> &
> 
> &PARM04
> usingSphericalPolarGrid=.TRUE.,
> delR= 50.,  70., 100., 140., 190.,
>      240., 290., 340., 390., 440.,
>      490., 540., 590., 640., 690.,
> ygOrigin=-80.,
> dySpacing=4.,
> dxSpacing=4.,
> &
> 
> &PARM05
> bathyFile=      'bathymetry.bin',
> hydrogThetaFile='lev_t.bin',
> hydrogSaltFile= 'lev_s.bin',
> zonalWindFile=  'trenberth_taux.bin',
> meridWindFile=  'trenberth_tauy.bin',
> thetaClimFile=  'lev_sst.bin',
> saltClimFile=   'lev_sss.bin',
> surfQFile=      'ncep_qnet.bin',
> EmPmRFile=      'ncep_emp.bin',
> &
> 
> 3.) compilation of adjoint code with modifications from global_ocean.90x40x15/code_ad, compiling with autodiff, cost, ctrl, grdchk, gfd, cd_code, gmredi, sbo, timeave, diagnostics. (Modifications also include the GMREDI_OPTIONS header file from the verification/code_ad directory, which is not used to create the executable mitgcmuv in 1.), but I checked that this doesn’t make the difference.)
> 
> 4.) adjoint run of 40 years
> a) picking up from the end of the 1000 year spinup
> b) using the packages gmredi, autodiff, ctrl, diagnostics, generic_advdiff, mom_common, mom_vecinv, cd_code, monitor, rw, mdsio, autodiff, cost (according to the standard output) and 
> c) applying only changes under PARM03 in the data-file in 2.):
> 
> &PARM03
> nIter0 = 360000,
> nTimeSteps = 14400,
> deltaTmom = 1800.0,
> tauCD =     321428.,
> deltaTtracer= 86400.0,
> deltaTClock = 86400.0,
> abEps = 0.1,
> pChkptFreq= 311040000.,
> adjDumpFreq= 2592000.,
> adjMonitorFreq=1.,
> monitorFreq=1.,
> # 2 months restoring timescale for temperature
> tauThetaClimRelax =  5184000.0,
> # 6 months restoring timescale for salinity
> tauSaltClimRelax = 15552000.0,
> periodicExternalForcing=.TRUE.,
> externForcingPeriod=2592000.,
> externForcingCycle=31104000.,
> &
> 
> 5.) plotting the evolution of the globally averaged temperature and salinity as well as the kinetic energy over the 1040 model years shows some abrupt jumps at model year 1000 (sudden increase of kinetic energy and temperature, sudden decrease of salinity)
> 
> 
> Can anybody spot my (probably stupid) mistake?
> 
> 
> Best regards,
> 
> Nora
> 
> 
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list