source: trunk/MESOSCALE/LMD_MM_MARS/WPS_GEOG/res/tylercap/test.m @ 2498

Last change on this file since 2498 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.0 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 'tyler.mat';
12tilex=320
13tiley=5760
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:500:tiley))
23disp(LAT(1:20: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=5760
36tileyy=2880
37
38part = zeros(tilexx,tileyy);
39part(1:tilexx,tileyy-tilex+1:tileyy) = el;
40fid = fopen('00001-05760.00001-02880','wb','b');
41fwrite(fid,part,'integer*2');
42
43plot(part(2000,1:tileyy))
44
45plot(part(1000,1:tileyy))
46
47
48%sho=part(1:100:tiley,1:100:tiley);
49%contour(sho)
50
Note: See TracBrowser for help on using the repository browser.