====== TOA radiance at 10 μm as function of cloud height ====== Calculate the radiance at the top of the atmosphere at a wavelength of 10 μm assuming that the atmosphere includes a cloud layer. How does the radiance depend on cloud altitude? //Hints:// * Use the libRadtran input file and the plotting script from [[teaching:radiative_transfer:disort_nstr1|exercise 6]] to start. * Look at [[teaching:radiative_transfer:disort_nstr2|exercise 8]] to see how a cloud layer is defined in libRadtran. data_files_path /local/libRadtran-1.5-beta/data atmosphere_file us-standard mol_abs_param lowtran source solar kurudz_1.0nm.dat albedo 0.0 sza 30.0 rte_solver disort2 wavelength 10000 wc_file 1D /usr/users/westermayer/Desktop/RadiativeTransfer/cloud1.dat zout toa umu 0.9 phi 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 # height LWC Reff # km g/m^3 µm 3.0 0 0 2.0 0.1 10.0 1.0 0.1 10.0 # height LWC Reff # km g/m^3 µm 8.0 0 0 7.0 0.1 10.0 6.0 0.1 10.0 5.0 0 0 4.0 0 0 3.0 0 0 2.0 0 0 1.0 0 0 {{:teaching:radiative_transfer:clouddata13.dat|}} {{:teaching:radiative_transfer:plot13.png|}} #!/bin/bash # this shell script calculates radiances for clouds at differnt heights. zmin is the bottom # of the cloud, zmax the top. rm radiance.dat for zmin in `seq 1 8`; do # zmax should be 1 km higher than zmin -> cloud layer thickness is 1 km let zmax=zmin+1 echo "zmin: "$zmin" zmax: "$zmax # Make template for wc_file where the altitudes are replaced using sed sed 's/ZMIN/'$zmin'/' wc.tmplt | sed 's/ZMAX/'$zmax'/' > wc.dat # execute uvspec uvspec < uvspec.inp > dummy # write result (zmin, zmax, radiance) into file gawk '{print '$zmin', '$zmax', $2}' dummy >> radiance.dat done # specify libRadtran data path data_files_path /local/emde/libRadtran/data # Location of atmospheric profile file. atmosphere_file us-standard correlated_k lowtran albedo 0 # Surface albedo rte_solver disort2 # Radiative transfer equation solver wavelength 10000 # Wavelength range [nm] wc_file wc.dat source thermal # Emission from Earth surface is source of radiation zout toa # surface or toa umu 1 phi 0 output per_nm # output unit output_user lambda uu ZMAX 0 0 ZMIN 0.1 10 from pylab import * # Planck function to calculate radiance for given wavelength and temperature. # Note the difference (factor pi) to task 1 where irradiances were calculated. def planck(lam, T): c= 2.99792458e8 # speed of light k= 1.380662e-23 # Boltzmann constant h= 6.626180e-34 # Planck constant return 2*h*c*c/(lam**5 * (exp(h*c/(lam*k*T))-1.)) # simulated radiance bt=loadtxt('radiance.dat') # atmospheric profile atm=loadtxt('/local/emde/libRadtran/data/atmmod/afglus.dat') plot(bt[:,2], bt[:,1], 'o', label='simulated radiance') plot(planck(10e-6,atm[:,2])*1e-9, atm[:,0], label='B( T(z) )') ylim(0,10) xlim(0,0.015) ylabel('cloud top height [km]') xlabel('radiance [W/(m^2 nm sr)]') legend() savefig('cloudheight.png') {{:teaching:radiative_transfer:cloudheight.png|}}