6
$\begingroup$

I need to generate an all-zeros file as an input file for an Earth Systems model (DGVM) I'm using. I have a file with the same dimensions as the zero file. I have R and MATLAB and use a Fedora machine.

$\endgroup$
5
  • 2
    $\begingroup$ matlab has great documentation, have you tried googling? $\endgroup$ Commented Sep 27, 2017 at 7:30
  • 1
    $\begingroup$ If you can do it in Python, it is very easy by using e.g xarray. $\endgroup$ Commented Sep 27, 2017 at 10:17
  • 1
    $\begingroup$ Also this might be more suitable to another SE cite. $\endgroup$ Commented Sep 27, 2017 at 12:08
  • 2
    $\begingroup$ If you have a file to begin with, you can open it up and set the variables equal to zero. I suggest NCL, but there are a variety of programs you could use. In general, it's easier to read/write an ncf file rather than creating one from scratch. $\endgroup$ Commented Sep 27, 2017 at 14:51
  • 1
    $\begingroup$ If you have an example file, just use the NCO tools, which you may well already have installed: e.g., ncap2 -v -s 'zeros=foo*0.0' input.nc output.nc. $\endgroup$ Commented Sep 28, 2017 at 11:14

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.