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 | |
---|
11 | load 'tyler.mat'; |
---|
12 | tilex=320 |
---|
13 | tiley=5760 |
---|
14 | el = alb(1:1:tilex,1:1:tiley)'; |
---|
15 | |
---|
16 | % Scale factor (ie accuracy): 10000 |
---|
17 | el = 10000.*el; |
---|
18 | % Conversion float >> integer |
---|
19 | el = round(el); |
---|
20 | |
---|
21 | disp("coordinates") |
---|
22 | disp(LON(1,1:500:tiley)) |
---|
23 | disp(LAT(1:20:tilex,1)') |
---|
24 | disp(LON(1,2)-LON(1,1)) |
---|
25 | disp(LAT(2,1)-LAT(1,1)) |
---|
26 | |
---|
27 | |
---|
28 | yeah = el(2000,1:10:tilex); |
---|
29 | plot(yeah) |
---|
30 | |
---|
31 | %% Create WRF data tiles (with 0. filling, to achieve a square tile) |
---|
32 | %tilex=641; |
---|
33 | %tiley=385; |
---|
34 | |
---|
35 | tilexx=5760 |
---|
36 | tileyy=2880 |
---|
37 | |
---|
38 | part = zeros(tilexx,tileyy); |
---|
39 | part(1:tilexx,tileyy-tilex+1:tileyy) = el; |
---|
40 | fid = fopen('00001-05760.00001-02880','wb','b'); |
---|
41 | fwrite(fid,part,'integer*2'); |
---|
42 | |
---|
43 | plot(part(2000,1:tileyy)) |
---|
44 | |
---|
45 | plot(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.