From 3a9fee1bfc073f826d922ab78d6c553485c9d2ff Mon Sep 17 00:00:00 2001 From: Bob Simons Date: Wed, 16 Feb 2022 13:58:46 -0500 Subject: [PATCH] v2.17 --- .../gov/noaa/pfel/coastwatch/TestAll.java | 13 ++-- .../pfel/coastwatch/griddata/NcHelper.java | 2 +- ...Nux10S1day_20050712_x-135_X-105_y22_Y50.nc | Bin 62144 -> 62144 bytes .../noaa/pfel/coastwatch/pointdata/Table.java | 2 +- .../classes/gov/noaa/pfel/erddap/Erddap.java | 38 +++++----- .../gov/noaa/pfel/erddap/dataset/EDDGrid.java | 12 ++-- .../erddap/dataset/EDDGridFromNcFiles.java | 4 +- .../noaa/pfel/erddap/dataset/EDDTable.java | 19 ++--- .../dataset/EDDTableCopyPost.javaINACTIVE | 2 +- .../erddap/dataset/EDDTableFromNcFiles.java | 66 ++++++++++++++---- .../gov/noaa/pfel/erddap/util/EDStatic.java | 2 +- .../gov/noaa/pfel/erddap/util/messages.xml | 55 +++++++++++++-- download/AccessToPrivateDatasets.html | 2 +- download/EDDTableFromEML.html | 2 +- download/NCCSV.html | 2 +- download/NCCSV_1.00.html | 2 +- download/changes.html | 30 ++++++-- download/grids.html | 2 +- download/setup.html | 12 +++- download/setupDatasetsXml.html | 2 +- pom.xml | 38 +++++----- 21 files changed, 209 insertions(+), 98 deletions(-) diff --git a/WEB-INF/classes/gov/noaa/pfel/coastwatch/TestAll.java b/WEB-INF/classes/gov/noaa/pfel/coastwatch/TestAll.java index d810f5c93..50348e486 100644 --- a/WEB-INF/classes/gov/noaa/pfel/coastwatch/TestAll.java +++ b/WEB-INF/classes/gov/noaa/pfel/coastwatch/TestAll.java @@ -240,10 +240,10 @@ public static void main(String args[]) throws Throwable { // 1) run: // EDD.verbose = true; // EDDGridFromDap.testUAFSubThreddsCatalog(0); //0= entire official clean catalog ~16hrs -// 2) Results file is /data/_erddapBPD/logs/UAFdatasets[uafi]_[dateTime].xml -// Log file is /data/_erddapBPD/logs/UAFdatasets[uafi]_[dateTime].xml.log.txt +// 2) Results file is /erddapBPD/logs/UAFdatasets[uafi]_[dateTime].xml +// Log file is /erddapBPD/logs/UAFdatasets[uafi]_[dateTime].xml.log.txt // 3) Look at problems, creator_, title, .... Make improvements. -// from /data/_erddapBPD/logs: +// from /erddapBPD/logs: // grep "SimpleException: Error while getting DAS from" // grep "unable to get axis" // grep "unsorted axis" @@ -375,7 +375,7 @@ public static void main(String args[]) throws Throwable { /* //This downloads AWS S3 directory into to a jsonlCSV file - //The lower level copy (written to file as it is downloaded) is in _erddapBPD/datasets/_GenerateDatasetsXml + //The lower level copy (written to file as it is downloaded) is in erddapBPD/datasets/_GenerateDatasetsXml FileVisitorDNLS.verbose=true; FileVisitorDNLS.reallyVerbose=true; FileVisitorDNLS.debugMode=true; @@ -393,7 +393,7 @@ public static void main(String args[]) throws Throwable { String2.log(File2.directReadFrom88591File(outName)); String2.log("The Results are in " + outName + "\n" + "The lower level (partial?) copy (written to file as it is downloaded)\n" + - "is in _erddapBPD/datasets/_GenerateDatasetsXml ."); + "is in erddapBPD/datasets/_GenerateDatasetsXml ."); /* */ // Do this periodically to update the local cache of InPort xml files @@ -1090,9 +1090,6 @@ public static void main(String args[]) throws Throwable { boolean interactive = false; boolean doSlowTestsToo = false; -//TestSSR.testAwsTransferManager(); -//DasDds.main(new String[]{"nceiPH53sstn1day", "-verbose"}); - //EDDGridFromNcFiles.testNcml(); /* for releases, this line should have open/close comment */ diff --git a/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/NcHelper.java b/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/NcHelper.java index 2b95db0bc..9acbb95c6 100644 --- a/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/NcHelper.java +++ b/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/NcHelper.java @@ -147,7 +147,7 @@ public static String decodeNcDump(String s) { int sLength = s.length(); //remove dir name from first line (since this is sometimes sent to ERDDAP users) - //"netcdf /data/_erddapBPD/cache/_test/EDDGridFromDap_Axis.nc {\n" + + //"netcdf /erddapBPD/cache/_test/EDDGridFromDap_Axis.nc {\n" + int po = 0; int brPo = s.indexOf(" {"); if (brPo >= 0) { diff --git a/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/OQNux10S1day_20050712_x-135_X-105_y22_Y50.nc b/WEB-INF/classes/gov/noaa/pfel/coastwatch/griddata/OQNux10S1day_20050712_x-135_X-105_y22_Y50.nc index d7ef6a11bf6f455d911b41721e725ffaedab503f..f39cee90b60d0d04c3e45ed3d6cbc95ca8609a8a 100644 GIT binary patch delta 41 wcmX@`l=;9@<_$SaOonEY^O%%?)aFS{^O(5}%|Z-KtxQd<3=KD1v$ehf04IVC9smFU delta 41 wcmX@`l=;9@<_$SaOa>;C^O%%?)aFS{^O(5}OhSwdt&9z=OpP{Mv$ehf049SC5&!@I diff --git a/WEB-INF/classes/gov/noaa/pfel/coastwatch/pointdata/Table.java b/WEB-INF/classes/gov/noaa/pfel/coastwatch/pointdata/Table.java index 3cfc392b9..8e5ae2884 100644 --- a/WEB-INF/classes/gov/noaa/pfel/coastwatch/pointdata/Table.java +++ b/WEB-INF/classes/gov/noaa/pfel/coastwatch/pointdata/Table.java @@ -9810,7 +9810,7 @@ public static void testReadNDNc() throws Exception { Test.ensureEqual(results, expected, "results=\n" + results); //test String vars - fiName = "c:/data/_erddapBPD/copy/cPostDet3/BARBARAx20BLOCK/LAMNAx20DITROPIS/Nx2fA/52038_A69-1303_1059305.nc"; + fiName = "c:/erddapBPD/copy/cPostDet3/BARBARAx20BLOCK/LAMNAx20DITROPIS/Nx2fA/52038_A69-1303_1059305.nc"; table.readNDNc(fiName, null, 0, //standardizeWhat=0 null, 0, 0); results = table.dataToString(4); diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/Erddap.java b/WEB-INF/classes/gov/noaa/pfel/erddap/Erddap.java index f8386842a..2d98f8a48 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/Erddap.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/Erddap.java @@ -2268,7 +2268,7 @@ public void doDataProviderForm1(int language, HttpServletRequest request, //convert the info into pseudo datasets.xml String content = "Data Provider Form - Part 1\n" + //important! Bob's erd.data gmail filter looks for 'Data Provider Form' - " from " + fromInfo + "\n" + + " from " + XML.encodeAsHTML(fromInfo) + "\n" + " ipAddress=" + ipAddress + "\n" + "\n" + "griddedOption=" + griddedOptions[griddedOption] + "\n" + @@ -2318,7 +2318,7 @@ public void doDataProviderForm1(int language, HttpServletRequest request, //hidden fields writer.write( - widgets.hidden("timestamp", XML.encodeAsHTML(tTimestamp)) + + widgets.hidden("timestamp", tTimestamp) + "\n"); //begin text @@ -2344,7 +2344,7 @@ public void doDataProviderForm1(int language, HttpServletRequest request, 30, 50, tYourName, "")) .replace("&widgetEmailAddress;", widgets.textField("emailAddress", "", //tooltip 30, 50, tEmailAddress, "")) - .replace("&tTimestamp;", tTimestamp); + .replace("&tTimestamp;", XML.encodeAsHTML(tTimestamp)); writer.write(dataProviderContactInfo /* "

Your Contact Information

\n" + @@ -2356,7 +2356,7 @@ public void doDataProviderForm1(int language, HttpServletRequest request, "
What is your email address? " + widgets.textField("emailAddress", "", //tooltip 30, 50, tEmailAddress, "") + -"
This dataset submission's timestamp is " + tTimestamp + ".\n" + +"
This dataset submission's timestamp is " + XML.encodeAsHTML(tTimestamp) + ".\n" + "\n" */); String dataProviderData = EDStatic.dataProviderDataAr[language] @@ -2594,7 +2594,7 @@ public void doDataProviderForm2(int language, HttpServletRequest request, tKeywords.sortIgnoreCase(); String content = "Data Provider Form - Part 2\n" + //important! Bob's erd.data gmail filter looks for this -" from " + fromInfo + "\n" + +" from " + XML.encodeAsHTML(fromInfo) + "\n" + " ipAddress=" + ipAddress + "\n" + "\n" + " \n" + @@ -2671,9 +2671,9 @@ public void doDataProviderForm2(int language, HttpServletRequest request, //hidden fields writer.write( - widgets.hidden("yourName", XML.encodeAsHTML(tYourName)) + - widgets.hidden("emailAddress", XML.encodeAsHTML(tEmailAddress)) + - widgets.hidden("timestamp", XML.encodeAsHTML(tTimestamp)) + + widgets.hidden("yourName", tYourName) + + widgets.hidden("emailAddress", tEmailAddress) + + widgets.hidden("timestamp", tTimestamp) + "\n"); //begin text @@ -3066,7 +3066,7 @@ public void doDataProviderForm3(int language, HttpServletRequest request, StringBuilder content = new StringBuilder(); content.append( "Data Provider Form - Part 3\n" + //important! Bob's erd.data gmail filter looks for this - " from " + fromInfo + "\n" + + " from " + XML.encodeAsHTML(fromInfo) + "\n" + " ipAddress=" + ipAddress + "\n" + "\n" + "groupOf10=" + groupOptions[tGroup] + "\n" + @@ -3138,9 +3138,9 @@ public void doDataProviderForm3(int language, HttpServletRequest request, //hidden fields writer.write( - widgets.hidden("yourName", XML.encodeAsHTML(tYourName)) + - widgets.hidden("emailAddress", XML.encodeAsHTML(tEmailAddress)) + - widgets.hidden("timestamp", XML.encodeAsHTML(tTimestamp)) + + widgets.hidden("yourName", tYourName) + + widgets.hidden("emailAddress", tEmailAddress) + + widgets.hidden("timestamp", tTimestamp) + "\n"); //begin text @@ -3383,7 +3383,7 @@ public void doDataProviderForm4(int language, HttpServletRequest request, //convert the info into pseudo datasets.xml String content = "Data Provider Form - Part 4\n" + //important! Bob's erd.data gmail filter looks for this - " from " + fromInfo + "\n" + + " from " + XML.encodeAsHTML(fromInfo) + "\n" + " ipAddress=" + ipAddress + "\n" + "\n" + "Other comments:\n" + @@ -3432,9 +3432,9 @@ public void doDataProviderForm4(int language, HttpServletRequest request, //hidden fields writer.write( - widgets.hidden("yourName", XML.encodeAsHTML(tYourName)) + - widgets.hidden("emailAddress", XML.encodeAsHTML(tEmailAddress)) + - widgets.hidden("timestamp", XML.encodeAsHTML(tTimestamp)) + + widgets.hidden("yourName", tYourName) + + widgets.hidden("emailAddress", tEmailAddress) + + widgets.hidden("timestamp", tTimestamp) + "\n"); //begin text @@ -3532,10 +3532,10 @@ public void doDataProviderFormDone(int language, HttpServletRequest request, //begin text writer.write(EDStatic.dpf_congratulationAr[language] - .replace("&tTimestamp;", tTimestamp) + .replace("&tTimestamp;", XML.encodeAsHTML(tTimestamp)) .replaceAll("&tErddapUrl;", tErddapUrl) - .replace("&tYourName;", SSR.minimalPercentEncode(tYourName)) - .replace("&tEmailAddress;", SSR.minimalPercentEncode(tEmailAddress)) + .replace("&tYourName;", XML.encodeAsHTML(tYourName)) + .replace("&tEmailAddress;", XML.encodeAsHTML(tEmailAddress)) // "

You're done! Congratulations! Thank you!

\n" + // "The ERDDAP administrator will email you soon to figure out the best way transfer\n" + diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGrid.java b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGrid.java index 8c154a4e9..03971b792 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGrid.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGrid.java @@ -7081,12 +7081,12 @@ private double validateGreaterThanThrowOrRepair(int precision, double value, * * @param language the index of the selected language * @param minX the minimum X / longitude value to validate. minX should - * be < maxX + * be < maxX * @param maxX the maximum X / longitude value to check. minX should be - * < maxX - * @param minY the minimum Y / latitude value to check. minY should be < + * < maxX + * @param minY the minimum Y / latitude value to check. minY should be < * maxY - * @param maxY the minimum Y / latitude value to check. minY should be < + * @param maxY the minimum Y / latitude value to check. minY should be < * maxY */ public void validateLatLon(int language, double minX, double maxX, @@ -7451,7 +7451,7 @@ public boolean saveAsKml(int language, //.transparentPng uses Sgt.makeCleanMap which projects data (even, e.g., Mercator) //so resulting .png will use a geographic projection. - //although the Google docs say lon must be +-180, lon > 180 is sortof ok! + //although the Google docs say lon must be +-180, lon > 180 is sort of ok! EDVLonGridAxis lonEdv = (EDVLonGridAxis)axisVariables[lonIndex]; EDVLatGridAxis latEdv = (EDVLatGridAxis)axisVariables[latIndex]; @@ -14762,7 +14762,7 @@ public static void testSaveAsImage() throws Throwable { // Make fully valid image testSaveAsImageVsExpected(eddGrid, dir, requestUrl, - MessageFormat.format(userDapQueryTemplate, 30, 40, 210, 220), + MessageFormat.format(userDapQueryTemplate, 30, 40, 210, 220), //#'s are minY, maxY, minX, maxX fileTypeName, "46bbbefee2b781a7eed98f8e3b855527ba45711cf806a04cf2704a141e0a6c6f" /* expected */); diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGridFromNcFiles.java b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGridFromNcFiles.java index d9996ce36..daea83255 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGridFromNcFiles.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDGridFromNcFiles.java @@ -7803,7 +7803,7 @@ public static void testMatchAxisNDigits() throws Throwable { int language = 0; //force reload files - File2.delete("/data/_erddapBPD/dataset/ay/erdATssta3day/fileTable.nc"); + File2.delete("/erddapBPD/dataset/ay/erdATssta3day/fileTable.nc"); //load dataset testVerboseOn(); @@ -15451,7 +15451,7 @@ public static void test(StringBuilder errorSB, boolean interactive, if (test == 0) testNc(deleteCachedDatasetInfo); if (test == 1) testCwHdf(deleteCachedDatasetInfo); if (test == 2) testHdf(); - if (test == 3) testNcml(); + if (test == 3) testNcml(); //!!!this is the only test which fails when I use separate netcdf-java Maven artifacts if (test == 4) testNccsv(); if (test == 5) testGrib_43(deleteCachedDatasetInfo); //42 or 43 for netcdfAll 4.2- or 4.3+ if (test == 6) testGrib2_43(deleteCachedDatasetInfo); //42 or 43 for netcdfAll 4.2- or 4.3+ diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTable.java b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTable.java index ee7c34a05..16083dbc6 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTable.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTable.java @@ -148,18 +148,17 @@ public abstract class EDDTable extends EDD { public static String orderByOptions[] = { "", "orderBy", "orderByClosest", "orderByCount", "orderByLimit", "orderByMax", "orderByMin", "orderByMinMax", "orderByMean", "orderBySum"}; - public static String DEFAULT_ORDERBYCLOSEST = "1 hour"; public static String DEFAULT_ORDERBYLIMIT = "100"; /** These are used on web pages when a user changes orderBy. * They parallel the orderByOptions. */ public static String orderByExtraDefaults[] = { "", - "", DEFAULT_ORDERBYCLOSEST, "", DEFAULT_ORDERBYLIMIT, - "", "", "", ""}; + "", "", "", DEFAULT_ORDERBYLIMIT, + "", "", "", "", ""}; /** This is the minimum number of orderBy variables that must be specified (not counting the orderByExtra item). */ public static byte minOrderByVariables[] = { 0, 1, 1, 0, 0, - 1, 1, 1, 0}; + 1, 1, 1, 0, 0}; /** This is used in many file types as the row identifier. */ public final static String ROW_NAME = "row"; //see also Table.ROW_NAME @@ -10160,16 +10159,20 @@ else if (tOp == REGEX_OP_INDEX || StringArray names = StringArray.fromCSV( obPart.substring(start.length(), obPart.length() - 2)); StringArray goodNames = new StringArray(); - boolean usesExtra = orderByExtraDefaults[i].length() > 0; //e.g., orderByLimit, orderByClosest + boolean usesExtra = orderByExtraDefaults[i].length() > 0; //e.g., orderByLimit int nNames = names.size() - (usesExtra? 1 : 0); //if uses extra, don't check last item if (nNames < minOrderByVariables[i]) continue; //too few items in csv for (int n = 0; n < nNames; n++) { - if (String2.indexOf(dataVariableDestinationNames, names.get(n)) < 0) + String tName = names.get(n); + int divPo = tName.indexOf('/'); + if (divPo > 0) + tName = tName.substring(0, divPo); + if (String2.indexOf(dataVariableDestinationNames, tName) < 0) continue; goodNames.add(names.get(n)); - if (resultsVariables.indexOf(names.get(n)) < 0) - resultsVariables.add(names.get(n)); + if (resultsVariables.indexOf(tName) < 0) + resultsVariables.add(tName); } if (goodNames.size() >= minOrderByVariables[i]) { //success diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableCopyPost.javaINACTIVE b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableCopyPost.javaINACTIVE index 60dfd7179..08329bca6 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableCopyPost.javaINACTIVE +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableCopyPost.javaINACTIVE @@ -1359,7 +1359,7 @@ public class EDDTableCopyPost extends EDDTableCopy { //find activation_time is after surgery_time TableWriterAll twa = new TableWriterAll(tedd, null, - "c:/data/_erddapBPD/cache/cPostSurg3/", "findSurgeryBeforeActivation"); + "c:/erddapBPD/cache/cPostSurg3/", "findSurgeryBeforeActivation"); tedd.getDataForDapQuery(language, loggedInAs, "requestUrl", "unique_tag_id,activation_time,surgery_time,PI", twa); Table table = twa.cumulativeTable(); diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableFromNcFiles.java b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableFromNcFiles.java index f9172cab0..18fdc91a1 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableFromNcFiles.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/dataset/EDDTableFromNcFiles.java @@ -5763,9 +5763,9 @@ public static void testGenerateBreakUpPostDatasetsXml() throws Throwable { //String tInfoUrl, String tInstitution, String tSummary, String tTitle, //Attributes externalAddGlobalAttributes) String2.log(generateDatasetsXml( - "c:/data/_erddapBPD/copy/tcPostDet3/", + "c:/erddapBPD/copy/tcPostDet3/", ".*\\.nc", - "c:/data/_erddapBPD/copy/tcPostDet3/Barbarax20Block/LAMNAx20DITROPIS/Nx2fA.nc", + "c:/erddapBPD/copy/tcPostDet3/Barbarax20Block/LAMNAx20DITROPIS/Nx2fA.nc", "", 100000000, "", "", "", "", "unique_tag_id", @@ -7138,7 +7138,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { " }\n" + " station_id {\n" + " Int32 _FillValue 2147483647;\n" + -" Int32 actual_range 1, 44956400;\n" + //changes every month //don't regex this. It's important to see the changes. +" Int32 actual_range 1, 45282398;\n" + //changes every month //don't regex this. It's important to see the changes. " String cf_role \"profile_id\";\n" + " String comment \"Identification number of the station (profile) in the GTSPP Continuously Managed Database\";\n" + " String ioos_category \"Identifier\";\n" + @@ -7183,7 +7183,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { " }\n" + " time {\n" + " String _CoordinateAxisType \"Time\";\n" + -" Float64 actual_range 4.772736e+8, 1.64034828e+9;\n" + //2nd value changes use + //first value was 4.811229e8 until 2020-07-12 +" Float64 actual_range 4.772736e+8, 1.6433712e+9;\n" + //2nd value changes use + //first value was 4.811229e8 until 2020-07-12 " String axis \"T\";\n" + " String ioos_category \"Time\";\n" + " String long_name \"Time\";\n" + @@ -7245,7 +7245,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { " }\n" + " NC_GLOBAL {\n" + " String acknowledgment \"These data were acquired from the US NOAA National Oceanographic " + - "Data Center (NODC) on 2022-01-10 from https://www.nodc.noaa.gov/GTSPP/.\";\n" + //changes monthly + "Data Center (NODC) on 2022-02-10 from https://www.nodc.noaa.gov/GTSPP/.\";\n" + //changes monthly " String cdm_altitude_proxy \"depth\";\n" + " String cdm_data_type \"TrajectoryProfile\";\n" + " String cdm_profile_variables \"station_id, longitude, latitude, time\";\n" + @@ -7273,9 +7273,9 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { " String gtspp_handbook_version \"GTSPP Data User's Manual 1.0\";\n" + " String gtspp_program \"writeGTSPPnc40.f90\";\n" + " String gtspp_programVersion \"1.8\";\n" + -" String history \"2022-01-01 csun writeGTSPPnc40.f90 Version 1.8\n" +//date changes +" String history \"2022-02-01 csun writeGTSPPnc40.f90 Version 1.8\n" +//date changes ".tgz files from ftp.nodc.noaa.gov /pub/data.nodc/gtspp/bestcopy/netcdf (https://www.nodc.noaa.gov/GTSPP/)\n" + -"2022-01-10 Most recent ingest, clean, and reformat at ERD (erd.data at noaa.gov).\n"; //date changes +"2022-02-10 Most recent ingest, clean, and reformat at ERD (erd.data at noaa.gov).\n"; //date changes po = results.indexOf("erd.data at noaa.gov).\n"); Test.ensureTrue(po > 0, "\nresults=\n" + results); @@ -7293,7 +7293,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { " String keywords_vocabulary \"NODC Data Types, CF Standard Names, GCMD Science Keywords\";\n" + " String LEXICON \"NODC_GTSPP\";\n" + //date below changes " String license \"These data are openly available to the public. Please acknowledge the use of these data with:\n" + -"These data were acquired from the US NOAA National Oceanographic Data Center (NODC) on 2022-01-10 from https://www.nodc.noaa.gov/GTSPP/.\n" + +"These data were acquired from the US NOAA National Oceanographic Data Center (NODC) on 2022-02-10 from https://www.nodc.noaa.gov/GTSPP/.\n" + "\n" + "The data may be used and redistributed for free but is not intended\n" + "for legal use, since it may contain inaccuracies. Neither the data\n" + @@ -7318,7 +7318,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { "Requesting data for a specific station_id may be slow, but it works.\n" + "\n" + "*** This ERDDAP dataset has data for the entire world for all available times (currently, " + - "up to and including the December 2021 data) but is a subset of the " + //month changes + "up to and including the January 2022 data) but is a subset of the " + //month changes "original NODC 'best-copy' data. It only includes data where the quality flags indicate the data is 1=CORRECT, 2=PROBABLY GOOD, or 5=MODIFIED. It does not include some of the metadata, any of the history data, or any of the quality flag data of the original dataset. You can always get the complete, up-to-date dataset (and additional, near-real-time data) from the source: https://www.nodc.noaa.gov/GTSPP/ . Specific differences are:\n" + "* Profiles with a position_quality_flag or a time_quality_flag other than 1|2|5 were removed.\n" + "* Rows with a depth (z) value less than -0.4 or greater than 10000 or a z_variable_quality_flag other than 1|2|5 were removed.\n" + @@ -7331,7 +7331,7 @@ public static void testErdGtsppBest(String tDatasetID) throws Throwable { "The Quality Flag definitions are also at\n" + "https://www.nodc.noaa.gov/GTSPP/document/qcmans/qcflags.htm .\";\n" + " String testOutOfDate \"now-45days\";\n" + -" String time_coverage_end \"2021-12-24T12:18:00Z\";\n" + //changes +" String time_coverage_end \"2022-01-28T12:00:00Z\";\n" + //changes " String time_coverage_start \"1985-02-15T00:00:00Z\";\n" + //was 1985-03-31T13:15:00Z before 2020-07-12 the new time is such a round number! " String title \"Global Temperature and Salinity Profile Programme (GTSPP) Data, 1985-present\";\n" + " Float64 Westernmost_Easting -180.0;\n" + @@ -17851,8 +17851,8 @@ public static void testHardFlag() throws Throwable { //test that the dirTable and fileTable weren't found after that expected = -"dir/file table doesn't exist: /data/_erddapBPD/dataset/01/testTimeSince19000101/dirTable.nc\n" + -"dir/file table doesn't exist: /data/_erddapBPD/dataset/01/testTimeSince19000101/fileTable.nc\n" + +"dir/file table doesn't exist: /erddapBPD/dataset/01/testTimeSince19000101/dirTable.nc\n" + +"dir/file table doesn't exist: /erddapBPD/dataset/01/testTimeSince19000101/fileTable.nc\n" + "creating new dirTable and fileTable (dirTable=null?true fileTable=null?true badFileMap=null?false)"; int po4 = tLog.indexOf(expected.substring(0, 29), po); Test.ensureTrue(po4 > 0, "\n\n************************************\n\"" + @@ -19516,6 +19516,45 @@ public static void testPrecision() throws Throwable { SSR.displayInBrowser("file://" + tDir + tName); } + /** + * This tests orderBy graphs in Make A Graph. + * There were errors in respondToGraphQuery() because it hadn't kept up with + * changes to orderBy options over the years. + */ + public static void testMAGOrderByGraphs() throws Throwable { + + String2.log("\n*** EDDTableFromNcFiles.testMAGOrderByGraphs()\n" + + "This REQUIRES cwwcNDBCMet in localhost ERDDAP."); + int language = 0; + String tDir = EDStatic.fullTestCacheDirectory; + String dapQuery, tName, start, query, results, expected; + EDDTable eddTable = (EDDTable)oneFromDatasetsXml(null, "cwwcNDBCMet"); + + //these test very minimal (but common) orderBy requests + dapQuery = "http://127.0.0.1:8080/cwexperimental/tabledap/cwwcNDBCMet.graph?" + + "time,atmp&time%3E=2021-01-01T00%3A00%3A00Z&time%3C=2021-01-08T00%3A00%3A00Z" + + "&station=%2246088%22&.draw=lines&.color=0x000000&.bgColor=0xffccccff"; + + SSR.displayInBrowser(dapQuery + "&orderBy(%22atmp%22)"); //goofy request (draw in ascending order of atmp, not time), but ERDDAP does what it was asked + + SSR.displayInBrowser(dapQuery + "&orderByClosest(%22time/1day%22)"); //value each day which is closest to midnight + + SSR.displayInBrowser(dapQuery + "&orderByCount(%22time/1day%22)"); //!!!y axis units should be 'count' + + SSR.displayInBrowser(dapQuery + "&orderByLimit(%22time/1day,4%22)"); //first 4 values from each day + + SSR.displayInBrowser(dapQuery + "&orderByMax(%22time/1day,atmp%22)"); //the max atmp each day (at the time it occurred) + + SSR.displayInBrowser(dapQuery + "&orderByMin(%22time/1day,atmp%22)"); //the max atmp each day (at the time it occurred) + + SSR.displayInBrowser(dapQuery + "&orderByMinMax(%22time/1day,atmp%22)"); //the min and max atmp each day (at the time they occurred). Better if markers. + + SSR.displayInBrowser(dapQuery + "&orderByMean(%22time/1day%22)"); //the mean atmp each day + + SSR.displayInBrowser(dapQuery + "&orderBySum(%22time/1day%22)"); //goofy request, but ERDDAP does what it was asked + + } + /** * This runs all of the interactive or not interactive tests for this class. * @@ -19530,7 +19569,7 @@ public static void testPrecision() throws Throwable { public static void test(StringBuilder errorSB, boolean interactive, boolean doSlowTestsToo, int firstTest, int lastTest) { if (lastTest < 0) - lastTest = interactive? 15 : 73; + lastTest = interactive? 16 : 73; String msg = "\n^^^ EDDTableFromNcFiles.test(" + interactive + ") test="; for (int test = firstTest; test <= lastTest; test++) { @@ -19555,6 +19594,7 @@ public static void test(StringBuilder errorSB, boolean interactive, if (test == 13) testCopyFilesGenerateDatasetsXml();//requires fedCalLandings if (test == 14) testCopyFilesBasic(true); //deleteDataFiles? //requires fedCalLandings if (test == 15) testCopyFilesBasic(false); //uses cachePartialPathRegex //doesn't require fedCalLandings + if (test == 16) testMAGOrderByGraphs(); } else { if (test == 0) test1D(false); //deleteCachedDatasetInfo diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/util/EDStatic.java b/WEB-INF/classes/gov/noaa/pfel/erddap/util/EDStatic.java index 94d9cf9b8..edd6696c6 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/util/EDStatic.java +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/util/EDStatic.java @@ -179,7 +179,7 @@ public class EDStatic { *
2.14 released on 2021-07-02 *
2.15 released on 2021-11-19 Just to coastwatch, to test translations. *
2.16 released on 2021-12-17 - *
2.17 released on 2022-??-?? + *
2.17 released on 2022-02-16 * * For master branch releases, this will be a floating point * number with 2 decimal digits, with no additional text. diff --git a/WEB-INF/classes/gov/noaa/pfel/erddap/util/messages.xml b/WEB-INF/classes/gov/noaa/pfel/erddap/util/messages.xml index 25b0f12dc..73eda0515 100644 --- a/WEB-INF/classes/gov/noaa/pfel/erddap/util/messages.xml +++ b/WEB-INF/classes/gov/noaa/pfel/erddap/util/messages.xml @@ -6740,25 +6740,36 @@ for every version is on title="This link to an external website does not constitute an endorsement.">, the most commonly used system for collaborative software projects. -So far, four other groups have contributed code to ERDDAP: +So far, these groups/people have contributed code to ERDDAP: diff --git a/download/AccessToPrivateDatasets.html b/download/AccessToPrivateDatasets.html index 036a270ed..e22811fdc 100644 --- a/download/AccessToPrivateDatasets.html +++ b/download/AccessToPrivateDatasets.html @@ -194,7 +194,7 @@

Contact<
 
-

ERDDAP, Version 2.16 +

ERDDAP, Version 2.17
Disclaimers | Privacy Policy

  diff --git a/download/EDDTableFromEML.html b/download/EDDTableFromEML.html index ac6708a92..ccb887a0f 100644 --- a/download/EDDTableFromEML.html +++ b/download/EDDTableFromEML.html @@ -606,7 +606,7 @@

Contact<
 
-

ERDDAP, Version 2.16 +

ERDDAP, Version 2.17
Disclaimers | Privacy Policy diff --git a/download/NCCSV.html b/download/NCCSV.html index 2bbf61720..e488c4362 100644 --- a/download/NCCSV.html +++ b/download/NCCSV.html @@ -930,7 +930,7 @@

Contact<
 
-

ERDDAP, Version 2.16 +

ERDDAP, Version 2.17
Disclaimers | Privacy Policy diff --git a/download/NCCSV_1.00.html b/download/NCCSV_1.00.html index 56f309574..edbe6a6dc 100644 --- a/download/NCCSV_1.00.html +++ b/download/NCCSV_1.00.html @@ -859,7 +859,7 @@

Contact<
 
-

ERDDAP, Version 2.16 +

ERDDAP, Version 2.17
Disclaimers | Privacy Policy diff --git a/download/changes.html b/download/changes.html index 0b322e607..180c32d1a 100644 --- a/download/changes.html +++ b/download/changes.html @@ -68,15 +68,30 @@

ERDDAP Changes

--> -

Changes -in ERDDAP version 2.17 (released 2022-??-??)

+in ERDDAP version 2.17 (released 2022-02-16)