diff --git a/docs/frames/category-menus.html b/docs/frames/category-menus.html index 4aa4af1f..d952658b 100755 --- a/docs/frames/category-menus.html +++ b/docs/frames/category-menus.html @@ -329,6 +329,8 @@
GET_IRBEM_NTIME_MAX
+ GET_IGRF_VERSION +
Magnetic diff --git a/docs/frames/frames.html b/docs/frames/frames.html index ab6c1b01..65d8c280 100755 --- a/docs/frames/frames.html +++ b/docs/frames/frames.html @@ -5340,6 +5340,37 @@

CALLING SEQUENCE FROM ID

CALLING SEQUENCE from FORTRAN:

call IRBEM_FORTRAN_RELEASE1(RLS) +

+
+


+

+

GET_IGRF_VERSION +

+

DESCRIPTION: +

+ Returns the version number of the IGRF model. +
+   +

INPUTS: +

+ NONE +

OUTPUTS: +

+ IGRF_VERSION IGRF version number (long integer). +
+   +

CALLING SEQUENCE FROM MATLAB: +

+ ntime_max = onera_desp_lib_igrf_version +
+

CALLING SEQUENCE FROM IDL: +

+ result = call_external(lib_name, 'igrf_version_idl_',igrf_version, /f_value) +
+

CALLING SEQUENCE from FORTRAN: +

+ call GET_IGRF_VERION_(igrf_version) +



diff --git a/matlab/libirbem.h b/matlab/libirbem.h index 64bd28cd..243df5fd 100644 --- a/matlab/libirbem.h +++ b/matlab/libirbem.h @@ -25,6 +25,7 @@ Paul O'Brien paul.obrien@aero.org void irbem_fortran_version1_(int *version); void get_irbem_ntime_max1_(int *ntime_max); +void get_igrf_version_(int *igrf_version); void make_lstar1_(int *ntime, int *kext, int *options,int *sysaxes, diff --git a/matlab/onera_desp_lib_igrf_version.m b/matlab/onera_desp_lib_igrf_version.m new file mode 100644 index 00000000..deca5adf --- /dev/null +++ b/matlab/onera_desp_lib_igrf_version.m @@ -0,0 +1,28 @@ +function igrf_version = onera_desp_lib_igrf_version() +%*************************************************************************************************** +% +% This file is part of IRBEM-LIB. +% +% IRBEM-LIB is free software: you can redistribute it and/or modify +% it under the terms of the GNU Lesser General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% IRBEM-LIB is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU Lesser General Public License for more details. +% +% You should have received a copy of the GNU Lesser General Public License +% along with IRBEM-LIB. If not, see . +%*************************************************************************************************** +% +% igrf_version = onera_desp_lib_igrf_version() +% size of ntime dimension in fortran arrays + +onera_desp_lib_load; + +nPtr = libpointer('int32Ptr',-1); +calllib('onera_desp_lib','get_igrf_version_',nPtr); +igrf_version = double(nPtr.value); + diff --git a/source/idl_wrappers.c b/source/idl_wrappers.c index 6fe31177..fceaf0be 100644 --- a/source/idl_wrappers.c +++ b/source/idl_wrappers.c @@ -72,6 +72,8 @@ IDL_SIMPLE(irbem_fortran_version,1) IDL_SIMPLE(irbem_fortran_release,1) IDL_SIMPLE(get_irbem_ntime_max,1) +IDL_WRAPPER(igrf_version_idl,get_igrf_version,1) + IDL_SIMPLE(make_lstar_shell_splitting,19) IDL_SIMPLE(lstar_phi,7) IDL_SIMPLE(drift_shell,17) diff --git a/source/igrf_coef.f b/source/igrf_coef.f index 1036a2c2..23a1ef2e 100644 --- a/source/igrf_coef.f +++ b/source/igrf_coef.f @@ -19,6 +19,14 @@ ! ! VERSION: IGRF13 ! + + subroutine get_igrf_version(version) + IMPLICIT NONE + INTEGER*4 version + version = 13 + end + + ! [EOS TRANS. AGU APRIL 21, 1992, P. 182] ! Additional IGRF References: ! (J. GEOMAG. GEOELECTR.(1982), V.34, P.313-315,