Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2014-06-13 08:22:05
Size: 3805
Editor: NicoleThomas
Comment:
Revision 9 as of 2016-05-25 07:26:35
Size: 5045
Editor: NicoleThomas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= MESSy/CLaMS = = MESSy/CLaMS: Restarts =
Line 3: Line 3:
== Restarts ==  * If the restart event is triggered, the status of the model is dumped with full precision to restart files
Line 5: Line 5:
 * Am Ende des Laufes werden Restart-Files geschrieben  * At the end of a MESSy simulation restart files are written.
Line 7: Line 7:
 * Es können zusaetzlich Restart-Files in einem vorgegebenen Zeittakt erstellt werden.
 Die entsprechenden Einstellungen werden in ''messy/nml/DEFAULTS/timer.nml'' vorgenommen:

 * Restart files can be written in a given simulation time interval. The simulation can be interrupted and restarted automatically when a given number of cycles is reached (TIMER-User-Manual, 4.4). The interval and the number of cycles can be specified in '''messy/nml/DEFAULTS/timer.nml''', e.g.:
Line 10: Line 10:
    IO_RERUN_EV = 1,'month','first',0,
    NO_CYCLES = 12 ! restart cycles without break
IO_RERUN_EV = 1,'month','first',0,
NO_CYCLES = 12 ! restart cycles without break
Line 13: Line 13:
  => Restart-Files jeden Monat, nach 12 Zyklen wird der Lauf unterbrochen und neu gestartet (s. TIMER-User-Manual)
Line 15: Line 14:
 * Nach einer bestimmten Laufzeit (Anz. CPU-Stunden) kann ein automatischer Restart erfolgen.
 Die Anzahl Rechenstunden wird in ''qtimer.nml'' vorgegeben, z. B.:
 => Restart files are witten at the beginning of a new month and after 12 months the simulation will be interrupted and restarted automatically.
<<BR>>
 
 * If the job is submitted to a queue manager, it might be necessary to split the simulation into chain elements. The submodel QTIMER triggers the restart just before the maximum time reserved by the scheduler is reached (Development cycle 2 of the Modular Earth Submodel System, section 4). The queue time limit and the usable fraction can be specified in '''qtimer.nml''', e.g.:
Line 19: Line 20:
QTIME = 4,0,0, ! Queue-Zeitlimit (hh,mm,se); 0,0,0: kein Limit
QCLOCK = 'wall', ! 'wall'|'cpu'|'user'|#sys'
QFRAC = 0.95 ! Anteil des Zeitlimits, nachdem der Lauf unterbrochen und Restart-Files geschrieben werden
 }}}
   (s. Development cycle 2 of the Modular Earth Submodel System)
    
QTIME = 4,0,0, ! queue time limit (hh,mm,se); 0,0,0 to switch off
QCLOCK = 'wall', ! queue clock type (wall|cpu|user|sys)
QFRAC = 0.95 ! usable fraction of queue time limit
}}}

 => When 95% of 4 hours CPU time are reached, restart files are written and the next chain-element is started.


 * If the file '''MSH_NO''' is in the working-directory, the model is started in rerun-mode. MSH_NO contains the number of the last chain-element. <<BR>>
 If you want run the simulation again from the beginning, remove file MSH_NO before starting the run script.

 * All files needed for a rerun starting from a specific chain element are saved in the subdirectory ''save/NNNN'' of the working directory.
   NNNN is the 4-digit number of the last complete chain element.

 * The restart files of the last chain-element are linked into the working directory

 * In order to start a rerun with chain element NNNN+1, the script '''messy/util/init_restart''' can be used to link the correct restart files:
 {{{
  init_restart -r NNNN -c MMMM [-d dir]
}}}

 NNNN: restart number <<BR>>
 MMMM: cycle number

 * The name of the experiment (''EXP_NAME'' in run-script) must not contain the substring ''restart''. <<BR>>
 All files ''*restart*'' are removed before linking the current restart files.


-----
Line 33: Line 58:
  * restart_cccc_CLAMS.nc
  * restart_cccc_clamstraj.nc
Line 41: Line 64:
  * restart_cccc_CLAMS.nc
Line 54: Line 78:
   => FÜr jedes dieser Submodule läßt sich der Output (und damit auch das Restartfile) ausschalten (in Namelist: ''loutput_paketname=.false.'')  => Für jedes dieser Submodule läßt sich der Output (und damit auch das Restartfile) ausschalten (in zugehöriger Namelist: ''loutput_paketname=.false.'')
Line 56: Line 80:
 * Die Nummer des letzten Laufes steht auf der Datei ''MSH_NO''.
 Die ab der aktuellen Zeit zu nutzenden Restart-Files sind in das Ausgabeverzeichns gelinkt. <<BR>>
   * Bei einem Neustart wird dort aufgesetzt <<BR>>
   * Soll von Beginn neu gestartet werden, muss die Datei ''MSH_NO'' gelöscht werden <<BR>>
   * Soll an einer anderen Stelle wieder aufgesetzt werden, kann man die entsprechenden Einstellungen mit dem folgenden Skript vornehmen:
  {{{
  init_restart -r nnnn -c mmmm [-d dir]
  }}}
  nnnn: restart number <<BR>>
  mmmm: cycle number
 * Ausgabe auf Restart-Files in MESSy-CLaMS:
Line 67: Line 82:
 * Ausgabe auf Restart-Files:   * In einzelnen Submodules (aus SMIL-Routinen) wird ''messy_write_output'' (''messy_main_control_clams.f90'') aufgerufen <<BR>>
  * In ''messy_write_output'' wird ''messy_channel_write_output'' (''messy_main_channel_bi.f90'') mit ''IOMODE_OUT'' aufgerufen <<BR>>
  => schreibe Channels/Channelobjekte auf Output-File
  *In ''messy_write_output'' wird ''messy_channel_write_output'' mit ''IOMODE_RST'' aufgerufen, falls ''l_rerun=.true.'' <<BR>>
  => schreibe Channels/Channelobjekte auf Restart-File (falls Restart-Event gesetzt)
  * program clams (clams_main.f90), innerhalb der Zeitschleife: <<BR>>
    -> sub. messy_global_start (messy_main_control_clams.f90) <<BR>>
       -> sub. main_timer_global_start (messy_main_timer_bi.f90) <<BR>>
          -> setze l_rerun: (true, wenn nächster Rerun-Ausgabezeitschritt oder maximale Rechenzeit erreicht)
Line 69: Line 92:
  * In einzelnen Submodules (aus SMIL-Routinen) wird ''messy_write_output'' aufgerufen (''messy_main_control_clams.f90'') <<BR>>
  In ''messy_write_output'' wird ''messy_channel_write_output'' aufgerufen (''messy_main_channel_bi.f90'') mit IOMODE_OUT und mit IOMODE_RST <<BR>>
  => schreibe Channels/Channelobjekte für IOMODE_OUT auf Output-File, für IOMODE_RST auf Restart-File
 * Einlesen der Restart-Files in MESSy-CLaMS:
Line 73: Line 94:
  * program clams (clams_main.f90)
    innerhalb der Zeitschleife:
    -> sub. messy_global_start (messy_main_control_clams.f90)
       -> sub. main_timer_global_start (messy_main_timer_bi.f90)
          -> setze l_rerun: (true, wenn event auftritt oder Ende des Laufes)

 * Restart-Files einlesen:

  clams_main
    -> messy_channel_read_restart (messy_main_channel_bi.f90)
      -> channel_read_data (messy_main_channel_io.f90)
  clams_main <<BR>>
    -> messy_channel_read_restart (messy_main_channel_bi.f90) <<BR>>
      -> channel_read_data (messy_main_channel_io.f90) <<BR>>
Line 87: Line 100:
  messy/echam5/bmil/messy_main_control_e5.f90:
    sub. messy_write_output
      -> messy_channel_write_output(IOMODE_OUT) (messy_main_channel_bi.f90)
    in echam5/src/stepon.f90
      -> messy_channel_write_output(IOMODE_RST)
  messy/echam5/bmil/messy_main_control_e5.f90: <<BR>>
    sub. messy_write_output <<BR>>
      -> messy_channel_write_output(IOMODE_OUT) (messy_main_channel_bi.f90) <<BR>>
    in echam5/src/stepon.f90 <<BR>>
      -> messy_channel_write_output(IOMODE_RST)  <<BR>>
Line 93: Line 106:
  Z.B. restart-Files einmal pro Monat:
    messy/nml/DEFAULTS/timer.nml:
  Z.B. Restart-Files einmal pro Monat: <<BR>>
    In ''messy/nml/DEFAULTS/timer.nml'': <<BR>>

MESSy/CLaMS: Restarts

  • If the restart event is triggered, the status of the model is dumped with full precision to restart files
  • At the end of a MESSy simulation restart files are written.
  • Restart files can be written in a given simulation time interval. The simulation can be interrupted and restarted automatically when a given number of cycles is reached (TIMER-User-Manual, 4.4). The interval and the number of cycles can be specified in messy/nml/DEFAULTS/timer.nml, e.g.:

    IO_RERUN_EV = 1,'month','first',0,
    NO_CYCLES   = 12           ! restart cycles without break

    => Restart files are witten at the beginning of a new month and after 12 months the simulation will be interrupted and restarted automatically.


  • If the job is submitted to a queue manager, it might be necessary to split the simulation into chain elements. The submodel QTIMER triggers the restart just before the maximum time reserved by the scheduler is reached (Development cycle 2 of the Modular Earth Submodel System, section 4). The queue time limit and the usable fraction can be specified in qtimer.nml, e.g.:

    &CTRL
    QTIME  =  4,0,0,  ! queue time limit (hh,mm,se); 0,0,0  to switch off
    QCLOCK = 'wall',  ! queue clock type (wall|cpu|user|sys)
    QFRAC  = 0.95     ! usable fraction of queue time limit

    => When 95% of 4 hours CPU time are reached, restart files are written and the next chain-element is started.

  • If the file MSH_NO is in the working-directory, the model is started in rerun-mode. MSH_NO contains the number of the last chain-element.
    If you want run the simulation again from the beginning, remove file MSH_NO before starting the run script.

  • All files needed for a rerun starting from a specific chain element are saved in the subdirectory save/NNNN of the working directory.

    • NNNN is the 4-digit number of the last complete chain element.
  • The restart files of the last chain-element are linked into the working directory
  • In order to start a rerun with chain element NNNN+1, the script messy/util/init_restart can be used to link the correct restart files:

      init_restart -r NNNN -c MMMM [-d dir]

    NNNN: restart number
    MMMM: cycle number

  • The name of the experiment (EXP_NAME in run-script) must not contain the substring restart.
    All files *restart* are removed before linking the current restart files.


  • Folgende Restart-Files werden bei einem CLaMS-Lauf erstellt:
    • restart_cccc_clams.nc:
      • dnparts
      • grid_switch
      • year_uvfirst, month_uvfirst, day_uvfirst, hour_uvfirst
      • chem. Spezies
      • JULSEC
      • LAT, LAT_OLD, LAT_OLD_MIX
      • LON, LON_OLD, LON_OLD_MIX
      • LEV, LEV_OLD
      • TEMP, TEMP_OLD
      • PRESS, PRESS_OLD
    • restart_cccc_CLAMS.nc
    • restart_cccc_winddata.nc
      • LAT, LON, LEV
      • UDT, VDT, WDT, LEVELDT
      • UFUT, VFUT, WFUT, LEVELFUT
      • PREDATA_TEMP, FUTDATA_TEMP
      • PREDATA_PRESS, FUTDATA_PRESS
  • Es werden Restart-Files für jeweils bis zu 5 Zyklen erstellt (da in jeder der entsprechenden SMIL-Routinen messy_write_output aufgerufen wird!) :

    • nach traj
    • nach dissoc
    • nach chem
    • nach mix
    • nach bmix

    => Für jedes dieser Submodule läßt sich der Output (und damit auch das Restartfile) ausschalten (in zugehöriger Namelist: loutput_paketname=.false.)

  • Ausgabe auf Restart-Files in MESSy-CLaMS:
    • In einzelnen Submodules (aus SMIL-Routinen) wird messy_write_output (messy_main_control_clams.f90) aufgerufen

    • In messy_write_output wird messy_channel_write_output (messy_main_channel_bi.f90) mit IOMODE_OUT aufgerufen
      => schreibe Channels/Channelobjekte auf Output-File

    • In messy_write_output wird messy_channel_write_output mit IOMODE_RST aufgerufen, falls l_rerun=.true.
      => schreibe Channels/Channelobjekte auf Restart-File (falls Restart-Event gesetzt)

    • program clams (clams_main.f90), innerhalb der Zeitschleife:

      • -> sub. messy_global_start (messy_main_control_clams.f90)

        • -> sub. main_timer_global_start (messy_main_timer_bi.f90)

          • -> setze l_rerun: (true, wenn nächster Rerun-Ausgabezeitschritt oder maximale Rechenzeit erreicht)

  • Einlesen der Restart-Files in MESSy-CLaMS:
    • clams_main

      • -> messy_channel_read_restart (messy_main_channel_bi.f90)

        • -> channel_read_data (messy_main_channel_io.f90)

  • Restart-Files in ECHAM:
    • messy/echam5/bmil/messy_main_control_e5.f90:

      • sub. messy_write_output

        • -> messy_channel_write_output(IOMODE_OUT) (messy_main_channel_bi.f90)

        in echam5/src/stepon.f90

        • -> messy_channel_write_output(IOMODE_RST)

      Z.B. Restart-Files einmal pro Monat:

      • In messy/nml/DEFAULTS/timer.nml:

        • IO_RERUN_EV = 1,'months','first',0,

messy/Restart (last edited 2023-01-31 10:52:36 by NicoleThomas)