Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jukkr
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kkr
jukkr
Commits
bb468edd
Commit
bb468edd
authored
2 years ago
by
Philipp Rüssmann
Browse files
Options
Downloads
Patches
Plain Diff
Apply 2 suggestion(s) to 1 file(s)
parent
ed54d996
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/KKRhost/write_gflle_npy.f90
+8
-101
8 additions, 101 deletions
source/KKRhost/write_gflle_npy.f90
with
8 additions
and
101 deletions
source/KKRhost/write_gflle_npy.f90
+
8
−
101
View file @
bb468edd
...
...
@@ -956,107 +956,6 @@ contains
write
(
p_un
)
mtx
close
(
unit
=
p_un
)
End
Subroutine
write_int8_mtx
Subroutine
write_int8_3d
(
filename
,
mtx
)
Implicit
None
character
(
len
=*
),
intent
(
in
)
::
filename
integer
(
1
),
intent
(
in
)
::
mtx
(:,:,:)
character
(
len
=*
),
parameter
::
var_type
=
"<i1"
integer
(
4
)
::
header_len
,
s_mtx
(
3
),
i
,
j
s_mtx
=
shape
(
mtx
)
header_len
=
len
(
dict_str
(
var_type
,
s_mtx
))
open
(
unit
=
p_un
,
file
=
filename
,
form
=
"unformatted"
,
&
access
=
"stream"
)
write
(
p_un
)
magic_num
,
magic_str
,
major
,
minor
write
(
p_un
)
header_len
write
(
p_un
)
dict_str
(
var_type
,
s_mtx
)
write
(
p_un
)
mtx
close
(
unit
=
p_un
)
End
Subroutine
write_int8_3d
Subroutine
write_int8_vec
(
filename
,
vec
)
Implicit
None
character
(
len
=*
),
intent
(
in
)
::
filename
integer
(
1
),
intent
(
in
)
::
vec
(:)
character
(
len
=*
),
parameter
::
var_type
=
"<i1"
integer
(
4
)
::
header_len
,
s_vec
(
1
),
i
s_vec
=
shape
(
vec
)
header_len
=
len
(
dict_str
(
var_type
,
s_vec
))
open
(
unit
=
p_un
,
file
=
filename
,
form
=
"unformatted"
,
&
access
=
"stream"
)
write
(
p_un
)
magic_num
,
magic_str
,
major
,
minor
write
(
p_un
)
header_len
write
(
p_un
)
dict_str
(
var_type
,
s_vec
)
write
(
p_un
)
vec
close
(
unit
=
p_un
)
End
Subroutine
write_int8_vec
function
dict_str
(
var_type
,
var_shape
)
result
(
str
)
implicit
none
character
(
len
=*
),
intent
(
in
)
::
var_type
integer
(
4
),
intent
(
in
)
::
var_shape
(:)
character
(
len
=
:),
allocatable
::
str
integer
(
4
)
::
cnt
cnt
=
len
(
"{'descr': '"
)
cnt
=
cnt
+
len
(
var_type
)
cnt
=
cnt
+
len
(
"', 'fortran_order': True, 'shape': ("
)
cnt
=
cnt
+
len
(
shape_str
(
var_shape
))
cnt
=
cnt
+
len
(
",), }"
)
do
while
(
mod
(
cnt
+
10
,
16
)
/
=
0
)
cnt
=
cnt
+
1
enddo
allocate
(
character
(
cnt
)
::
str
)
str
=
"{'descr': '"
//
var_type
//
&
"', 'fortran_order': True, 'shape': ("
//
&
shape_str
(
var_shape
)//
"), }"
do
while
(
mod
(
len
(
str
)
+
11
,
16
)
/
=
0
)
str
=
str
//
" "
enddo
str
=
str
//
achar
(
10
)
end
function
dict_str
function
shape_str
(
var_shape
)
result
(
fin_str
)
implicit
none
integer
(
4
),
intent
(
in
)
::
var_shape
(:)
character
(
len
=
:),
allocatable
::
str
,
small_str
,
fin_str
integer
(
4
)
::
i
,
length
,
start
,
halt
length
=
14
*
size
(
var_shape
)
allocate
(
character
(
length
)
::
str
)
allocate
(
character
(
14
)
::
small_str
)
str
=
" "
do
i
=
1
,
size
(
var_shape
)
start
=
(
i
-
1
)
*
length
+
1
halt
=
i
*
length
+
1
write
(
small_str
,
"(I13,A)"
)
var_shape
(
i
),
","
str
=
trim
(
str
)//
adjustl
(
small_str
)
enddo
fin_str
=
trim
(
str
)
end
function
shape_str
end
module
m_npy
module
mod_write_gflle
...
...
@@ -1064,6 +963,14 @@ module mod_write_gflle
contains
!-------------------------------------------------------------------------------
!> Summary: Write gflle file out in npy format
!> Author: Philipp Rüßmann
!> Category: writeout
!> Deprecated: False
!> Creates one file per atom and energy, otherwise file can be very large which
!> might be problematic in post-processing
!-------------------------------------------------------------------------------
subroutine
write_gflle_to_npy
(
lmmaxd
,
ielast
,
nqdos
,
i1
,
gflle
)
use
mod_datatypes
,
only
:
dp
...
...
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