MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
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 cfweights (ym, miu, cfwm)
 
subroutine coef (b_r0, xm, ym, miu, mius, cfwm)
 
subroutine, public pfss (ixIL, ixOL, Bpf, x)
 
subroutine inv_sph_transform (Bt, phi, miu, mius, nphi, ntheta, Bpf, qlmax)
 
subroutine fft (a, b, ntot, n, nspan, isn)
 

Variables

double precision, public r_s =2.5d0
 
double precision, public r_0 =1.d0
 
integer, public lmax =0
 
logical, public trunc =.false.
 

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) 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

◆ cfweights()

subroutine mod_pfss::cfweights ( integer, intent(in)  ym,
double precision, dimension(ym), intent(in)  miu,
double precision, dimension(ym), intent(out)  cfwm 
)

Definition at line 167 of file mod_pfss.t.

◆ coef()

subroutine mod_pfss::coef ( double precision, dimension(xm,ym), intent(in)  b_r0,
integer, intent(in)  xm,
integer, intent(in)  ym,
double precision, dimension(ym), intent(in)  miu,
double precision, dimension(ym), intent(in)  mius,
double precision, dimension(ym), intent(in)  cfwm 
)

Definition at line 196 of file mod_pfss.t.

Here is the call graph for this function:

◆ fft()

subroutine mod_pfss::fft ( double precision, dimension(:)  a,
double precision, dimension(:)  b,
integer  ntot,
integer  n,
integer  nspan,
integer  isn 
)

Definition at line 456 of file mod_pfss.t.

◆ harm_coef()

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

Definition at line 52 of file mod_pfss.t.

Here is the call graph for this function:

◆ inv_sph_transform()

subroutine mod_pfss::inv_sph_transform ( double complex, dimension(0:lmax,0:lmax), intent(in)  Bt,
double precision, dimension(nphi), intent(in)  phi,
double precision, dimension(ntheta), intent(in)  miu,
double precision, dimension(ntheta), intent(in)  mius,
integer, intent(in)  nphi,
integer, intent(in)  ntheta,
double precision, dimension(nphi,ntheta), intent(out)  Bpf,
integer, intent(in)  qlmax 
)

Definition at line 361 of file mod_pfss.t.

◆ 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 267 of file mod_pfss.t.

Here is the call graph for this function:

Variable Documentation

◆ lmax

integer, public mod_pfss::lmax =0

Definition at line 42 of file mod_pfss.t.

◆ r_0

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

Definition at line 40 of file mod_pfss.t.

◆ r_s

double precision, public mod_pfss::r_s =2.5d0

Definition at line 40 of file mod_pfss.t.

◆ trunc

logical, public mod_pfss::trunc =.false.

Definition at line 43 of file mod_pfss.t.