Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
extract_cyclones
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
cyclobs
extract_cyclones
Commits
33767d07
Commit
33767d07
authored
Sep 21, 2020
by
CEVAER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding spatial_dims and crs to netcdf attributes
parent
e3b8ae8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
bin/startExtractCyclone.sh
bin/startExtractCyclone.sh
+2
-2
extract_cyclones/__init__.py
extract_cyclones/__init__.py
+4
-0
No files found.
bin/startExtractCyclone.sh
View file @
33767d07
...
...
@@ -90,10 +90,10 @@ files_to_process=$(echo "$files_to_process" | sed -r '/^\s*$/d')
if
[
"
$smap
"
==
"True"
]
;
then
echo
"Generating SMAP files..."
#printf "%s\n $files_to_process" | xargs -r -P 5 extractSmapCyclone.py --dbd "$DATABASE_URL" -o "$output_path" -i
printf
"%s
\n
$files_to_process
"
| xargs
-r
-P
5
-L
1 extractWrapper.sh extractSmapCyclone.py
--dbd
"
$DATABASE_URL
"
-o
"
$output_path
"
-i
printf
"%s
\n
$files_to_process
"
| xargs
-r
-P
10
-L
1 extractWrapper.sh extractSmapCyclone.py
--dbd
"
$DATABASE_URL
"
-o
"
$output_path
"
-i
elif
[
"
$smos
"
==
"True"
]
;
then
echo
"Generating SMOS files..."
printf
"%s
\n
$files_to_process
"
| xargs
-r
-P
5
-L
1 extractWrapper.sh extractSmosCyclone.py
--dbd
"
$DATABASE_URL
"
-o
"
$output_path
"
-i
printf
"%s
\n
$files_to_process
"
| xargs
-r
-P
10
-L
1 extractWrapper.sh extractSmosCyclone.py
--dbd
"
$DATABASE_URL
"
-o
"
$output_path
"
-i
fi
extract_cyclones/__init__.py
View file @
33767d07
...
...
@@ -6,6 +6,7 @@ from sqlalchemy import and_, func, cast
from
geoalchemy2
import
Geometry
from
cyclobs_orm
import
SimpleTrack
import
xarray
import
rioxarray
as
rxr
import
pandas
as
pd
import
geopandas
as
gpd
import
numpy
as
np
...
...
@@ -285,6 +286,9 @@ def extract_write_cyclone_data(dataset, kept_track_points, filename, output_path
sel
=
sel
.
squeeze
()
sel
.
rio
.
set_spatial_dims
(
'lon'
,
'lat'
,
inplace
=
True
)
sel
.
rio
.
write_crs
(
"epsg:4326"
,
inplace
=
True
)
sel
.
to_netcdf
(
os
.
path
.
join
(
output_path
,
output_filename
))
...
...
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