MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
Functions/Subroutines | Variables
mod_pfss Module Reference

module mod_pfss.t – potential field source surface model PURPOSE : to extrapolate global potential magnetic field of the sun from synoptic magnetograms 2013.11.04 Developed by S. Moschou and C. Xia 2014.04.01 Allow to change source surface (C. Xia) PRECONDITIONS: More...

Functions/Subroutines

subroutine, public harm_coef (mapname)
 
subroutine, public pfss (ixil, ixol, bpf, x)
 

Variables

double precision, public r_s =2.5d0
 
double precision, public r_0 =1.d0
 
integer, public lmax =0
 
logical, public trunc =.false.
 
character(len=20), public pfss_theta_quadrature ='cell_area'
 

Detailed Description

module mod_pfss.t – potential field source surface model PURPOSE : to extrapolate global potential magnetic field of the sun from synoptic magnetograms 2013.11.04 Developed by S. Moschou and C. Xia 2014.04.01 Allow to change source surface (C. Xia) PRECONDITIONS:

  1. 3D spherical coordinates
  2. A synoptic magnetogram in a binary file contains nphi, ntheta, theta(ntheta), phi(nphi), B_r(nphi,ntheta) succesively.
  3. nphi, ntheta are long integers and other arrays are double precision. theta contains decreasing radians with increasing indice (Pi to 0) phi contains increasing radians with increasing indice (0 to 2*Pi)
  4. By default, theta points are interpreted as cell centers and harmonic coefficients use cell-area quadrature in mu=cos(theta). To reproduce the old Gauss-Legendre quadrature, set pfss_theta_quadrature='gauss_legendre' before calling harm_coef. If a mapname.coef file already exists, it is reused and this setting does not take effect until that coefficient file is regenerated. USAGE: example for a magnetogram with name 'mdicr2020.dat':

    subroutine initglobaldata_usr ... R_0=1.d0 ! dimensionless Solar radius (default 1.0) R_s=2.5d0 ! dimensionless radius of source surface (default 2.5) lmax=120 ! use a fixed value instead of the value determined by the resolution of input magnetogram trunc=.true. ! use less spherical harmonics at larger distances call harm_coef('mdicr2020.dat') end subroutine initglobaldata_usr

    subroutine initonegrid_usr(ixI^L,ixO^L,w,x) ... double precision :: bpf(ixI^S,1:ndir) ... call pfss(ixI^L,ixO^L,bpf,x) w(ix^S,mag(:))=bpf(ix^S,:)

    end subroutine initonegrid_usr

Function/Subroutine Documentation

◆ harm_coef()

subroutine, public mod_pfss::harm_coef ( character(len=*)  mapname)

Definition at line 59 of file mod_pfss.t.

Here is the call graph for this function:

◆ pfss()

subroutine, public mod_pfss::pfss ( integer, intent(in)  ixi,
integer, intent(in)  l,
integer, intent(in)  ixo,
  l,
double precision, dimension(ixi^s,1:ndir), intent(out)  bpf,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 328 of file mod_pfss.t.

Variable Documentation

◆ lmax

integer, public mod_pfss::lmax =0

Definition at line 48 of file mod_pfss.t.

◆ pfss_theta_quadrature

character(len=20), public mod_pfss::pfss_theta_quadrature ='cell_area'

Definition at line 50 of file mod_pfss.t.

◆ r_0

double precision, public mod_pfss::r_0 =1.d0

Definition at line 46 of file mod_pfss.t.

◆ r_s

double precision, public mod_pfss::r_s =2.5d0

Definition at line 46 of file mod_pfss.t.

◆ trunc

logical, public mod_pfss::trunc =.false.

Definition at line 49 of file mod_pfss.t.