Giter VIP home page Giter VIP logo

cl2nc's People

Contributors

peterkuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cl2nc's Issues

Error: Exception: Invalid syntax for time format

Hi,
Having the following error for converting cl51 data.

`Traceback (most recent call last):
File "/home/sourav/anaconda3/bin/cl2nc", line 240, in read_input
d.update(line0(line))
File "/home/sourav/anaconda3/bin/cl2nc", line 51, in line0
if m is None: raise Exception('Invalid syntax for time format')
Exception: Invalid syntax for time format

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sourav/anaconda3/bin/cl2nc", line 478, in
'check': args.check
File "/home/sourav/anaconda3/bin/cl2nc", line 275, in read_input
raise Exception('Error on line %d: %s: %s' % (line_number, e, line))
Exception: Error on line 4: Invalid syntax for time format: �CL010326�
`

Any suggestion?
Thanks in advance

Last timestamp not included in netcdf

Hi,

I have several CL31 files (one example attached here) where I have found the last timestamp has not been included in the netcdf.

Netcdf created with:

cl2nc cl2nc_issue_example.DAT cl2nc_issue_example.nc

From cl2nc_issue_example.DAT you can see the last timestamp in the file is 2021-03-21 01:59:56

However, after a quick inspection of the netcdf:

import netCDF4 as nc 
import datetime as dt

nc_data = nc.Dataset('cl2nc_issue_example.nc')

netcdf_timestamps = [dt.datetime.fromtimestamp(i) for i in nc_data['time'][:]]

max(netcdf_timestamps).strftime('%Y-%m-%d %H:%M:%S')
>> '2021-03-21 01:59:42'

i.e. the second last timestamp in the file.

This is with cl2nc version 3.3.0 and python version 3.8.3

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.