-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/increment write #15
Conversation
…ture/increment_write
…er introspection of file contents. There seems to be issues around time/tile dimension and data, currently commented out.
…es to output increment files, and other tweaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested myself but looks good. Had the odd comment (mostly formatting)
if (fieldMetadata.lfricWriteName != "TO BE DERIVED" && | ||
fieldMetadata.lfricWriteName != "TO BE IMPLEMENTED") { | ||
if (fieldMetadata.copyFirstLevel == true) { | ||
atlas::util::Config atlasOptions = atlas::option::name(fieldMetadata.lfricWriteName) | | ||
if (writeName != consts::kToBeDerived && writeName != consts::kToBeImplemented) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
int getDataSize(const atlas::Field& field) { | ||
std::vector<int> dimVec = field.shape(); | ||
int size = 1; | ||
for (const auto& dim : dimVec) { | ||
size *= dim; | ||
} | ||
return size; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this includes halo points in the count - is this what you want? Is it for global fields only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very good spot. I didn't want the ghost points, I don't think. Let me play with this. There'll be an update on this, I'm sure. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah. I checked, @mo-joshuacolclough. I am using it with global fields only. So the current implementation is what I need. Glad you made me think about that though!
I'll rename the function to make it clear. Otherwise I'll probably forget later on!
Thanks @mo-joshuacolclough. The change to |
This PR introduces the necessary changes to MONIO for use of
Monio::writeIncrements
from LFRic-Lite.Current test outputs: http://fcm1/cylc-review/taskjobs/punderwo/?suite=monio_increment_write_05
The work in MONIO for use of
Monio::readIncrements
will come next, but the work in LFRic-Lite to use both of these functions will appear in a single PR.