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
dg
dg
Commits
9e05aca5
Commit
9e05aca5
authored
Nov 14, 2016
by
Philippe Delandmeter
Browse files
netcdf_to_msh now writes idx file
parent
985fcaec
Pipeline
#1348
passed with stage
in 29 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dgpy/scripts/slimPre.py
View file @
9e05aca5
...
...
@@ -403,14 +403,18 @@ def netcdf_to_msh(mesh_file_name, nc_file_name, variable_name, export_file_name,
* variable_name
name of the variable in the netcdf file
* export_file_name
path to the field name (.
msh
format)
path to the field name (.
idx
format)
* time
time at which the data will be exported in msh format (default: 0)
"""
groups
=
dgpy
.
dgGroupCollection
(
mesh_file_name
)
f
=
slim_private
.
_load_function
((
nc_file_name
,
variable_name
),
groups
)
dgpy
.
function
.
getTime
().
set
(
time
)
groups
.
exportFunctionMsh
(
f
,
export_file_name
)
dof
=
dgpy
.
dgDofContainer
(
groups
,
1
)
dof
.
interpolate
(
f
)
exporter
=
dgpy
.
dgIdxExporter
(
dof
,
export_file_name
)
exporter
.
exportIdx
()
#groups.exportFunctionMsh(f, export_file_name)
def
read_temporal_serie
(
file_name
,
time
=
None
,
output_netcdf
=
None
):
"""Return a temporal serie from a text data file.
...
...
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