\hypertarget{namespacewa__module__interpolate}{}\doxysection{wa\+\_\+module\+\_\+interpolate Module Reference}
\label{namespacewa__module__interpolate}\index{wa\_module\_interpolate@{wa\_module\_interpolate}}
\doxysubsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \mbox{\hyperlink{interfacewa__module__interpolate_1_1a__interpolate__wa}{a\+\_\+interpolate\+\_\+wa}}
\item 
interface \mbox{\hyperlink{interfacewa__module__interpolate_1_1alpha}{alpha}}
\item 
interface \mbox{\hyperlink{interfacewa__module__interpolate_1_1pmm}{pmm}}
\end{DoxyCompactItemize}
\doxysubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
real(dp) function, dimension(size(wa\+\_\+data, 2)) \mbox{\hyperlink{namespacewa__module__interpolate_af1d2c6fe40fa2542c49fd736dcfe0281}{a\+\_\+interpolate\+\_\+array00\+\_\+wa}} (wa\+\_\+data, alon, alat)
\item 
real(dp) function \mbox{\hyperlink{namespacewa__module__interpolate_a5cead6bb94393b345efcadfa8cc001ca}{alpha\+\_\+array0}} (n, m, x)
\item 
real(dp) function \mbox{\hyperlink{namespacewa__module__interpolate_aa94bb2f79a04f4bb8f6680bef3c0d977}{beta}} (n, m)
\item 
real(dp) function \mbox{\hyperlink{namespacewa__module__interpolate_a4dcfdad628b810fd857eef7ba71d9276}{pmm\+\_\+array0}} (m, x)
\end{DoxyCompactItemize}


\doxysubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacewa__module__interpolate_af1d2c6fe40fa2542c49fd736dcfe0281}\label{namespacewa__module__interpolate_af1d2c6fe40fa2542c49fd736dcfe0281}} 
\index{wa\_module\_interpolate@{wa\_module\_interpolate}!a\_interpolate\_array00\_wa@{a\_interpolate\_array00\_wa}}
\index{a\_interpolate\_array00\_wa@{a\_interpolate\_array00\_wa}!wa\_module\_interpolate@{wa\_module\_interpolate}}
\doxysubsubsection{\texorpdfstring{a\_interpolate\_array00\_wa()}{a\_interpolate\_array00\_wa()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(wa\+\_\+data,2)) wa\+\_\+module\+\_\+interpolate\+::a\+\_\+interpolate\+\_\+array00\+\_\+wa (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,\+:), intent(in)}]{wa\+\_\+data,  }\item[{real(dp), intent(in)}]{alon,  }\item[{real(dp), intent(in)}]{alat }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 83 of file wa\+\_\+module\+\_\+interpolate.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{83     \textcolor{comment}{!}}
\DoxyCodeLine{84     \textcolor{comment}{! 緯度 alon, 経度 alat における関数値を}}
\DoxyCodeLine{85     \textcolor{comment}{! その球面調和変換係数 wa\_data から補間計算する}}
\DoxyCodeLine{86     \textcolor{comment}{!}}
\DoxyCodeLine{87 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{intent(IN)} :: wa\_data(:,:)             \textcolor{comment}{! スペクトルデータ}}
\DoxyCodeLine{88 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{intent(IN)} :: alon                     \textcolor{comment}{! 補間する位置(経度)}}
\DoxyCodeLine{89 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{intent(IN)} :: alat                     \textcolor{comment}{! 補間する位置(緯度)}}
\DoxyCodeLine{90 \textcolor{keywordtype}{    real}(DP) :: a\_Interpolate\_array00\_wa(size(wa\_data,2))   \textcolor{comment}{! 補間した値}}
\DoxyCodeLine{91 }
\DoxyCodeLine{92 \textcolor{keywordtype}{    real}(DP) :: mu}
\DoxyCodeLine{93 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{dimension(size(wa\_data,2))} :: y0, y1, y2, AnmPnm}
\DoxyCodeLine{94     \textcolor{keywordtype}{integer} :: k,m,n}
\DoxyCodeLine{95 }
\DoxyCodeLine{96     n = int(nm)}
\DoxyCodeLine{97 }
\DoxyCodeLine{98     mu = sin(alat)}
\DoxyCodeLine{99     a\_interpolate\_array00\_wa = 0.0d0}
\DoxyCodeLine{100 }
\DoxyCodeLine{101     \textcolor{comment}{!-\/-\/-\/-\/ Σa\_n\string^0 P\_n\string^0 の計算}}
\DoxyCodeLine{102     y2 = 0.0d0 ; y1 = 0.0d0}
\DoxyCodeLine{103     \textcolor{keywordflow}{do} k=n,1,-\/1}
\DoxyCodeLine{104       y0 = alpha(k,0,mu) * y1 + beta(k+1,0)*y2 + wa\_data(l\_nm(k,0),:)}
\DoxyCodeLine{105       y2 = y1 ; y1 = y0}
\DoxyCodeLine{106 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{107     a\_interpolate\_array00\_wa = (  beta(1,0) * y2 + mu*sqrt(3.0d0) * y1 \&}
\DoxyCodeLine{108       + wa\_data(l\_nm(0,0),:)  ) * pmm(0,mu)}
\DoxyCodeLine{109 }
\DoxyCodeLine{110     \textcolor{comment}{!-\/-\/-\/-\/ cos mλ Σa\_n\string^m P\_n\string^m の計算}}
\DoxyCodeLine{111     \textcolor{keywordflow}{do} m=1,n}
\DoxyCodeLine{112       y2 = 0.0d0 ; y1 = 0.0d0}
\DoxyCodeLine{113       \textcolor{keywordflow}{do} k=n,m+1,-\/1}
\DoxyCodeLine{114         y0 = alpha(k,m,mu) * y1 + beta(k+1,m) * y2 + wa\_data(l\_nm(k,m),:)}
\DoxyCodeLine{115         y2 = y1 ; y1 = y0}
\DoxyCodeLine{116 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{117 }
\DoxyCodeLine{118       anmpnm =(wa\_data(l\_nm(m,m),:) + beta(m+1,m)*y2 \&}
\DoxyCodeLine{119         + mu*sqrt(2.0d0*m+3)*y1 ) * pmm(m,mu)}
\DoxyCodeLine{120 }
\DoxyCodeLine{121       a\_interpolate\_array00\_wa = a\_interpolate\_array00\_wa \&}
\DoxyCodeLine{122         + anmpnm * 2.0d0 * cos(m*alon)}
\DoxyCodeLine{123 \textcolor{keywordflow}{    end do}}
\DoxyCodeLine{124 }
\DoxyCodeLine{125     \textcolor{comment}{!-\/-\/-\/-\/ sin λ Σa\_n\string^m P\_n\string^m の計算n}}
\DoxyCodeLine{126     \textcolor{keywordflow}{do} m=1,n}
\DoxyCodeLine{127       y2 = 0.0d0 ; y1 = 0.0d0}
\DoxyCodeLine{128       \textcolor{keywordflow}{do} k=n,m+1,-\/1}
\DoxyCodeLine{129         y0 = alpha(k,m,mu) * y1 + beta(k+1,m)*y2 + wa\_data(l\_nm(k,-\/m),:)}
\DoxyCodeLine{130         y2 = y1 ; y1 = y0}
\DoxyCodeLine{131 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{132 }
\DoxyCodeLine{133       anmpnm =(wa\_data(l\_nm(m,-\/m),:) + beta(m+1,m)*y2 \&}
\DoxyCodeLine{134         + mu*sqrt(2.0d0*m+3)*y1 ) * pmm(m,mu)}
\DoxyCodeLine{135 }
\DoxyCodeLine{136 }
\DoxyCodeLine{137       a\_interpolate\_array00\_wa = a\_interpolate\_array00\_wa \&}
\DoxyCodeLine{138         -\/ anmpnm * 2.0d0 * sin(m*alon)}
\DoxyCodeLine{139 \textcolor{keywordflow}{    end do}}
\DoxyCodeLine{140 }

\end{DoxyCode}


References beta(), and w\+\_\+module\+\_\+base\+::nm.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacewa__module__interpolate_af1d2c6fe40fa2542c49fd736dcfe0281_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacewa__module__interpolate_a5cead6bb94393b345efcadfa8cc001ca}\label{namespacewa__module__interpolate_a5cead6bb94393b345efcadfa8cc001ca}} 
\index{wa\_module\_interpolate@{wa\_module\_interpolate}!alpha\_array0@{alpha\_array0}}
\index{alpha\_array0@{alpha\_array0}!wa\_module\_interpolate@{wa\_module\_interpolate}}
\doxysubsubsection{\texorpdfstring{alpha\_array0()}{alpha\_array0()}}
{\footnotesize\ttfamily real(dp) function wa\+\_\+module\+\_\+interpolate\+::alpha\+\_\+array0 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{n,  }\item[{integer, intent(in)}]{m,  }\item[{real(dp), intent(in)}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 145 of file wa\+\_\+module\+\_\+interpolate.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{145     \textcolor{comment}{!}}
\DoxyCodeLine{146     \textcolor{comment}{!  漸化式の P\_n\string^m の係数}}
\DoxyCodeLine{147     \textcolor{comment}{!}}
\DoxyCodeLine{148     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(IN)} :: n,m}
\DoxyCodeLine{149 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{intent(IN)} :: x}
\DoxyCodeLine{150 \textcolor{keywordtype}{    real}(DP)             :: alpha\_array0}
\DoxyCodeLine{151 }
\DoxyCodeLine{152     alpha\_array0 = sqrt( (2.0d0*n+3)*(2.0d0*n+1)/((n-\/m+1)*(n+m+1)) ) * x}

\end{DoxyCode}
\mbox{\Hypertarget{namespacewa__module__interpolate_aa94bb2f79a04f4bb8f6680bef3c0d977}\label{namespacewa__module__interpolate_aa94bb2f79a04f4bb8f6680bef3c0d977}} 
\index{wa\_module\_interpolate@{wa\_module\_interpolate}!beta@{beta}}
\index{beta@{beta}!wa\_module\_interpolate@{wa\_module\_interpolate}}
\doxysubsubsection{\texorpdfstring{beta()}{beta()}}
{\footnotesize\ttfamily real(dp) function wa\+\_\+module\+\_\+interpolate\+::beta (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{n,  }\item[{integer, intent(in)}]{m }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 156 of file wa\+\_\+module\+\_\+interpolate.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{156     \textcolor{comment}{!}}
\DoxyCodeLine{157     \textcolor{comment}{!  漸化式の P\_\{n-\/1\}\string^m の係数}}
\DoxyCodeLine{158     \textcolor{comment}{!}}
\DoxyCodeLine{159     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(IN)} :: n,m}
\DoxyCodeLine{160 \textcolor{keywordtype}{    real}(DP)             :: beta}
\DoxyCodeLine{161 }
\DoxyCodeLine{162     beta = -\/ sqrt( (2.0d0*n+3)*(n+m)*(n-\/m)/((2*n-\/1)*(n+m+1)*(n-\/m+1)) )}

\end{DoxyCode}


Referenced by a\+\_\+interpolate\+\_\+array00\+\_\+wa().

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacewa__module__interpolate_aa94bb2f79a04f4bb8f6680bef3c0d977_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacewa__module__interpolate_a4dcfdad628b810fd857eef7ba71d9276}\label{namespacewa__module__interpolate_a4dcfdad628b810fd857eef7ba71d9276}} 
\index{wa\_module\_interpolate@{wa\_module\_interpolate}!pmm\_array0@{pmm\_array0}}
\index{pmm\_array0@{pmm\_array0}!wa\_module\_interpolate@{wa\_module\_interpolate}}
\doxysubsubsection{\texorpdfstring{pmm\_array0()}{pmm\_array0()}}
{\footnotesize\ttfamily real(dp) function wa\+\_\+module\+\_\+interpolate\+::pmm\+\_\+array0 (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{m,  }\item[{real(dp), intent(in)}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 166 of file wa\+\_\+module\+\_\+interpolate.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{166     \textcolor{comment}{!}}
\DoxyCodeLine{167     \textcolor{comment}{! ルジャンドル陪函数 P\_m\string^m(x) の計算}}
\DoxyCodeLine{168     \textcolor{comment}{!         sqrt( factrl(2*m+1) )/(2.0D0**m * factrl(m)) \&}}
\DoxyCodeLine{169     \textcolor{comment}{!          * (1-\/x**2)**(m/2.0D0)}}
\DoxyCodeLine{170     \textcolor{comment}{!}}
\DoxyCodeLine{171     \textcolor{comment}{! 係数が発散しないように対数で計算する}}
\DoxyCodeLine{172     \textcolor{comment}{!}}
\DoxyCodeLine{173     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(IN)} :: m           \textcolor{comment}{! ルジャンドル陪函数の次数}}
\DoxyCodeLine{174 \textcolor{keywordtype}{    real}(DP), \textcolor{keywordtype}{intent(IN)} :: x           \textcolor{comment}{! 引き数}}
\DoxyCodeLine{175 \textcolor{keywordtype}{    real}(DP)             :: Pmm\_array0  \textcolor{comment}{! ルジャンドル陪函数の値}}
\DoxyCodeLine{176 }
\DoxyCodeLine{177     \textcolor{keywordflow}{if} ( m < 0 ) \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'Pmm in w\_Intepolate\_module'},\&}
\DoxyCodeLine{178       \textcolor{stringliteral}{'order m should be larger equal to zero'})}
\DoxyCodeLine{179 }
\DoxyCodeLine{180     pmm\_array0 = 1.0d0}
\DoxyCodeLine{181     \textcolor{keywordflow}{if} ( m > 0 )\textcolor{keywordflow}{then}}
\DoxyCodeLine{182       pmm\_array0 = \&}
\DoxyCodeLine{183         exp(gammaln(2.0d0*m+2.0)/2.0d0 -\/ m*log(2.0d0) -\/ gammaln(m+1.0d0)) \&}
\DoxyCodeLine{184         \& * (1-\/x**2)**(m/2.0d0)}
\DoxyCodeLine{185 \textcolor{keywordflow}{    endif}}

\end{DoxyCode}
