This works! I appreciate your help.
Thank you for your response! I tried and got the following error: Command-line script:1:22: unexpected token: _00
Dear all, I am trying to replace the value of a character variable (say Times) in some multiple nc files. I can do that for one file like this: ncap2 -O -s 'Times(0,:)="2020-01-05_00:00:00";' file.nc file.nc I want to automate this over all the files, but each file has a different value for the Times variable. For each file, I get the value from the file name and store it in a variable (not in the nc file) say newval. Then I perform the operation above in a loop. I tried this but it didn’t work for...