Corfield
 All Classes Namespaces Files Functions Variables Pages
Classes | Functions | Variables
read_fieldline_corfield Namespace Reference

Classes

class  CORFIELDError
 

Functions

def read_ascii
 Master routine for reading CORFIELD/Ascii different formats. More...
 
def read_ascii_v0
 Read CORFIELD Ascii Fieldline format v0 and return a list of 1 fieldline. More...
 
def read_ascii_v1
 Read CORFIELD Ascii Fieldline format v1 and return a list of 1 fieldline. More...
 
def read_ascii_v2
 Read ascii v2 format fieldline file from CORFIELD. More...
 
def write_ascii_v0
 Write ascii v0 format fieldline file from CORFIELD. More...
 
def write_ascii_v2
 Write ascii v2 format fieldline file from CORFIELD. More...
 

Variables

float rsun2km = 6.957e5
 

Function Documentation

def read_fieldline_corfield.read_ascii (   filepath)

Master routine for reading CORFIELD/Ascii different formats.

Here is the call graph for this function:

Here is the caller graph for this function:

def read_fieldline_corfield.read_ascii_v0 (   ifile)

Read CORFIELD Ascii Fieldline format v0 and return a list of 1 fieldline.

Returns
List of 1 module_fieldline.Fieldline() object.

CORFIELD ASCII Fieldline V0-format is the following:
Header: No header
Data: Written with this format (6F12.6):

  • r(1) phi(1) the(1) br(1) bphi(1) bthe(1)
  • ...
  • r(nsize) phi(nsize) the(nsize) br(nsize) bphi(nsize) bthe(nsize)

where:

  • r : radial distance (Rsun)
  • phi : longitude (degree)
  • the : latitude (degree)
  • br : radial magnetic field (Gauss)
  • bphi: zonal magnetic field (Gauss)
  • bthe: meridional magnetic field (Gauss)

Here is the caller graph for this function:

def read_fieldline_corfield.read_ascii_v1 (   ifile)

Read CORFIELD Ascii Fieldline format v1 and return a list of 1 fieldline.

Returns
List of 1 module_fieldline.Fieldline() object.

CORFIELD ASCII Fieldline V1-format is the following:
Header: No header
Data: Written with this format (7F12.6):

  • curv(1) r(1) phi(1) the(1) br(1) bphi(1) bthe(1)
  • ...
  • curv(nsize) r(nsize) phi(nsize) the(nsize) br(nsize) bphi(nsize) bthe(nsize)

where:

  • curv: curvilinear abscissa (km)
  • r : radial distance (Rsun)
  • phi : longitude (degree)
  • the : latitude (degree)
  • br : radial magnetic field (Gauss)
  • bphi: zonal magnetic field (Gauss)
  • bthe: meridional magnetic field (Gauss)

Here is the caller graph for this function:

def read_fieldline_corfield.read_ascii_v2 (   ifile)

Read ascii v2 format fieldline file from CORFIELD.

Parameters
[in]ifile,:file ID of an open file
[out]fieldlines,:List of module_fieldline.Fieldlines objects in HGC coordinates.

V2-format for CORFIELD fieldline file is the following (quite the same as SWD V0 ascii format):
Header (9 lines):

  • #Version 2
  • #nline X
  • #iline nsize
  • #R(1..nsize) (Rsun)
  • #Phi(1..nsize) (degree)
  • #The(1..nsize) (degree)
  • #Br(1..nsize) (Gauss)
  • #Bphi(1..nsize) (Gauss)
  • #Bthe(1..nsize) (Gauss)

Data: Written on nline * 7 lines.

  • iline nsize
  • R(1..nsize)
  • Phi(1..nsize)
  • The(1..nsize)
  • Br(1..nsize)
  • Bphi(1..nsize)
  • Bthe(1..nsize)

Here is the caller graph for this function:

def read_fieldline_corfield.write_ascii_v0 (   fieldlines,
  filepath 
)

Write ascii v0 format fieldline file from CORFIELD.

Only for 1 fieldline!

Parameters
[in]fieldline,:List of 1 module_fieldline.Fieldline objects in HGC coordinate.
[in]filepath
def read_fieldline_corfield.write_ascii_v2 (   fieldlines,
  filepath 
)

Write ascii v2 format fieldline file from CORFIELD.

Parameters
[in]fieldlines,:List of module_fieldline.Fieldline objects in HGC coordinate.
[in]filepath

Variable Documentation

float read_fieldline_corfield.rsun2km = 6.957e5