[MITgcm-support] Issue of restarting adjoint run with time-variant controls

Yueyang Lu ylu06 at mit.edu
Tue Apr 28 10:21:03 EDT 2026


Hello Jean-Michel,

Thank you for the information!

I was using an older version of code. I replaced “ctrl_get_gen_rec.F” with the updated one and recompiled the model. The issue was then resolved.

Best,
Yueyang

From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Jean-Michel Campin <jmc at mit.edu>
Date: Tuesday, April 28, 2026 at 9:58 AM
To: mitgcm-support at mitgcm.org <mitgcm-support at mitgcm.org>
Subject: Re: [MITgcm-support] Issue of restarting adjoint run with time-variant controls

Hi Yueyang Lu,

There has been some fixes in the last few years for the start/restart of gentim2d control,
the latest beeing: https://github.com/MITgcm/MITgcm/pull/934 (merged on 2025-10-22),
so could you confirm that you are using a recent version of MITgcm code ?

And also, are you using "pkg/cal" and if yes could you provide the content of "data.cal" ?

Cheers,
Jean-Michel

On Fri, Apr 24, 2026 at 05:31:22PM +0000, Yueyang Lu wrote:
> Hello,
>
> I am trying to run the adjoint with a time-dependent control variable (xx_atemp) starting from a restart file (e.g., pickup.0000149028.data). In ?data", I set:
> nIter0 = 149028
> nTimeSteps = 8
> and in ?data.ctrl":
> xx_gentim2d_weight(1) = 'wt_ones_2dm.data',
> xx_gentim2d_file(1)   = 'xx_atemp',
> xx_gentim2d_period(1) = 7200.0,
> mult_gentim2d(1)      = 1.,
> However, I encounter the following error related to the number of records for the effective control variable:
> At line 2493 of file mdsio_read_field.f
> (unit = 9, file = 'xx_atemp.effective.0000000012.data')
> Fortran runtime error: Non-existing record number
> This error disappears if I start from the initial time instead (i.e., nIter0 = 1) with other parameters remaining the same.
>
> Does anyone happen to know how to address this issue in a general way? I greatly appreciate any suggestions or guidance!
>
> Best regards,
> Yueyang Lu
>
>

> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20260428/d5a8bf26/attachment.html>


More information about the MITgcm-support mailing list