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

Query on adjoint force non-dimensionalisation #832

Open
williameaton opened this issue Mar 8, 2024 · 1 comment
Open

Query on adjoint force non-dimensionalisation #832

williameaton opened this issue Mar 8, 2024 · 1 comment

Comments

@williameaton
Copy link

Hi Folks,

I need to run a kernel calculation in which the adjoint force has units of m/s^4, i.e. the 4th time derivative of displacement, and the adjoint force time-series is calculated directly from the output seismograms.

Upon looking at the file compute_arrays_source.f90 it looks like the source is read from file, and then non-dimensionalised with the line

  ! non-dimensionalize
  adj_src(:,:) = adj_src(:,:) * scale_displ_inv

Does this line need to be edited to use a different non-dimensionalisation, in the case that the adjoint source has units other than metres? I.e. for my case do I need to edit the line to

  ! non-dimensionalize
  adj_src(:,:) = adj_src(:,:) * scale_displ_inv * (scale_t)**4

Finally, if I do not need to edit this, does this non-dimensionalisation affect the output units of my adjoint wavefield/do I need to be aware of scaling this when I calculate kernels that include the adjoint wavefield?

Thanks!

@danielpeter
Copy link
Contributor

good question :) - i was wondering the same a while ago. this scaling was introduced by Qinya in her original implementation and hasn't changed so far. and i think the code is consistent in the way how it non-dimensionalizes and re-dimensionalizes the adjoint wavefield, in particular the kernels.

  1. note that the SPECFEM codes all implement the linear wave equation. that is, if you would double the magnitude of the source, the wavefield amplitudes would be twice as large as well. the output scales linearly with the source magnitude.

  2. the adjoint source can have varying dimensions, depending if you take a traveltime misfit, amplitude misfit or whatever misfit you come up with. thus, the kernel dimensions will vary as well according to the adjoint wavefield dimension. however, the kernel expressions are all linear, best seen with the density kernel. Thus, if the adjoint source amplitude doubles, the adjoint wavefield amplitude doubles and the adjoint kernels become twice as big as well.

considering 1. and 2. , it doesn't matter what scaling factor your apply to the adjoint source as long as this is consistent with the re-scaling of the adjoint wavefield in the output of the kernel results. the code uses scale_displ_inv to that end, it could have taken any other value as well.

so to answer the question, i think you don't have to change the non-dimensionalization factor when you change the adjoint source. but if you would do this, you would also need to change the kernel re-dimensionalization factors (and adjoint wavefield outputs in case). given the code doesn't know a priori what adjoint source you use as input, it uses a scaling factor for a simple waveform misfit adjoint source (that would be measured in meters and hence the scale_displ_inv factor) to non-dimensionalize and re-dimensionalize the adjoint wavefield.

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

2 participants