Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Oceano2python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
Oceano2python
Commits
d532e0fd
Commit
d532e0fd
authored
5 years ago
by
jacques.grelet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
update construct datetime object for xbt and ladcp
parent
5f74d24d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
file_extractor.py
+6
-5
6 additions, 5 deletions
file_extractor.py
tests/test.toml
+4
-8
4 additions, 8 deletions
tests/test.toml
tools.py
+1
-1
1 addition, 1 deletion
tools.py
with
11 additions
and
14 deletions
file_extractor.py
+
6
−
5
View file @
d532e0fd
...
@@ -224,12 +224,13 @@ class FileExtractor:
...
@@ -224,12 +224,13 @@ class FileExtractor:
# format date and time to "May 09 2011 16:33:53"
# format date and time to "May 09 2011 16:33:53"
dateTime
=
"
%s/%s/%s %s:%s:%s
"
%
(
day
,
month
,
year
,
hour
,
minute
,
second
)
dateTime
=
"
%s/%s/%s %s:%s:%s
"
%
(
day
,
month
,
year
,
hour
,
minute
,
second
)
# set datetime object
dt
=
dt
.
strptime
(
dateTime
,
"
%d/%b/%Y %H:%M:%S
"
)
# # dateTime conversion to "09/05/2011 16:33:53"
# dateTime conversion to "09/05/2011 16:33:53"
# dateTime = "%s" % \
dateTime
=
"
%s
"
%
\
# (dt.strptime(dateTime, "%d/%m/%Y %H:%M:%S").strftime("%d/%m/%Y %H:%M:%S"))
(
dt
.
strptime
(
dateTime
,
"
%d/%m/%Y %H:%M:%S
"
).
strftime
(
"
%d/%m/%Y %H:%M:%S
"
))
# set datetime object
dt
=
dt
.
strptime
(
dateTime
,
"
%d/%m/%Y %H:%M:%S
"
)
# # conversion to "20110509163353"
# # conversion to "20110509163353"
# epic_date = "%s" % \
# epic_date = "%s" % \
# (dt.strptime(dateTime, "%d/%m/%Y %H:%M:%S").strftime("%Y%m%d%H%M%S"))
# (dt.strptime(dateTime, "%d/%m/%Y %H:%M:%S").strftime("%Y%m%d%H%M%S"))
...
...
This diff is collapsed.
Click to expand it.
tests/test.toml
+
4
−
8
View file @
d532e0fd
...
@@ -71,12 +71,12 @@ comment = "Extract from .edf files"
...
@@ -71,12 +71,12 @@ comment = "Extract from .edf files"
cruisePrefix
=
"fr29"
cruisePrefix
=
"fr29"
stationPrefixLength
=
3
stationPrefixLength
=
3
separator
=
","
separator
=
","
typeInstrument
=
"SBE21"
instrumentNumber
=
"3199"
acquisitionSoftware
=
"COLCOR"
acquisitionSoftware
=
"COLCOR"
acquisitionVersion
=
""
acquisitionVersion
=
""
processingSoftware
=
""
processingSoftware
=
""
processingVersion
=
""
processingVersion
=
""
type
=
"SBE21"
sn
=
3199
calDate
=
"14/01/2019"
calDate
=
"14/01/2019"
externalType
=
"SBE3S"
externalType
=
"SBE3S"
externalSn
=
4074
externalSn
=
4074
...
@@ -88,16 +88,12 @@ comment = "Extract from .colcor files"
...
@@ -88,16 +88,12 @@ comment = "Extract from .colcor files"
[ladcp]
[ladcp]
cruisePrefix
=
"fr29"
cruisePrefix
=
"fr29"
stationPrefixLength
=
3
stationPrefixLength
=
3
typeInstrument
=
"LADCP 150/300"
typeInstrument
=
"LADCP
WH
150/
WH
300"
instrumentNumber
=
"
12817
"
instrumentNumber
=
"
24543/24085
"
acquisitionSoftware
=
"BBTALK"
acquisitionSoftware
=
"BBTALK"
acquisitionVersion
=
3.04
acquisitionVersion
=
3.04
processingSoftware
=
"MATLAB-VISBECK"
processingSoftware
=
"MATLAB-VISBECK"
processingVersion
=
"10.16.2"
processingVersion
=
"10.16.2"
upType
=
"WH300"
upSn
=
"24085"
downType
=
"WH150"
downSn
=
"24543"
title_summary
=
"IFM-GEOMAR/LDEO Matlab LADCP-Processing system adapted by FM/PR/JG"
title_summary
=
"IFM-GEOMAR/LDEO Matlab LADCP-Processing system adapted by FM/PR/JG"
comment
=
"Extract from .lad files"
comment
=
"Extract from .lad files"
...
...
This diff is collapsed.
Click to expand it.
tools.py
+
1
−
1
View file @
d532e0fd
...
@@ -6,7 +6,7 @@ from datetime import datetime
...
@@ -6,7 +6,7 @@ from datetime import datetime
import
julian
import
julian
JULIAN
=
33282
JULIAN
=
33282
DEGREE
=
u
"
\u00B0
"
DEGREE
=
u
"
\u00B0
"
# u"\N{DEGREE SIGN}"
#DEGREE = 176
#DEGREE = 176
def
dateTime2julian
(
month
,
day
,
year
,
hour
,
minute
,
second
):
def
dateTime2julian
(
month
,
day
,
year
,
hour
,
minute
,
second
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment