Setting up Environment for AGCM Sandbox: Difference between revisions

Bmauer (talk | contribs)
adding script to set up environment for model
Bmauer (talk | contribs)
split script back up
Line 1: Line 1:
Given the large number of directories in the GEOS5 model it can be useful to set up your environment to make navigating your sandbox easier. This page will document one way of doing this through two shell scripts that must be sourced. This is especially useful if you have multiple copies of the GEOS5 model that you might have checked out (a stable release and your development sandbox for example). This assumes you have checked out a copy of the model previously.
Given the large number of directories in the GEOS5 model it can be useful to set up your environment to make navigating your sandbox easier. This page will document one way of doing this through two shell scripts that must be sourced. This is especially useful if you have multiple copies of the GEOS5 model that you might have checked out (a stable release and your development sandbox for example). This assumes you have checked out a copy of the model previously and you are running c shell.


You need two files in your home directory or somewhere else.
First is geosmodels. Here you will set the location of any GEOS sandboxes and names for them you will use from the command line to set the proper $ESMADIR variable.
  <nowiki>  
  <nowiki>  
#!/bin/csh -f
#!/bin/csh -f
Line 17: Line 20:
   exit
   exit
endif
endif
</nowiki>
Next is g5env
<nowiki>
#!/bin/csh -f


set arch = `uname`
set arch = `uname`
Line 106: Line 115:
echo ""
echo ""
</nowiki>
</nowiki>
Set an alias in your login script to run these:
alias geostag 'source ~/geosmodels \!:1 ; source ~/g5env'
Now run "geostag MODEL_NAME", where model name is one of the MODEL_NAMES in the geosmodel file.
This will set $ESMADIR, source g5_modules in your sandbox and set aliases to the various model directories.
To go to $ESMADIR/src/GMAO_Share/MAPL_Base you can now just type MAPL.