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
Last revision Both sides next revision
faq [2010/09/13 10:50]
admin
faq [2022/12/09 23:39]
admin [Where is the tools directory?]
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 80: Line 83:
   export F77=gfortran   export F77=gfortran
 before calling configure. ​ before calling configure. ​
- + 
 +==== I have problems compiling libRadtran under Mac OS X ==== 
 + 
 +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 
 +your computer on a DVD or you may get it from  
 + 
 +      http://​developer.apple.com/​tools/​xcode/​ 
 + 
 +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 
 + 
 +Also add the following lines to your .profile file and remember to "​source .profile"​ afterwards. 
 + 
 +      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 a 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 gmp 
 +      sudo port install netcdf 
 ==== How to implement loops in libRadtran ==== ==== How to implement loops in libRadtran ====
  
Line 94: Line 132:
  
      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 115: Line 153:
 Of course that's not all you can do - please refer to the manuals of bash, sed, AWK, ... or whatever you use. You might need to spend some time learning a new language but be sure that it pays off! Everything which has been calculated and published by the libRadtran group has been done in a similar way, sometimes using more weird languages (Perl), sometimes more readable (Python). ​ Of course that's not all you can do - please refer to the manuals of bash, sed, AWK, ... or whatever you use. You might need to spend some time learning a new language but be sure that it pays off! Everything which has been calculated and published by the libRadtran group has been done in a similar way, sometimes using more weird languages (Perl), sometimes more readable (Python). ​
  
-==== How to interpret the radiance output of libRadtran====+==== How to interpret the radiance output of libRadtran ====
  
 For those not used to the standard UNIX tools, that may be a pain in the neck! All you want to have are radiances but instead you get For those not used to the standard UNIX tools, that may be a pain in the neck! All you want to have are radiances but instead you get
 +
 +   ​400.000 ​ 1.711472e+03 ​ 2.040234e-03 ​ 2.600588e+02 ​ 1.361946e+02 ​ 2.709903e-04 ​ 4.893769e+01
 +                                   0.000
 +  1.00000000 ​ 6.844470215e+01 ​  ​6.844470215e+01
 +   ​401.000 ​ 1.695302e+03 ​ 1.212575e-03 ​ 2.554139e+02 ​ 1.349078e+02 ​ 1.535584e-04 ​ 4.815027e+01
 +                                   0.000
 +  1.00000000 ​ 6.716767883e+01 ​  ​6.716767883e+01
 +   ​402.000 ​ 1.790552e+03 -8.538017e-04 ​ 2.677181e+02 ​ 1.424876e+02 -6.538203e-05 ​ 5.060664e+01
 +                                   0.000
 +  1.00000000 ​ 7.032174683e+01 ​  ​7.032174683e+01
 +   ​403.000 ​ 1.671323e+03 ​ 1.793135e-03 ​ 2.478811e+02 ​ 1.329996e+02 ​ 2.162131e-04 ​ 4.695971e+01
 +                                   0.000
 +  1.00000000 ​ 6.504595184e+01 ​  ​6.504595184e+01
 +That's the line with the irradiances and actinic fluxes (7 columns) followed by the azimuth angles (here only one column) and then the radiances. What you probably might want is the radiance for each wavelength. This a typical application for an AWK oneliner: ​
 +  ../​bin/​uvspec < uvspec.inp | gawk '​NF==7{wvl=$1};​NF==3{print wvl,​$3}' ​
 +will produce what you want: 
 +  400.000 6.844470215e+01
 +  401.000 6.716767883e+01
 +  402.000 7.032174683e+01
 +  403.000 6.504595184e+01
 +Simple, isn't it? AWK is powerful enough to extract whatever you want, in whatever format you want. It is part of standard Linux installations and of cygwin. Please check the [[http://​www.gnu.org/​manual/​gawk/​gawk.html|AWK manual]] if you need more information. Alternatively,​ there are more modern scripting languages like Python but AWK probably cannot be beat with respect to effectiveness (defined as action done divided by characters typed).
 +
 +
 +==== netcdf doesn'​t work under Windows/​cygwin ====
 +
 +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.txt · Last modified: 2022/12/09 23:51 by admin
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki