Commit e7d1c5d7 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Fortran interface update.

parent 23bb887e
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
! !
! Author: ! Author:
! ------- ! -------
! Uwe Schulzweida, MPI-MET, Hamburg, July 2018 ! Uwe Schulzweida, MPI-MET, Hamburg, September 2018
! !
INTEGER CDI_MAX_NAME INTEGER CDI_MAX_NAME
...@@ -80,24 +80,6 @@ ...@@ -80,24 +80,6 @@
PARAMETER (CDI_FILETYPE_EXT = 9) PARAMETER (CDI_FILETYPE_EXT = 9)
INTEGER CDI_FILETYPE_IEG INTEGER CDI_FILETYPE_IEG
PARAMETER (CDI_FILETYPE_IEG = 10) PARAMETER (CDI_FILETYPE_IEG = 10)
INTEGER FILETYPE_GRB
PARAMETER (FILETYPE_GRB = 1)
INTEGER FILETYPE_GRB2
PARAMETER (FILETYPE_GRB2 = 2)
INTEGER FILETYPE_NC
PARAMETER (FILETYPE_NC = 3)
INTEGER FILETYPE_NC2
PARAMETER (FILETYPE_NC2 = 4)
INTEGER FILETYPE_NC4
PARAMETER (FILETYPE_NC4 = 5)
INTEGER FILETYPE_NC4C
PARAMETER (FILETYPE_NC4C = 6)
INTEGER FILETYPE_SRV
PARAMETER (FILETYPE_SRV = 7)
INTEGER FILETYPE_EXT
PARAMETER (FILETYPE_EXT = 8)
INTEGER FILETYPE_IEG
PARAMETER (FILETYPE_IEG = 9)
! !
! Compress types ! Compress types
! !
...@@ -200,20 +182,6 @@ ...@@ -200,20 +182,6 @@
PARAMETER (CDI_DATATYPE_UINT16 = 316) PARAMETER (CDI_DATATYPE_UINT16 = 316)
INTEGER CDI_DATATYPE_UINT32 INTEGER CDI_DATATYPE_UINT32
PARAMETER (CDI_DATATYPE_UINT32 = 332) PARAMETER (CDI_DATATYPE_UINT32 = 332)
INTEGER DATATYPE_PACK
PARAMETER (DATATYPE_PACK = 0)
INTEGER DATATYPE_PACK8
PARAMETER (DATATYPE_PACK8 = 8)
INTEGER DATATYPE_PACK16
PARAMETER (DATATYPE_PACK16 = 16)
INTEGER DATATYPE_PACK24
PARAMETER (DATATYPE_PACK24 = 24)
INTEGER DATATYPE_FLT32
PARAMETER (DATATYPE_FLT32 = 132)
INTEGER DATATYPE_FLT64
PARAMETER (DATATYPE_FLT64 = 164)
INTEGER DATATYPE_INT32
PARAMETER (DATATYPE_INT32 = 232)
! !
! internal data types ! internal data types
! !
...@@ -231,18 +199,6 @@ ...@@ -231,18 +199,6 @@
PARAMETER (CDI_DATATYPE_LONG = 256) PARAMETER (CDI_DATATYPE_LONG = 256)
INTEGER CDI_DATATYPE_UINT INTEGER CDI_DATATYPE_UINT
PARAMETER (CDI_DATATYPE_UINT = 257) PARAMETER (CDI_DATATYPE_UINT = 257)
INTEGER DATATYPE_INT
PARAMETER (DATATYPE_INT = 251)
INTEGER DATATYPE_FLT
PARAMETER (DATATYPE_FLT = 252)
INTEGER DATATYPE_TXT
PARAMETER (DATATYPE_TXT = 253)
INTEGER DATATYPE_CPX
PARAMETER (DATATYPE_CPX = 254)
INTEGER DATATYPE_UCHAR
PARAMETER (DATATYPE_UCHAR = 255)
INTEGER DATATYPE_LONG
PARAMETER (DATATYPE_LONG = 256)
! !
! Chunks ! Chunks
! !
...@@ -275,8 +231,6 @@ ...@@ -275,8 +231,6 @@
PARAMETER (GRID_UNSTRUCTURED = 9) PARAMETER (GRID_UNSTRUCTURED = 9)
INTEGER GRID_CURVILINEAR INTEGER GRID_CURVILINEAR
PARAMETER (GRID_CURVILINEAR = 10) PARAMETER (GRID_CURVILINEAR = 10)
INTEGER GRID_LCC
PARAMETER (GRID_LCC = 11)
INTEGER GRID_PROJECTION INTEGER GRID_PROJECTION
PARAMETER (GRID_PROJECTION = 12) PARAMETER (GRID_PROJECTION = 12)
INTEGER GRID_CHARXY INTEGER GRID_CHARXY
...@@ -289,6 +243,8 @@ ...@@ -289,6 +243,8 @@
PARAMETER (CDI_PROJ_LAEA = 23) PARAMETER (CDI_PROJ_LAEA = 23)
INTEGER CDI_PROJ_SINU INTEGER CDI_PROJ_SINU
PARAMETER (CDI_PROJ_SINU = 24) PARAMETER (CDI_PROJ_SINU = 24)
INTEGER CDI_PROJ_STERE
PARAMETER (CDI_PROJ_STERE = 25)
! !
! ZAXIS types ! ZAXIS types
! !
...@@ -488,6 +444,9 @@ ...@@ -488,6 +444,9 @@
DOUBLEPRECISION cdiInqMissval DOUBLEPRECISION cdiInqMissval
EXTERNAL cdiInqMissval EXTERNAL cdiInqMissval
DOUBLEPRECISION cdiInqGridMissval
EXTERNAL cdiInqGridMissval
! cdiDefGlobal ! cdiDefGlobal
! (CHARACTER*(*) string, ! (CHARACTER*(*) string,
! INTEGER val) ! INTEGER val)
...@@ -1537,6 +1496,13 @@ ...@@ -1537,6 +1496,13 @@
! DOUBLEPRECISION xvals(*)) ! DOUBLEPRECISION xvals(*))
EXTERNAL gridInqXvals EXTERNAL gridInqXvals
INTEGER gridInqXvalsPart
! (INTEGER gridID,
! INTEGER start,
! INTEGER size,
! DOUBLEPRECISION xvals(*))
EXTERNAL gridInqXvalsPart
INTEGER gridInqXIsc INTEGER gridInqXIsc
! (INTEGER gridID) ! (INTEGER gridID)
EXTERNAL gridInqXIsc EXTERNAL gridInqXIsc
...@@ -1551,6 +1517,13 @@ ...@@ -1551,6 +1517,13 @@
! DOUBLEPRECISION yvals(*)) ! DOUBLEPRECISION yvals(*))
EXTERNAL gridInqYvals EXTERNAL gridInqYvals
INTEGER gridInqYvalsPart
! (INTEGER gridID,
! INTEGER start,
! INTEGER size,
! DOUBLEPRECISION yvals(*))
EXTERNAL gridInqYvalsPart
INTEGER gridInqYIsc INTEGER gridInqYIsc
! (INTEGER gridID) ! (INTEGER gridID)
EXTERNAL gridInqYIsc EXTERNAL gridInqYIsc
...@@ -1902,7 +1875,7 @@ ...@@ -1902,7 +1875,7 @@
EXTERNAL gridInqParamGME EXTERNAL gridInqParamGME
! !
! Lambert Conformal Conic grid (GRIB version) ! Lambert Conformal Conic grid
! !
! gridDefParamLCC ! gridDefParamLCC
! (INTEGER gridID, ! (INTEGER gridID,
...@@ -1934,6 +1907,35 @@ ...@@ -1934,6 +1907,35 @@
! DOUBLEPRECISION y_0) ! DOUBLEPRECISION y_0)
EXTERNAL gridInqParamLCC EXTERNAL gridInqParamLCC
!
! Polar stereographic grid
!
! gridDefParamSTERE
! (INTEGER gridID,
! DOUBLEPRECISION missval,
! DOUBLEPRECISION lon_0,
! DOUBLEPRECISION lat_ts,
! DOUBLEPRECISION lat_0,
! DOUBLEPRECISION a,
! DOUBLEPRECISION xval_0,
! DOUBLEPRECISION yval_0,
! DOUBLEPRECISION x_0,
! DOUBLEPRECISION y_0)
EXTERNAL gridDefParamSTERE
INTEGER gridInqParamSTERE
! (INTEGER gridID,
! DOUBLEPRECISION missval,
! DOUBLEPRECISION lon_0,
! DOUBLEPRECISION lat_ts,
! DOUBLEPRECISION lat_0,
! DOUBLEPRECISION a,
! DOUBLEPRECISION xval_0,
! DOUBLEPRECISION yval_0,
! DOUBLEPRECISION x_0,
! DOUBLEPRECISION y_0)
EXTERNAL gridInqParamSTERE
! gridDefArea ! gridDefArea
! (INTEGER gridID, ! (INTEGER gridID,
! DOUBLEPRECISION area(*)) ! DOUBLEPRECISION area(*))
...@@ -2258,7 +2260,7 @@ ...@@ -2258,7 +2260,7 @@
! TAXIS routines ! TAXIS routines
! !
INTEGER taxisCreate INTEGER taxisCreate
! (INTEGER timetype) ! (INTEGER taxistype)
EXTERNAL taxisCreate EXTERNAL taxisCreate
! taxisDestroy ! taxisDestroy
...@@ -2276,9 +2278,13 @@ ...@@ -2276,9 +2278,13 @@
! taxisDefType ! taxisDefType
! (INTEGER taxisID, ! (INTEGER taxisID,
! INTEGER type) ! INTEGER taxistype)
EXTERNAL taxisDefType EXTERNAL taxisDefType
INTEGER taxisInqType
! (INTEGER taxisID)
EXTERNAL taxisInqType
! taxisDefVdate ! taxisDefVdate
! (INTEGER taxisID, ! (INTEGER taxisID,
! INTEGER date) ! INTEGER date)
...@@ -2410,10 +2416,6 @@ ...@@ -2410,10 +2416,6 @@
! INTEGER numavg) ! INTEGER numavg)
EXTERNAL taxisDefNumavg EXTERNAL taxisDefNumavg
INTEGER taxisInqType
! (INTEGER taxisID)
EXTERNAL taxisInqType
INTEGER taxisInqNumavg INTEGER taxisInqNumavg
! (INTEGER taxisID) ! (INTEGER taxisID)
EXTERNAL taxisInqNumavg EXTERNAL taxisInqNumavg
......
...@@ -114,6 +114,7 @@ FCALLSCSUB0 (cdiPrintVersion, CDIPRINTVERSION, cdiprintversion) ...@@ -114,6 +114,7 @@ FCALLSCSUB0 (cdiPrintVersion, CDIPRINTVERSION, cdiprintversion)
FCALLSCFUN1 (INT, cdiHaveFiletype, CDIHAVEFILETYPE, cdihavefiletype, INT) FCALLSCFUN1 (INT, cdiHaveFiletype, CDIHAVEFILETYPE, cdihavefiletype, INT)
FCALLSCSUB1 (cdiDefMissval, CDIDEFMISSVAL, cdidefmissval, DOUBLE) FCALLSCSUB1 (cdiDefMissval, CDIDEFMISSVAL, cdidefmissval, DOUBLE)
FCALLSCFUN0 (DOUBLE, cdiInqMissval, CDIINQMISSVAL, cdiinqmissval) FCALLSCFUN0 (DOUBLE, cdiInqMissval, CDIINQMISSVAL, cdiinqmissval)
FCALLSCFUN0 (DOUBLE, cdiInqGridMissval, CDIINQGRIDMISSVAL, cdiinqgridmissval)
FCALLSCSUB2 (cdiDefGlobal, CDIDEFGLOBAL, cdidefglobal, STRING, INT) FCALLSCSUB2 (cdiDefGlobal, CDIDEFGLOBAL, cdidefglobal, STRING, INT)
FCALLSCFUN0 (INT, namespaceNew, NAMESPACENEW, namespacenew) FCALLSCFUN0 (INT, namespaceNew, NAMESPACENEW, namespacenew)
FCALLSCSUB1 (namespaceSetActive, NAMESPACESETACTIVE, namespacesetactive, INT) FCALLSCSUB1 (namespaceSetActive, NAMESPACESETACTIVE, namespacesetactive, INT)
...@@ -477,6 +478,13 @@ static int gridInqXvals_fwrap(int gridID, double xvals[]) ...@@ -477,6 +478,13 @@ static int gridInqXvals_fwrap(int gridID, double xvals[])
return size_t_c2f(v); return size_t_c2f(v);
} }
FCALLSCFUN2 (INT, gridInqXvals_fwrap, GRIDINQXVALS, gridinqxvals, INT, DOUBLEV) FCALLSCFUN2 (INT, gridInqXvals_fwrap, GRIDINQXVALS, gridinqxvals, INT, DOUBLEV)
static int gridInqXvalsPart_fwrap(int gridID, int start, int size, double xvals[])
{
size_t v;
v = gridInqXvalsPart(gridID, start, (size_t)size, xvals);
return size_t_c2f(v);
}
FCALLSCFUN4 (INT, gridInqXvalsPart_fwrap, GRIDINQXVALSPART, gridinqxvalspart, INT, INT, INT, DOUBLEV)
FCALLSCFUN1 (INT, gridInqXIsc, GRIDINQXISC, gridinqxisc, INT) FCALLSCFUN1 (INT, gridInqXIsc, GRIDINQXISC, gridinqxisc, INT)
FCALLSCSUB2 (gridDefYvals, GRIDDEFYVALS, griddefyvals, INT, DOUBLEV) FCALLSCSUB2 (gridDefYvals, GRIDDEFYVALS, griddefyvals, INT, DOUBLEV)
static int gridInqYvals_fwrap(int gridID, double yvals[]) static int gridInqYvals_fwrap(int gridID, double yvals[])
...@@ -486,6 +494,13 @@ static int gridInqYvals_fwrap(int gridID, double yvals[]) ...@@ -486,6 +494,13 @@ static int gridInqYvals_fwrap(int gridID, double yvals[])
return size_t_c2f(v); return size_t_c2f(v);
} }
FCALLSCFUN2 (INT, gridInqYvals_fwrap, GRIDINQYVALS, gridinqyvals, INT, DOUBLEV) FCALLSCFUN2 (INT, gridInqYvals_fwrap, GRIDINQYVALS, gridinqyvals, INT, DOUBLEV)
static int gridInqYvalsPart_fwrap(int gridID, int start, int size, double yvals[])
{
size_t v;
v = gridInqYvalsPart(gridID, start, (size_t)size, yvals);
return size_t_c2f(v);
}
FCALLSCFUN4 (INT, gridInqYvalsPart_fwrap, GRIDINQYVALSPART, gridinqyvalspart, INT, INT, INT, DOUBLEV)
FCALLSCFUN1 (INT, gridInqYIsc, GRIDINQYISC, gridinqyisc, INT) FCALLSCFUN1 (INT, gridInqYIsc, GRIDINQYISC, gridinqyisc, INT)
FCALLSCFUN4 (INT, cdiDefKeyInt, CDIDEFKEYINT, cdidefkeyint, INT, INT, INT, INT) FCALLSCFUN4 (INT, cdiDefKeyInt, CDIDEFKEYINT, cdidefkeyint, INT, INT, INT, INT)
FCALLSCFUN4 (INT, cdiInqKeyInt, CDIINQKEYINT, cdiinqkeyint, INT, INT, INT, PINT) FCALLSCFUN4 (INT, cdiInqKeyInt, CDIINQKEYINT, cdiinqkeyint, INT, INT, INT, PINT)
...@@ -556,10 +571,15 @@ FCALLSCSUB4 (gridInqParamRLL, GRIDINQPARAMRLL, gridinqparamrll, INT, PDOUBLE, PD ...@@ -556,10 +571,15 @@ FCALLSCSUB4 (gridInqParamRLL, GRIDINQPARAMRLL, gridinqparamrll, INT, PDOUBLE, PD
FCALLSCSUB5 (gridDefParamGME, GRIDDEFPARAMGME, griddefparamgme, INT, INT, INT, INT, INT) FCALLSCSUB5 (gridDefParamGME, GRIDDEFPARAMGME, griddefparamgme, INT, INT, INT, INT, INT)
FCALLSCSUB5 (gridInqParamGME, GRIDINQPARAMGME, gridinqparamgme, INT, PINT, PINT, PINT, PINT) FCALLSCSUB5 (gridInqParamGME, GRIDINQPARAMGME, gridinqparamgme, INT, PINT, PINT, PINT, PINT)
/* Lambert Conformal Conic grid (GRIB version) */ /* Lambert Conformal Conic grid */
FCALLSCSUB12 (gridDefParamLCC, GRIDDEFPARAMLCC, griddefparamlcc, INT, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE) FCALLSCSUB12 (gridDefParamLCC, GRIDDEFPARAMLCC, griddefparamlcc, INT, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE)
FCALLSCFUN12 (INT, gridInqParamLCC, GRIDINQPARAMLCC, gridinqparamlcc, INT, DOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE) FCALLSCFUN12 (INT, gridInqParamLCC, GRIDINQPARAMLCC, gridinqparamlcc, INT, DOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE)
/* Polar stereographic grid */
FCALLSCSUB10 (gridDefParamSTERE, GRIDDEFPARAMSTERE, griddefparamstere, INT, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE)
FCALLSCFUN10 (INT, gridInqParamSTERE, GRIDINQPARAMSTERE, gridinqparamstere, INT, DOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE, PDOUBLE)
FCALLSCSUB2 (gridDefArea, GRIDDEFAREA, griddefarea, INT, DOUBLEV) FCALLSCSUB2 (gridDefArea, GRIDDEFAREA, griddefarea, INT, DOUBLEV)
FCALLSCSUB2 (gridInqArea, GRIDINQAREA, gridinqarea, INT, DOUBLEV) FCALLSCSUB2 (gridInqArea, GRIDINQAREA, gridinqarea, INT, DOUBLEV)
FCALLSCFUN1 (INT, gridHasArea, GRIDHASAREA, gridhasarea, INT) FCALLSCFUN1 (INT, gridHasArea, GRIDHASAREA, gridhasarea, INT)
...@@ -661,6 +681,7 @@ FCALLSCSUB1 (taxisDestroy, TAXISDESTROY, taxisdestroy, INT) ...@@ -661,6 +681,7 @@ FCALLSCSUB1 (taxisDestroy, TAXISDESTROY, taxisdestroy, INT)
FCALLSCFUN1 (INT, taxisDuplicate, TAXISDUPLICATE, taxisduplicate, INT) FCALLSCFUN1 (INT, taxisDuplicate, TAXISDUPLICATE, taxisduplicate, INT)
FCALLSCSUB2 (taxisCopyTimestep, TAXISCOPYTIMESTEP, taxiscopytimestep, INT, INT) FCALLSCSUB2 (taxisCopyTimestep, TAXISCOPYTIMESTEP, taxiscopytimestep, INT, INT)
FCALLSCSUB2 (taxisDefType, TAXISDEFTYPE, taxisdeftype, INT, INT) FCALLSCSUB2 (taxisDefType, TAXISDEFTYPE, taxisdeftype, INT, INT)
FCALLSCFUN1 (INT, taxisInqType, TAXISINQTYPE, taxisinqtype, INT)
static void taxisDefVdate_fwrap(int taxisID, int date) static void taxisDefVdate_fwrap(int taxisID, int date)
{ {
taxisDefVdate(taxisID, (int64_t)date); taxisDefVdate(taxisID, (int64_t)date);
...@@ -733,7 +754,6 @@ FCALLSCFUN1 (INT, taxisInqForecastTunit, TAXISINQFORECASTTUNIT, taxisinqforecast ...@@ -733,7 +754,6 @@ FCALLSCFUN1 (INT, taxisInqForecastTunit, TAXISINQFORECASTTUNIT, taxisinqforecast
FCALLSCSUB2 (taxisDefForecastPeriod, TAXISDEFFORECASTPERIOD, taxisdefforecastperiod, INT, DOUBLE) FCALLSCSUB2 (taxisDefForecastPeriod, TAXISDEFFORECASTPERIOD, taxisdefforecastperiod, INT, DOUBLE)
FCALLSCFUN1 (DOUBLE, taxisInqForecastPeriod, TAXISINQFORECASTPERIOD, taxisinqforecastperiod, INT) FCALLSCFUN1 (DOUBLE, taxisInqForecastPeriod, TAXISINQFORECASTPERIOD, taxisinqforecastperiod, INT)
FCALLSCSUB2 (taxisDefNumavg, TAXISDEFNUMAVG, taxisdefnumavg, INT, INT) FCALLSCSUB2 (taxisDefNumavg, TAXISDEFNUMAVG, taxisdefnumavg, INT, INT)
FCALLSCFUN1 (INT, taxisInqType, TAXISINQTYPE, taxisinqtype, INT)
FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT) FCALLSCFUN1 (INT, taxisInqNumavg, TAXISINQNUMAVG, taxisinqnumavg, INT)
FCALLSCFUN1 (STRING, tunitNamePtr, TUNITNAMEPTR, tunitnameptr, INT) FCALLSCFUN1 (STRING, tunitNamePtr, TUNITNAMEPTR, tunitnameptr, INT)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment