Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
/ SOCRATES Public archive
forked from nichollsh/SOCRATES

Redistributed on GitHub from the original TRAC repository, with modifications and additions.

License

Notifications You must be signed in to change notification settings

FormingWorlds/SOCRATES

 
 

Repository files navigation

SOCRATES

Suite Of Community RAdiative Transfer codes based on Edwards and Slingo.

Rehosted from the original MetOffice source [1] with modifications by Harrison Nicholls.

Contents:

  1. Licence
  2. What's included?
  3. [Omitted in this redistribution of the code]
  4. Compiling the source code externally
  5. Compilation of scripts in sbin
  6. Running the code
  7. Tested compilers
  8. Contributors

0) BSD 3-Clause licence

(C) Crown copyright Met Office. All rights reserved. For further details please refer to the file COPYRIGHT.txt which you should have received as part of this distribution.

1) What's included?

src/ contains the source code in Fortran 95 (.f90) and a few remaining in Fortran 77 (.f).

make/ contains the Makefile which then accesses the various Mk_* files.

sbin/ contains scripts that can be used to run the fortran routines.

man/ contains man pages for scripts in sbin/. For example, running man Cl_run_cdf will give options for that script.

examples/ and data/ provide test input for the radiation code. See the CONTENTS in each directory under examples/ for instructions.

idl/ and python/ contain scripts to generate atmospheric profiles etc in netCDF format to be used as input for the radiation code (l_run_cdf).

docs/ contain the user guide and technical guide for the ES code.

spectraltools/ contains new addons to the code which allow for streamlined and flexible creation of spectral files from precomputed cross-sections.

3) Compiling the source code externally

For external users it should only be necessary to edit the file make/Mk_cmd to allow compilation of the code on your system. FORTCOMP and LINK can be changed to your local Fortran compiler. To use the netCDF routines you must also change INCCDF_PATH and LIBCDF_PATH to point to your local netCDF installation.

The following commands can then be run to build the suite and setup your path to the executables and man pages:

./configure ./build_code
source ./set_rad_env

4) Compilation of scripts in sbin

There are a small number of utilities in sbin/ which are written in C and require compilation. A Makefile has been provided:

cd $RAD_SCRIPT make

5) Running the code

Once you have set your path to the man pages (see section 2/3) you can find up-to-date instructions for running the following routines:

Two-stream and spherical harmonics radiance codes using netCDF or text CDL input files:

man Cl_run_cdf man Cl_run_cdl

A Mie scattering code for determining optical properties of aerosol and cloud particles:

man Cscatter

A correlated-k code for the calculation of gaseous absorption coefficients for the spectral files either directly from HITRAN .par or .xsc databases or line-by-line absorption coefficients in a netCDF input file:

man Ccorr_k

Auxillary routines for format conversion, interpolation etc:

man Ccdf2cdl man Ccdl2cdf man Cinterp

These scripts are a command line interface to interactive routines in the bin/ directory. These routines may be run directly if desired (eg. l_run_cdf).

It is very useful to study the examples/ directory for common usage of the code.

6) Tested compilers

The full suite has been tested with the following compilers:

  • Intel ifort 17.0.7
  • GCC gfortran 9.4.0

7) Contributors

Significant contributors include:

  • J. Edwards
  • A. Slingo
  • J. Manners

References

About

Redistributed on GitHub from the original TRAC repository, with modifications and additions.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Fortran 90.9%
  • Python 2.8%
  • Terra 1.8%
  • q 1.8%
  • Shell 1.0%
  • Julia 0.7%
  • Other 1.0%