[MITgcm-devel] ptracer conservation

Jean-Michel Campin jmc at mit.edu
Wed Aug 24 09:22:34 EDT 2016


Hi Matt,

my preliminary test shows no more additional recomp in tutorial_dic_adjoffline;
currently checking the other exp. and will check-in the fix after.

Cheers,
Jean-Michel

On Wed, Aug 24, 2016 at 08:59:17AM -0400, Jean-Michel Campin wrote:
> Hi Matt,
> 
> I am trying now to update thermodynamics.F following Oliver's changes
> (made after Martin changes to fix recomp. issue). Will let you know 
> how it goes.
> 
> Cheers,
> Jean-Michel
> 
> On Tue, Aug 23, 2016 at 10:01:44PM -0700, Matthew Mazloff wrote:
> > Hello
> > 
> > Unfortunately I am still get a whole mess of recomputations due to the modifications to ptracers_apply_forcing.F 
> > 
> > Matt
> > 
> > > On Aug 23, 2016, at 5:35 AM, Martin Losch <Martin.Losch at awi.de> wrote:
> > > 
> > > Hi,
> > > 
> > > things should be fixed now, at least for the verification experiments. There's one place where I didn't check in my modifications, because they don't seem to be necessary: in autodiff_init_varia.F tSurfCor and sSurfCor are initialized but totSurfCorPtr is not. If you want to initialise it you need to include PTRACERS.h etc. but since it does not seem to be necessary ... What do you think? Not clear, where and when this is needed.
> > > 
> > > Martin
> > > 
> > > 
> > > On 08/23/2016 02:02 PM, Jean-Michel Campin wrote:
> > >> Hi Martin and Matt,
> > >> 
> > >> I think all automatic testing usually fininishes the downloading part early
> > >> in the night, about 3.am EST. so should be safe now.
> > >> 
> > >> And yes, I can see many more recomp warnings from TAF, zero digits agreement
> > >> for the cost funtion in exp. tutorial_dic_adjoffline & tutorial_global_oce_biogeo,
> > >> 
> > >> Diff for ref.compiler on ref. platform (i.e., baudelaire with gfortran -devel),
> > >> lastnight vs yesterday night:
> > >> < Y Y Y Y  0>16<16 pass  tutorial_dic_adjoffline  (e=0, w=19)
> > >> < Y Y Y Y  0>16<16 pass  tutorial_global_oce_biogeo  (e=0, w=41)
> > >> < Y Y N N .. .. .. N/O   tutorial_global_oce_optim
> > >> < Y Y Y Y 16>16<16 pass  tutorial_tracer_adjsens  (e=0, w=50)
> > >> ---
> > >>> Y Y Y Y 16>16<16 pass  tutorial_dic_adjoffline  (e=0, w=1)
> > >>> Y Y Y Y 16>16<16 pass  tutorial_global_oce_biogeo  (e=0, w=6)
> > >>> Y Y Y Y 16>16< 8 pass  tutorial_global_oce_optim  (e=0, w=2)
> > >>> Y Y Y Y 16>16<16 pass  tutorial_tracer_adjsens  (e=0, w=34)
> > >> Note that tutorial_global_oce_optim just failed to get access to TAF, nothing
> > >> related to code changes.
> > >> 
> > >> Cheers,
> > >> Jean-Michel
> > >> 
> > >> On Tue, Aug 23, 2016 at 10:00:25AM +0200, Martin Losch wrote:
> > >>> Hi Matt,
> > >>> 
> > >>> sorry, did not think of the adjoint.
> > >>> 
> > >>> I will check in a fix later today after all the adjoint tests are more or less complete in order to minimize the confusion about excessive warnings in the tests.
> > >>> 
> > >>> Martin
> > >>> 
> > >>> 
> > >>>> On 23 Aug 2016, at 01:21, Matthew Mazloff <mmazloff at ucsd.edu> wrote:
> > >>>> 
> > >>>> Hi Martin
> > >>>> 
> > >>>> Unfortunately this is causing major recomputations. I was able to fix one with an extra ptracer store in thermodynamics.F. Analogous to lines 140 to 142 but for ptracer, and starting on line 155.
> > >>>> 
> > >>>> But I still have a lot of the nature:
> > >>>> TAF RECOMPUTATION LOOP WARNING DOLOOP_STMT ad_input_code.f:476756 in the_main_loop
> > >>>> extensive recomputations are required.
> > >>>> The responsible variables are : totsurfcorptr
> > >>>> 
> > >>>> I tried putting a store of ???totsurfcorptr??? in ptracers_ad_check_lev?_dir.h but that didn???t help
> > >>>> 
> > >>>> I have to run but can work on this more tonight
> > >>>> 
> > >>>> -Matt
> > >>>> 
> > >>>> 
> > >>>>> On Aug 22, 2016, at 7:43 AM, Martin Losch <Martin.Losch at awi.de> wrote:
> > >>>>> 
> > >>>>> Hi Bruno,
> > >>>>> 
> > >>>>> I just added your code (with a slight modification in ptracers_readparms.F). Please test, if you find this OK.
> > >>>>> 
> > >>>>> The verification results are not changed, but we may want to change one of the experiements to use this flag (actually: linFSConserveTr). Does global_ocean.90x40x15.dwnslp make sense? There, one ptracer is used to mimic salinity and we have linear free surface.
> > >>>>> 
> > >>>>> Martin
> > >>>>> 
> > >>>>> On 07/27/2016 09:27 PM, Bruno Deremble wrote:
> > >>>>>> 
> > >>>>>> Hi,
> > >>>>>> 
> > >>>>>> I was looking with a student at an offline configuration for tracer
> > >>>>>> advection. The (u,v) velocity field comes form another model (Hycom) and
> > >>>>>> has a divergent component. With an implicit free surface, it seems that
> > >>>>>> the tracer field is not conserved.
> > >>>>>> 
> > >>>>>> For some reason the correction term needed to conserve the ptracer with
> > >>>>>> a free surface is only partly implemented (cf. flag PTRACERS_calcSurfCor
> > >>>>>> in thermodynamics.F)
> > >>>>>> 
> > >>>>>> I finished the implementation in a similar way than what is currently
> > >>>>>> done for temperature and salinity.
> > >>>>>> 
> > >>>>>> the modified files are (cf. attached) :
> > >>>>>> ptracers_calc_wsurf_tr.F
> > >>>>>> ptracers_apply_forcing.F
> > >>>>>> ptracers_readparms.F
> > >>>>>> 
> > >>>>>> and the associated flag is PTRACERS_calcSurfCor (set by default to false)
> > >>>>>> 
> > >>>>>> these are minor modifications but I think it could be helpful to add it
> > >>>>>> to the main mitgcm.
> > >>>>>> 
> > >>>>>> thanks
> > >>>>>> bruno
> > >>>>>> 
> > >>>>>> 
> > >>>>>> 
> > >>>>>> _______________________________________________
> > >>>>>> MITgcm-devel mailing list
> > >>>>>> MITgcm-devel at mitgcm.org
> > >>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > >>>>>> 
> > >>>>> 
> > >>>>> --
> > >>>>> Martin Losch
> > >>>>> Alfred Wegener Institute for Polar and Marine Research
> > >>>>> Postfach 120161, 27515 Bremerhaven, Germany;
> > >>>>> Tel./Fax: ++49(0471)4831-1872/1797
> > >>>>> 
> > >>>>> 
> > >>>>> _______________________________________________
> > >>>>> MITgcm-devel mailing list
> > >>>>> MITgcm-devel at mitgcm.org
> > >>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > >>>> 
> > >>>> 
> > >>>> _______________________________________________
> > >>>> MITgcm-devel mailing list
> > >>>> MITgcm-devel at mitgcm.org
> > >>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > >>> 
> > >>> 
> > >>> _______________________________________________
> > >>> MITgcm-devel mailing list
> > >>> MITgcm-devel at mitgcm.org
> > >>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > >> 
> > >> _______________________________________________
> > >> MITgcm-devel mailing list
> > >> MITgcm-devel at mitgcm.org
> > >> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > >> 
> > > 
> > > -- 
> > > Martin Losch
> > > Alfred Wegener Institute for Polar and Marine Research
> > > Postfach 120161, 27515 Bremerhaven, Germany;
> > > Tel./Fax: ++49(0471)4831-1872/1797
> > > 
> > > 
> > > _______________________________________________
> > > MITgcm-devel mailing list
> > > MITgcm-devel at mitgcm.org
> > > http://mitgcm.org/mailman/listinfo/mitgcm-devel
> > 
> > 
> > _______________________________________________
> > MITgcm-devel mailing list
> > MITgcm-devel at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-devel
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel



More information about the MITgcm-devel mailing list