Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8668767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:17:47+00:00 2026-06-12T18:17:47+00:00

I opened a netCDF file in R and looked at the header information. Afterwards

  • 0

I opened a netCDF file in R and looked at the header information. Afterwards I used gdalinfo to look at the header information of the same file.

What I found is that there are much-much more information shown by the gdalinfo (time origin , units , etc.). Is there a command to grasp more information of a variable in netCDF file with R?

             f=open.ncdf("C:\\BR_Ban.nc")

              > f
            [1] "file C:\\GF_Guy_6Y.nc has 4 dimensions:"
              [1] "x   Size: 1"
              [1] "y   Size: 1"
              [1] "land   Size: 1"
           [1] "tstep   Size: 105120"
       [1] "double nav_lon[x,y]  Longname:Longitude Missval:1e+30"
       [1] "double nav_lat[x,y]  Longname:Latitude Missval:1e+30"
       [1] "float time[tstep]  Longname:Time axis Missval:1e+30"
     [1] "float timestp[tstep]  Longname:Time step axis Missval:1e+30"

Then read one variable

           A = get.var.ncdf(nc=f,varid="time",verbose=TRUE)
     [1] "vobjtodimname: is a character type varid.  This file has 6 dims"
    [1] "vobjtodimname: no cases found, returning FALSE"
     [1] "get.var.ncdf: isdimvar: FALSE"
      [1] "vobjtovarid: entering with varid=date"
     [1] "Variable named date found in file with varid= 7"
     [1] "vobjtovarid: returning with varid deduced from name; varid= 7"
    [1] "get.var.ncdf: ending up using varid= 7"
     [1] "ndims: 2"
  [1] "get.var.ncdf: varsize:"
    [1]     3 52560
     [1] "get.var.ncdf: start:"
     [1] 1 1
      [1] "get.var.ncdf: count:"
    [1]     3 52560
     [1] "get.var.ncdf: totvarsize: 157680"
     [1] "Getting var of type 3  (1=short, 2=int, 3=float, 4=double, 5=char, 6=byte)"
    [1] "get.var.ncdf: C call returned 0"
    [1] "count.nodegen: 3    Length of data: 157680"     "count.nodegen: 52560    Length of data: 157680"
     [1] "get.var.ncdf: final dims of returned array:"
        [1]     3 52560
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:17:49+00:00Added an answer on June 12, 2026 at 6:17 pm

    In short, because gdalinfo is a program for displaying information about a particular type of data sets, while R is a language designed to analyze all kinds of data sets. If R spammed me with such information every time I import a data set, I would quickly go nuts.

    Of course, this information can be accessed in R, you just need to ask for it.

    class( f )
    dim( f )
    summary( f )
    plot( f )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I opened a files in vim using gf command.which opened a file that the
I opened hello.cpp. Why isn't there File -> Compile -> hello.cpp? What is an
I opened a javaScript file in a javaScript time.... document.write(<script src='newnote.js' type='text/javascript'></script>); is there
I opened a js file that I wrote a while back and although it's
I opened *.htm file with Excel Application ( Microsoft.Office.Interop.Excel ). It was parsed excellent!
I have opened one file with following way: fp = fopen(some.txt,r); Now in this
I opened a File in Matlab using the a+ permission to read and write,
I opened a solution in Visual Studio 2010 RC that I previously created using
let's say I opened a file, then parsed it into lines. Then I use
I opened my wsdl file locally with soapUI(not using my localhost url but directly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.