[gradsusr] netcdf files with different order of variables
Semyon Grodsky
senya at umd.edu
Wed Feb 7 15:50:41 EST 2018
Andrew,
I confirm, it works. But, it requires reprocessing of all files in a
dataset.
Thanks again,
--Senya
On 2/7/2018 3:18 PM, Andrew Friedman wrote:
> Just a short follow-up on rearranging variables using NCO:
>
> I realize that ncpdq is for permuting dimensions. For re-arranging variables, I believe the right command is ncks, which automatically alphabetizes variable order: http://nco.sourceforge.net/nco.html#alphabetize
>
> -Andrew
>
>> On Feb 6, 2018, at 2:21 PM, 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
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
-----------------------------------------------
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
More information about the gradsusr
mailing list