Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Clément Haëck
submeso-color
Commits
c4e99d90
Commit
c4e99d90
authored
Nov 29, 2021
by
Clément Haëck
Browse files
Make add_args second positional argument
description almost never used
parent
8f2d6ac7
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
19 additions
and
20 deletions
+19
-20
Compute/SOM/SOM_merge_pigments.py
Compute/SOM/SOM_merge_pigments.py
+1
-1
Compute/climato.py
Compute/climato.py
+1
-1
Compute/climato_tseries.py
Compute/climato_tseries.py
+1
-1
Compute/compute_hi.py
Compute/compute_hi.py
+1
-1
Compute/find_HF_inversion.py
Compute/find_HF_inversion.py
+1
-1
Compute/find_images/extract_images.py
Compute/find_images/extract_images.py
+2
-3
Compute/generate_box_grid.py
Compute/generate_box_grid.py
+1
-1
Compute/hist_to_timeseries.py
Compute/hist_to_timeseries.py
+1
-1
Compute/histogram/compute_hists_box.py
Compute/histogram/compute_hists_box.py
+1
-1
Compute/histogram/compute_hists_modis.py
Compute/histogram/compute_hists_modis.py
+1
-1
Compute/histogram/compute_hists_modis_gs.py
Compute/histogram/compute_hists_modis_gs.py
+1
-1
Compute/histogram/compute_hists_ostia.py
Compute/histogram/compute_hists_ostia.py
+1
-1
Compute/histogram/compute_hists_ostia_gs.py
Compute/histogram/compute_hists_ostia_gs.py
+1
-1
Compute/histogram/compute_hists_ostia_gs_som.py
Compute/histogram/compute_hists_ostia_gs_som.py
+1
-1
Compute/regrid/merge_daily.py
Compute/regrid/merge_daily.py
+1
-1
Compute/regrid/regrid.py
Compute/regrid/regrid.py
+1
-1
Download/download_modis.py
Download/download_modis.py
+1
-1
lib/__init__.py
lib/__init__.py
+1
-1
No files found.
Compute/SOM/SOM_merge_pigments.py
View file @
c4e99d90
...
...
@@ -17,7 +17,7 @@ log.setLevel(logging.INFO)
def
main
():
args
=
get_args
([
'region'
,
'date'
,
'fixes'
],
"Merge pigments images in daily files."
)
description
=
"Merge pigments images in daily files."
)
merge_pigments
(
args
)
...
...
Compute/climato.py
View file @
c4e99d90
...
...
@@ -13,7 +13,7 @@ def main():
parser
.
add_argument
(
'-data'
,
type
=
str
,
default
=
'globcolour'
)
args
=
lib
.
get_args
([
'region'
,
'days'
,
'level'
,
'fixes'
],
add_args
=
add_args
)
add_args
)
mod
=
importlib
.
import_module
(
'lib.data.'
+
args
[
'data'
])
finder
=
mod
.
get_finder
(
args
)
...
...
Compute/climato_tseries.py
View file @
c4e99d90
...
...
@@ -19,7 +19,7 @@ def add_args(parser):
parser
.
add_argument
(
'-data'
,
type
=
str
,
default
=
'clouds'
)
args
=
lib
.
get_args
([
'region'
,
'days'
,
'fixes'
],
add_args
=
add_args
)
args
=
lib
.
get_args
([
'region'
,
'days'
,
'fixes'
],
add_args
)
mod
=
importlib
.
import_module
(
'lib.data.'
+
args
[
'data'
])
...
...
Compute/compute_hi.py
View file @
c4e99d90
...
...
@@ -61,7 +61,7 @@ if __name__ == '__main__':
args
=
lib
.
get_args
([
'region'
,
'days'
,
'year'
,
'scale'
,
'number'
,
'fixes'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
if
args
[
'data'
]
==
'ostia'
:
...
...
Compute/find_HF_inversion.py
View file @
c4e99d90
...
...
@@ -43,7 +43,7 @@ def add_args(parser):
args
=
lib
.
get_args
([
'region'
,
'year'
,
'fixes'
,
'grid_file'
,
'season'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
PLOT
=
args
[
'plot'
]
...
...
Compute/find_images/extract_images.py
View file @
c4e99d90
...
...
@@ -25,9 +25,8 @@ def main():
parser
.
add_argument
(
'-stepy'
,
type
=
int
,
default
=
10
)
parser
.
add_argument
(
'-cover_threshold'
,
type
=
float
,
default
=
0.70
)
args
=
get_args
([
'region'
,
'year'
,
'fixes'
],
"Extract images from regridded swaths."
,
add_args
)
args
=
get_args
([
'region'
,
'year'
,
'fixes'
],
add_args
,
"Extract images from regridded swaths."
)
find_images
(
args
)
...
...
Compute/generate_box_grid.py
View file @
c4e99d90
...
...
@@ -48,7 +48,7 @@ def generate_grid(args, zone, land):
def
main
():
args
=
lib
.
get_args
([
'region'
],
add_args
=
add_args
)
args
=
lib
.
get_args
([
'region'
],
add_args
)
args
[
'grid_file'
]
=
'boxgrid_{:.1f}_{:.1f}'
.
format
(
args
[
'size_lon'
],
args
[
'size_lat'
])
...
...
Compute/hist_to_timeseries.py
View file @
c4e99d90
...
...
@@ -16,7 +16,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'number'
,
'scale'
,
'coef'
,
'zone'
,
'fixes'
],
add_args
=
add_args
)
add_args
)
args
[
'days'
]
=
1
args
[
'Y'
]
=
args
[
'year'
]
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
...
...
Compute/histogram/compute_hists_box.py
View file @
c4e99d90
...
...
@@ -26,7 +26,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
# Retrieve datasets
...
...
Compute/histogram/compute_hists_modis.py
View file @
c4e99d90
...
...
@@ -31,7 +31,7 @@ def main():
args
=
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
,
'zone'
],
add_args
=
add_args
)
add_args
)
zone
=
lib
.
zones
.
zones
[
args
[
'zone'
]]
coef
=
lib
.
data
.
hi
.
get_coef
(
args
)
...
...
Compute/histogram/compute_hists_modis_gs.py
View file @
c4e99d90
...
...
@@ -30,7 +30,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
,
'zone'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
images_all
=
lib
.
data
.
images
.
get_images_list
(
args
)
...
...
Compute/histogram/compute_hists_ostia.py
View file @
c4e99d90
...
...
@@ -25,7 +25,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
,
'zone'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
# Retrieve datasets
...
...
Compute/histogram/compute_hists_ostia_gs.py
View file @
c4e99d90
...
...
@@ -26,7 +26,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
,
'zone'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
# Retrieve datasets
...
...
Compute/histogram/compute_hists_ostia_gs_som.py
View file @
c4e99d90
...
...
@@ -31,7 +31,7 @@ def main():
args
=
lib
.
get_args
([
'region'
,
'year'
,
'days'
,
'scale'
,
'number'
,
'coef'
,
'fixes'
,
'zone'
],
add_args
=
add_args
)
add_args
)
args
[
'fixes'
][
'Y'
]
=
args
[
'year'
]
variables_pft
=
[
...
...
Compute/regrid/merge_daily.py
View file @
c4e99d90
...
...
@@ -21,7 +21,7 @@ log.setLevel(logging.INFO)
def
main
():
args
=
get_args
([
'region'
,
'date'
],
'Merge OC and SST products. Merge daily.'
)
description
=
'Merge OC and SST products. Merge daily.'
)
merge_daily
(
'OC'
,
args
)
merge_daily
(
'SST'
,
args
)
...
...
Compute/regrid/regrid.py
View file @
c4e99d90
...
...
@@ -27,7 +27,7 @@ l2mapgen_script_file = path.join(path.dirname(path.realpath(__file__)),
def
main
():
args
=
get_args
([
'data_type'
,
'region'
,
'date'
,
'fixes'
],
'Remap L2 swaths to regular grid.'
)
description
=
'Remap L2 swaths to regular grid.'
)
l2_to_map
(
args
)
...
...
Download/download_modis.py
View file @
c4e99d90
...
...
@@ -26,7 +26,7 @@ def main():
parser
.
add_argument
(
'-password'
,
nargs
=
1
,
type
=
str
)
args
=
get_args
([
'region'
,
'date'
,
'data_type'
,
'fixes'
],
'Download modis data'
,
add_args
=
add_args
)
add_args
,
'Download modis data'
)
args
[
'password'
]
=
args
[
'password'
][
0
]
args
[
'user'
]
=
args
[
'user'
][
0
]
download_data
(
args
)
...
...
lib/__init__.py
View file @
c4e99d90
...
...
@@ -71,7 +71,7 @@ def check_output_dir(odir, log=None, file=False):
os
.
makedirs
(
odir
)
def
get_args
(
args
,
description
=
''
,
add_args
=
None
):
def
get_args
(
args
,
add_args
=
None
,
description
=
''
):
"""Get command line arguments.
With lots of typical arguments.
...
...
Write
Preview
Markdown
is supported
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