source: trunk/MESOSCALE/LMD_MM_MARS/WPS_GEOG/res/tylerall/test.m @ 2613

Last change on this file since 2613 was 1168, checked in by aslmd, 11 years ago

MESOSCALE. added Tyler and Barnes 2014 albedo and thermal inertia maps (useful for polar runs)

File size: 1.2 KB
Line 
1% -----------------------------------------------
2% custom_build.m
3%   Script to be used with Matlab or GNU-Octave
4% -----------------------------------------------
5% Purpose:
6%   Custom topography in a peculiar region >> WRF geogrid tiles
7% Author:
8%   A. Spiga - 03/2007
9% -----------------------------------------------
10
11load 'TylerData_8ppd.mat';
12tilex=1440
13tiley=2880
14el = alb(1:1:tilex,1:1:tiley)';
15
16% Scale factor (ie accuracy): 10000
17el = 10000.*el;
18% Conversion float >> integer
19el = round(el);
20
21disp("coordinates")
22disp(lon(1,1:200:tiley))
23disp(lat(1:200:tilex,1)')
24disp(lon(1,2)-lon(1,1))
25disp(lat(2,1)-lat(1,1))
26
27
28yeah = el(2000,1:10:tilex);
29plot(yeah)
30
31%% Create WRF data tiles (with 0. filling, to achieve a square tile)
32%tilex=641;
33%tiley=385;
34
35tilexx=2880
36tileyy=1440
37
38part = zeros(tilexx,tileyy);
39part(1:tilexx,1:tileyy) = el;
40fid = fopen('albedo/00001-02880.00001-01440','wb','b');
41fwrite(fid,part,'integer*2');
42
43plot(part(2000,1:tileyy))
44
45plot(part(1000,1:tileyy))
46
47
48%% now thermal inertia
49el = ti(1:1:tilex,1:1:tiley)';
50part = zeros(tilexx,tileyy);
51part(1:tilexx,1:tileyy) = el;
52fid = fopen('ti/00001-02880.00001-01440','wb','b');
53fwrite(fid,part,'integer*2');
54
Note: See TracBrowser for help on using the repository browser.