Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ash
ash-iasi
Commits
b9a6060c
Commit
b9a6060c
authored
Jun 07, 2022
by
Espen Sollum
Browse files
Fixed problem with last time interval in case of missing files. Removed some output to stdout.
parent
896ea8bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Plot_IASI/run_regrid_IASI.py
View file @
b9a6060c
...
...
@@ -233,7 +233,7 @@ eso@nilu.no
### Capture output from subprocess
proc_output
=
proc
.
stdout
.
read
().
strip
()
if
(
len
(
proc_output
)
>
-
1
):
if
(
len
(
proc_output
)
>
0
):
print
(
proc_output
)
proc
.
wait
()
...
...
bin/makeCombined.py
View file @
b9a6060c
...
...
@@ -8,7 +8,7 @@ DESCRIPTION
NOTE
Uses the "non-standard" pynco library, install under your user directory with
`
python3 -m pip install --user nco
´
"
python3 -m pip install --user nco
"
TODO
A cron job deletes IASI files older than n (=14?) days. Take care in this script
...
...
@@ -126,11 +126,21 @@ def make_interval(files_dict, days_to_process=None):
utc_now_hour
=
datetime
.
utcnow
().
hour
end_hour
=
math
.
ceil
(
utc_now_hour
/
(
DT
.
seconds
/
3600
))
*
int
(
DT
.
seconds
/
3600
)
# This fails to correctly produce latest interval if files are missing
# if end_hour == 24:
# # set h=0 and increase day
# end_day = latest_date.replace(hour=0, minute=0) + timedelta(days=1)
# else:
# end_day = latest_date.replace(hour=end_hour, minute=0)
# Try using current utc date instead of latest date of files
utc_now
=
datetime
.
utcnow
()
if
end_hour
==
24
:
# set h=0 and increase day
end_day
=
latest_date
.
replace
(
hour
=
0
,
minute
=
0
)
+
timedelta
(
days
=
1
)
end_day
=
utc_now
.
replace
(
hour
=
0
,
minute
=
0
)
+
timedelta
(
days
=
1
)
else
:
end_day
=
latest_date
.
replace
(
hour
=
end_hour
,
minute
=
0
)
end_day
=
utc_now
.
replace
(
hour
=
end_hour
,
minute
=
0
)
# If days_to_process is given, only process the given days back in time
if
days_to_process
is
not
None
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment