source: LMDZ6/trunk/libf/phylmd/ecrad/test/ckdmip/calc_hr.m

Last change on this file was 4773, checked in by idelkadi, 9 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 317 bytes
Line 
1function hr = calc_hr(data, band, icol)
2
3eval(['flux_up = data.flux_up_' band ';']);
4eval(['flux_dn = data.flux_dn_' band ';']);
5flux_net = flux_dn-flux_up;
6g=9.81;
7scaling = 3600.*24;
8hr_all = -scaling.*(diff(flux_net).*g./diff(data.pressure_hl)./1004)';
9if nargin > 2
10  hr = hr_all(icol,:);
11else
12  hr = hr_all;
13end
Note: See TracBrowser for help on using the repository browser.