Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MVCM
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Paolo Veglio
MVCM
Commits
efe84051
Commit
efe84051
authored
3 months ago
by
Paolo Veglio
Browse files
Options
Downloads
Patches
Plain Diff
code cleanup
parent
6bbd98be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mvcm/main_prep_only.py
+2
-2
2 additions, 2 deletions
mvcm/main_prep_only.py
mvcm/main_tests_only.py
+1
-1
1 addition, 1 deletion
mvcm/main_tests_only.py
mvcm/write_output.py
+2
-2
2 additions, 2 deletions
mvcm/write_output.py
with
5 additions
and
5 deletions
mvcm/main_prep_only.py
+
2
−
2
View file @
efe84051
...
@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
...
@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
LOG_LEVELS
=
[
"
CRITICAL
"
,
"
ERROR
"
,
"
WARNING
"
,
"
INFO
"
,
"
DEBUG
"
]
LOG_LEVELS
=
[
"
CRITICAL
"
,
"
ERROR
"
,
"
WARNING
"
,
"
INFO
"
,
"
DEBUG
"
]
proc
=
psutil
.
Process
(
os
.
getpid
())
proc
=
psutil
.
Process
(
os
.
getpid
())
_VERSION
=
"
0.0.0
"
_VERSION
=
get_distribution
(
"
mvcm
"
).
version
def
main
(
def
main
(
...
@@ -177,7 +177,7 @@ def main(
...
@@ -177,7 +177,7 @@ def main(
logger
.
info
(
f
"
Memory usage #3:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
logger
.
info
(
f
"
Memory usage #3:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
with
xr
.
open_dataset
(
file_names
[
"
MOD02
"
])
as
vnp02
:
with
xr
.
open_dataset
(
file_names
[
"
MOD02
"
])
as
vnp02
:
time_str
=
dt
.
strftime
(
dt
.
strptime
(
vnp02
.
time_coverage_start
,
fmt_in
),
fmt_out
)
time_str
=
dt
.
strftime
(
dt
.
strptime
(
vnp02
.
time_coverage_start
,
fmt_in
),
fmt_out
)
# noqa
viirs_data
.
to_netcdf
(
viirs_data
.
to_netcdf
(
f
"
{
os
.
path
.
dirname
(
out_file
)
}
/input_data_
{
time_str
}
.nc
"
,
mode
=
"
w
"
,
format
=
"
NETCDF4
"
f
"
{
os
.
path
.
dirname
(
out_file
)
}
/input_data_
{
time_str
}
.nc
"
,
mode
=
"
w
"
,
format
=
"
NETCDF4
"
...
...
This diff is collapsed.
Click to expand it.
mvcm/main_tests_only.py
+
1
−
1
View file @
efe84051
...
@@ -25,7 +25,7 @@ _LOG_FORMAT = "%(message)s"
...
@@ -25,7 +25,7 @@ _LOG_FORMAT = "%(message)s"
logging
.
basicConfig
(
level
=
"
NOTSET
"
,
datefmt
=
"
[%X]
"
,
format
=
_LOG_FORMAT
,
handlers
=
[
RichHandler
()])
logging
.
basicConfig
(
level
=
"
NOTSET
"
,
datefmt
=
"
[%X]
"
,
format
=
_LOG_FORMAT
,
handlers
=
[
RichHandler
()])
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
LOG_LEVELS
=
[
"
CRITICAL
"
,
"
ERROR
"
,
"
WARNING
"
,
"
INFO
"
,
"
DEBUG
"
]
LOG_LEVELS
=
[
"
CRITICAL
"
,
"
ERROR
"
,
"
WARNING
"
,
"
INFO
"
,
"
DEBUG
"
]
_VERSION
=
"
0.0.0
"
_VERSION
=
get_distribution
(
"
mvcm
"
).
version
proc
=
psutil
.
Process
(
os
.
getpid
())
proc
=
psutil
.
Process
(
os
.
getpid
())
...
...
This diff is collapsed.
Click to expand it.
mvcm/write_output.py
+
2
−
2
View file @
efe84051
...
@@ -346,9 +346,9 @@ def create_empty_dataset(lat_shape: tuple) -> xr.Dataset:
...
@@ -346,9 +346,9 @@ def create_empty_dataset(lat_shape: tuple) -> xr.Dataset:
def
run_mvcm
(
def
run_mvcm
(
file_names
:
dict
,
file_names
:
dict
,
thresholds_file
:
str
,
thresholds_file
:
str
|
None
,
out_file
:
str
,
out_file
:
str
,
exe_path
:
str
,
exe_path
:
str
|
None
,
satellite
:
str
=
"
VIIRS_NPP
"
,
satellite
:
str
=
"
VIIRS_NPP
"
,
)
->
None
:
)
->
None
:
"""
Run MVCM.
"""
"""
Run MVCM.
"""
...
...
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