Home > custom > glimmer > glimmer_temp_model.m

glimmer_temp_model

PURPOSE ^

glimmer temp model (EIS driver)

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 glimmer temp model (EIS driver)
 copy/pasted from temp_const.model file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % glimmer temp model (EIS driver)
0002 % copy/pasted from temp_const.model file
0003 ad=-0.006;
0004 timesteps=1000; %stepping in model
0005 temp_const=[
0006 -144000.000000    -10.264430    17.964430 -0.051329
0007 -120000.000000    -10.264430    17.964430 -0.051329
0008 -110000.000000    -11.264430    17.964430 -0.051329
0009 -100000.000000    -12.0000    17.964430 -0.051329
0010 -95000.00000    -12.40000    17.964430 -0.051329
0011 -90000.00000    -12.90000    17.964430 -0.051329
0012 -5000.000000    -14.0000    17.964430 -0.051329
0013 -0.000000    3.342444    8.657556    -0.051329];
0014 
0015 %% read in lat and grid
0016 [xcoord,ycoord,alp10k,alpheader]=asciigrid2mat('L:\glimmer_alpen\alpen10k.asc');
0017 [lxcoord,lycoord,lat,latheader]=asciigrid2mat('L:\glimmer_alpen\alps10k_lat.asc');
0018 
0019 %% model:
0020 t=6; % time in model years
0021 
0022 %mt=(temp_const(1,1)-temp_const(end,1))/timesteps;
0023 
0024 lamb0=35; % latitude 0, 30deg here
0025 T=lat;
0026 %T=nan;
0027 T = temp_const(t,2) + (temp_const(t,3)*exp(temp_const(t,4)*(lat-lamb0) )) ; % temp at 0m
0028 oT=T+(ad*alp10k); % temp at topg
0029 
0030 %% dump
0031 
0032 mat2asciigrid('L:\glimmer_alpen\temp10k_5.asc',xcoord,ycoord,T);
0033 mat2asciigrid('L:\glimmer_alpen\otemp10k_5.asc',xcoord,ycoord,oT);
0034 
0035 
0036 %%
0037 load('D:\Matlab\MCS_Scand\glimmer_temperature');
0038 lamb0=35; %
0039 lat=60;
0040 tempseries=zeros(size(glimmertemp,1),2);
0041 for t=1:size(tempseries)
0042     tempseries(t,1)=glimmertemp(t,1);   
0043     tempseries(t,2) = glimmertemp(t,2) + (glimmertemp(t,3)*exp(glimmertemp(t,4)*(lat-lamb0) )) ; % temp at 0m
0044 end
0045 
0046 % start -120000 at t=25  end at -80000 at 65
0047 figure, plot(1:41,tempseries(25:65,2))

Generated on Tue 24-Feb-2009 19:14:50 by m2html © 2003