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

feedback from a quick test #3

Open
Thomas-Ulrich opened this issue Dec 19, 2024 · 0 comments
Open

feedback from a quick test #3

Thomas-Ulrich opened this issue Dec 19, 2024 · 0 comments

Comments

@Thomas-Ulrich
Copy link

Thomas-Ulrich commented Dec 19, 2024

Hi Frantisek,

I've been testing your code, using the LAquila-realdata example, and notice the example file needs to be update:

diff --git a/examples/LAquila-realdata/SlipInvSVD.in b/examples/LAquila-realdata/SlipInvSVD.in
index 3e6c4d3..0347972 100644
--- a/examples/LAquila-realdata/SlipInvSVD.in
+++ b/examples/LAquila-realdata/SlipInvSVD.in
@@ -1,7 +1,7 @@
 Data (1 = synthetic data, 0 = read from files, -1 = custom target model from a file)
 0
-Std.dev for slip rate (0 = no smoothing), Std.dev for GF's, GPS weight, M0 constraint weight, Weight of additional constraint
-1.d0  0.1  .1d0   1.d0   0.d0
+Std.dev for slip rate (0 = no smoothing), Std.dev for GF's, GPS weight, M0 constraint weight, Weight of additional constraint, Aspect ratio of the smoothing constraint
+1.d0  0.1  .1d0   1.d0   0.d0 1d0
 Station component weights (1=no distance distance-dependent weights, 2=distance-dependent approximated CD)
 1
 Choice of use of eigenvectors (see further)

stations.dat is missing (but can be easily created from stations.txt)

EDIT: now I realize that stations.dat is created by the program station.
and this kind of project the coords in stations.txt. So that might explain why I get different results.

icc has been replaced to icx, and I could compile with:

diff --git a/src/compile.SlipInvNNLS.sh b/src/compile.SlipInvNNLS.sh
index d4889f5..afaf027 100644
--- a/src/compile.SlipInvNNLS.sh
+++ b/src/compile.SlipInvNNLS.sh
@@ -1,6 +1,7 @@
#Compile with MKL NNLS
-icc -O -c -openmp nnlsmkl.c
-ifx -O -fpp -openmp -mkl -DMKL -DNNLSMKL -oSlipInvNNLS SlipInvNNLS.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for nnlsmkl.o OutputModel.f90
+export MKLROOT=/opt/software/intel/oneapi/2024.2/mkl/2024.2
+icx -I${MKLROOT}/include -O -c -qopenmp nnlsmkl.c
+ifort -I${MKLROOT}/include -O -fpp -qopenmp -qmkl -DMKL -DNNLSMKL -oSlipInvNNLS SlipInvNNLS.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for nnlsmkl.o OutputModel.f90

#Compile with classical NNLS
#ifort -O -fpp -openmp -mkl -DMKL -oSlipInvNNLS SlipInvNNLS.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for nnls.f90 OutputModel.f90

I could run the code I got:

(base) ulrich@exception:/export/dump/ulrich/LinSlipInv/examples/LAquila-realdata$ ./SlipInvNNLS 
 Reading parameters...
   (Warning! Assumig order epicL, epicW in input.dat!)
   (Using mu values from file crustal.dat)
   (reading observed data from files)
 Creating matrix H...
   (Correcting GFs for artifical time delay by   30.0000000000000      sec.)
 Creating vector u...
 Creating matrix G and vector d...
   (constraint on M0 applied)
   184.909533010974     
   (smoothing by model covariance matrix applied)
   (Preparing the covariance matrix ...)
     (k^-2 in space and f^0 in time)
 POZOR, hladim IZOTROPNE!!!
   (Covariance matrix ready)
 Saving matrix G and vector D to G.dat ...
 Calculating m_tilde using NNLS ...
   (matrix         9502 x        7800 )
nSys 0, nnlsIter 5761, lsIter 6020
Elapsed time 567.119573
   (variance reduction:   0.965302514734550      )
   (RMS of covariance constraint   1.240720362048741E-002 )
   (scalar moment   3.104610324377345E+018 )
   (scalar moment discrepancy    77.3043876442478      %)

and I'm able to reproduce the results, e.g.
image

When plotting results, I get the following error:

(base) ulrich@exception:/export/dump/ulrich/LinSlipInv/examples/LAquila-realdata$ sh mtilde2anime.sh 
 Converting mtilde.dat
"mtilde2anime.gp" line 25: warning: Cannot find or open file "epic.dat"

well, I suppose epic.dat should be something like

6000.  4000.

?

Looking at SlipInvSVD.in, it is not very clear what are:
slip rate time window (is that the width of each hat function?)
Depth of fault reference point (m) (is that the depth of the hypocenter?)
Position of reference point on the fault (m) (is that position in the horizontal plane?).

At this point, I'm just testing if I can get quickly (in the sense learning curve) some kinematic slip models with different codes, so I'm not necessarily considering using your code in the future, but I wanted to document my endevour so that future user may not fall in the same issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant