Charlie, I may try to convert nc files into cdl files, and convert them back to nc files using ncgen after editing/replacing the TFLAG values. I need to develop a batch file to realize it because I have more than hundred files to process. Thanks.
Hello, I have a nectdf with daily variable from 2017091 to 2017273 (6 months), the file structure can be seen from the header file attached. I want to calculate monthly average. Thanks for any ideas to realize it.
Charlie, I may try to convert nc files into cdl files, and convert them back to nc files using ncgen after editing/replacing the TFLAG values. I need to develop a batch file to realize it because I have more than hundred files to process. Thanks. Feng
Charlie, I may try to convert nc files into cdl fil, and convert them back to nc files using ncgen after editing/replacing the TFLAG values. I need to develop a batch file to realize it because I have more than hundred files to process. Thanks. Feng
The command gives the following output : ncap2: WARNING prs_cls::ncap_var_init(): Unable to find variable X in test.nc or out.nc ncap2: ERROR out(): Could not read var X
Charlie, Thank you for your response. The output by "ncks -m -v TFLAG in.nc" : netcdf in { dimensions: DATE-TIME = 2 ; TSTEP = UNLIMITED ; // (25 currently) VAR = 35 ; variables: int TFLAG(TSTEP,VAR,DATE-TIME) ; TFLAG:units = "<yyyyddd,hhmmss>" ; TFLAG:long_name = "TFLAG " ; TFLAG:var_desc = "Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS " ; } // group /</yyyyddd,hhmmss>
I have multiple netcdf files (each file for one day and starting from April 1, 2020), in order to process and combine with other netcdf files for 2017 using an available program, I want to change TFALG values: The netcdf file in.nc for example looks like by ncdump: data: dimensions: TSTEP = UNLIMITED ; // (25 currently) DATE-TIME = 2 ; LAY = 1 ; VAR = 35 ; ROW = 47 ; COL = 56 ; .. .. TFLAG = 2020092, 0, 2020092, 0, 2020092, 0, ... 2020092, 10000, 2020092, 10000, 2020092, 10000, .. .. 2020092, 230000,...
I have multiple netcdf files (each file for one day and starting from April 1, 2020), in order to process and combine with other netcdf files for 2017 using an available program, I want to change TFALG values: The netcdf file can be seen ncdump like: data: dimensions: TSTEP = UNLIMITED ; // (25 currently) DATE-TIME = 2 ; LAY = 1 ; VAR = 35 ; ROW = 47 ; COL = 56 ; .. .. TFLAG = 2020092, 0, 2020092, 0, 2020092, 0, ... 2020092, 10000, 2020092, 10000, 2020092, 10000, .. .. 2020092, 230000, 2020092, 230000,...