Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #7

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
1addf44
Update README.md
N-Dhabaria Sep 7, 2021
3ae5424
Update parameters.f90
N-Dhabaria Sep 7, 2021
8ff0aab
Update parameters.f90
N-Dhabaria Sep 7, 2021
f74fc5e
Add files via upload
N-Dhabaria Sep 7, 2021
34b78c3
Update seismicmodel.py
N-Dhabaria Sep 7, 2021
9abcbee
Create file1
N-Dhabaria Sep 7, 2021
265d342
Add files via upload
N-Dhabaria Sep 7, 2021
38561f4
Delete file1
N-Dhabaria Sep 7, 2021
ba903db
Update seismicmodel.py
N-Dhabaria Sep 7, 2021
f9908b8
Update README.md
N-Dhabaria Sep 7, 2021
531bb05
Update README.md
N-Dhabaria Sep 7, 2021
6191f7f
Update README.md
N-Dhabaria Sep 7, 2021
f035a3c
Update seismicmodel.py
N-Dhabaria Sep 7, 2021
e850fb7
Create file1
N-Dhabaria Sep 7, 2021
b31d2ef
Delete file1
N-Dhabaria Sep 7, 2021
61932eb
Create file1
N-Dhabaria Sep 7, 2021
a1c038c
Update run_dsm_2.py
N-Dhabaria Sep 7, 2021
e09384d
Add files via upload
N-Dhabaria Sep 7, 2021
2f6577b
Delete file1
N-Dhabaria Sep 7, 2021
04cb7d4
Create file1
N-Dhabaria Sep 7, 2021
7bbc79b
Add files via upload
N-Dhabaria Sep 7, 2021
2b155a3
Delete models_directory directory
N-Dhabaria Sep 7, 2021
8a3fc19
Update seismicmodel.py
N-Dhabaria Sep 7, 2021
8323e03
Merge pull request #1 from N9ss/master
seismobassoon Sep 7, 2021
a494a13
Create README
N-Dhabaria Sep 14, 2021
b0ec7fd
Add files via upload
N-Dhabaria Sep 14, 2021
65f973f
Update add_attenuation.py
N-Dhabaria Sep 14, 2021
c636957
Create Readme
N-Dhabaria Sep 14, 2021
90775e8
Add files via upload
N-Dhabaria Sep 14, 2021
241171e
Create Readme
N-Dhabaria Sep 14, 2021
9607182
Add files via upload
N-Dhabaria Sep 14, 2021
4290269
Merge pull request #2 from N9ss/master
seismobassoon Sep 14, 2021
d017860
small modif
seismobassoon Feb 8, 2022
46b0514
just a small stuff
seismobassoon Feb 8, 2022
ef904fe
Update README.md
seismobassoon May 10, 2022
6af3ea1
Update README.md
seismobassoon May 10, 2022
1209b91
asdf
seismobassoon May 18, 2022
c4cee92
Merge branch 'master' of https://github.com/seismobassoon/dsmpy
seismobassoon May 18, 2022
349f416
stla stlo
seismobassoon May 20, 2022
b5dd7eb
stla stlo
seismobassoon May 20, 2022
903de8c
tla stlo
seismobassoon May 20, 2022
06b1a19
new files
seismobassoon May 20, 2022
81be46d
gcarc
seismobassoon May 20, 2022
8997c13
some pb
seismobassoon May 20, 2022
bf643ed
Merge branch 'master' of https://github.com/seismobassoon/dsmpy
seismobassoon May 20, 2022
423a335
sonify
seismobassoon May 20, 2022
039b091
see https://getridbug.com/python/getting-modulenotfounderror-when-try…
seismobassoon Jun 7, 2022
901f4de
conda is broken somewhere
seismobassoon Jun 7, 2022
1e23019
more for readme
seismobassoon Jun 7, 2022
1f3703e
Merge pull request #3 from afeborgeaud/master
seismobassoon Jul 17, 2023
f70e764
environment yml
seismobassoon Jul 17, 2023
c524f03
ok?
seismobassoon Jul 18, 2023
8ffb98b
Update README.md
seismobassoon Jul 18, 2023
7f6a9d9
Update README.md
seismobassoon Jul 18, 2023
89e8dab
Update README.md
seismobassoon Jul 18, 2023
fa9c7e7
ok?
seismobassoon Jul 19, 2023
89733df
Update README.md
seismobassoon Jul 19, 2023
52be8f3
Update README.md
seismobassoon Jul 19, 2023
7df9f09
Update README.md
seismobassoon Jul 19, 2023
c57c4b5
modif for new numpy and m1
seismobassoon Jul 19, 2023
836d8b6
Event type
seismobassoon Jul 19, 2023
83471ba
kurama modif
seismobassoon Jul 20, 2023
61c8c0d
Update README.md
seismobassoon Jul 20, 2023
a58e165
Update README.md
seismobassoon Jul 20, 2023
e6f164a
Update README.md
seismobassoon Jul 20, 2023
ecacd79
Update README.md
seismobassoon Jul 20, 2023
861b399
Update README.md
seismobassoon Jul 20, 2023
1042d5e
Update README.md
seismobassoon Jul 20, 2023
4f50761
Update README.md
seismobassoon Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 65 additions & 0 deletions Q_scripts/2d_convert_binary_to_ascii.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
% Post-processing MATLAB script for extracting 1-D properties
% at certain horizontal points
% Modified from Nakagawa scripts
%

clear

directory = '../NCFMAS-R/';
file_name = 'perplex_binary_2d1e8_R104';
horizontal_points=[1 128 256 384 512 640 758 896];


file_stem = [directory file_name];

for frame = 37:1:37
% Frame number: Please refer the final two digit in your data file
frame

if frame<10000
framestring = num2str(10000+frame);
framestring(1) = '0';
end

% load spatial fields: 4D arrays (x,y,z,b)

[theta, phi, z, vs, time] = ReadStag3Dpjt(directory, file_name, frame, 's-velocity');
[theta, phi, z, vb, time] = ReadStag3Dpjt(directory, file_name, frame, 'b-velocity');
[theta, phi, z, ps, time] = ReadStag3Dpjt(directory, file_name, frame, 'p-velocity');
[theta, phi, z, rho, time] = ReadStag3Dpjt(directory, file_name, frame, 'density');
[theta, phi, z, T, time] = ReadStag3Dpjt(directory, file_name, frame, 'temperature');
[theta, phi, z, c, time] = ReadStag3Dpjt(directory, file_name, frame, 'composition');

[nt, np, nz]=size(vs);
nz

numel(horizontal_points)
vs_arr=zeros(numel(horizontal_points), nz);
vb_arr=zeros(numel(horizontal_points), nz);
vp_arr=zeros(numel(horizontal_points), nz);
rho_arr=zeros(numel(horizontal_points), nz);
T_arr=zeros(numel(horizontal_points), nz);
c_arr=zeros(numel(horizontal_points), nz);

for k = 1:(numel(horizontal_points)-1)
p = horizontal_points(k)
vs_arr(k,:) = squeeze(vs(1,p,:));
vb_arr(k,:) = squeeze(vb(1,p,:));
vp_arr(k,:) = squeeze(ps(1,p,:)); % sqrt(vb_arr(k).^2+4.0/3.0*vs_arr(k).^2);

rho_arr(k,:) = squeeze(rho(1,p,:));
T_arr(k,:) = squeeze(T(1,p,:));
c_arr(k,:) = squeeze(c(1,p,:));
end

for k = 1:numel(horizontal_points)-1
p = horizontal_points(k)

tname=strcat(file_stem,'_all_',sprintf('%05d',p),'_', framestring,'.dat');
fid=fopen(tname,'w');
for l = 1:nz
fprintf(fid,'%f %f %f %f %f %f %f\n', (1.0-z(l))*2890, T_arr(k,l)*2500, c_arr(k,l), rho_arr(k,l), vs_arr(k,l), vb_arr(k,l), vp_arr(k,l));
end
end

end
Loading