Planned intervention: On Thursday March 28th 07:00 UTC Zenodo will be unavailable for up to 5 minutes to perform a database upgrade.
Published July 29, 2020 | Version v1
Software Open

mc-unik

  • 1. Leibniz Institute for Tropospheric Research

Description

Monte Carlo radiative transfer code for multiple scattering in 3d inhomogeneous atmospheres


Description of files:

mc-unik.readme: this file

mc-unik.f90: Monte Carlo radiative transfer code (see detailed
description below)

les_cu.cloud-1-067.b: 3d field of volume extinction coeff. [m-1]
les_cu.cloud-1-067.w0: 3d field of single scattering albedo
les_cu.cloud-1-067.pf-index: 3d field of phase function indices

les_cu.cloud067.pf: set of phase functions
angle: scattering angles for this set above

les_stcu.cloud.xmesh: grid coordinates in x direction
les_stcu.cloud.ymesh                      y
les_stcu.cloud.zmesh                      z

4_1: example input file for Monte Carlo run

4_1.* output files (see below for description)


mc-unik.f90: Forward Monte Carlo radiative transfer code with Local
Estimate scheme for efficient radiance calculations, I3RC aproved
(I3RC name: "UNIK" from University Kiel). This is a pure radiative
transfer solver! There are no utilities for calculating monochromatic
or spectral band gas absorption, phase functions, single scattering
albedos. On request, I can provide users with some tabulated phase
functions and singe scattering albedos at various wavelengths and for
a number of effective particle radii.

Technical description of the mc-unik.f90 in
http://i3rc.gsfc.nasa.gov/
under 'Workshop Reports', 'Abstracts from Workshop #1', 'UNIK'

Improvements from that version:
- local estimate scheme for efficient radiance calculations
- phase function index for each grid box

Reference:

  author =      "Macke, A. and Mitchell, D. and von Bremen, L.",
  title =      "Monte Carlo radiative transfer calculations for
          inhomogeneous mixed phase clouds",
  journal =     "Phys. Chem Earth (B)",
  year =     1999,
  volume =     24,
  number =     3,
  pages =     "237-241"

Organization of input and output files for mc-unik.f90

1) INPUT: (see subroutine PINPUT)

a) List of input filenames and input values in the same order as they are
read in subroutine PINPUT. This subroutine opens one main input file
ifn which contains all informations for the Monte Carlo run including
further filenames which contain the data

cloudfile ! body of cloud filename (see description below)
pf_file ! phase function filename
anglefile ! table of phase function scattering angles
xmeshfile ! grid coordinates in x direction
ymeshfile ! same for y
zmeshfile ! same for z
theta_0, phi_0 ! solar zenith and solar azimuth angle [degree]
photon_total ! # of incoming photons
albedo_lambert ! isotropic surface albedo
print_radiances ! 1/0 == write/dont write radiance output
if (print_radiances = 1)
  n_radiance ! number of selected radiances
  do i = 1, n_radiance
     read(unit,*) theta_choice(i), phi_choice(i), char_radiance(i) ! [degree]
  end do

char_radiance is a character string, i.e., 'nadir' or what ever you
like. This is I3RC convention and may not be very practical for
studying the angular dependencies of the reflected/transmitted radiances.


b) Description of the various input files:

cloud_file:
There are 3 files which contain cloud information for each grid box

i)   cloudfile.b        : volume extinction coefficient [1/length]
ii)  cloudfile.w0       : single scattering albedo
iii) cloudfile.pf-index : phase function index (see comments for phase
                          function file name)

Format for each file, i.e. for each value is:

do ix = 1, n_x
  do iy = 1, n_y
    read(unit) (value(ix, iy, iz), iz = 1, n_z)
  end do
end do

Value is a 3d real(4) array for volume extinction coeff. and for single
scattering albedo. Value is a 3d integer(4) array for the phase function
index. Format = "unformatted", i.e. binary!


anglefile contains the scattering angles [degree] for the phase function

read(unit) n_angle
do i_angle = 1, n_angle
  read(unit) angle(i_angle) ! scattering angles [deg]
end do


pf_file contains all phase functions, one after the other:

read(unit) n_pf ! number of phase functions

do i_pf = 1, n_pf
   read(unit) (pf(i_pf,i_angle), i_angle = 1, n_angle)
end do

pf is a 2d real(4) array.

!!! Note regarding anglefile and pf_file:
The scattering angles are mean angles for angular bins. Consequently,
the phase functions MUST be given as mean values for finite sized
angular bins.

Example: If angles are given as

0.25
1.00
2.00
.
.
.
178
179.75

than this corrresponds to the angular bins

[0.0, 0.5]
[0.5, 1.5]
[1.5, 2.5]
.
.
.
[178.5, 179.5]
[179.5, 180.0]

The Monte Carlo does a linear extrapolation to get phase function
values at exactly 0 and at exactly 180 degree scattering angle. Of
course, one can use discrete phase function values but the
corresponding scattering angles must be center angles of finite sized
angular bins! So, for example, do NOT use

0
1
2
.
.
.

for the scattering angles cause the angle 0 can not be interpreted as
a bin center.


xmeshfile contains the grid coordinates in units of 1 over volume
extinction coefficient. That means if you specify the volume
ext. coeff. in [m-1] than the grid coordinates MUST be given in [m].

read(unit,*) n_x
do i_x = 1, n_x + 1
  read(unit,*) xmesh(ix)
end do

n_x is the number of layers. The program reads the coordinates at nx+1
levels.
Note: Here we use formatted input in contrast to the format of the
other input files. That's a bit inconsequent, I confess!


2) Output: subroutine PZS

In the Monte Carlo source code, you can specify two character strings
prolog
epilog
which are put before and after the main ifn. In the present version
prolog = ''
epilog = ''

The output files get filenames prolog//ifn//epilog.EXT, where .EXT are
different extensions as described below

ifn.status : some runtime informations

ifn.info : cpu time

ifn.cloud : optical thickness, pixel by pixel (for testing only)

ifn.p11 : domain averaged phase function (for testing only)

ifn.R : albedo, pixel by pixel
do ix = 1, n_x
  do iy = i, n_y
     write(unit, '(f8.5)') albedo(ix,iy)
  end do
end do

ifn.T : total transmission, pixel by pixel
same format as above

ifn.T_dif : diffuse transmission, pixel by pixel
same format as above

ifn.A : absorption, pixel by pixel
same format as above

ifn.H : net horizontal transport, pixel by pixel
same format as above

ifn.<char_radiance(i_radiance)> : radiance iradiance. pixel by pixel
do ix = xmin, xmax
   do iy = ymin, ymax
      write(10, '(f12.5)') select_radiance(ix,iy,i) ! ###
   end do
end do


There is an example input file '4_1' (identical to case 4.1 in the 2nd
phase of the I3rc project) and the corresponding output.


That's it, I hope...

Questions: -> Andreas Macke (amacke@tropos.de)

 

Files

mc-unik.zip

Files (620.5 kB)

Name Size Download all
md5:6ed5e7ec90bb9a74a83dc977458b69a3
620.5 kB Preview Download

Additional details

References

  • Macke A, Mitchell D, Bremen von L (1999) Monte Carlo radiative transfer calculations for inhomogeneous mixed phase clouds. Physics and Chemistry of the Earth 24 (3), 237-241.
  • Cahalan R-F, Oreopoulos L, Marshak A, ( incl. Macke A ) et al. (2005) The International Intercomparison of 3D Radiation Codes (I3RC): Bringing together the most advanced radiative transfer tools for cloudy atmospheres. Bull. Amer. Met. Soc. doi: 10.1175/BAMS-86-9-1275.