[MITgcm-support] Loading a new variable

Martin Losch Martin.Losch at awi.de
Thu Nov 26 06:11:07 EST 2009


I am not sure what your exact requirements are, but I think it would  
be easier to use and/or modify obcs_calc.F (if you are using open  
boundaries). You can either specify a 2D field as constant interval  
(the extreme being at each time step and I agree that's expensive), or  
you could read the field once (with the help of obcs_prescribe_read  
and zero reading period) and modify it at every time step with exp(iwt).

tRef is only applied once at the beginning of the integration. You'd  
need to modify theta in many places of the code (unless you want to do  
some kind of restoring, then you could add that in external_forcing_t  
(external_forcing.F).

Martin

On Nov 26, 2009, at 11:46 AM, Nicolas Grisouard wrote:

> Hi,
>
> I think I tried like a year ago (not sure what the exact package was  
> though). I might have not gotten it right but I came to the  
> conclusion that I only had 2 options: either to set a constant  
> forcing (which seems to be te case in exp4, but which is not the  
> case in my experiment) or to reload a new file at each time step,  
> which was nearly doubling the computing time.
>
> My idea is to load the spatial stucture of the forcing once and for  
> all, like tRef, and then to apply a time propagator at each time  
> step. The spatial structure as no simple analytical formulation,  
> unlike the time propagator which is simply exp(iwt). Following  
> Jody's links, I am modifying load_ref_files.F to add a new variable  
> and I think it should work... shouldn't it?
>
> Nico.
>
> Le 26 nov. 09 à 10:36, Martin Losch a écrit :
>
>> Why don't you use the obcs package? As a simple example see exp4  
>> (you'll need to specify 2D fields instead of profiles, though).
>>
>> Martin
>>
>> On Nov 25, 2009, at 5:52 PM, Nicolas Grisouard wrote:
>>
>>> Hi everyone,
>>>
>>> I am trying to set a quite unusual forcing on a boundary which has  
>>> no simple analytical expression (it has one though). I think that  
>>> the best option would imply loading a variable that I would have  
>>> defined on matlab first.
>>>
>>> The way I see it, I would proceed the same way I load the  
>>> temperature reference:
>>> tRefFile='tRefvar',
>>> tRefvar being a file having been created with gendata.m. I want to  
>>> do that but with a new variable.
>>>
>>> I am not used to modify the code at that level and I can't see  
>>> what steps happen between the file data and the definition of the  
>>> variable tRef, which would help me introducing my new file. Could  
>>> anyone give me some hints, either about the chain of files  
>>> involved in the definition of tRef or how to load my variable from  
>>> the beginning?
>>>
>>> Thanks!
>>> Nicolas
>>>
>>> -- 
>>> Nicolas Grisouard
>>> PhD Student - ERES research group
>>> Laboratoire des Ecoulements Geophysiques et Industriels
>>> BP53
>>> GRENOBLE CEDEX 9 FRANCE
>>> tel : +33 (0) 476 825 037 - fax : +33 (0) 476 827 022
>>> http://nicolas.grisouard.free.fr
>>>
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
> -- 
> Nicolas Grisouard
> PhD Student - ERES research group
> Laboratoire des Ecoulements Geophysiques et Industriels
> BP53
> GRENOBLE CEDEX 9 FRANCE
> tel : +33 (0) 476 825 037 - fax : +33 (0) 476 827 022
> http://nicolas.grisouard.free.fr
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list