[MITgcm-support] Adding multiple tracers to MITgcm

Dhruv Balwada db194 at nyu.edu
Wed Nov 15 18:30:18 EST 2017


Hi Jean-Michel, 

Thanks a ton for this response. It fixed my problem. 

Thanks,
Dhruv 

> On Nov 15, 2017, at 5:51 PM, Jean-Michel Campin <jmc at mit.edu> wrote:
> 
> Hi Dhruv,
> 
> One possible explanation could be the following:
> - you compile with maskLEN set to 3 in RBCS_SIZE.h, either because you
>   are using the default RBCS_SIZE.h (from pkg/rbcs) or because you did
>   not change it from the single ptracer case.
> - but at run-time, as you try to read RBCS_PARM01, this line:
>> relaxMaskFile(4)='tracer_mask.bin',
>   cause an error since relaxMaskFile has only maskLEN size.
>   If you were compiling with some check-bounds option, this would produce
>   a more explicit error message like this one:
>> At line 2058 of file rbcs_readparms.f (unit = 11, file = 'scratch1.000000000')
>> Fortran runtime error: Index 1 out of range for namelist variable relaxmaskfile
> 
> If this is the case, you could either:
> - recompile with a customized RBCS_SIZE.h in which maskLEN = 4
> or
> - since you are using the same binary mask-file (in your case: tracer_mask.bin)
>   for both tracers, you could just comment out this line:
>> relaxMaskFile(4)='tracer_mask.bin',
>   and the same mask will be used for both tracers.
>   Note that this setting is reported in STDOUT:
>> (PID.TID 0000.0001)  ---  RBCS_INIT_FIXED: setting RBCS mask  ---
>   so you should be able to check.
> 
> Cheers,
> Jean-Michel
> 
> On Wed, Nov 15, 2017 at 03:09:20PM -0500, Dhruv Balwada wrote:
>> Hi Jean-Michel, 
>> 
>> Thanks for the suggestions. I incorporated them both. 
>> Here is the STDOUT output (attached file as well). 
>> (PID.TID 0000.0001)  PTRACERS_READPARMS: finished reading data.ptracers
>> (PID.TID 0000.0001)  RBCS_READPARMS: opening data.rbcs
>> (PID.TID 0000.0001)  OPEN_COPY_DATA_FILE: opening file data.rbcs
>> (PID.TID 0000.0001) // =======================================================
>> (PID.TID 0000.0001) // Parameter file "data.rbcs"
>> (PID.TID 0000.0001) // =======================================================
>> (PID.TID 0000.0001) > &RBCS_PARM01
>> (PID.TID 0000.0001) >  rbcsForcingPeriod=0.,
>> (PID.TID 0000.0001) >  useRBCptracers=.TRUE.,
>> (PID.TID 0000.0001) >  relaxMaskFile(3)='tracer_mask.bin',
>> (PID.TID 0000.0001) >  relaxMaskFile(4)='tracer_mask.bin',
>> (PID.TID 0000.0001) > &
>> (PID.TID 0000.0001) > &RBCS_PARM02
>> (PID.TID 0000.0001) >  useRBCptrnum(1)=.TRUE.,
>> (PID.TID 0000.0001) >  tauRelaxPTR(1)=1000.,
>> (PID.TID 0000.0001) >  relaxPtracerFile(1)='tracer_relax.bin',
>> (PID.TID 0000.0001) >  useRBCptrnum(2)=.TRUE.,
>> (PID.TID 0000.0001) >  tauRelaxPTR(2)=1000.,
>> (PID.TID 0000.0001) >  relaxPtracerFile(2)='tracer_relax.bin',
>> (PID.TID 0000.0001) > &
>> (PID.TID 0000.0001)
>> "STDOUT.0000" 304L, 16658C                                                                                                              304,1         Bot
>> 
>> I have the simulation running with one tracer. Am I supposed to define some extra flags when I use more than one tracer? 
>> There is no error in STDERR.0000 
>> 
>> Thanks,
>> Dhruv
>> 
>> 
>> 
>>> On Nov 15, 2017, at 2:50 PM, Jean-Michel Campin <jmc at mit.edu> wrote:
>>> 
>>> Hi Dhruv,
>>> 
>>> 2 (short) suggestions:
>>> 
>>> 1) rbcsForcingPeriod is a real parameter, so I would try to specify:
>>>> rbcsForcingPeriod=0.,
>>>  instead of:
>>>> rbcsForcingPeriod=0,
>>> 
>>> 2) If you want to be sure that your are getting everything written in STDOUT.#####
>>> (not retained in an IO buffer and lost as the model stops) you could specify:
>>> a) in "eedata":
>>>> debugMode=.TRUE.,
>>> b) in "data", PARM01 namelist:
>>>> debugLevel=2,
>>> This will flush the IO buffer so that it should be easier to see 
>>> where the model stops.
>>> 
>>> Cheers,
>>> Jean-Michel
>>> 
>>> On Wed, Nov 15, 2017 at 01:30:37PM -0500, Dhruv Balwada wrote:
>>>> Hello,
>>>> 
>>>> I am doing an experiment with MITgcm using multiple tracers that are restored at a certain boundary. I am using the rbcs and ptracers package. The simulations works when I only restore one of the tracers, but when I add multiple tracers to the data.rbcs file I start getting the error - 
>>>> 
>>>> 'forrtl: severe (19): invalid reference to variable in NAMELIST input, unit 11, file /var/tmpdata/fortew5BaY, line 5, position 18
>>>> Image              PC                Routine            Line        Source
>>>> libifcore.so.5     00002B14AF4B7A28  Unknown               Unknown  Unknown
>>>> ???
>>>> 
>>>> I think this error implies that there is some typo in the data files, and probably in data.rbcs because that where the STDOUT stopped. However, I can???t find any thing that seems out of place. 
>>>> Here is the text from data.rbcs - 
>>>> &RBCS_PARM01
>>>> rbcsForcingPeriod=0,
>>>> useRBCptracers=.TRUE.,
>>>> relaxMaskFile(3)='tracer_mask.bin',
>>>> relaxMaskFile(4)='tracer_mask.bin',
>>>> &
>>>> &RBCS_PARM02
>>>> useRBCptrnum(1)=.TRUE.,
>>>> tauRelaxPTR(1)=1000.,
>>>> relaxPtracerFile(1)='tracer_relax.bin',
>>>> useRBCptrnum(2)=.TRUE.,
>>>> tauRelaxPTR(2) =100000.,
>>>> relaxPtracerFile(2)='tracer_relax.bin',
>>>> &
>>>> 
>>>> And here is the text from data.ptracers -
>>>> &PTRACERS_PARM01
>>>> PTRACERS_Iter0=4147200,
>>>> PTRACERS_numInUse=3,
>>>> PTRACERS_names(1)='TRAC01',
>>>> PTRACERS_names(2)='TRAC02',
>>>> PTRACERS_names(3)='TRAC03',
>>>> &
>>>> 
>>>> 
>>>> Any suggestions would be appreciated. 
>>>> 
>>>> Thank you,
>>>> Dhruv 
>>> 
>>>> _______________________________________________
>>>> 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
>> 
> 
>> _______________________________________________
>> 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



More information about the MITgcm-support mailing list