Blog

Matlab library for RRTMG – now public

I just made public my GitHub repository with a Matlab library for RRTMG, which I had announced here and had stored on Guillimin.

https://github.com/blyankinshtein/rrtmg_libraries

The library contains functions to run both RRTMG Longwave and Shortwave, by creating tape-files from ERA-Interim data and some standard atmospheric profiles.

Any questions are welcome. Enjoy!

vertical integration of energy flux in ERA-Interim

This is the method I used to compute vertical integration of energy flux based on ERA-Interim 4 times daily datasets. It mainly includes how vertical integral should be done based on model level and what errors may results in if adopted improper integration scheme.

Variables should be based on model level and please refer to Trenberth 2002 to see the comparison between the difference between the computation under model level and pressure level.
The dimension of each variable is ntime*nlev*nlat*nlon. As I focus on one time slice computation, time dimension is 1.

Take thermal energy flux VT as an example.
V and T are both defined on midpoint layer and their dimension is 60*nlat*nlon. Here are the calculation steps:
1. compute VT=V*T at each layer (60*nlat*nlon)
2. calculate the pressure of each layer under vertical hybrid coordinate.
Note: nlev of vertical hybrid coordinate is 61 as we want to know the pressure of layer interfaces associated with hybrid coordinate. In this way, we can get the pressure difference between two adjacent layer dp = p(lower)-p(upper) (60*nlat*nlon)
3. do vertical integration, sum(VT*dp) at each layer.
Done!

Previously, I mistook that V and T are defined at layer interfaces and took the average of VT between two adjacent layer to represent the thermal flux between these two layers. Actually as V and T are already at midpoint layer, I shouldn’t do average again. And the underestimation of this wrong method can reach about 1/3 at some place. Experience in tears…

Hope this will be of help to you😊.



Diffusivity angle script

This is a function used to compute diffusivity angle of infrared spectra for given atmospheric conditions.

Reference: Feng J, Huang Y. Diffusivity factor approximation for spectral outgoing longwave radiation, Journal of Atmospheric Sciences (submitted)

function [diff,alpha]=dfa(opts,Ht,H,gamma,wavenum,ts,mode_geo);

%%%% opts: total optical depth, nadir view

%%%% Ht: scale height (km) of optical depth

%%%% gamma: temperature lapse rate (K/km); poistively defined

%%%% ts: surface temperature (K)

%%%% mode_geo: 0 if plane-parral atmosphere; 1 if curved earth surface

R       =6371.23; %%% Earth radius (km)

hkB     =1.438833;%%% h/kB

%H      =100;     %%% Height of TOA (km)

r       =0.5772156;%% Euler’s constant

alpha   =(hkB*wavenum/ts^2)*gamma*Ht*(exp(hkB*wavenum/ts))/(exp(hkB*wavenum/ts)1);

%alpha  =(hkB*wavenum/ts^2/2+1/ts)*gamma*Ht;

if opts<1.45

if mode_geo==0

        scale=1;

        tmpmin=acos(exp(0.5))/pi*180;

elseif mode_geo==1

        scale=(1H/R)^2;

else

        display(‘mode_geo must be 0 or 1!’)

end

        a=(12*alpha*opts0.5*alpha*opts^2*(r+log(opts)2)+alpha/12*opts^3)*scale(1alpha/3*opts^3);

        b=0.5*alpha*opts^3+alpha*opts;

        c=alpha/4*opts^2+alpha/4*opts^3;

        diff=acos((b-sqrt(b^24*a*c))/2/a)/pi*180;

        if mode_geo==1

        tmp=(b-sqrt(b^24*a*c))/2/a;

        diff=acos(sqrt(1(1tmp^2)*scale))/pi*180;

        end

end

if opts>=1.45

if mode_geo==0

        diff=acos(exp(0.5))/pi*180;

elseif mode_geo==1

       scale=(1H/R)^2;

       diff=acos(sqrt(1(1-exp(0.5)^2)*scale))/pi*180;

end

end

LAGRANTO workshop

Over the last six months, I have been using a trajectory model LAGRANTO by ETH Zurich. This model offers very broad functionality that can be used in various research problems. I personally found it extremely helpful to study the motion of Arctic air masses and the modification of their characteristics.

Here is a small example of using LAGRANTO in the network of our department:
https://github.com/blyankinshtein/lagranto_tutorial
On July 30 at 2.30 pm I will be giving a workshop as a part CAOS Student Workshop series. We will briefly discuss the science behind the model, its comparison with the HYSPLIT trajectory model and go through some of its capabilities. In the end, there will be a short tutorial where you will try to run the model and manipulate the trajectories to identify warm conveyor belts.

Here is the abstract: https://www.dropbox.com/s/jnlmk80cjqd84wq/Introduction%20to%20LAGRANTO.pdf
Here is the presentation slides: https://www.dropbox.com/s/zi89mut25mxcjok/LAGRANTO%20workshop.pdf?dl=0

See you there,
Natalia Bliankinshtein

Workshop on Git and GitHub

Today, July 19 at 2.30pm, I am giving a tutorial on Git and GitHub as a part of Student Workshop Series by the CAOS. Everybody in the Department is invited.
Here is the link to the presentation that you will be needing:
https://www.dropbox.com/s/grd6q3f4y847s7b/Git%20workshop.pdf?dl=0
And here is the abstract:
https://www.dropbox.com/s/5fqv4ef0buxnym8/Introduction%20to%20Git%20and%20GitHub.pdf?dl=0

GitHub has been an extremely useful tool for me over the two years of my
studies in the Department, so I encourage everyone to start using it, for the safety of your research and results.

See you there,
Natalia Bliankinshtein