Menu

4dvar

Maarten Krol

4dvar

A working gradient test should in principle imply that emissions can be optimized.
To initiate the emission optimization (i.e. only the emissions marked for optimization), we
need to invoke it like:

~~~~~
:::csh

./scripts/run_var4d.py -s 2000,1,1 -e 2000,1,3 rc/nam1x1-dummy_tr.rc

When I tried this, I found that some settings were not correct, or did require extra input.
Specifically, I changed in ___rc/include/optimizer.rc___

    optimize.monitor.output.list            : satellite point station.timeseries       

    into:

    optimize.monitor.output.list            : point

The reason is that the file defining station output is not present, and that we do not have
satellite observations for this dummy tracer. Now, a forward and adjoint run is performed (like in the gradient test), but the 4dvar run crashed, giving a message:

:::csh
File "./scripts/run_var4d.py", line 54, in <module>
opt.Var4D()
File "/home/krol/HG/tm5-code-0/base/branches/var4d/py/Optimizer_base.py", line 535, in Var4D
sbp.check_call(self.OptimCommand)
File "/hpc/sw/python-2.7.5/lib/python2.7/subprocess.py", line 537, in check_call
retcode = call(*popenargs, kwargs)
File "/hpc/sw/python-2.7.5/lib/python2.7/subprocess.py", line 524, in call
return Popen(*popenargs,
kwargs).wait()
File "/hpc/sw/python-2.7.5/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/hpc/sw/python-2.7.5/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception

The reason for this is that the ___4DVAR___ system needs some _Fortran_ executables. In this case, we selected the __conGrad__ optimizer (and link to the executable) in __rc/include/optimized.rc__:

:::csh
my.optimizer.class : conGrad
optimize.conGrad.exec : ${my.home}/base/branches/${my.branch}/optimizer/conjuGrad
~~~~

optimize.conGrad.exec is an executable, hence platform dependent. So, we need to compile the executable. It is in the folder /home/krol/HG/tm5-code-0/base/branches/var4d/optimizer/congrad/src
where I can simply perform a make (make conjuGrad). On different platforms you have to find out how the executable should be compiled.


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.