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

Add etrans #203

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open

Add etrans #203

wants to merge 14 commits into from

Conversation

samhatfield
Copy link
Collaborator

This PR adds the limited-area formulation of ecTrans, "etrans".

Actual work carried out by @ddegrauwe.

AlexandreMary and others added 13 commits January 28, 2025 14:26
…ate (trans, etrans, biper); only single include directory
…ans/cpu/; (ii) create separate ectrans_etrans_* libraries instead of patching ectrans_* libraries; (iii) re-introduced FFT992, but put it under a switch WITH_FFT992 everywhere; compiling/running with FFT992 instead of FFTW is probably still broken; (iv) temporarily added ellips.F90, which in fact should go into fiat.
Commit 8622da1 changed D%NSTAGTF from
JPIM to JPIB.
@samhatfield samhatfield force-pushed the add_etrans branch 3 times, most recently from 4db6611 to 901f85c Compare January 28, 2025 15:40
@samhatfield samhatfield force-pushed the add_etrans branch 4 times, most recently from bcf697c to cf12244 Compare January 28, 2025 15:57
Copy link
Collaborator

@wdeconinck wdeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks perfect now. Thanks @ddegrauwe for addressing my suggestions!

@samhatfield
Copy link
Collaborator Author

Note: PR #204 should be merged before this one.

@AlexandreMary
Copy link
Contributor

Reminder that this (esp. commit 1bd0e01) requires fiat PR ecmwf-ifs/fiat#30

@wdeconinck
Copy link
Collaborator

Reminder that this (esp. commit 1bd0e01) requires fiat PR ecmwf-ifs/fiat#30

Thank you for the reminder!

Copy link
Collaborator

@wdeconinck wdeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for overlooking this earlier: I don't agree with the move of ellips routines to fiat. I suggest to add them to the ectrans_common library instead, within ectrans repository. That also removes the dependency of merging ecmwf-ifs/fiat#30.

@AlexandreMary
Copy link
Contributor

@wdeconinck the move of ellips was done for the needs of the externalisation of our FA format library (taken out of ifsaux), in the spirit of what has been done for ectrans. Indeed, FA calls ellips in order to determine the size of arrays for spectral fields, when reading spectral fields.
If we move it back to ectrans, it introduces a dependency of FA to ectrans, which is a bit far-fetched, especially as FA can be used in context that never deal with spectral fields (as if eccodes depended on ectrans for spherical harmonics fields).

Is that a design issue, I don't know, but one of the consequences of the desintrications of arpifs/trans/ifsaux. But maybe we can make that dependency optional there.
@ddegrauwe, @walidchikhi, any opinion on this ?

@wdeconinck
Copy link
Collaborator

wdeconinck commented Jan 29, 2025

Actually it seems ellips.F90 is still part of ectrans in this PR: src/etrans/cpu/internal/ellips.F90 so that this PR already should not depend on ecmwf-ifs/fiat#30 (?)

I suggest to add another copy of the ellips routine in the FA library. The routine is small and trivial.
Also better to change the symbol name within etrans as it is a private implementation detail, and avoids symbol clash with the other one.

@wdeconinck
Copy link
Collaborator

I agree that FA should not depend on ectrans, just as eccodes does not. eccodes however does reimplement some functions needed to support spectral fields, and does so in the C-language.

@AlexandreMary
Copy link
Contributor

Actually it seems ellips.F90 is still part of ectrans in this PR: src/etrans/cpu/internal/ellips.F90 so that this PR already should not depend on ecmwf-ifs/fiat#30 (?)

I suggest to add another copy of the ellips routine in the FA library. The routine is small and trivial. Also better to change the symbol name within etrans as it is a private implementation detail, and avoids symbol clash with the other one.

It was removed in commit 1bd0e01 - but maybe reintroduced in one of the rebasing steps ???

@samhatfield
Copy link
Collaborator Author

samhatfield commented Jan 29, 2025

I cherry picked this commit which (erroneously?) added ellips to the etrans/cpu/internal directory.

@ddegrauwe
Copy link
Collaborator

Yes, I reintroduced ellips.F90 in ectrans to be able to build without modifying the fiat version. Sorry about the confusion this caused.

Cleanest solution to me seems indeed to duplicate ellips in ectrans and in fa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-for-ci enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants