From f63e20dfad2fae1396ff9859066935d07cbfdaee Mon Sep 17 00:00:00 2001 From: Chris Webster Date: Fri, 16 Aug 2024 11:27:56 -0600 Subject: [PATCH] Update acquiring global attributes. Some names are being phased out or renamed. Adjust to check for new and old names. --- dataIO.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dataIO.c b/dataIO.c index 71121e2..555212d 100644 --- a/dataIO.c +++ b/dataIO.c @@ -220,13 +220,14 @@ void AddDataFile(Widget w, XtPointer client, XtPointer call) nc_inq_nvars(InputFile, &nVars); - if (getNCattr(InputFile, NC_GLOBAL, "ProjectName", curFile->ProjectName) == false) - getNCattr(InputFile, NC_GLOBAL, "project", curFile->ProjectName); // Unidata DataDiscovery name. + if (getNCattr(InputFile, NC_GLOBAL, "project", curFile->ProjectName) == false) + getNCattr(InputFile, NC_GLOBAL, "ProjectName", curFile->ProjectName); getNCattr(InputFile, NC_GLOBAL, "FlightNumber", curFile->FlightNumber); getNCattr(InputFile, NC_GLOBAL, "FlightDate", curFile->FlightDate); - if (getNCattr(InputFile, NC_GLOBAL, "Platform", curFile->TailNumber) == false) - getNCattr(InputFile, NC_GLOBAL, "Aircraft", curFile->TailNumber); + if (getNCattr(InputFile, NC_GLOBAL, "platform", curFile->TailNumber) == false) + if (getNCattr(InputFile, NC_GLOBAL, "Platform", curFile->TailNumber) == false) + getNCattr(InputFile, NC_GLOBAL, "Aircraft", curFile->TailNumber); std::string warning; getNCattr(InputFile, NC_GLOBAL, "WARNING", warning);