Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
faq [2011/11/25 07:45]
arve
faq [2022/12/09 23:51] (current)
admin [I have problems compiling libRadtran under Mac OS X]
Line 1: Line 1:
 +==== How to convert to the new syntax? ====
 +
 +This is simple: We provide a Python script to translate from the old 
 +syntax (before July 2014) to the new syntax (after July 2014):
 +
 +    python src_py/​translate.py uvspec.inp > uvspecnew.inp
 +
  
 ==== How serious are serious differences reported by "make check"?​ ==== ==== How serious are serious differences reported by "make check"?​ ====
Line 38: Line 45:
  
 There are several sources that describe the inner workings of DISORT. Please check out: There are several sources that describe the inner workings of DISORT. Please check out:
-  * [[ftp://climate1.gsfc.nasa.gov/wiscombe/Multiple_Scatt/​DISORTpaper.pdf|The DISORT paper]] for a brief description. +  * [[https://www.osapublishing.org/ao/abstract.cfm?​uri=ao-27-12-2502|The DISORT paper]] for a brief description. 
-  * [[ftp://​climate1.gsfc.nasa.gov/​wiscombe/​Multiple_Scatt/​DISORTReport1.1.pdf|The DISORT report]] for a detailed description. Highly recommended. +  * {{::​disortreport1.1.pdf|The DISORT report}} for a detailed description. Highly recommended. 
-  * [[ftp://​climate1.gsfc.nasa.gov/​wiscombe/​Multiple_Scatt/​DISORT2.0beta/​DISORT.doc|The DISORT IO documentation]] for  a description of all input/​output to DISORT.  +  * {{::disort2.doc|The DISORT ​2.0 IO documentation}} for  a description of all input/​output to DISORT. ​
- +
-==== Where is the tools directory? ==== +
- +
-The directory structure has changed a bit from version 1.3 to version 1.4. We made libRadtran a bit more compliant to the "​standard"​ source code structure. All the sources are now in src, the library sources in libsrc_c and libsrc_f, and the binaries go into bin. While this is not a big improvement in itself, one may now use "make install"​ as with most other UNIX/Linux tools.+
  
 ==== How to redirect uvspec output ==== ==== How to redirect uvspec output ====
Line 81: Line 84:
 before calling configure. ​ before calling configure. ​
  
-==== I have problems compiling libRadtran under Mac OS X ====+==== I have problems compiling libRadtran under MacOS ====
  
-To be able to build the libRadtran C and Fortran libraries and associated +Please be assured that libRadtran works nicely under MacOS since some of the developers work on a Mac. To be able to build the libRadtran C and Fortran libraries and associated 
-tools, ​XCODE from apple is first needed. It either ​is included with +tools, ​you will need a number of packages provided by either  
-your computer on a DVD or you may get it from +[[https://​www.macports.org|macports]] ​or [[https://​brew.sh/​index_de|Homebrew]]. Both build upon the Apple developer tools Xcode, available in the App Store. Please note that Xcode is not sufficient because ​it does not provide a Fortran compiler. ​
  
-      http://​developer.apple.com/​tools/​xcode/​ +E.gfor macports that implies ​that you install the GNU C compiler,
- +
-The gcc that comes with xcode will not compile libRadtran. Thus, please install ​  +
-gcc and gfortran from http://​www.macports.org using the port command (you have to install the port command first) in a terminal window: ​+
  
       sudo port install gcc       sudo port install gcc
  
-Also add the following lines to your .profile file and remember to "​source .profile"​ afterwards. +and a number of other packages like the GNU Scientific Library ​ 
- +(libgsl), the GNU Multiple Precision Library ​(libgmp), and the NetCDF ​library
-      export LDFLAGS="​-L/​opt/​local/​lib -L/​usr/​X11/​lib"​ +
-      export CPPFLAGS="​-I/​opt/​local/​include -I/​usr/​X11/​include"​ +
-      export PATH=/​opt/​local/​bin:/​opt/​local/​sbin:​$PATH +
- +
-The rest is easy. Open terminal under Max OS X and following ​the  +
-standard libRadtran instructions in the README file. +
- +
-BUT THAT IS NOT ALL! +
- +
-Alas, two things will be missing with the above installation procedure. Thus +
-not all functionality is included. To get the rest you need the gnu scientific library ​ +
-(libgsl), the gnu multiple precision library ​(libgmp), and the (NETCDF)  +
-Network Common Data Form) library +
- +
-Get these also from http://​www.macports.org and install with:+
  
       sudo port install gsl       sudo port install gsl
       sudo port install gmp       sudo port install gmp
       sudo port install netcdf       sudo port install netcdf
 +      ...
  
 +The rest is easy. Open a terminal under Max OS X and follow the standard libRadtran installation instructions.
  
  
-==== I have problems compiling libRadtran under Ubuntu 11.10 ==== 
- 
-When compiling and linking libRadtran under Ubuntu 11.10 the following error message may be encountered:​ 
- 
-  "/​usr/​lib/​gcc/​i686-linux-gnu/​4.6.1/​../​../​../​../​lib/​libgsl.so:​ undefined reference to `cblas_dasum'"​ 
- 
-  
-This is caused by the order of which libraries are passed to the linker. The order was irrelevant for earlier version of Ubuntu. Why they choose to change this I do not know. Anyway, here is the fix to link libRadtran. First open the file configure.in in your favorite editor. Search for the line that says: 
- 
-  LIBGSL="​-lgslcblas -lgsl -lm" 
- 
-Change this line to 
- 
-  LIBGSL="​lgsl -lgslcblas -lm" 
- 
-Note the change in the order of the gsl and gslcblas libraries........ 
- 
-Run "​autoconf"​ to create a new configure from configure.in and then execute ./​configure. Next follow the normal libRadtran compilation and linking procedure. The autoconf program is normally not installed on all systems. You may thus have to install it first. ​ 
  
  
Line 151: Line 120:
  
      for sza in 0 15 30 45; do      for sza in 0 15 30 45; do
-       sed s/​SZA/​$sza/ ​uvspec.template ​uvspec.template > uvspec.inp+       sed s/SZA/$sza/ uvspec.template > uvspec.inp
        ​../​bin/​uvspec < uvspec.inp >> uvspec.out        ​../​bin/​uvspec < uvspec.inp >> uvspec.out
      done      done
Line 201: Line 170:
  
 See [[http://​www.libradtran.org/​doku.php?​id=user_area:​netcdf_under_cygwin|here]]! See [[http://​www.libradtran.org/​doku.php?​id=user_area:​netcdf_under_cygwin|here]]!
 +
 +
 +==== User defined aerosol ====
 +
 +The most general method to setup your own aerosol (or cloud) properties is the following:
 +
 +  profile_file 1D aer1 your_aerosol1.dat
 +  profile_properties aer1 your_aerosol1.cdf interpolate
 +
 +  profile_file 1D aer2 your_aerosol2.dat
 +  profile_properties aer2 your_aerosol2.cdf interpolate
 +
 +  ...
 +
 +This way you may combine as many aerosol species as you need. The profile_file includes mass concentration altitude profiles and particle size. The netcdf profile_properties_files include the aerosol optical properties (extinction,​ single scattering albedo, phase matrix, Legendre polynomials of phase matrix ... ) and can be generated using e.g. the Mie tool in libRadtran, where you can specify refractive index and size distribution parameters (see examples/​MIE_2.INP). Run 
 +   ​bin/​mie < examples/​MIE_2.INP
 +and you may use the output wc.mie.cdf as example for an optical properties file.
  
  
  
 
 
faq.1322207102.txt.gz · Last modified: 2011/11/25 07:45 by arve
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki