persist

Module

Description

$Id$

Module to handle variables whose state should persist between executions of run.x, e.g. the random number seeds and some other forcing state information.

25-Apr-2005/tony: Implemented initial try at backwards compatible

additions to var.dat files.

The idea is to use integer block and record type tags to store arbitrary extra information in the var files along with the actual field information.

The integers representing the various block/record types are defined in a separate file, record_types.h. These numbers MUST remain unique and MUST not be altered, though adding new types is acceptable (else old var.dat files may become unreadable).

Quick access

Variables:

input_persist_general_by_id, input_persist_general_by_label, input_persistent_general, output_persistent_general

Routines:

input_persistent(), output_persistent()

Needed modules

Variables

  • persist/id_block_persistent [integer,private/parameter/optional/default=2000]
  • persist/id_record_dt_gw [integer,private/parameter/optional/default=350]
  • persist/id_record_eps_rkf [integer,private/parameter/optional/default=331]
  • persist/id_record_forcing_location [integer,private/parameter/optional/default=270]
  • persist/id_record_forcing_torus [integer,private/parameter/optional/default=272]
  • persist/id_record_forcing_tsforce [integer,private/parameter/optional/default=271]
  • persist/id_record_hydro_ampl [integer,private/parameter/optional/default=286]
  • persist/id_record_hydro_avec_gb [integer,private/parameter/optional/default=289]
  • persist/id_record_hydro_location [integer,private/parameter/optional/default=285]
  • persist/id_record_hydro_phase1 [integer,private/parameter/optional/default=281]
  • persist/id_record_hydro_phase2 [integer,private/parameter/optional/default=282]
  • persist/id_record_hydro_qvec_gb [integer,private/parameter/optional/default=288]
  • persist/id_record_hydro_tphase [integer,private/parameter/optional/default=280]
  • persist/id_record_hydro_tsforce [integer,private/parameter/optional/default=284]
  • persist/id_record_hydro_wavenumber [integer,private/parameter/optional/default=287]
  • persist/id_record_ism_bold_mass [integer,private/parameter/optional/default=252]
  • persist/id_record_ism_pos_next_old [integer,private/parameter/optional/default=251]
  • persist/id_record_ism_snrs [integer,private/parameter/optional/default=259]
  • persist/id_record_ism_snrs_old [integer,private/parameter/optional/default=1002]
  • persist/id_record_ism_t_cluster [integer,private/parameter/optional/default=261]
  • persist/id_record_ism_t_next_old [integer,private/parameter/optional/default=250]
  • persist/id_record_ism_t_next_sni [integer,private/parameter/optional/default=253]
  • persist/id_record_ism_t_next_snii [integer,private/parameter/optional/default=254]
  • persist/id_record_ism_toggle_old [integer,private/parameter/optional/default=1001]
  • persist/id_record_ism_toggle_sni [integer,private/parameter/optional/default=257]
  • persist/id_record_ism_toggle_snii [integer,private/parameter/optional/default=258]
  • persist/id_record_ism_x_cluster [integer,private/parameter/optional/default=255]
  • persist/id_record_ism_y_cluster [integer,private/parameter/optional/default=256]
  • persist/id_record_ism_z_cluster [integer,private/parameter/optional/default=260]
  • persist/id_record_iteration_number [integer,private/parameter/optional/default=100]
  • persist/id_record_magnetic_ampl [integer,private/parameter/optional/default=312]
  • persist/id_record_magnetic_phase [integer,private/parameter/optional/default=311]
  • persist/id_record_random_seeds [integer,private/parameter/optional/default=1]
  • persist/id_record_random_seeds2 [integer,private/parameter/optional/default=2]
  • persist/id_record_shear_delta_y [integer,private/parameter/optional/default=320]
  • persist/id_record_special_lnkmin0 [integer,private/parameter/optional/default=340]
  • persist/id_record_time_step [integer,private/parameter/optional/default=330]
  • persist/input_persist_general_by_id [private]
  • persist/input_persist_general_by_label [private]
  • persist/input_persistent_general [private]
  • persist/output_persistent_general [private]

Subroutines and functions

subroutine  persist/input_persistent([file])

Read auxiliary information from snapshot file. lun should be set to the same lun as that of the snapshot.

26-may-03/axel: adapted from output_vect

6-apr-08/axel: added input_persistent_magnetic

Parameters:

file [character,in,]

Use :

io (init_read_persist(), read_persist_id(), io_strategy()), hydro (input_persistent_hydro()), interstellar (input_persistent_interstellar()), forcing (input_persistent_forcing()), magnetic (input_persistent_magnetic()), special (input_persistent_special())

Call to:

read_persist_id(), input_persistent_hydro(), input_persistent_interstellar(), input_persistent_forcing(), input_persistent_magnetic(), init_read_persist(), init_write_persist(), output_persistent_hydro(), output_persistent_interstellar(), output_persistent_forcing(), output_persistent_special(), persist_exists(), warning()

subroutine  persist/output_persistent(file)

Write auxiliary information into snapshot file. lun should be set to the same lun as that of the snapshot

26-may-03/axel: adapted from output_vect

6-apr-08/axel: added output_persistent_magnetic

16-nov-11/MR: calls adapted 13-Dec-2011/Bourdin.KIS: reworked

Parameters:

file [character,in]

Use :

io (init_write_persist()), hydro (output_persistent_hydro()), interstellar (output_persistent_interstellar()), forcing (output_persistent_forcing()), magnetic (output_persistent_magnetic()), special (output_persistent_special())

Call to:

init_write_persist(), output_persistent_hydro(), output_persistent_interstellar(), output_persistent_forcing(), output_persistent_special(), persist_exists(), warning()