Changes between Version 1 and Version 2 of schwarz_nemo


Ignore:
Timestamp:
07/22/19 17:32:01 (2 years ago)
Author:
snguyen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • schwarz_nemo

    v1 v2  
    114114The Schwarz algorithm is implemented by storing and restoring the state of the ocean and ice at the proper times. 
    115115 
    116 The routines used to store and restore a state are all in `schwarz.F90` which is a new subroutine. 
    117  
    118 The storing is done just before the schwarz looping is done: inside `iswloop` loop, before `kswr` loop. 
    119 Like this we are sure to store the initial condition of a schwarz loop. 
    120  
     116The routines used to store and restore a state are all in `schwarz.F90` which is a new module. 
     117 
     118The storing is done just before the schwarz looping is done: inside the `iswloop` loop, before the `kswr` loop. 
     119 
     120Like this we are certain to store the initial condition for a Schwarz loop. 
     121 
     122The restoring is done at the beginning of the `kswr` loop before the `istp` loop. 
     123If we are not in the first iteration the variables state is restored: 
     124{{{ 
     125IF ( kswr > 1 ) CALL swz_reinit(istp) ! reset Ocean state to first time step for new schwarz iteration 
     126}}} 
     127 
     128`Unfortunately this is not the only place variables are stored and restored!` 
     129 
     130Because NEMO is modular some implementation details are repeated in the modules some modules have their own storing and restoring details. 
     131 
     132The files concerned are: 
     133{{{ 
     134sbcmod.F90 
     135sbcrnf.F90 
     136traqsr.F90 
     137trasbc.F90 
     138}}} 
     139 
     140== Coding details: modification of other files == 
     141 
     142The routines: 
     143{{{ 
     144iom.F90 
     145step.F90 
     146}}} 
     147have been modified to output only one time serie for a set of Schwarz loops. The parameter `ksout` selects which Schwarz loop is given for outputs.  
     148 
     149Some routines have a particular behavior when `istp=nit000` or/and `istp=nitend`. They where modified to behave correctly when doing Schwarz iterations: 
     150{{{ 
     151closea.F90 
     152diaar5.F90 
     153diafwb.F90 
     154diahth.F90 
     155dynspg_ts.F90 
     156dynvor.F90 
     157fldread.F90 
     158limdyn.F90 
     159limitd_me.F90 
     160limrst.F90 
     161limthd.F90 
     162limtrp.F90 
     163limupdate1.F90 
     164limupdate2.F90 
     165restart.F90 
     166sbcblk_core.F90 
     167sbcice_lim.F90 
     168sbcssm.F90 
     169stpctl.F90 
     170traadv_eiv.F90 
     171traadv_tvd.F90 
     172trazdf_imp.F90 
     173zdftke.F90 
     174zdftmx.F90 
     175}}} 
     176 
     177Some other routines which are not compiled have also been modified for the sake of consistency. These are the routines relative to PISCES present in `ORCA1_LIM3_PISCES/MY_SRC` which get copied in `ORCA2_LIM3_PISCES`. 
     178 
     179They are: 
     180{{{ 
     181p4zflx.F90 
     182p4zsed.F90 
     183p4zsms.F90 
     184trcrst.F90 
     185trcsms_age.F90 
     186trcsms_cfc.F90 
     187trcstp.F90 
     188trcwri.F90 
     189}}} 
     190 
     191You will need these updates if you want to add PISCES support to the Schwarz algorithm. 
     192 
     193Lastly, but much more important, some files have been modified to declare the variables needed to store the parameters of the Schwarz algorithm and the storing/restoring variables. 
     194 
     195The parameters are in: 
     196{{{ 
     197in_out_manager.F90 
     198}}} 
     199and read in 
     200{{{ 
     201domain.F90 
     202}}} 
     203 
     204 
     205The "Schwarz fields" named with `_s` appended at the end of the original variable name are defined in these subroutines: 
     206{{{ 
     207dom_oce.F90 
     208dynspg_oce.F90 
     209ice.F90 
     210limdiahsb.F90 
     211oce.F90 
     212sbc_oce.F90 
     213sbcrnf.F90 
     214zdf_oce.F90 
     215zdftke.F90 
     216}}}