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

Refactor of W3SRCE module #43

Open
1 of 2 tasks
ukmo-ccbunney opened this issue May 16, 2023 · 1 comment
Open
1 of 2 tasks

Refactor of W3SRCE module #43

ukmo-ccbunney opened this issue May 16, 2023 · 1 comment
Assignees

Comments

@ukmo-ccbunney
Copy link
Member

ukmo-ccbunney commented May 16, 2023

Refactor the W3SRCE module to receive and process arrays of spectra and associated arrays from caller.
Requires:

  • Handling of arrays defined on full domain (NSEA) vs local processor domain (NSEAL)
  • Temporary arrays will need expanding
    • Implement chunking to keep temporary array size manageable (and also to mimic existing functionality)
  • Initially wrapping calls to source term subroutine calls in loops (until individual routines have been ported)

Prerequisites:

TODO:

  • Sort out FPI variable. Currently calculating ISEA for each loop iter. Does FPI get used for next iteration? i.e. do I need to pass it OUT from W3SRCE?
  • Sort out temporary arrays being passed to W3SRCE due to slicing (e.g. CG, WHITECAPPING, etc)
@ukmo-ccbunney ukmo-ccbunney self-assigned this May 16, 2023
@ukmo-ccbunney ukmo-ccbunney converted this from a draft issue May 16, 2023
@ukmo-ccbunney ukmo-ccbunney moved this from Todo to In Progress in WW3 GPU port and refactor May 16, 2023
@ukmo-ccbunney
Copy link
Member Author

ukmo-ccbunney commented Jul 18, 2023

Some refactors that need noting in final PR:

  • New TILE sized arrays for mapping of local seapoints to full grid seapoints. (JSEA -> ISEA).
  • W3SRCE now loops over tiles are seapoints
    • To keep source term subroutines working as before, these are wrapped in sepoint loops
    • As source term subroutines are accelerated on GPU, it is expected they will be refactored to receive arrays of spectra.
  • VAOLD/VAoldDummy not used in w3srce. Removed. VAOLD used by PDLIB, but not in w3srce.
  • DELX, DELY and DELA not used. Removed.
  • REFLEC and REFLECD scalars removed - passed in REFL[CD] arrays instead. Calculation now done in w3srce
  • D50 and PSIC scalars removed. Passing whole arrays.
  • TMP[1234] scalars removed and passed in arrays direct.
  • VSIO/VDIO/SHAVEIO now optional arguments (only for PDLIB)
    • LSLOC test on VSIO/VDIO now done in w3srce.
    • UPDATE: These are problematic as VSIO and VDIO are not allocated if LSLOC is True. This makes passing them into W3SRCE difficult. Maybe if I don't slice them?
  • A new loop added to end of main chunk loop to copy local grid variables back to full grid (e.g. USTAR)
  • WHITECAP, TAUICE and TAUBBL 2D arrays have been split into multiple 1D arrays to avoid temporary variables when slicing.

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

No branches or pull requests

1 participant