Home > swan_scripts > example_fetchcalc.m

example_fetchcalc

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 clear all; 
0002 close all;
0003 % determine fetch from Raubenheimer & Elgar Instrument 41
0004 re41fetch = fetch_calc('skg4.3_grd.dat','skg4.3_dep.dat',-122.4721646,48.3372476,-3,3,30,16,0.1,125);
0005 
0006 % plot fetch
0007 show_fetch(re41fetch);
0008 
0009 % calculate fetch for a west wind with 0.5m of water at the site
0010 uwind = 10;
0011 vwind = 0;
0012 fprintf('with 0.5 meters of water\n')
0013 [fetch] = get_fetch(re41fetch,uwind,vwind,0.5);
0014 fprintf('fetch from west wind %f\n',fetch);
0015 [fetch] = get_fetch(re41fetch,0,10,0.5);
0016 fprintf('fetch from south wind %f\n',fetch);
0017 [fetch] = get_fetch(re41fetch,-1,0,0.5);
0018 fprintf('fetch from east wind %f\n',fetch);
0019 [fetch] = get_fetch(re41fetch,0,-1,0.5);
0020 fprintf('fetch from north wind %f\n',fetch);
0021 fprintf('with 2.0 meters of water\n')
0022 [fetch] = get_fetch(re41fetch,uwind,vwind,2.0);
0023 fprintf('fetch from west wind %f\n',fetch);
0024 [fetch] = get_fetch(re41fetch,0,10,2.0);
0025 fprintf('fetch from south wind %f\n',fetch);
0026 [fetch] = get_fetch(re41fetch,-1,0,2.0);
0027 fprintf('fetch from east wind %f\n',fetch);
0028 [fetch] = get_fetch(re41fetch,0,-1,2.0);
0029 fprintf('fetch from north wind %f\n',fetch);

Generated on Wed 20-Feb-2019 16:06:01 by m2html © 2005