Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

phisx value #13

Open
ccc-12 opened this issue Aug 20, 2018 · 2 comments
Open

phisx value #13

ccc-12 opened this issue Aug 20, 2018 · 2 comments

Comments

@ccc-12
Copy link

ccc-12 commented Aug 20, 2018

Hello,

I am new to working with the HOS-Ocean model and I would like to kindly ask for a clarification.
I am trying to obtain the value of the \partial \phi^{s} / \partial x on the x-grid at each time step. I am outputting in the 'output_time_step' routine with the value calculated via the 'phisxy_etaxy' routine. I am outputting phisx(1:n1,1) (for 2D simulation). My clarification is: is this the correct value that I am looking for? I am asking as the size of phisx is larger (md1,1) depending on the order M of the solution.

Thank you for your time and help!

Kind regards,
Constantin

@rickyspaceguy
Copy link

rickyspaceguy commented Aug 20, 2018

phisx(1:md1,1) will indeed output the partial x-derivative on a grid of md1 x 1.

To project it onto n1x1, do the following

  1. FFT phisx on to its fourier space of complex amplitudes, size md1 x 1. Use s_2_f_big.
  2. Use function reduce_C to obtain a reduced fourier space of complex amplitudes i.e. size n1 x 1.
  3. Inverse FFT the n1 x 1 complex amplitudes to give phisx onto n1 x 1 grid. Use f_2_s

@ccc-12
Copy link
Author

ccc-12 commented Aug 20, 2018

Thank you very much for the help and for the quick reply!

It is very clear now and works!

All the best,
Constantin

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

No branches or pull requests

2 participants