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

waveflux.r different lists for psi.dxy #176

Open
WMueller11 opened this issue Jun 24, 2023 · 1 comment
Open

waveflux.r different lists for psi.dxy #176

WMueller11 opened this issue Jun 24, 2023 · 1 comment

Comments

@WMueller11
Copy link

Hi Elio,

I try to get running the waveflux.R, however when my script reaches the point to calculate psi.dxy
"...psi.dxy = Derivate(psi.dx ~ latrad, cyclical = FALSE)[[1]]), by = lon]..."

it says:

Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data, :
invalid type (list) for variable 'psi.dx'

Seems like has to do with psi.dx and latrad have different lists (2d and 1d respectively) and not supported by the function "Derivate". (see below screenshot for the data.table). Any idea how to solve this?

Regards
Wolfgang

dt
lon lat lonrad latrad gh u.mean v.mean f
1: -60 20 -1.047198 0.3490659 12365 15.28999 -13.410004 2.487241e-05
2: -60 20 -1.047198 0.3490659 12351 22.34999 -12.460007 2.487241e-05
3: -60 20 -1.047198 0.3490659 12356 35.44000 -8.410004 2.487241e-05
4: -60 20 -1.047198 0.3490659 12373 36.56999 1.449997 2.487241e-05
5: -60 20 -1.047198 0.3490659 12398 28.81999 -19.460007 2.487241e-05
---
200381: 90 40 1.570796 0.6981317 11614 31.67000 -4.410004 4.674483e-05
200382: 90 40 1.570796 0.6981317 11619 45.30000 -6.309998 4.674483e-05
200383: 90 40 1.570796 0.6981317 11701 51.59000 -4.160004 4.674483e-05
200384: 90 40 1.570796 0.6981317 11682 42.59000 2.089996 4.674483e-05
200385: 90 40 1.570796 0.6981317 11570 38.23999 8.949997 4.674483e-05
psi
1: 4876916474
2: 4871394692
3: 4873366757
4: 4880071778
5: 4889932102
---
200381: 2437346120
200382: 2438395434
200383: 2455604181
200384: 2451616788
200385: 2428112159
psi.dx
1: -275698028, -40676758, 99432076, 189824872, 144628474, 13558919,...
2: -275698028, -40676758, 99432076, 189824872, 144628474, 13558919,...
3: -275698028, -40676758, 99432076, 189824872, 144628474, 13558919,...
4: -275698028, -40676758, 99432076, 189824872, 144628474, 13558919,...
5: -275698028, -40676758, 99432076, 189824872, 144628474, 13558919,...
---
200381: 480970022,-579568877,-622856179, 146695857, -24048501,-245294711,...
200382: 480970022,-579568877,-622856179, 146695857, -24048501,-245294711,...
200383: 480970022,-579568877,-622856179, 146695857, -24048501,-245294711,...
200384: 480970022,-579568877,-622856179, 146695857, -24048501,-245294711,...
200385: 480970022,-579568877,-622856179, 146695857, -24048501,-245294711,...
psi.dxx
1: 2071650286, 4298674344, 2641354115, 517912572,-2019859029,-2019859029,...

@eliocamp
Copy link
Owner

eliocamp commented Jul 1, 2023

Hi, can you provide a minimal reproducible example of this issue?

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

No branches or pull requests

2 participants