Commit Graph

68 Commits

Author SHA1 Message Date
dmh
18eb1c1126 Coverity fixing 2014-08-17 12:03:23 -06:00
dmh
cd2574ba7c Change assertion failure to a error 2014-07-23 11:25:49 -06:00
dmh
7689f8be32 JIRA: NCF-308
Jennifer Adams has requested a reversion in behavior so that
all dap requests include a constraint.

Problem is caused by change in prefetch where if all variables
are requested, then no constraint is generated.
Fix is to always generate a constraint in prefetch.
2014-07-07 14:08:19 -06:00
dmh
83ec39f5db [NCF-272]
re: e support ZCL-340681 and CPW-270700

HDF4 supports compression (and chunking)
but the chunking was not being recorded
for HDF4 files. So, I modified the necessary
files to support HDF4 chunking.
2014-06-02 13:04:28 -06:00
dmh
af566dd300 In preparation for adding dap4 support, I have cleaned up
the libdap2 code to make it dap2 protocol + netcdf classic
only.
2014-03-24 14:02:52 -06:00
dmh
b524e151ef Remove last vestiges of thredds-test 2014-03-14 14:07:35 -06:00
dmh
ba726d55ce synch with oc2.0 2014-03-03 13:43:47 -07:00
dmh
0ee6d11d85 fix t_auth failure now that tiggeUser password is set 2014-02-28 14:39:30 -07:00
dmh
d7de6fd551 [NCF-287/MCI-552767
Problem related to NCF-284.
Namely an old thredds server that
does not properly implement the
dap2 spec. It is accessing a field of a grid
but is not wrapping it as a structure.
url:http://thredds.aodn.org.au/thredds/dodsC/IMOS/ACORN/gridded_1h-avg-current-map_QC/SAG/2010/01/27/IMOS_ACORN_V_20100127T023000Z_SAG_FV01_1-hour-avg.nc.dds?SPEED.SPEED

In any case, this exposed another bug.
Also, in looking at this, I realized that the
code could be simplified.
2014-02-05 17:05:33 -07:00
dmh
8541a32175 [NCF-284]/ ZQX-155900
Some servers do not properly
implement the current DAP2 spec.
It turns out that this server is one of those:
    http://nomads.ncep.noaa.gov:9090/
When a reference such as this is made:
    http://nomads.ncep.noaa.gov:9090/dods/gens/gens20140123/gep_all_12z?prmslmsl[0][0][0][0:359]
tt is returning this:
Dataset {
    float prmslmsl[ens=1][time=1][lat=1][lon=360];
} gens%2fgens20140123%2fgep_all_12z;

when it should be returning this:
Dataset {
  Structure {
    float prmslmsl[ens=1][time=1][lat=1][lon=360];
  } prmslmsl;
} gens%2fgens20140123%2fgep_all_12z;

The reason is that when picking fields out of a grid,
one must maintain the fully qualified name, so the grid
is converted to an enclosing structure.

It turns out that the problem was that
when I create the new structure node, I was
improperly linking it into the existing graph.
This caused a null pointer failure.
Fix is to make sure the relevant field (node->root)
is set.
2014-01-24 13:26:00 -07:00
dmh
dfc3749506 [NCF-282]/ HAD-595112
The code that tests if a path is a url is
faulting when the url does not end in a slash
(e.g. http://thredds-tests.ucar.edu).
The code that tests if a path is a url is
faulting when the url does not end in a slash
(e.g. http://thredds-tests.ucar.edu).
CF-273]/HZY-708311

Solution was to do a null pointer test.
Added a test (tst_misc).
2014-01-20 16:11:45 -07:00
dmh
ea7c0fc91b [NCF-280]/TLO-836022
Fix bug where leading backslash digit
in name was not being properly handled.
The reason was that I accidentally attemped to allow \x... and \0...
escapes in identifiers. This make identifiers
with leading escaped digits not work any more.
Also added test case.
2013-11-19 21:58:56 -07:00
dmh
d6061db87d define mode_t when under windows 2013-11-15 15:41:17 -07:00
dmh
baed147ba4 [NCF-277]
Fix Http Basic Authorization.
The problem is really in oc2.0.
In order for it to work,
the CURLOPT_COOKIEJAR must have
a non-null value. The code
was already there, but not being
used for some reason.
1. fixed cookiejar code in oc2.0
2. synched oc2.0 with netcdf-c/oc2
3. added a test case
2013-11-15 11:38:54 -07:00
dmh
2bc308432d sync with oc2.0 2013-11-14 15:13:20 -07:00
Dennis Heimbigner
fcecd1a2bc 1. The duplicate name checking in oc2 was
effectively o(n cubed); modified to be
   o(n squared).
2. If the list of prefetched variables is too long,
   (something on the order of 400 variables), then
   the server may reject it. Modified code so that
   in the case that the set of prefetch'd vars is
   the in fact all variables, it does not create a long
   request. This does not actually solve the problem
   if the prefetch list is long, but not all inclusive.
2013-07-27 20:20:13 +00:00
Dennis Heimbigner
628aed80d9 1. synch changes with oc2.0
2. Fix a bug in ncgen to
   catch a special case of a malformed
   datalist.
2013-06-26 18:55:30 +00:00
Dennis Heimbigner
228e8439d2 1. The code to parse a constraint
was losing the initial double quote
for a quoted string.
2. The code in ncuri.c was not properly
   handling occurrences of e.g. %xx
2013-05-16 21:37:58 +00:00
Dennis Heimbigner
ce290d3459 Fix Jirs 255
The DAP code compiles constraints into an internal
tree form. When it goes to fetch data, it converts
that tree form into a string suitable for use in a url.
The tree->string code was using '<' when it should be
using '<=' and vice versa.
The fix is to make sure the right operator is used.
2013-05-16 18:22:17 +00:00
Dennis Heimbigner
253a26cb82 change format of url parameters in fragment part 2013-05-13 19:12:37 +00:00
Dennis Heimbigner
19c1c11f1d It turns out that my dap code
is not properly checking the incoming
count argument for nc_get_vars.
It is treating the count as pre-stride
rather than post-stride.
2013-05-01 22:31:01 +00:00
Dennis Heimbigner
f17e7324c1 Rebuilt the compose operation in dceconstraints.c. The
revisions are simpler, and I hope, clearer than the all
previous versions.  Part of the code taken from the
ucar.nc2.Range.compose function.  Modified to handle edge
cases not handled in the Range.compose function.
2013-04-19 19:55:43 +00:00
Dennis Heimbigner
b5697ae20f Rebuild the projection merging code 2013-04-17 18:58:37 +00:00
Dennis Heimbigner
d70cf6d10c Primary change is to add ability
to do prefetch on either a lazy
or eager basis. Lazy means that
the prefetch does not occur
until and unless the client actually
makes a get_var request.

Also repaired a problem where
doing prefetch wrt a url that
has a constraint will prefetch
a whole variable if its constrained
size is small enough, even if the
underlying variable is too large
to warrant prefetch.
2013-03-03 04:06:43 +00:00
Dennis Heimbigner
6cf31dcf2d jira: NCF-232: bad conversion of grids 2013-02-26 04:31:06 +00:00
Dennis Heimbigner
b0b6c77a3e 1. corrected the nc_get_varm/put_varm documentation
to indicate that they only work for atomic types,
   not user defined types.

2. modified NCDEFAULT_{get/put}_vars to no longer use
   nc_get/put_varm. They now directly use nc_get/put_vara
   directly. This means that nc_get/put_vars now work
   properly for user defined types as well as atomic types.

3. Added test cases for get_vars/put_vars with a
   user defined type. Tests placed into
   nc_test/tst_compounds.c
2013-02-17 23:42:15 +00:00
Dennis Heimbigner
4109174d00 Add quick check for Error {...} at start of the datadds data part 2013-02-07 22:14:57 +00:00
Dennis Heimbigner
ccb523fb56 add fix for '/' in dap names plus test 2013-02-04 18:49:48 +00:00
Dennis Heimbigner
2200f01f4d fix NCF-218: bug in oc2/dap.y parser 2013-01-30 22:56:12 +00:00
Dennis Heimbigner
7f58fc9400 fix bug in % encoding of dap names 2013-01-30 21:33:31 +00:00
Dennis Heimbigner
0803ba20ba fix Jira NCF-208; but note that this causes test.06 to fail because thredds mishandles grids 2012-11-21 23:57:42 +00:00
Dennis Heimbigner
5ca78309cc The effect of this change is to make the struct NC structure
contain as little file-type specific info as possible.  It
modifies especially libsrc so that all of the netcdf-3 data
that used to be in struct NC is now kept in a separate chunk
of data pointed to by the struct NC. This makes all of
current protocols consistent: netcdf-3, netcdf-4, and dap.
2012-09-06 19:44:03 +00:00
Dennis Heimbigner
3c843c9578 add more debug output to try to find Ward's bug 2012-08-21 16:46:10 +00:00
Dennis Heimbigner
685e1bf66a add extra debug about findbod 2012-08-17 20:51:03 +00:00
Dennis Heimbigner
65350dc361 fix Jira bug NCF-191 reported by Manke 2012-08-15 17:55:25 +00:00
Dennis Heimbigner
666786d48b testing nc_inq_format help 2012-08-09 16:57:35 +00:00
Dennis Heimbigner
499f8d3a1c complete update of utilities: ncbyte, nclist, ncuri, nclog 2012-08-08 23:15:18 +00:00
Dennis Heimbigner
bc3a732e25 fix e-support YOP-841363 plus a number of coverity found bugs 2012-08-02 18:43:21 +00:00
Dennis Heimbigner
42999f4c7c move from oc1.0 to oc2.0; create new dir oc2 2012-07-31 20:34:13 +00:00
Dennis Heimbigner
d144438455 fix temp file creation problems re: wfisher 2012-06-06 21:33:53 +00:00
Dennis Heimbigner
5b2aee44a7 windows support fixes plus add --disable-diskless 2012-05-15 17:48:27 +00:00
Dennis Heimbigner
79c751b806 catch some distclean files 2012-05-13 18:42:10 +00:00
Dennis Heimbigner
77de04bb29 fix memory overflow bug (HT to Larry Knox) 2012-05-03 17:15:41 +00:00
Dennis Heimbigner
00e50f5a44 1. changed from using port 8080 to 8081 for motherlode
2. Fixed Ward's IGNORE problem with oc
3. Mmap support now works.
4. Fix an uninitialized variable pointed out by Russ in dnclog.c
2012-04-22 20:34:21 +00:00
Dennis Heimbigner
5536bccee1 allow NC_DISKLESS with nc_open() to operate as a in-memory cache 2012-04-08 22:47:38 +00:00
Dennis Heimbigner
7e27052f87 - Implemented diskless files for both netcdf classic and extended.
The in-memory files can be made persistent if nc_create is called with
  NC_DISKLESS|NC_WRITE flags set. Initial test case also included.
- Modified ncio mechanism to support
  multiple ncio packages; this is so we
  can have posixio and memio operating
  at the same time.
- cleanup up a bunch of lint issues (unused variables, etc).
2012-03-26 01:34:32 +00:00
Dennis Heimbigner
99eef24bc2 - Fix NCF-158 to modify ncgen flag defaults.
- Fix NCF-157 to modify DAP code to support
  partial variable retrieval.
- Fix of NCF-154 to solve problem of ncgen
  improperly processing data lists for variables
  of size greater than 2**18 bytes.
- Fix ncgen processing of char variables that have
  multiple unlimited dimensions.
- Partly fix Jira issue: NCF-145 (vlen issues).
- Benchmark program nc_test4/tst_ar4_*) requires arguments
  and should only be invoked inside a shell
  script; fixed so that they terminate cleanly
  if invoked with no arguments.
- Fix the Doxygen processing so it will work
  with make distcheck.
- Begin switchover to using an alternative to ncio.
- Begin support for in-memory (diskless) files.
2012-03-14 23:26:48 +00:00
Dennis Heimbigner
787d32fffd changed form of some static data to work with cxx4 2012-03-08 22:21:12 +00:00
Dennis Heimbigner
5f6c865543 fixed minor malloc problem 2012-02-15 19:15:03 +00:00
Dennis Heimbigner
ea1af11655 Resolve Lynton's vlen problems (partially) re: jira NCF-145 2012-02-14 00:25:32 +00:00