Giter Site home page Giter Site logo

pysat / pysatcdf Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 7.0 11.3 MB

Python reader for NASA CDF file format

License: BSD 3-Clause "New" or "Revised" License

Shell 0.08% Python 0.60% Fortran 3.05% Makefile 1.65% Java 1.02% C 91.16% Brainfuck 0.04% PHP 1.03% C++ 1.16% Batchfile 0.01% Roff 0.03% NASL 0.18%
cdf nasa-cdf python python-reader

pysatcdf's Introduction

The pysat logo: A snake orbiting a blue sphere

pysat: Python Satellite Data Analysis Toolkit

PyPI Package latest release Build Status Documentation Status Coverage Status DOI

The Python Satellite Data Analysis Toolkit (pysat) provides a simple and flexible interface for robust data analysis from beginning to end - including downloading, loading, cleaning, managing, processing, and analyzing data. Pysat's plug-in design allows analysis support for any data, including user provided data sets. The pysat team provides a variety of plug-ins to support public scientific data sets in packages such as pysatNASA, pysatMadrigal, and more, available as part of the general pysat ecosystem.

Full Documentation

JGR-Space Physics Publication

Pysat Ecosystem Publication

Citation Info

Come join us on Slack! An invitation to the pysat workspace is available in the 'About' section of the pysat GitHub Repository. Development meetings are generally held fortnightly.

Main Features

  • Instrument independent analysis routines.
  • Instrument object providing an interface for downloading and analyzing a wide variety of science data sets.
    • Uses pandas or xarray for the underlying data structure; capable of handling the many forms scientific measurements take in a consistent manner.
    • Standard scientific data handling tasks (e.g., identifying, downloading, and loading files and cleaning and modifying data) are built into the Instrument object.
    • Supports metadata consistent with the netCDF CF-1.6 standard. Each variable has a name, long name, and units. Note units are informational only.
  • Simplifies data management
    • Iterator support for loading data by day/file/orbit, independent of data storage details.
    • Orbits are calculated on the fly from loaded data and span day breaks.
    • Iterate over custom seasons
  • Supports rigorous time-series calculations that require spin up/down time across day, orbit, and file breaks.
  • Includes helper functions to reduce the barrier in adding new science instruments to pysat

Installation

The following instructions provide a guide for installing pysat and give some examples on how to use the routines.

Prerequisites

pysat uses common Python modules, as well as modules developed by and for the Space Physics community. This module officially supports Python 3.X+.

Common modules Community modules
dask netCDF4
numpy >= 1.12
pandas
portalocker
pytest
scipy
toolz
xarray

PyPi Installation

pip install pysat

GitHub Installation

git clone https://github.com/pysat/pysat.git

Change directories into the repository folder and run the pyproject.toml or setup.py file. For a local install use the "--user" flag after "install".

cd pysat/
python -m build .
pip install .

Using pysat

  • The first time pysat is run, you will need to specify a directory to store the data. In Python, run:
pysat.params['data_dirs'] = 'path/to/directory/that/may/or/may/not/exist'
  • Nominal organization of data is top_dir/platform/name/tag/inst_id/files

Detailed examples and tutorials for using pysat are available in the documentation.

pysatcdf's People

Contributors

aburrell avatar asherp avatar asreimer avatar gayatri012 avatar gregstarr avatar jklenzing avatar mddepew avatar rstoneback avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pysatcdf's Issues

STY: import DataFrame from pandas, not pysat

See pysat/pysat#369 for reference.

If we clean up the style in pysat 3.0.0 to avoid importing convenience methods from pandas and other packages, this will need to be updated here. This is a straightforward find and replace, and an update to the requirements.

Install pysatCDF error: '-mno-cygwin' did you mean...

Hello,

I am having trouble installing pysatCDF using the instructions in the readme. I have set up everything exactly as it reads (in order to set the environment). I got to the install part and got an error that I think is related to my compiler. (I got that from the readme file; it was the Microsoft Visual C++.)

I get an error that reads, "unrecognized command-line option '-mno-cygwin'; did you mean '-mno-clwb'?

I have attached a photo with the error.
PXL_20200915_125859092

Could you help me decipher? I am using a Windows 10, with Python 2.7, and the most up to date (using pacman) msys64.

~Ryan

Error loading the file

Hi!

I'm encountering an error when loading a file using pysatCDF.CDF(filename):
ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,256,)

I'm on MacOS, using python 3.5.

It seems like a fortrany error and I have no idea how to debug this, any hints/advice?

Could it be related to the fact that I am using libgfortran.4.dylib instead of libgfortran.3.dylib?

Full traceback:

ValueError                                Traceback (most recent call last)
<ipython-input-24-b7e18e1842cf> in <module>()
----> 1 cdf = pysatCDF.CDF(filename)

/Users/adamg/.virtualenvs/py35/lib/python3.5/site-packages/pysatCDF/_cdf.py in __init__(self, fname)
     71             self.inquire()
     72             # get all attribute info
---> 73             self._read_all_attribute_info()
     74             # get z variable info, basic stats on the variables
     75             self._read_all_z_variable_info()

/Users/adamg/.virtualenvs/py35/lib/python3.5/site-packages/pysatCDF/_cdf.py in _read_all_attribute_info(self)
    343         num = copy.deepcopy(self._num_attrs)
    344         fname = copy.deepcopy(self.fname)
--> 345         out = fortran_cdf.inquire_all_attr(fname, num, len(fname))
    346         status = out[0]
    347         names = out[1].astype('U')

ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,256,)

BAD_REC_COUNT: Illegal record count specified.

I am receiving an error when trying to read a CDF file. Other CDF files read okay. I am using macOS 10.13.6, conda install of python 3.7.3, pysatCDF 0.3.0 (via pip) and have the most recent NASA CDF driver tools installed.

An example of a file that I can read successfully is ftp://spdf.gsfc.nasa.gov/pub/data/omni/omni_cdaweb/hro_5min/2012/omni_hro_5min_20120101_v01.cdf

and one that fails is ftp://spdf.gsfc.nasa.gov/pub/data/themis/thd/l2/gmom/2012/thd_l2_gmom_20120115_v01.cdf

I've replicated the error on a different machine, and have been able to read both CDF files using other tools.

I've attached output from an IPython session showing the relevant traceback.

cdf_read_error.txt

Non-standard Fortran syntax causing installation issues

The Issue

The problem is nicely described here. The non-standard fortran syntax in fortran_cdf.f causes the following error when installing:

Click for log output

  f951: Warning: Nonconforming tab character in column 1 of line 1000 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1002 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1003 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1005 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1006 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1008 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1009 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1011 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1012 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1014 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1015 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1017 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1018 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1020 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1021 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1023 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1024 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1026 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1027 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1029 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1030 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1032 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1033 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1035 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1036 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1038 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1039 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1041 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1042 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1044 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1045 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1047 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1048 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1050 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1051 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1053 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1054 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1056 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1057 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1059 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1060 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1062 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1063 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1065 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1066 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1068 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1069 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1071 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1072 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1074 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1075 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1077 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1078 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1080 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1081 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1083 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1084 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1086 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1087 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1089 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1090 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1092 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1093 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1095 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1096 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1098 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1099 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1101 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1102 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1104 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1105 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1107 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1108 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1110 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1111 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1113 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1114 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1116 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1117 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1119 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1120 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1122 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1123 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1125 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1126 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1128 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1129 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1131 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1132 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1134 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1135 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1137 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1138 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1140 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1141 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1143 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1144 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1146 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1147 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1149 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1150 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1152 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1153 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1155 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1156 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1158 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1159 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1161 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1162 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1164 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1165 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1167 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1168 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1170 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1171 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1173 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1174 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1176 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1177 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1179 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1180 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1182 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1183 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1185 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1186 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1188 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1189 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1191 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1192 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1194 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1195 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1197 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1198 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1200 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1201 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1203 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1204 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1206 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1207 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1209 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1210 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1212 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1213 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1215 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1216 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1218 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1219 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1221 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1222 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1224 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1225 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1227 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1228 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1230 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1231 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1233 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1234 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1236 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1237 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1239 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1240 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1242 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1243 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1245 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1246 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1248 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1249 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1251 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1252 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1254 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1255 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1257 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1258 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1260 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1261 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1263 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1264 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1266 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1267 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1269 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1270 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1272 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1273 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1275 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1276 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1278 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1279 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1281 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1282 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1284 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1285 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1287 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1288 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1290 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1291 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1293 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1294 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1296 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1297 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1299 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1300 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1302 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1303 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1305 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1306 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1308 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1309 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1311 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1312 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1314 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1315 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1317 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1318 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1320 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1321 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1323 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1324 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1326 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1327 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1329 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1330 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1332 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1333 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1335 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1336 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1338 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1339 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1341 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1342 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1344 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1345 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1347 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1348 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1350 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1351 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1353 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1354 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1356 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1357 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1359 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1360 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1362 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1363 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1365 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1366 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1368 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1369 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1371 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1372 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1374 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1375 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1377 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1378 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1380 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1381 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1383 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1384 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1386 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1387 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1389 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1390 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1392 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1393 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1395 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1396 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1398 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1399 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1401 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1402 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1404 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1405 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1427 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1428 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1429 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1430 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1431 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1432 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1433 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1434 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1435 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1436 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1437 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1438 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1442 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1443 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1444 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1445 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1446 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1447 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1448 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1449 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1450 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1451 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1452 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1453 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1454 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1455 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1456 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1457 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1458 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1459 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1460 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1461 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1462 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1463 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1464 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1470 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1471 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1473 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1474 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1476 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1477 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1479 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1480 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1482 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1483 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1485 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1486 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1488 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1489 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1491 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1492 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1494 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1495 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1497 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1498 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1500 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1501 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1503 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1504 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1506 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1507 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1509 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1510 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1512 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1513 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1515 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1516 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1518 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1519 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1521 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1522 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1524 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1525 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1527 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1528 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1530 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1531 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1533 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1534 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1536 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1537 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1539 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1540 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1542 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1543 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1545 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1546 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1548 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1549 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1551 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1552 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1554 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1555 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1557 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1558 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1560 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1561 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1563 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1564 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1566 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1567 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1569 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1570 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1572 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1573 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1575 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1576 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1578 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1579 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1581 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1582 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1584 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1585 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1587 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1588 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1590 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1591 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1593 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1594 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1596 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1597 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1599 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1600 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1602 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1603 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1605 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1606 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1608 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1609 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1611 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1612 [-Wtabs]
  f951: Warning: Nonconforming tab character in column 1 of line 1093 [-Wtabs]
  pysatCDF/fortran_cdf.f:301:21:
  
    257 |      &entry_nums(j), buffer(j,:), status(j))
        |                     2
  ......
    301 |      &entry_nums(j), buffer(j,:), status(j))
        |                     1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
  pysatCDF/fortran_cdf.f:345:21:
  
    257 |      &entry_nums(j), buffer(j,:), status(j))
        |                     2
  ......
    345 |      &entry_nums(j), buffer(j,:), status(j))
        |                     1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
  pysatCDF/fortran_cdf.f:389:21:
  
    257 |      &entry_nums(j), buffer(j,:), status(j))
        |                     2
  ......
    389 |      &entry_nums(j), buffer(j,:), status(j))
        |                     1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(2)/REAL(8)).
  pysatCDF/fortran_cdf.f:433:21:
  
    257 |      &entry_nums(j), buffer(j,:), status(j))
        |                     2
  ......
    433 |      &entry_nums(j), buffer(j,:), status(j))
        |                     1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/REAL(8)).
  pysatCDF/fortran_cdf.f:477:21:
  
    257 |      &entry_nums(j), buffer(j,:), status(j))
        |                     2
  ......
    477 |      &entry_nums(j), buffer(j), status(j))
        |                     1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER/REAL(8)).
  pysatCDF/fortran_cdf.f:736:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    736 |         CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
  pysatCDF/fortran_cdf.f:778:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    778 |         CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(8)/REAL(4)).
  pysatCDF/fortran_cdf.f:826:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    826 |           CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
  pysatCDF/fortran_cdf.f:913:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    913 |         CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(4)).
  pysatCDF/fortran_cdf.f:954:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    954 |         CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(2)/REAL(4)).
  pysatCDF/fortran_cdf.f:995:72:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
    995 |         CALL CDF_get_var_allrecords_varname (id, in_names(j),
        |                                                                        1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/REAL(4)).
  pysatCDF/fortran_cdf.f:1029:58:
  
    697 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          2
  ......
   1029 |         CALL CDF_get_var_allrecords_varname (id, in_name, buffer,
        |                                                          1
  Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
  error: Command "/usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -I/tmp/pip-install-3fk4f9hh/pysatcdf_555ca23d525642dba4feae4e47ba1699/build/lib.linux-x86_64-3.7/pysatCDF/include -Ibuild/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/pysatCDF -I/home/asreimer/apexpy_testing/venv37/lib64/python3.7/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/distutils/include -I/home/asreimer/apexpy_testing/venv37/include -I/usr/include/python3.7m -c -c pysatCDF/fortran_cdf.f -o build/temp.linux-x86_64-3.7/pysatCDF/fortran_cdf.o" failed with exit status 1
  
  ########### EXT COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: x64
    Compiler    : gcc
  
  CPU baseline  :
    Requested   : 'min'
    Enabled     : SSE SSE2 SSE3
    Flags       : -msse -msse2 -msse3
    Extra checks: none
  
  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
    Generated   : none
  CCompilerOpt._cache_write[796] : write cache to path -> /tmp/pip-install-3fk4f9hh/pysatcdf_555ca23d525642dba4feae4e47ba1699/build/temp.linux-x86_64-3.7/ccompiler_opt_cache_ext.py
  ----------------------------------------
  ERROR: Failed building wheel for pysatCDF

My System

I'm using GNU Fortran (GCC) 10.2.1, Python 3.7.9, and numpy 1.20.1, on Fedora 33.

I can get this to compile with:

F77FLAGS='--std=legacy' pip install --no-binary :pysatCDF: pysatCDF

What is causing this?

I did some initial poking around and I think there are a couple problems:

  1. I think the cdf.inc file is written in a Fortran 77 tab-format, but for gfortran >=8 (man gfortran):
-Wtabs
           By default, tabs are accepted as whitespace, but tabs are not members of the Fortran Character Set.  For continuation lines, a tab followed by a digit between 1 and 9 is supported.  -Wtabs will cause a warning
           to be issued if a tab is encountered. Note, -Wtabs is active for -pedantic, -std=f95, -std=f2003, -std=f2008, -std=f2018 and -Wall.
  1. The format of the fortran_cdf.f file is mixed F77 and F95, including mixed tab and space-format lines

Possible Resolutions

  1. Fix cdf.inc and fortran_cdf.f to be F95 compliant
  2. Add --std=legacy as an extra_f77_compile_args in the setup.py here

Doing 1 is A LOT of work. I've tested 2 and it works.

BUG: epoch referenced before assignment

Description

When loading some cdf datasets, pysatCDF may reference epoch before it is assigned.

To Reproduce this bug:

import pysat 
import pysatNASA

vefi = pysat.Instrument('de2', 'vefi')
vefi.load(1983, 1)

yields

        # all of the data left over is 1D, add as Series
>       data = pandas.DataFrame(cdata, index=epoch)
E       UnboundLocalError: local variable 'epoch' referenced before assignment

../pysatCDF/pysatCDF/_cdf.py:686: UnboundLocalError

Test configuration

  • OS: Mac Monterrey
  • Version: python 3.10.8
  • enh/de2 branch of pysatNASA

Additional context

Found while working on pysat/pysatNASA#155

ZLIB_ERROR

Hi rstoneback,
I'm having a peculiar problem with using pysatCDF to load a specific dataset on a specific machine. I'm trying to load data from the PWE instrument, part of the Arase mission (link to files below). I managed to get the CDF files to load on my own desktop, but I receive a "ZLIB_ERROR" (see below) every time I try on the university server:

In [1]: import pysatCDF

In [2]: cdf = pysatCDF.CDF('erg_pwe_hfa_l2_spec_high_20170323_v01_01.cdf')
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-2-83e7fffe3f12> in <module>()
----> 1 cdf = pysatCDF.CDF('erg_pwe_hfa_l2_spec_high_20170323_v01_01.cdf')

/home/m/mkj13/.local/lib/python2.7/site-packages/pysatCDF/_cdf.pyc in __init__(self, fname)
     79             self._read_all_z_attribute_data()
     80         else:
---> 81             raise IOError(fortran_cdf.statusreporter(status))
     82 
     83     def __enter__(self):

IOError: ZLIB_ERROR: Error during ZLIB decompression.

The data I am using are from: https://ergsc.isee.nagoya-u.ac.jp/data/ergsc/satellite/erg/pwe/hfa/l2/spec/high/

I have not had this problem with any other datasets yet. I have also tried using different versions of Python, but I get exactly the same problem. I don't suppose you have any idea how to fix this?

Thanks
Matt.

No CDF Epoch

Hi, I have been experimenting with pysatCDF, which can successfully read the data that I am trying to look at. The only problem I have is that there is no "epoch" entry in the cdf.data dict. There is definitely an epoch in the file as it is listed in the metadata, not to mention that I can get the epoch values using IDL (yuck!). Is there something that I am missing?
Cheers,
Matt.

Installing with pip

I ran into problems installing with pip involving the notorious libgfortran rpath bug on mac.

To reproduce,

  1. pip pysatCDF on a mac anaconda/miniconda environment (python 2.7)
  2. import pysatCDF
  3. raises something like this
ImportError: dlopen(/Users/apembrok/Library/Caches/Python-Eggs/pysatCDF-0.3.0-py2.7-macosx-10.6-x86_64.egg-tmp/pysatCDF/fortran_cdf.so, 2): Library not loaded: @rpath/./libgfortran.3.dylib
  Referenced from: /Users/apembrok/Library/Caches/Python-Eggs/pysatCDF-0.3.0-py2.7-macosx-10.6-x86_64.egg-tmp/pysatCDF/fortran_cdf.so
  Reason: image not found

To resolve:

  1. verify the existing library names assigned to fortran_cdf.so:
    otool -L ${CONDA_PREFIX}/lib/python2.7/site-packages/pysatCDF/fortran_cdf.so
  2. modify the library names with install_name_tool:
install_name_tool -change @rpath/./libgfortran.3.dylib ${CONDA_PREFIX}/lib/libgfortran.dylib -change @rpath/./libquadmath.0.dylib ${CONDA_PREFIX}/lib/libquadmath.0.dylib fortran_cdf.so ${CONDA_PREFIX}/lib/python2.7/site-packages/pysatCDF/fortran_cdf.so

Conda package installers usually fix the rpath issue automagically. Not sure how to do this with setuptools...

CDF version is out of date

I feel obliged to mention that CDF is currently on version 3.8.1
It looks like pysatCDF is using CDF version 3.5.0 according to the README in cdf36_3-dist

I'm not sure which version is actually being used, but unless there are issues with the latest version I think we should try to use it.

MAINT: update to use pyproject.toml

Is your feature request related to a problem? Please describe.
setup.py is deprecated by pip.

Describe the solution you'd like
Update using pyproject.toml standards

Describe alternatives you've considered
๐Ÿ˜ด

Additional context
Followup from pysat/pysat#1051

conda recipe

It would be incredibly useful if pysatcdf had a conda or conda forge recipe. This would enable users to utilize the package more easily and readily.

ENH: flake-8 standards

Description

Need to update flake-8 standard with the other pysat projects

Potential Impact

May need major rewrite of portions of code

Potential solution(s)

  • Add hacking and docstring checks
  • Update code standards accordingly
  • remove cap on flake8, fix how ignore statements are handled

Alternatives

lower standards

Additional context

follow on from #39.

Expand read support for higher dimension data

pysatCDF currently uses a Fortran interface to the underlying CDF library. Each time a variable is loaded the code needs to open the file, read the variable, then close the file. Each variable type requires its own function. To reduce read time, all variables of a given type and dimensionality (<=2) are all read at once. The memory passed to Fortran is sized based off of the largest dimensions, so loading 1D and 10D data together is inefficient.

Convert the raw fortran read routines to support the highest CDF dimension (10?).
Keep current loads of 1D and 2D together. Then load 3D, 4D, 5D, as needed, individually.

Issues installing with python 2.7 anaconda version

Any chance this can be installed easily with anaconda?

I had issues trying to install following the README instructions (using MacOSX).

Here is the output:

swe16:pysatCDF lwinter$ python setup.py install
Unable to find CDF installation in default location.
Building CDF for pysatCDF.
running install
running bdist_egg
running egg_info
running build_src
Traceback (most recent call last):
File "setup.py", line 273, in
'Programming Language :: Python :: 3.4',
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/Users/lwinter/anaconda/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Users/lwinter/anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/lwinter/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
self.do_egg_install()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/lwinter/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/lwinter/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/command/egg_info.py", line 18, in run
self.run_command("build_src")
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/lwinter/anaconda/lib/python2.7/distutils/dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", line 128, in finalize_options
build_ext = self.get_finalized_command('build_ext')
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/Users/lwinter/anaconda/lib/python2.7/site-packages/numpy/distutils/command/build_ext.py", line 75, in finalize_options
self.set_undefined_options('build', ('parallel', 'parallel'))
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 302, in set_undefined_options
getattr(src_cmd_obj, src_option))
File "/Users/lwinter/anaconda/lib/python2.7/distutils/cmd.py", line 105, in getattr
raise AttributeError, attr
AttributeError: parallel

ENH: rename develop branches

Description

Following pysat, develop-3 should be renamed as develop, and develop renamed as develop-2.

Potential impact

  • Confusion

Potential solution(s)

See above

Alternatives

๐Ÿซ 

Additional context

Add any other context or screenshots about the feature request here, potentially
including your operational configuration.

Installation on Windows using MSYS fails

Hello,

I am desparately trying to install pysatCDF on Windows 10 with Miniconda 2.7 and CDF Software Distribution 3.6.4. I installed MSYS, updated twice, downloaded some build tools using pacman, set up the PATH variables as specified in the instructions and started the installation. The rather lengthy output is uploaded here:

https://pastebin.com/TxR5D5my

There seems to be a lot of missing references that, as far as I understand, ultimately lead to the failure of the setup. Am I doing something wrong here or is this a bug?

MAINT: numpy 1.24 compliance

Description

numpy 1.24 has dropped some deprecated features, in particular with respect to data access.

Potential impact

From unit tests for pandas data in pysatNASA:

>                   self.meta[var_name][attr_name] = data[i, 0:num_e]
E                   IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/pysatCDF/_cdf.py:572: IndexError

These errors do not appear when a version cap is applied.

Potential solution(s)

Update data standards.

Alternatives

๐Ÿ˜ด

Additional context

Found in Github Actions testing. https://github.com/pysat/pysatNASA/actions/runs/3750994468/jobs/6371429123

cannot install pysatCDF

i have error while installing pysat cdf. the error message is shown below :

C:\Users\ASUS\pysatCDF>pip install PysatCDF
Collecting PysatCDF
Using cached pysatCDF-0.3.0.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\asus\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-ih15q5dl\PysatCDF\setup.py'"'"'; file='"'"'C:\Users\ASUS\AppData\Local\Temp\pip-install-ih15q5dl\PysatCDF\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ASUS\AppData\Local\Temp\pip-install-ih15q5dl\PysatCDF\pip-egg-info'
cwd: C:\Users\ASUS\AppData\Local\Temp\pip-install-ih15q5dl\PysatCDF
Complete output (5 lines):
Building CDF for pysatCDF.
running egg_info
running build_src
Cleaning CDF
error: [WinError 2] The system cannot find the file specified
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.