E3SM-Project / E3SM-Project/scorpio

Add interfaces accepting scorpio data structures rather than a list of builtin types

Open
#314 5 comments 0 reactions 1 assignee Claimed by @jayeshkrishna View on GitHub
question
Dominant language
C++
Stars
22
Forks
20
Avg merge
12d 19m
Merged PRs (30d)
1

Description

I was wondering if there is a plan to add a set of interfaces accepting scorpio data structures instead of a bunch of raw types (int, double, pointers,...).

For instance, this function:

```
int PIOc_createfile(int iosysid, int *ncidp, int *iotype, const char *fname, int mode);
```

could be made more user friendly (for a C/C++ downstream user, that is) like the following (I'm using same name, but C does not support overload, so might have to be adjusted):

```
int PIOc_createfile(file_desc_t* file_desc);
```
This new function can unpack needed input from desc (mode, iosystem, iotype), also checking that they are valid, and stuff the output (ncidp) in side it.

The reason is that the C/C++ user might have a cleaner code if he/she already stores PIO stuff using PIO structures. A line such as
```
PIOc_createfile(my_file.iosystem->iosysid, &my_file.pio_ncid,&my_file.iotype,my_file.fname,my_file.mode);
```
might be harder to parse (and a waste of keystrokes ;-) ) than
```
PIOc_createfile(my_file);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.