2013年11月6日水曜日

Finally done! gotm-git (4.1.0) setup

Summary

  • In the developer's version (4.1.0) of GOTM, namelist files must be generated with 'make' command as well as specifying appropriate .xml files ('make run_all' will recognize all the .xml files inside the working directory.
  • To do this, you need 'editscenario.py', which can be obtained by executing 'git clone git://git.bolding-burchard.com/editscenario editscenario' (refer to my previous post)
  • After modifying 'gotm-cases/Rule.make' to address the appropriate path for 'editscenario.py', you should be able to 'make run_all' to generate all the appropriate namelist files.
  • You can 'make namelist' to generate the appropriate .nml files, and then 'make run' to run the model.

Step-by-step

After obtaining 'editscenario.py', which is located in '~/editscenario/', I had to modify 'Rule.make' accordingly to address the correct path for this file (there are two places where 'editscenario.py' is called): 

gotm-cases/Rules.make

        ~/editscenario/editscenario.py --skipvalidation -e nml --schemadir=$(SCHEMADIR) $(setup).xml . --targetversion=gotm-$(ver)

...

scenario:

        ~/editscenario/editscenario.py -e zip --schemadir=$(SCHEMADIR) $(setup).xml $(setup).gotmscenario --targetversion=gotm-$(ver)


make run_all

Generating input files for: kepsilon

ln -sf kepsilon.xml channel.xml && make namelist && make run && mv channel.nc kepsilon.nc && mv log.channel log.kepsilon.channel
make[1]: Entering directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
~/editscenario/editscenario.py --skipvalidation -e nml --schemadir=/HOME/hakase/GOTM/gotm-git/gui.py/schemas/scenario/ channel.xml . --targetversion=gotm-4.1.0
Operating on values file with version gotm-4.1.0.
Exporting values to namelist file(s) /HOME/hakase/GOTM/gotm-git/gotm-cases/channel...
make[1]: Leaving directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
make[1]: Entering directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'

running gotm

gotm 2> log.channel
make[1]: *** [run] Error 127
make[1]: Leaving directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
make: *** [kepsilon] Error 2

I don't know what these errors mean. 'running gotm'? Does the 'make' command start the simulation automatically??

Here is what's inside 'log.channel' file:

/bin/sh: 1: gotm: not found

I am not sure what this means. 'gotm' command was not found in /bin/sh directory? obviously??
---Beginning of Update---
I found where it went wrong. I had to add './' in the file "~/GOTM/gotm-git/gotm-cases/Rules.make":

BEFORE:      gotm 2> log.$(name)
AFTER:         ./gotm 2> log.$(name)

The problem solved for this part. However, I then received the following error message:

make

/bin/sh: 1: Syntax error: Unterminated quoted string
make: *** [all] Error 2

Now I noticed (by staring at '~/GOTM/gotm-git/gotm-cases/Rules.make') that, by 'make', it means 'make all' or 'make namelist run'. Then I decided to do 'make namelist' and 'make run' separately. 

Then guess what? No error was produced. Strange! But problem solved! 
---End of Update---

Anyways, ignoring this error, the 'make run_all' command managed to create all the required namelist files:

ls

airsea.nml   filelist   gotmturb.nml  Makefile   seagrass.nml
bio.nml      gotm   kepsilon.xml  MellorYamada.xml
channel.xml  gotmmean.nml  komega.xml obs.nml
doit     gotmrun.nml   log.channel README

Therefore, I can do './gotm' to start the simulation and it did work (no more errors with airsea.nml!).

0 件のコメント:

コメントを投稿