Number of (c,s) coefficients for n x m geopotential model Starting with n=2,m=0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n |
degree |
||
integer, | intent(in) | :: | m |
order |
number of coefficients
pure function number_of_coefficients(n,m) result(np) implicit none integer :: np !! number of coefficients integer,intent(in) :: n !! degree integer,intent(in) :: m !! order integer :: i !counter if (n>=m .and. n>1) then np = m - 1 + sum( [ (i, i=n,2,-1) ] ) else np = -999 !error end if end function number_of_coefficients