[gradsusr] netcdf files with different order of variables

Jennifer M Adams jadams21 at gmu.edu
Tue Feb 6 13:39:26 EST 2018


Upon the initial I/O request for any netcdf variable, GrADS will query the metadata in the data file and look for the varid that matches the variable name. That varid is stored, and assumed to be the same for all the files in the template set. All further interaction with the library is done using the varid, and it is never re-checked when a new data file in the collection is opened. This behavior is the same for all netcdf data sets — it doesn’t matter whether you used open, xdfopen, or sdfopen. In general, this requirement does not become apparent until you do try to draw a time series plot that requires opening multiple files in a templated collection where the varids are inconsistent for a given variable name. 
—Jennifer

> On Feb 6, 2018, at 12:30 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> 
> Just curious how this goes. Are you using sdfopen to query the file? In my experience viewing netCDF data in Grads, you can write a control file to only view the specific arrays you want to display and omit the rest from the VARS section. I've done exactly this with WRF output for years. Have you tried this?
> 
> Jeff Duda
> 
> On Tue, Feb 6, 2018 at 7:21 AM, Jennifer M Adams <jadams21 at gmu.edu> wrote:
> Yes, it most definitely DOES matter!
> 
> Grads requires that the netcdf varids be consistent for each variable in a templated set of data files. If the variables are written out in different order in some of the data files, the varids won’t be the same, and GrADS will get upset. I think using NCO to rearrange the variables is your best option, but be careful if the data are compressed/chunked — NCO will not retain existing chunking parameters in the output file, and the defaults are not GrADS-friendly. Use the —cnk_dmn option to specify which dimensions should be chunked and what the chunk size should be.
> —Jennifer
> 
> 
> 
> > On Feb 6, 2018, at 3:33 AM, M.Mahakur <mmahakur at TROPMET.RES.IN> wrote:
> >
> > It doesn't matter.
> >
> >
> >
> > ----- Original Message -----
> > From: Semyon Grodsky <senya at umd.edu>
> > To: GrADS Users Forum <gradsusr at gradsusr.org>
> > Sent: Tue, 06 Feb 2018 09:43:43 +0530 (IST)
> > Subject: [gradsusr] netcdf files with different order of variables
> >
> > Dear GRADS community,
> >
> > I face a bit unusual problem. I have data in netcdf fromat, but a
> > portion of files has different order of variables. For an example, some
> > files has the following order of variables u,v,T.S while other files -
> > T,S, u,v.
> >
> > Is there a way to use all these data in GRADS?
> >
> > Alternatively, could smb suggest a simple (utility based) way to unify
> > the order of variables (say change T,S, u,v => u,v,T.S)?
> >
> > Thanks,
> >
> > --Senya
> >
> > --
> > -----------------------------------------------
> > Semyon Grodsky
> > University of Maryland
> > Department of Atmospheric and Oceanic Science
> > Room 2409, Atlantic Building (224)
> > 4254 Stadium Dr.
> > College Park, MD 20742
> >
> > Phone:  301-405-5330
> > Fax:    301-314-9482
> > E-mail: senya at atmos.umd.edu
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://secure-web.cisco.com/1xkLtB97-N2PThacwoqMZlkuozRcnoMMqcAUYnXtdOA28QprCgv2Pcac_noNGRhYR3Uec7JnkIdK0ESVHIIdgaGz4SxXpxj8tHwR-CSQr0eeaWekpFNoCMJrx1PmIDu757Xx4xtmK9-JDAHOoXJpP5pioX2u8EBnQ3EJDQ7ED8WYQzCL4pCfYrys_4iNFcL9_uGmqSA0sbnFtmC9-4557AVoqaKVj31w7er6Lsw734OLcJ3m0WJMzvlVNm4XeTy2qgjyMza67LApP9W-lsdcQ-gkrWXFIxWyAZKU3l59Oo66aXYC7j6MrAV_s_5TOWQYSlwxK6NMOKiv02mPnhq1WQBOsXi_Rdzgl-Vpn53W9Tps1M0_dNEpZus6O-OPvgBRpry-3JV6fgsjWjIOK85knkBELqS11INlK4TkvgqoVRZPrPi1sihj-9CeEe4a5LtOd/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://secure-web.cisco.com/1xkLtB97-N2PThacwoqMZlkuozRcnoMMqcAUYnXtdOA28QprCgv2Pcac_noNGRhYR3Uec7JnkIdK0ESVHIIdgaGz4SxXpxj8tHwR-CSQr0eeaWekpFNoCMJrx1PmIDu757Xx4xtmK9-JDAHOoXJpP5pioX2u8EBnQ3EJDQ7ED8WYQzCL4pCfYrys_4iNFcL9_uGmqSA0sbnFtmC9-4557AVoqaKVj31w7er6Lsw734OLcJ3m0WJMzvlVNm4XeTy2qgjyMza67LApP9W-lsdcQ-gkrWXFIxWyAZKU3l59Oo66aXYC7j6MrAV_s_5TOWQYSlwxK6NMOKiv02mPnhq1WQBOsXi_Rdzgl-Vpn53W9Tps1M0_dNEpZus6O-OPvgBRpry-3JV6fgsjWjIOK85knkBELqS11INlK4TkvgqoVRZPrPi1sihj-9CeEe4a5LtOd/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> >
> 
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
> 
> 
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> 
> -- 
> Jeff Duda, Research Scientist
> University of Colorado Boulder
> Cooperative Institute for Research in Environmental Sciences
> NOAA/OAR/ESRL/Global Systems Division
> Boulder, CO
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://secure-web.cisco.com/1SEf4XCt620byVd8HMNYCZKBrlqey-wODZRDNV5e1pqsCgNfdkh97bpcFbiX5Q3nTZpDdNSshJdLNEndAKEcSuZcptEOlyi3WAhtVjss873DNFOJKt4KGlXVo3k8th-q2OplNCj_hImqcvAdKtvnMzi6TCKeAKmvETBhFxFRTgfl7HysKmy9Ou6DDXHpeJM4jTqZVQK7p_ZmxPbU1aazlOdhgvmci4V-rWJiBNQEwT-ECvfL70CKXocaR5NYvS84dROi1zqR9HYd5pzqTCvQFPcwss48o_QM98hOAM8iBdRbCOQd5nYTosl2WPNRHk7-8gARZRKM4XnOakaCjllO_rHXxcjEynsHgJ1uwQPS815QeOzAuBJERR0uT2pd1eBFq54bp5x1WRKWaF1DBE5xIYEShE8keIlwkb-LvObDIiSdHm1xYx7Q_rfVxn2msi4vr/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University






More information about the gradsusr mailing list