[MOAB-dev] commit/MOAB: danwu: Add comments to MPAS reader on two possible types for xtime variable.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Nov 21 10:39:41 CST 2013
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/cf918f3a3973/
Changeset: cf918f3a3973
Branch: master
User: danwu
Date: 2013-11-21 17:39:27
Summary: Add comments to MPAS reader on two possible types for xtime variable.
Affected #: 1 file
diff --git a/src/io/NCHelperMPAS.cpp b/src/io/NCHelperMPAS.cpp
index c803bf3..b706990 100644
--- a/src/io/NCHelperMPAS.cpp
+++ b/src/io/NCHelperMPAS.cpp
@@ -147,12 +147,14 @@ ErrorCode NCHelperMPAS::init_mesh_vals()
// Store time coordinate values in tVals
if (nTimeSteps > 0) {
+ // Note, two possible types for xtime variable: double(Time) or char(Time, StrLen)
if ((vmit = varInfo.find("xtime")) != varInfo.end() && (*vmit).second.varDims.size() == 1) {
+ // If xtime variable is double type, read time coordinate values to tVals
rval = read_coordinate("xtime", 0, nTimeSteps - 1, tVals);
ERRORR(rval, "Trouble reading 'xtime' variable.");
}
else {
- // If expected time variable is not available, set dummy time coordinate values to tVals
+ // If xtime variable does not exist, or it is string type, set dummy values to tVals
for (int t = 0; t < nTimeSteps; t++)
tVals.push_back((double)t);
}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list