-
Notifications
You must be signed in to change notification settings - Fork 262
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
nccopy variable subsetting via OPeNDAP and global variables #373
Comments
Hi, sorry for the delay responding. The output you're seeing is correct. From the
I hope this answers your question! |
Sorry, I wasn't clear the problem I'm pointing out. The nccopy command should not have included the global attributes I included above. I should have said "Should the variables and attributes that were not requested in the nccopy command be showing up as global attributes? Adding the -v or -V options with those variables listed doesn't affect the output." Have a look at the OPeNDAP endpoint: https://cida.usgs.gov/thredds/dodsC/new_gmo.info The global attributes I get back from nccopy are actual variables and the variables' attributes that I did not ask for. |
@WardF - Not sure if you can re-open this... should I create a new ticket? |
My mistake thanks for clarifying! I'll reopen and revisit in the morning. |
@dblodgett-usgs No need, I reopened this one. :). |
@DennisHeimbigner Can you weigh in on this? I missed the subsetting that I now see in the nccopy request. I don't know if this is expected behavior without doing a bit of research and I feel like you might know if this is how nccopy/subsetting is supposed to work off the top of your head :). |
In the past, the request would just subset the actual global variables and the variables requested using OPeNDAP subsetting syntax. It is now adding the other variable (that I don't want) names and attributes as global attributes. |
ok, Let me look at it.
=Dennis
…On 3/9/2017 9:45 AM, Ward Fisher wrote:
@DennisHeimbigner <https://github.com/DennisHeimbigner> Can you weigh in
on this? I missed the subsetting that I now see in the nccopy request. I
don't know if this is expected behavior without doing a bit of research
and I feel like you might know if this is how nccopy/subsetting is
supposed to work off the top of your head :).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#373 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3P28k7BcX3J3LoykxLGBLhlDNbOvjUks5rkCylgaJpZM4MRjcO>.
|
If you stick this into your browser So, the real issue is: why is the server sending back those extra attributes. Since this is apparently |
I have created issue Unidata/thredds#774 |
Interesting. This is definitely different behavior than we used to get. This is a technique we've been using for a long time. Not sure if THREDDS or nccopy changed, but I guess you guys see what's up and can advise if I should change how I use nccopy or if it's an issue that should be fixed in THREDDS. Thanks! |
I am trying to fix it, although the legacy opendap code is making this hard. |
@dblodgett-usgs Can you say with any certainty what old version you used that had different behavior? If not no worries, I can step back through versions, but it would take the guess work out of figuring out what changed in netCDF and/or is this netCDF or Thredds. |
We have nccopy on one of our cent OS machines... |
I suppose it is possible that at some point, the netcdf-c code suppressed those |
Exactly the same request, yeah. If that old OPeNDAP code hasn't changed, maybe the C code was smart and worked around this before? Variable subsetting was added to nccopy recently right?
…On March 9, 2017 9:50:21 PM CST, DennisHeimbigner ***@***.***> wrote:
As far as I can tell, the problem should be on the server. Are you
accessing the same URL?
If so, I am baffled.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#373 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Github issue #152 requested that "orphaned" DAS attributes be included in the netcdf metadata as global variables. The term orphaned here meant that they were not connected to any variable in the DDS. This was done in pull request #164 However, some servers (e.g. Thredds) include attributes for variables not specified in a constraint expression, but which exist in the full DDS. So I was adding these to the set of global attributes, but in retrospect this should not have been done: they should have been elided. Solution: modify oc2 code to be more distriminatory about which orphaned attributes to include.
Fixed by pull request #376 |
OSX 10.12
netCDF library version 4.4.1.1 of Feb 23 2017 13:31:18 (Homebrewed)
When I do:
$ nccopy https://cida.usgs.gov/thredds/dodsC/new_gmo?longitude[0:1:461],latitude[0:1:221],time[0:1:22644] out.nc
I get:
Should the variables and attributes that were not requested be showing up as global attributes? Adding the -v or -V options with those variables listed doesn't affect the output.
The text was updated successfully, but these errors were encountered: