Back to OASIS3-MCT home
INSTANT: no time transformation, the instantaneous
field is
transferred
ACCUMUL: the field accumulated over the previous coupling
period is exchanged
AVERAGE: the field averaged over the previous coupling period
is transferred
A restart file is associated to the LOCTRANS transformation, to avoid
loosing the information (accumulations) between the end of a run and a
new run.
It is controlled by the variable prism_coupler(cplid)%trans .
The LOCTRANS restart file is always read/written on the put side and
it's only needed for cases where the transform is not "INSTANT".
At t=0:
prism_advance_init() is called in prism_enddef : a restart file will be
read but if the file or fields do not exist, the model does NOT
abort.
The idea here is that on a real startup, it doesn't make much sense to
have past accumulations for the first run. So a restart file is
not needed to startup LOCTRANS.
The field is read with (in modprism_coupler, in routine
prism_coupler_setup, the structure prism_coupler(nc)%avect1 is
initialised with mct_avect_zero(prism_coupler(nc)%avect1)) :
call
prism_io_read_avfile(rstfile,prism_coupler(cplid)%avect1,prism_part(partid)%gsmap,abort=.false.)
If the retart file does not exists at t=0,
prism_coupler(cplid)%avect1%rAttr stays at 0.
Then when calling oasis_put, we have in prism_advance_run :
if
(prism_coupler(cplid)%trans == ip_average) then
cstring
= 'average'
do
n = 1,nsav
prism_coupler(cplid)%avect1%rAttr(nfav,n)
= &
prism_coupler(cplid)%avect1%rAttr(nfav,n)
+ array(n)
enddo
prism_coupler(cplid)%avcnt(nfav)
= prism_coupler(cplid)%avcnt(nfav) + 1
elseif
(prism_coupler(cplid)%trans == ip_accumul) then
cstring
= 'accumul'
do
n = 1,nsav
prism_coupler(cplid)%avect1%rAttr(nfav,n)
= &
prism_coupler(cplid)%avect1%rAttr(nfav,n)
+ array(n)
enddo
prism_coupler(cplid)%avcnt(nfav)
= 1
For average, the division by the number of time steps (ie
prism_coupler(cplid)%avcnt(nfav)) is done before sending the file.