Skip to content

Installation of NEMESIS

Leigh Fletcher edited this page Nov 17, 2021 · 3 revisions

Overview

NEMESIS is the name of our suite of radiative transfer and spectral inversion software. Some of the underlying forward model (e.g., the code that calculates the spectrum) dates back to the 1980s and is known as Radtrans. The inverse model (which iteratively fits data) was coded by Professor Patrick Irwin at Oxford in the 1990s/2000s, and is known as NEMESIS. Full details can be accessed in the following paper:

Irwin et al. (2008), JQSRT

Also see the manuals located in radtrancode/manuals.

The NEMESIS and RADTRAN manuals are somewhat dense and detailed. Hence, new users may wish to look at NEMESIS4Newbies.pdf to better understand how to use the software.

In 2016 the NEMESIS software project moved from version control under SVN to version control under GIT. As a new user, you may find that the code is already available to you, but these instructions are recorded here for any authorised users of the code.

To get started, you need to git clone https://github.com/nemesiscode/radtrancode.git and follow the instructions here. On Leicester systems, we recommend compiling with ifort

Directory Structure

The directories are:

  • frecipes/ Numerical recipes Fortran programs. A makefile is included.

  • raddata/ Reference spectral data for use by Radtrans/Nemesis, including CIA tables, solar/stellar reference spectra, gas continuum spectra, lineshape factors, SVP curves and last, but definitely not least, a list of the current planets defined, together with their mass and radius, etc.

  • radtran/ Main Radtrans directory, containing a number of sub-directories. Several executables are defined, including Radtrans itself and a number of line data and correlated-k processing programs. The subdirectory makefiles/ includes shell scripts for making the libraries in one go and for making all the Radtrans executables. The makefiles for each sub-directory are also included.

  • nemesis/ The Nemesis subroutines and programs. The Nemesis programs are built upon the Radtrans libraries in radtran/ so these must be compiled first.

  • idl/ Useful IDL programs for reading and plotting Radtrans/Nemesis calculations.

  • manuals/ The Radtrans and Nemesis manuals.

  • FOVgreg/ Library of routines for defining MCS Field of View. Only needs compiling if you're going to run NemesisMCS or GenerateMCSspx.

Template Files for NEMESIS

NEMESIS requires a large number of input files before it can run successfully. These are fully explained in the NEMESIS manual, but a series of templates have been set up as follows. Copy the directories over, and type: Nemesis < nemesis.nam > run.prc & ...to execute. Then check out the nemesis.mre file, which contains the spectral fit and the retrieved profiles. The run.prc file contains cd r information about the progress of the iteration, and a calculation of the chi-squared value, indicating goodness of fit. Remember, only run NEMESIS on a compute node, and not a login node.

Play with the NEMESIS retrievals to develop an understanding of how the code works:

  • Try increasing and decreasing the size of the a priori error on the temperature profile in tempapr.dat
  • Try adding and removing forward modelling error in the fmerror.dat file
  • Try editing the *spx file to reduce the uncertainty on the data or to cut out different regions of the spectrum.
  • Try setting the number of iterations to zero in the nemesis.inp file to calculate a forward model rather than performing a full retrieval.
  • Try setting the distribution of NH3, PH3 or CH4 to zero in the nemesis.ref file to see the resulting effect on the calculated spectrum.
  • Try removing all cloud opacity by setting the column in aerosol.ref to zero.

The spectrum and retrieved profiles can be extracted from the output *mre file, which can be plotted using idl/subroutines/zscanmre.pro Try plotting the profiles in the nemesis.prf file (these are the retrieved profiles at the end of the retrieval).

Jupiter CIRS

Using data from the 2000 flyby of Jupiter by Cassini. Cassini data must be downloaded via vanilla and processed via idl to produce the input *spx files. Examples of the codes used to manipulate CIRS data can be found in /data/nemesis/idl/read_vanilla/

Jupiter VISIR

Using ground-based imaging data from the VLT/VISIR instrument. These data are generated by stacking together cylindrical maps (cmap files) in various different ways to form crude spectra using GB_make_spx.pro. Zonal average or square grids can be output from this code, and then used as inputs to NEMESIS.

Clone this wiki locally