source: LMDZ6/trunk/libf/phylmd/ecrad/test/ckdmip/permute_sza.m @ 5157

Last change on this file since 5157 was 4773, checked in by idelkadi, 11 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: 405 bytes
Line 
1function out = permute_sza(in, sza)
2% Permute the implicit solar-zenith-angle and column dimensions
3
4nsza = length(sza);
5ncol = size(in.pressure_hl,2)./nsza;
6nz = size(in.pressure_hl,1);
7
8vars = {'flux_dn_direct_sw','flux_dn_sw','flux_up_sw','pressure_hl'};
9
10out = in;
11
12for ivar = 1:length(vars)
13  out.(vars{ivar}) = reshape(permute(reshape(in.(vars{ivar}),[nz ncol nsza]), [1 3 2]), [nz ncol*nsza]);
14end
Note: See TracBrowser for help on using the repository browser.