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

Diag manager: Allow scalar static variables #1526

Open
uramirez8707 opened this issue May 16, 2024 · 0 comments
Open

Diag manager: Allow scalar static variables #1526

uramirez8707 opened this issue May 16, 2024 · 0 comments
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. help wanted

Comments

@uramirez8707
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current register_static_field interface does not allow for scalar static variables.

INTEGER FUNCTION register_static_field(module_name, field_name, axes, long_name, units,&
& missing_value, range, mask_variant, standard_name, DYNAMIC, do_not_log, interp_method,&
& tile_count, area, volume, realm)
CHARACTER(len=*), INTENT(in) :: module_name !< Name of the module, the field is on
CHARACTER(len=*), INTENT(in) :: field_name !< Name of the field
INTEGER, DIMENSION(:), INTENT(in) :: axes !< Axes_id of the field

This will force users to have a dummy axis of size 1 which is terrible practice.
https://github.com/uramirez8707/FMS/blob/008ebd513cd170c223d6d50be9ff36bee156e3e3/test_fms/diag_manager/test_output_every_freq.F90#L50
https://github.com/uramirez8707/FMS/blob/008ebd513cd170c223d6d50be9ff36bee156e3e3/test_fms/diag_manager/test_output_every_freq.F90#L53

Describe the solution you'd like
The register_static_field should be expanded to allow for scalar static variables.

Describe alternatives you've considered
Forcing people to pass in a dummy axis of size 1

Additional context
N/A

@uramirez8707 uramirez8707 added enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. help wanted labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR for a modification that increases performance, improves syntax, or adds functionality. help wanted
Projects
None yet
Development

No branches or pull requests

1 participant