[MITgcm-devel] issues with xx_gentim2d
An Nguyen
antnguyen13 at gmail.com
Tue Sep 29 18:21:09 EDT 2020
hi Martin,
Tim (Smith) has put in a pull-request to fix this problem last year (I believe it's the same issue you're encountering), see: https://github.com/MITgcm/MITgcm/pull/260
cheers,
An
> On Sep 29, 2020, at 11:28, Martin Losch <Martin.Losch at awi.de> wrote:
>
> Hi all,
>
> I am having trouble with using the generic control variables. I am pretty sure this has been discussed somewhere already, but I cannot find it. I use the ecco package.
>
> Here’s the problem:
> data.cal:
> startDate_1=19470101,
>
> data:
> &PARM03
> # 2000,1,1
> nIter0=464592,
> nTimeSteps=1600,
> deltaT = 3600.,
>
> That is, I am starting from a pickup and I get about 66.66 days of integration. In data.ctrl I have this:
>
> xx_gentim2d_file(1)='xx_precip',
> xx_gentim2d_startdate1(1)=19991231,
> xx_gentim2d_startdate2(1)=180000,
> xx_gentim2d_period(1)=1209600.0,
> (but I also tried 20000101, 000000 and 6hr into the new year etc.)
>
> So the period is 14 days. My integration time is less than 5 times than that. I would expect that I get 5 records of xx_precip. In ctrl_init, 7 records are written to xx_precip.000000000.data, but in ctrl_map_ini_gentim2d the program stops while attemping "to access non-existing record in xx_precip.0000000000.data". A closer inspection reveals, that this happens when we try to read record 8 (which was never written), in fact, the loop in which this happens would go to record 2772, which is the value of endrec, the value of startrec being 2766 and diffrec is the expected 7.
>
> When I replace endrec by diffrec in quite a few places, the simulation runs (but I have no idea if it does the right thing ... for me it probably does, because there are only zeros in xx_precip.000000000.data and it doesn’t matter if I add the wrong set of zeros.)
>
> So I think that this is a bug, because the code of ctrl_map_ini_gentim2d.F assumes a startrec of 1 and totally does not work when nIter0 >> 1 (the ECCOv4 setup starts from a pickup with nIter0=1, not sure if this is a remedy that’s supposed to be universal, or it just happened to be convenient).
>
> If you agree that this is a bug, I can start an issue on github. If you think it’s a user error, then please point me in the right direction, to the documenation, or some support/devel info that can help me use this piece of code correctly. Any pointer is welcome.
>
> Martin
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list