Commit e55765af authored by Pierre Cazenave's avatar Pierre Cazenave

Actually add the tests to the documentation generation

parent e8d720fd
......@@ -3,8 +3,8 @@
<html>
<head>
<title>Matlab Index</title>
<meta name="keywords" content="fvcom_postproc fvcom_prepro swan_scripts utilities">
<meta name="description" content="fvcom_postproc fvcom_prepro swan_scripts utilities">
<meta name="keywords" content="fvcom_postproc fvcom_prepro swan_scripts tests/utilities utilities">
<meta name="description" content="fvcom_postproc fvcom_prepro swan_scripts tests/utilities utilities">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
......@@ -15,7 +15,7 @@
<h1>Matlab Index</h1>
<h2>Matlab Directories</h2>
<ul style="list-style-image:url(./matlabicon.gif)">
<li><a href="fvcom_postproc/index.html">fvcom_postproc</a></li><li><a href="fvcom_prepro/index.html">fvcom_prepro</a></li><li><a href="swan_scripts/index.html">swan_scripts</a></li><li><a href="utilities/index.html">utilities</a></li></ul>
<li><a href="fvcom_postproc/index.html">fvcom_postproc</a></li><li><a href="fvcom_prepro/index.html">fvcom_prepro</a></li><li><a href="swan_scripts/index.html">swan_scripts</a></li><li><a href="tests/utilities/index.html">tests/utilities</a></li><li><a href="utilities/index.html">utilities</a></li></ul>
<h2>Matlab Files found in these Directories</h2>
<table width="100%">
<tr>
......@@ -27,43 +27,43 @@
<td><a href="utilities/ST_example.html" title="utilities">ST_example</a></td> <td><a href="fvcom_prepro/example2.html" title="fvcom_prepro">example2</a></td> <td><a href="fvcom_prepro/inCell.html" title="fvcom_prepro">inCell</a></td> <td><a href="fvcom_prepro/smoothfield.html" title="fvcom_prepro">smoothfield</a></td> </tr> <tr>
<td><a href="utilities/ST_phi2d.html" title="utilities">ST_phi2d</a></td> <td><a href="fvcom_prepro/example_FVCOM_river.html" title="fvcom_prepro">example_FVCOM_river</a></td> <td><a href="utilities/inbox.html" title="utilities">inbox</a></td> <td><a href="fvcom_prepro/smoothfield2.html" title="fvcom_prepro">smoothfield2</a></td> </tr> <tr>
<td><a href="utilities/ST_summary.html" title="utilities">ST_summary</a></td> <td><a href="fvcom_prepro/example_FVCOM_tsobc.html" title="fvcom_prepro">example_FVCOM_tsobc</a></td> <td><a href="utilities/inkmlbb.html" title="utilities">inkmlbb</a></td> <td><a href="swan_scripts/swan2netcdf.html" title="swan_scripts">swan2netcdf</a></td> </tr> <tr>
<td><a href="utilities/ST_taucr.html" title="utilities">ST_taucr</a></td> <td><a href="fvcom_prepro/example_FVCOM_wind_ts.html" title="fvcom_prepro">example_FVCOM_wind_ts</a></td> <td><a href="fvcom_prepro/interp_POLCOMS2FVCOM.html" title="fvcom_prepro">interp_POLCOMS2FVCOM</a></td> <td><a href="utilities/transect_nodes_screen.html" title="utilities">transect_nodes_screen</a></td> </tr> <tr>
<td><a href="utilities/ST_wentworth.html" title="utilities">ST_wentworth</a></td> <td><a href="fvcom_prepro/example_FVCOM_wind_ts_speed.html" title="fvcom_prepro">example_FVCOM_wind_ts_speed</a></td> <td><a href="utilities/isintriangle.html" title="utilities">isintriangle</a></td> <td><a href="utilities/tri_from_bndry.html" title="utilities">tri_from_bndry</a></td> </tr> <tr>
<td><a href="utilities/ST_wset.html" title="utilities">ST_wset</a></td> <td><a href="swan_scripts/example_fetchcalc.html" title="swan_scripts">example_fetchcalc</a></td> <td><a href="utilities/julian2greg.html" title="utilities">julian2greg</a></td> <td><a href="fvcom_prepro/truncfield.html" title="fvcom_prepro">truncfield</a></td> </tr> <tr>
<td><a href="utilities/SW_Density.html" title="utilities">SW_Density</a></td> <td><a href="fvcom_prepro/example_init_lag.html" title="fvcom_prepro">example_init_lag</a></td> <td><a href="utilities/lat_to_m.html" title="utilities">lat_to_m</a></td> <td><a href="utilities/utm2deg.html" title="utilities">utm2deg</a></td> </tr> <tr>
<td><a href="utilities/SW_Kviscosity.html" title="utilities">SW_Kviscosity</a></td> <td><a href="fvcom_prepro/example_my_project.html" title="fvcom_prepro">example_my_project</a></td> <td><a href="utilities/lon_to_m.html" title="utilities">lon_to_m</a></td> <td><a href="utilities/wave_fric.html" title="utilities">wave_fric</a></td> </tr> <tr>
<td><a href="utilities/SW_Viscosity.html" title="utilities">SW_Viscosity</a></td> <td><a href="fvcom_postproc/example_surface_plot.html" title="fvcom_postproc">example_surface_plot</a></td> <td><a href="utilities/m_ll2ll.html" title="utilities">m_ll2ll</a></td> <td><a href="utilities/wgs2utm.html" title="utilities">wgs2utm</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_coriolis.html" title="fvcom_prepro">add_coriolis</a></td> <td><a href="swan_scripts/fetch_calc.html" title="swan_scripts">fetch_calc</a></td> <td><a href="utilities/m_to_lat.html" title="utilities">m_to_lat</a></td> <td><a href="fvcom_prepro/wrf2fvcom_U10V10.html" title="fvcom_prepro">wrf2fvcom_U10V10</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_obc_nodes_graphic.html" title="fvcom_prepro">add_obc_nodes_graphic</a></td> <td><a href="utilities/find_boundary_elements.html" title="utilities">find_boundary_elements</a></td> <td><a href="utilities/m_to_lon.html" title="utilities">m_to_lon</a></td> <td><a href="fvcom_prepro/write_FVCOM_bath.html" title="fvcom_prepro">write_FVCOM_bath</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_obc_nodes_list.html" title="fvcom_prepro">add_obc_nodes_list</a></td> <td><a href="fvcom_prepro/find_nearest_pt.html" title="fvcom_prepro">find_nearest_pt</a></td> <td><a href="fvcom_prepro/make_blank_mesh.html" title="fvcom_prepro">make_blank_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_bedflag.html" title="fvcom_prepro">write_FVCOM_bedflag</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_river_nodes_graphic.html" title="fvcom_prepro">add_river_nodes_graphic</a></td> <td><a href="utilities/fix_inside_boundary.html" title="utilities">fix_inside_boundary</a></td> <td><a href="utilities/mjul2str.html" title="utilities">mjul2str</a></td> <td><a href="fvcom_prepro/write_FVCOM_cor.html" title="fvcom_prepro">write_FVCOM_cor</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_river_nodes_list.html" title="fvcom_prepro">add_river_nodes_list</a></td> <td><a href="swan_scripts/fvcom2swan.html" title="swan_scripts">fvcom2swan</a></td> <td><a href="utilities/mjul2str2.html" title="utilities">mjul2str2</a></td> <td><a href="fvcom_prepro/write_FVCOM_elevtide.html" title="fvcom_prepro">write_FVCOM_elevtide</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sigma_forDT.html" title="fvcom_prepro">add_sigma_forDT</a></td> <td><a href="fvcom_prepro/gen_semistructured_mesh.html" title="fvcom_prepro">gen_semistructured_mesh</a></td> <td><a href="utilities/mjulian2greg.html" title="utilities">mjulian2greg</a></td> <td><a href="fvcom_prepro/write_FVCOM_forcing.html" title="fvcom_prepro">write_FVCOM_forcing</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sponge_nodes.html" title="fvcom_prepro">add_sponge_nodes</a></td> <td><a href="fvcom_prepro/gen_unstructured_mesh.html" title="fvcom_prepro">gen_unstructured_mesh</a></td> <td><a href="fvcom_prepro/my_project.html" title="fvcom_prepro">my_project</a></td> <td><a href="fvcom_prepro/write_FVCOM_grid.html" title="fvcom_prepro">write_FVCOM_grid</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sponge_nodes_list.html" title="fvcom_prepro">add_sponge_nodes_list</a></td> <td><a href="fvcom_prepro/generate_mjd.html" title="fvcom_prepro">generate_mjd</a></td> <td><a href="utilities/naut_2_cart.html" title="utilities">naut_2_cart</a></td> <td><a href="fvcom_prepro/write_FVCOM_meanflow.html" title="fvcom_prepro">write_FVCOM_meanflow</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_stations_list.html" title="fvcom_prepro">add_stations_list</a></td> <td><a href="fvcom_prepro/get_AMM.html" title="fvcom_prepro">get_AMM</a></td> <td><a href="fvcom_prepro/nodes2elems.html" title="fvcom_prepro">nodes2elems</a></td> <td><a href="fvcom_prepro/write_FVCOM_meanflow_ascii.html" title="fvcom_prepro">write_FVCOM_meanflow_ascii</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_var_FVCOM_river.html" title="fvcom_prepro">add_var_FVCOM_river</a></td> <td><a href="fvcom_prepro/get_FVCOM_rivers.html" title="fvcom_prepro">get_FVCOM_rivers</a></td> <td><a href="utilities/pl64.html" title="utilities">pl64</a></td> <td><a href="fvcom_prepro/write_FVCOM_obc.html" title="fvcom_prepro">write_FVCOM_obc</a></td> </tr> <tr>
<td><a href="swan_scripts/calc_fetch.html" title="swan_scripts">calc_fetch</a></td> <td><a href="fvcom_prepro/get_HYCOM_forcing.html" title="fvcom_prepro">get_HYCOM_forcing</a></td> <td><a href="fvcom_prepro/plot_field.html" title="fvcom_prepro">plot_field</a></td> <td><a href="fvcom_prepro/write_FVCOM_obs_TS.html" title="fvcom_prepro">write_FVCOM_obs_TS</a></td> </tr> <tr>
<td><a href="fvcom_prepro/calc_sponge_radius.html" title="fvcom_prepro">calc_sponge_radius</a></td> <td><a href="fvcom_prepro/get_MetUM_forcing.html" title="fvcom_prepro">get_MetUM_forcing</a></td> <td><a href="swan_scripts/plot_swan_mesh.html" title="swan_scripts">plot_swan_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_restart.html" title="fvcom_prepro">write_FVCOM_restart</a></td> </tr> <tr>
<td><a href="swan_scripts/calc_tauw.html" title="swan_scripts">calc_tauw</a></td> <td><a href="fvcom_prepro/get_NAE2_forcing.html" title="fvcom_prepro">get_NAE2_forcing</a></td> <td><a href="swan_scripts/plotunswan.html" title="swan_scripts">plotunswan</a></td> <td><a href="fvcom_prepro/write_FVCOM_river.html" title="fvcom_prepro">write_FVCOM_river</a></td> </tr> <tr>
<td><a href="utilities/calc_tauw.html" title="utilities">calc_tauw</a></td> <td><a href="fvcom_prepro/get_NCEP_forcing.html" title="fvcom_prepro">get_NCEP_forcing</a></td> <td><a href="fvcom_prepro/read_ERA_wind.html" title="fvcom_prepro">read_ERA_wind</a></td> <td><a href="fvcom_prepro/write_FVCOM_river_nml.html" title="fvcom_prepro">write_FVCOM_river_nml</a></td> </tr> <tr>
<td><a href="utilities/catstruct.html" title="utilities">catstruct</a></td> <td><a href="utilities/get_NCEP_year.html" title="utilities">get_NCEP_year</a></td> <td><a href="fvcom_prepro/read_NCEP_wind.html" title="fvcom_prepro">read_NCEP_wind</a></td> <td><a href="fvcom_prepro/write_FVCOM_spectide.html" title="fvcom_prepro">write_FVCOM_spectide</a></td> </tr> <tr>
<td><a href="utilities/centroid.html" title="utilities">centroid</a></td> <td><a href="fvcom_prepro/get_POLCOMS_meanflow.html" title="fvcom_prepro">get_POLCOMS_meanflow</a></td> <td><a href="fvcom_prepro/read_fvcom_bath.html" title="fvcom_prepro">read_fvcom_bath</a></td> <td><a href="fvcom_prepro/write_FVCOM_sponge.html" title="fvcom_prepro">write_FVCOM_sponge</a></td> </tr> <tr>
<td><a href="utilities/check_wset.html" title="utilities">check_wset</a></td> <td><a href="fvcom_prepro/get_POLCOMS_netCDF.html" title="fvcom_prepro">get_POLCOMS_netCDF</a></td> <td><a href="fvcom_prepro/read_fvcom_mesh.html" title="fvcom_prepro">read_fvcom_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_stations.html" title="fvcom_prepro">write_FVCOM_stations</a></td> </tr> <tr>
<td><a href="utilities/connectivity.html" title="utilities">connectivity</a></td> <td><a href="fvcom_prepro/get_POLCOMS_river_discharge.html" title="fvcom_prepro">get_POLCOMS_river_discharge</a></td> <td><a href="utilities/read_fvcom_mesh.html" title="utilities">read_fvcom_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_tsobc.html" title="fvcom_prepro">write_FVCOM_tsobc</a></td> </tr> <tr>
<td><a href="utilities/deg2utm.html" title="utilities">deg2utm</a></td> <td><a href="fvcom_prepro/get_POLCOMS_river_positions.html" title="fvcom_prepro">get_POLCOMS_river_positions</a></td> <td><a href="utilities/read_kml.html" title="utilities">read_kml</a></td> <td><a href="fvcom_prepro/write_FVCOM_wind_ts_speed.html" title="fvcom_prepro">write_FVCOM_wind_ts_speed</a></td> </tr> <tr>
<td><a href="utilities/do_ph_change_plot.html" title="utilities">do_ph_change_plot</a></td> <td><a href="fvcom_prepro/get_POLCOMS_tsobc.html" title="fvcom_prepro">get_POLCOMS_tsobc</a></td> <td><a href="utilities/read_netCDF_FVCOM.html" title="utilities">read_netCDF_FVCOM</a></td> <td><a href="fvcom_prepro/write_FVCOM_z0.html" title="fvcom_prepro">write_FVCOM_z0</a></td> </tr> <tr>
<td><a href="utilities/do_ph_change_points_plot.html" title="utilities">do_ph_change_points_plot</a></td> <td><a href="fvcom_prepro/get_POLCOMS_tsobc_gcoms.html" title="fvcom_prepro">get_POLCOMS_tsobc_gcoms</a></td> <td><a href="fvcom_prepro/read_sigma.html" title="fvcom_prepro">read_sigma</a></td> <td><a href="utilities/write_SMS_2dm.html" title="utilities">write_SMS_2dm</a></td> </tr> <tr>
<td><a href="utilities/do_ph_max_change_plot.html" title="utilities">do_ph_max_change_plot</a></td> <td><a href="fvcom_prepro/get_POLPRED_spectide.html" title="fvcom_prepro">get_POLPRED_spectide</a></td> <td><a href="fvcom_prepro/read_sms_map.html" title="fvcom_prepro">read_sms_map</a></td> <td><a href="utilities/write_SMS_cst.html" title="utilities">write_SMS_cst</a></td> </tr> <tr>
<td><a href="utilities/do_ph_vertical_profile.html" title="utilities">do_ph_vertical_profile</a></td> <td><a href="swan_scripts/get_fetch.html" title="swan_scripts">get_fetch</a></td> <td><a href="fvcom_prepro/read_sms_mesh.html" title="fvcom_prepro">read_sms_mesh</a></td> <td><a href="fvcom_prepro/write_dtank.html" title="fvcom_prepro">write_dtank</a></td> </tr> <tr>
<td><a href="utilities/do_residual.html" title="utilities">do_residual</a></td> <td><a href="utilities/get_runs.html" title="utilities">get_runs</a></td> <td><a href="swan_scripts/read_specfile.html" title="swan_scripts">read_specfile</a></td> <td><a href="fvcom_prepro/write_river_info.html" title="fvcom_prepro">write_river_info</a></td> </tr> <tr>
<td><a href="utilities/do_residual_plot.html" title="utilities">do_residual_plot</a></td> <td><a href="utilities/get_runs_test.html" title="utilities">get_runs_test</a></td> <td><a href="utilities/readdir.html" title="utilities">readdir</a></td> <td><a href="swan_scripts/ww3_to_swan_bndry.html" title="swan_scripts">ww3_to_swan_bndry</a></td> </tr> <tr>
<td><a href="utilities/do_surface_plot.html" title="utilities">do_surface_plot</a></td> <td><a href="fvcom_prepro/get_zeta_xtide.html" title="fvcom_prepro">get_zeta_xtide</a></td> <td><a href="utilities/runmean.html" title="utilities">runmean</a></td> <td><a href="utilities/zero_to_nan.html" title="utilities">zero_to_nan</a></td> </tr> <tr>
<td><a href="utilities/do_transect_plot.html" title="utilities">do_transect_plot</a></td> <td><a href="utilities/ginput2.html" title="utilities">ginput2</a></td> <td><a href="fvcom_prepro/set_elevtide.html" title="fvcom_prepro">set_elevtide</a></td> <td><a href="" title=""></a></td> </tr> <tr>
<td><a href="utilities/do_vector_plot.html" title="utilities">do_vector_plot</a></td> <td><a href="utilities/greg2julian.html" title="utilities">greg2julian</a></td> <td><a href="fvcom_prepro/set_spectide.html" title="fvcom_prepro">set_spectide</a></td> <td><a href="" title=""></a></td> </tr> <tr>
<td><a href="utilities/ST_taucr.html" title="utilities">ST_taucr</a></td> <td><a href="fvcom_prepro/example_FVCOM_wind_ts.html" title="fvcom_prepro">example_FVCOM_wind_ts</a></td> <td><a href="fvcom_prepro/interp_POLCOMS2FVCOM.html" title="fvcom_prepro">interp_POLCOMS2FVCOM</a></td> <td><a href="tests/utilities/test_get_POLCOMS_tsobc.html" title="tests/utilities">test_get_POLCOMS_tsobc</a></td> </tr> <tr>
<td><a href="utilities/ST_wentworth.html" title="utilities">ST_wentworth</a></td> <td><a href="fvcom_prepro/example_FVCOM_wind_ts_speed.html" title="fvcom_prepro">example_FVCOM_wind_ts_speed</a></td> <td><a href="utilities/isintriangle.html" title="utilities">isintriangle</a></td> <td><a href="tests/utilities/test_grid2fvcom.html" title="tests/utilities">test_grid2fvcom</a></td> </tr> <tr>
<td><a href="utilities/ST_wset.html" title="utilities">ST_wset</a></td> <td><a href="swan_scripts/example_fetchcalc.html" title="swan_scripts">example_fetchcalc</a></td> <td><a href="utilities/julian2greg.html" title="utilities">julian2greg</a></td> <td><a href="utilities/transect_nodes_screen.html" title="utilities">transect_nodes_screen</a></td> </tr> <tr>
<td><a href="utilities/SW_Density.html" title="utilities">SW_Density</a></td> <td><a href="fvcom_prepro/example_init_lag.html" title="fvcom_prepro">example_init_lag</a></td> <td><a href="utilities/lat_to_m.html" title="utilities">lat_to_m</a></td> <td><a href="utilities/tri_from_bndry.html" title="utilities">tri_from_bndry</a></td> </tr> <tr>
<td><a href="utilities/SW_Kviscosity.html" title="utilities">SW_Kviscosity</a></td> <td><a href="fvcom_prepro/example_my_project.html" title="fvcom_prepro">example_my_project</a></td> <td><a href="utilities/lon_to_m.html" title="utilities">lon_to_m</a></td> <td><a href="fvcom_prepro/truncfield.html" title="fvcom_prepro">truncfield</a></td> </tr> <tr>
<td><a href="utilities/SW_Viscosity.html" title="utilities">SW_Viscosity</a></td> <td><a href="fvcom_postproc/example_surface_plot.html" title="fvcom_postproc">example_surface_plot</a></td> <td><a href="utilities/m_ll2ll.html" title="utilities">m_ll2ll</a></td> <td><a href="utilities/utm2deg.html" title="utilities">utm2deg</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_coriolis.html" title="fvcom_prepro">add_coriolis</a></td> <td><a href="swan_scripts/fetch_calc.html" title="swan_scripts">fetch_calc</a></td> <td><a href="utilities/m_to_lat.html" title="utilities">m_to_lat</a></td> <td><a href="utilities/wave_fric.html" title="utilities">wave_fric</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_obc_nodes_graphic.html" title="fvcom_prepro">add_obc_nodes_graphic</a></td> <td><a href="utilities/find_boundary_elements.html" title="utilities">find_boundary_elements</a></td> <td><a href="utilities/m_to_lon.html" title="utilities">m_to_lon</a></td> <td><a href="utilities/wgs2utm.html" title="utilities">wgs2utm</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_obc_nodes_list.html" title="fvcom_prepro">add_obc_nodes_list</a></td> <td><a href="fvcom_prepro/find_nearest_pt.html" title="fvcom_prepro">find_nearest_pt</a></td> <td><a href="fvcom_prepro/make_blank_mesh.html" title="fvcom_prepro">make_blank_mesh</a></td> <td><a href="fvcom_prepro/wrf2fvcom_U10V10.html" title="fvcom_prepro">wrf2fvcom_U10V10</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_river_nodes_graphic.html" title="fvcom_prepro">add_river_nodes_graphic</a></td> <td><a href="utilities/fix_inside_boundary.html" title="utilities">fix_inside_boundary</a></td> <td><a href="utilities/mjul2str.html" title="utilities">mjul2str</a></td> <td><a href="fvcom_prepro/write_FVCOM_bath.html" title="fvcom_prepro">write_FVCOM_bath</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_river_nodes_list.html" title="fvcom_prepro">add_river_nodes_list</a></td> <td><a href="swan_scripts/fvcom2swan.html" title="swan_scripts">fvcom2swan</a></td> <td><a href="utilities/mjul2str2.html" title="utilities">mjul2str2</a></td> <td><a href="fvcom_prepro/write_FVCOM_bedflag.html" title="fvcom_prepro">write_FVCOM_bedflag</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sigma_forDT.html" title="fvcom_prepro">add_sigma_forDT</a></td> <td><a href="fvcom_prepro/gen_semistructured_mesh.html" title="fvcom_prepro">gen_semistructured_mesh</a></td> <td><a href="utilities/mjulian2greg.html" title="utilities">mjulian2greg</a></td> <td><a href="fvcom_prepro/write_FVCOM_cor.html" title="fvcom_prepro">write_FVCOM_cor</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sponge_nodes.html" title="fvcom_prepro">add_sponge_nodes</a></td> <td><a href="fvcom_prepro/gen_unstructured_mesh.html" title="fvcom_prepro">gen_unstructured_mesh</a></td> <td><a href="fvcom_prepro/my_project.html" title="fvcom_prepro">my_project</a></td> <td><a href="fvcom_prepro/write_FVCOM_elevtide.html" title="fvcom_prepro">write_FVCOM_elevtide</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_sponge_nodes_list.html" title="fvcom_prepro">add_sponge_nodes_list</a></td> <td><a href="fvcom_prepro/generate_mjd.html" title="fvcom_prepro">generate_mjd</a></td> <td><a href="utilities/naut_2_cart.html" title="utilities">naut_2_cart</a></td> <td><a href="fvcom_prepro/write_FVCOM_forcing.html" title="fvcom_prepro">write_FVCOM_forcing</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_stations_list.html" title="fvcom_prepro">add_stations_list</a></td> <td><a href="fvcom_prepro/get_AMM.html" title="fvcom_prepro">get_AMM</a></td> <td><a href="fvcom_prepro/nodes2elems.html" title="fvcom_prepro">nodes2elems</a></td> <td><a href="fvcom_prepro/write_FVCOM_grid.html" title="fvcom_prepro">write_FVCOM_grid</a></td> </tr> <tr>
<td><a href="fvcom_prepro/add_var_FVCOM_river.html" title="fvcom_prepro">add_var_FVCOM_river</a></td> <td><a href="fvcom_prepro/get_FVCOM_rivers.html" title="fvcom_prepro">get_FVCOM_rivers</a></td> <td><a href="utilities/pl64.html" title="utilities">pl64</a></td> <td><a href="fvcom_prepro/write_FVCOM_meanflow.html" title="fvcom_prepro">write_FVCOM_meanflow</a></td> </tr> <tr>
<td><a href="swan_scripts/calc_fetch.html" title="swan_scripts">calc_fetch</a></td> <td><a href="fvcom_prepro/get_HYCOM_forcing.html" title="fvcom_prepro">get_HYCOM_forcing</a></td> <td><a href="fvcom_prepro/plot_field.html" title="fvcom_prepro">plot_field</a></td> <td><a href="fvcom_prepro/write_FVCOM_meanflow_ascii.html" title="fvcom_prepro">write_FVCOM_meanflow_ascii</a></td> </tr> <tr>
<td><a href="fvcom_prepro/calc_sponge_radius.html" title="fvcom_prepro">calc_sponge_radius</a></td> <td><a href="fvcom_prepro/get_MetUM_forcing.html" title="fvcom_prepro">get_MetUM_forcing</a></td> <td><a href="swan_scripts/plot_swan_mesh.html" title="swan_scripts">plot_swan_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_obc.html" title="fvcom_prepro">write_FVCOM_obc</a></td> </tr> <tr>
<td><a href="swan_scripts/calc_tauw.html" title="swan_scripts">calc_tauw</a></td> <td><a href="fvcom_prepro/get_NAE2_forcing.html" title="fvcom_prepro">get_NAE2_forcing</a></td> <td><a href="swan_scripts/plotunswan.html" title="swan_scripts">plotunswan</a></td> <td><a href="fvcom_prepro/write_FVCOM_obs_TS.html" title="fvcom_prepro">write_FVCOM_obs_TS</a></td> </tr> <tr>
<td><a href="utilities/calc_tauw.html" title="utilities">calc_tauw</a></td> <td><a href="fvcom_prepro/get_NCEP_forcing.html" title="fvcom_prepro">get_NCEP_forcing</a></td> <td><a href="fvcom_prepro/read_ERA_wind.html" title="fvcom_prepro">read_ERA_wind</a></td> <td><a href="fvcom_prepro/write_FVCOM_restart.html" title="fvcom_prepro">write_FVCOM_restart</a></td> </tr> <tr>
<td><a href="utilities/catstruct.html" title="utilities">catstruct</a></td> <td><a href="utilities/get_NCEP_year.html" title="utilities">get_NCEP_year</a></td> <td><a href="fvcom_prepro/read_NCEP_wind.html" title="fvcom_prepro">read_NCEP_wind</a></td> <td><a href="fvcom_prepro/write_FVCOM_river.html" title="fvcom_prepro">write_FVCOM_river</a></td> </tr> <tr>
<td><a href="utilities/centroid.html" title="utilities">centroid</a></td> <td><a href="fvcom_prepro/get_POLCOMS_meanflow.html" title="fvcom_prepro">get_POLCOMS_meanflow</a></td> <td><a href="fvcom_prepro/read_fvcom_bath.html" title="fvcom_prepro">read_fvcom_bath</a></td> <td><a href="fvcom_prepro/write_FVCOM_river_nml.html" title="fvcom_prepro">write_FVCOM_river_nml</a></td> </tr> <tr>
<td><a href="utilities/check_wset.html" title="utilities">check_wset</a></td> <td><a href="fvcom_prepro/get_POLCOMS_netCDF.html" title="fvcom_prepro">get_POLCOMS_netCDF</a></td> <td><a href="fvcom_prepro/read_fvcom_mesh.html" title="fvcom_prepro">read_fvcom_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_spectide.html" title="fvcom_prepro">write_FVCOM_spectide</a></td> </tr> <tr>
<td><a href="utilities/connectivity.html" title="utilities">connectivity</a></td> <td><a href="fvcom_prepro/get_POLCOMS_river_discharge.html" title="fvcom_prepro">get_POLCOMS_river_discharge</a></td> <td><a href="utilities/read_fvcom_mesh.html" title="utilities">read_fvcom_mesh</a></td> <td><a href="fvcom_prepro/write_FVCOM_sponge.html" title="fvcom_prepro">write_FVCOM_sponge</a></td> </tr> <tr>
<td><a href="utilities/deg2utm.html" title="utilities">deg2utm</a></td> <td><a href="fvcom_prepro/get_POLCOMS_river_positions.html" title="fvcom_prepro">get_POLCOMS_river_positions</a></td> <td><a href="utilities/read_kml.html" title="utilities">read_kml</a></td> <td><a href="fvcom_prepro/write_FVCOM_stations.html" title="fvcom_prepro">write_FVCOM_stations</a></td> </tr> <tr>
<td><a href="utilities/do_ph_change_plot.html" title="utilities">do_ph_change_plot</a></td> <td><a href="fvcom_prepro/get_POLCOMS_tsobc.html" title="fvcom_prepro">get_POLCOMS_tsobc</a></td> <td><a href="utilities/read_netCDF_FVCOM.html" title="utilities">read_netCDF_FVCOM</a></td> <td><a href="fvcom_prepro/write_FVCOM_tsobc.html" title="fvcom_prepro">write_FVCOM_tsobc</a></td> </tr> <tr>
<td><a href="utilities/do_ph_change_points_plot.html" title="utilities">do_ph_change_points_plot</a></td> <td><a href="fvcom_prepro/get_POLCOMS_tsobc_gcoms.html" title="fvcom_prepro">get_POLCOMS_tsobc_gcoms</a></td> <td><a href="fvcom_prepro/read_sigma.html" title="fvcom_prepro">read_sigma</a></td> <td><a href="fvcom_prepro/write_FVCOM_wind_ts_speed.html" title="fvcom_prepro">write_FVCOM_wind_ts_speed</a></td> </tr> <tr>
<td><a href="utilities/do_ph_max_change_plot.html" title="utilities">do_ph_max_change_plot</a></td> <td><a href="fvcom_prepro/get_POLPRED_spectide.html" title="fvcom_prepro">get_POLPRED_spectide</a></td> <td><a href="fvcom_prepro/read_sms_map.html" title="fvcom_prepro">read_sms_map</a></td> <td><a href="fvcom_prepro/write_FVCOM_z0.html" title="fvcom_prepro">write_FVCOM_z0</a></td> </tr> <tr>
<td><a href="utilities/do_ph_vertical_profile.html" title="utilities">do_ph_vertical_profile</a></td> <td><a href="swan_scripts/get_fetch.html" title="swan_scripts">get_fetch</a></td> <td><a href="fvcom_prepro/read_sms_mesh.html" title="fvcom_prepro">read_sms_mesh</a></td> <td><a href="utilities/write_SMS_2dm.html" title="utilities">write_SMS_2dm</a></td> </tr> <tr>
<td><a href="utilities/do_residual.html" title="utilities">do_residual</a></td> <td><a href="utilities/get_runs.html" title="utilities">get_runs</a></td> <td><a href="swan_scripts/read_specfile.html" title="swan_scripts">read_specfile</a></td> <td><a href="utilities/write_SMS_cst.html" title="utilities">write_SMS_cst</a></td> </tr> <tr>
<td><a href="utilities/do_residual_plot.html" title="utilities">do_residual_plot</a></td> <td><a href="utilities/get_runs_test.html" title="utilities">get_runs_test</a></td> <td><a href="utilities/readdir.html" title="utilities">readdir</a></td> <td><a href="fvcom_prepro/write_dtank.html" title="fvcom_prepro">write_dtank</a></td> </tr> <tr>
<td><a href="utilities/do_surface_plot.html" title="utilities">do_surface_plot</a></td> <td><a href="fvcom_prepro/get_zeta_xtide.html" title="fvcom_prepro">get_zeta_xtide</a></td> <td><a href="utilities/runmean.html" title="utilities">runmean</a></td> <td><a href="fvcom_prepro/write_river_info.html" title="fvcom_prepro">write_river_info</a></td> </tr> <tr>
<td><a href="utilities/do_transect_plot.html" title="utilities">do_transect_plot</a></td> <td><a href="utilities/ginput2.html" title="utilities">ginput2</a></td> <td><a href="fvcom_prepro/set_elevtide.html" title="fvcom_prepro">set_elevtide</a></td> <td><a href="swan_scripts/ww3_to_swan_bndry.html" title="swan_scripts">ww3_to_swan_bndry</a></td> </tr> <tr>
<td><a href="utilities/do_vector_plot.html" title="utilities">do_vector_plot</a></td> <td><a href="utilities/greg2julian.html" title="utilities">greg2julian</a></td> <td><a href="fvcom_prepro/set_spectide.html" title="fvcom_prepro">set_spectide</a></td> <td><a href="utilities/zero_to_nan.html" title="utilities">zero_to_nan</a></td> </tr> <tr>
<td><a href="utilities/do_volume.html" title="utilities">do_volume</a></td> <td><a href="utilities/greg2mjulian.html" title="utilities">greg2mjulian</a></td> <td><a href="fvcom_prepro/setup_metrics.html" title="fvcom_prepro">setup_metrics</a></td> <td><a href="" title=""></a></td> </tr></table>
<hr><address>Generated on Tue 04-Jun-2013 12:12:53 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
<hr><address>Generated on Tue 04-Jun-2013 12:21:19 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
\ No newline at end of file
/* Created by mdot for Matlab */
digraph m2html {
test_get_POLCOMS_tsobc [URL="test_get_POLCOMS_tsobc.html"];
test_grid2fvcom [URL="test_grid2fvcom.html"];
}
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Dependency Graph for tests/utilities</title>
<meta name="keywords" content="dependency, graph, dependence, tests/utilities">
<meta name="description" content="Dependency graph for tests/utilities">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for tests/utilities&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>
<h1>Dependency Graph for tests/utilities</h1>
<center>
<img src="graph.png" usemap="#mainmap" alt="Dependency Graph for tests/utilities" border="2" style="color:#000;">
<map name="mainmap">
<area shape="poly" id="node1" href="test_get_POLCOMS_tsobc.html" title="test_get_POLCOMS_tsobc" alt="" coords="316,31 308,23 286,16 251,10 208,6 160,5 112,6 69,10 34,16 12,23 4,31 12,39 34,46 69,51 112,55 160,56 208,55 251,51 286,46 308,39">
<area shape="poly" id="node2" href="test_grid2fvcom.html" title="test_grid2fvcom" alt="" coords="539,31 534,23 520,16 497,10 470,6 439,5 408,6 380,10 358,16 344,23 339,31 344,39 358,46 380,51 408,55 439,56 470,55 497,51 520,46 534,39">
</map>
</center>
<hr><address>Generated on Tue 04-Jun-2013 12:21:23 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
\ No newline at end of file
<area shape="poly" id="node1" href="test_get_POLCOMS_tsobc.html" title="test_get_POLCOMS_tsobc" alt="" coords="316,31 308,23 286,16 251,10 208,6 160,5 112,6 69,10 34,16 12,23 4,31 12,39 34,46 69,51 112,55 160,56 208,55 251,51 286,46 308,39">
<area shape="poly" id="node2" href="test_grid2fvcom.html" title="test_grid2fvcom" alt="" coords="539,31 534,23 520,16 497,10 470,6 439,5 408,6 380,10 358,16 344,23 339,31 344,39 358,46 380,51 408,55 439,56 470,55 497,51 520,46 534,39">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Index for Directory tests/utilities</title>
<meta name="keywords" content="tests/utilities">
<meta name="description" content="Index for Directory tests/utilities">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for tests/utilities&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>
<h1>Index for tests/utilities</h1>
<h2>Matlab files in this directory:</h2>
<table>
<tr><td><img src="../../matlabicon.gif" alt="" border="">&nbsp;<a href="test_get_POLCOMS_tsobc.html">test_get_POLCOMS_tsobc</a></td><td>Unit test for get_POLCOMS_tsobc. </td></tr><tr><td><img src="../../matlabicon.gif" alt="" border="">&nbsp;<a href="test_grid2fvcom.html">test_grid2fvcom</a></td><td>Unit test for grid2fvcom. </td></tr></table>
<h2>Dependency Graph</h2>
<ul style="list-style-image:url(../../simulinkicon.gif)">
<li>View the <a href="graph.html">Graph</a>.</li>
</ul>
<hr><address>Generated on Tue 04-Jun-2013 12:21:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Description of test_get_POLCOMS_tsobc</title>
<meta name="keywords" content="test_get_POLCOMS_tsobc">
<meta name="description" content="Unit test for get_POLCOMS_tsobc.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt; <a href="#">tests</a> &gt; <a href="index.html">utilities</a> &gt; test_get_POLCOMS_tsobc.m</div>
<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for tests/utilities&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->
<h1>test_get_POLCOMS_tsobc
</h1>
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Unit test for get_POLCOMS_tsobc.</strong></div>
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>This is a script file. </strong></div>
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Unit test for get_POLCOMS_tsobc.
DESCRIPTION:
Currently checks against a reference data set for the following:
- number of nodes in the output
- number of sigma layers in the output
- number of time steps in the output
- range of values in the node arrays
It uses a simplified POLCOMS NetCDF file from January, 2001 as the base
input. The mesh object (Mobj) contains the required input for
get_POLCOMS_tsobc as well as a set of 'known good' results
(Mobj.temperature, Mobj.salt and Mobj.ts_times) for comparison against
the new result.
Author(s):
Pierre Cazenave (Plymouth Marine Laboratory)
Revision history:
2013-05-17 First version.
==========================================================================</pre></div>
<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">% Unit test for get_POLCOMS_tsobc.</span>
0002 <span class="comment">%</span>
0003 <span class="comment">% DESCRIPTION:</span>
0004 <span class="comment">% Currently checks against a reference data set for the following:</span>
0005 <span class="comment">% - number of nodes in the output</span>
0006 <span class="comment">% - number of sigma layers in the output</span>
0007 <span class="comment">% - number of time steps in the output</span>
0008 <span class="comment">% - range of values in the node arrays</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% It uses a simplified POLCOMS NetCDF file from January, 2001 as the base</span>
0011 <span class="comment">% input. The mesh object (Mobj) contains the required input for</span>
0012 <span class="comment">% get_POLCOMS_tsobc as well as a set of 'known good' results</span>
0013 <span class="comment">% (Mobj.temperature, Mobj.salt and Mobj.ts_times) for comparison against</span>
0014 <span class="comment">% the new result.</span>
0015 <span class="comment">%</span>
0016 <span class="comment">% Author(s):</span>
0017 <span class="comment">% Pierre Cazenave (Plymouth Marine Laboratory)</span>
0018 <span class="comment">%</span>
0019 <span class="comment">% Revision history:</span>
0020 <span class="comment">% 2013-05-17 First version.</span>
0021 <span class="comment">%</span>
0022 <span class="comment">%==========================================================================</span>
0023
0024 matlabrc
0025 close all
0026 clc
0027
0028 addpath(<span class="string">'/users/modellers/pica/Code/fvcom-toolbox/utilities'</span>)
0029 addpath(<span class="string">'/users/modellers/pica/Code/fvcom-toolbox/fvcom_prepro/'</span>)
0030
0031 <span class="comment">% Temporary paths when on Riqui's machine</span>
0032 addpath(<span class="string">'/tmp/pica/fvcom-toolbox/fvcom_prepro/'</span>)
0033 addpath(<span class="string">'/tmp/pica/fvcom-toolbox/utilities/'</span>)
0034
0035 load(<span class="string">'/tmp/pica/fvcom-toolbox/tests/data/get_POLCOMS_tsobc_data.mat'</span>);
0036
0037 <span class="comment">% Perform the interpolation using the new routine.</span>
0038 obc_ts = {<span class="string">'/tmp/pica/fvcom-toolbox/tests/data/Daily.PolcomsErsem.2001.01.nc'</span>};
0039 Mobj_new = get_POLCOMS_tsobc(Mobj, obc_ts);
0040
0041 <span class="comment">% Check we have the temperature, salinity and time fields in the new mesh</span>
0042 <span class="comment">% object.</span>
0043 fnames = fieldnames(Mobj_new);
0044
0045 <span class="keyword">for</span> ff = 1:length(fnames)
0046 <span class="keyword">switch</span> fnames{ff}
0047 <span class="keyword">case</span> {<span class="string">'temperature'</span>, <span class="string">'salt'</span>, <span class="string">'ts_times'</span>}
0048 assert(isfield(Mobj_new, fnames{ff}), <span class="string">'Missing field %s'</span>, fnames{ff})
0049 <span class="keyword">end</span>
0050 <span class="keyword">end</span>
0051
0052 <span class="comment">% Clear out fields which don't exist in both Mobj and Mobj_new.</span>
0053 fnames = intersect(fnames, fieldnames(Mobj));
0054
0055 <span class="comment">%%</span>
0056
0057 results = struct();
0058
0059 <span class="keyword">for</span> ff = 1:length(fnames)
0060
0061 results.(fnames{ff}) = struct();
0062
0063 <span class="keyword">switch</span> fnames{ff}
0064 <span class="keyword">case</span> {<span class="string">'siglayz'</span>, <span class="string">'lon'</span>, <span class="string">'lat'</span>, <span class="string">'obc_nodes'</span>, <span class="string">'nObcNodes'</span>, <span class="string">'ts_times'</span>}
0065
0066 results.(fnames{ff}).vectorValues = <span class="string">'FAIL'</span>;
0067
0068 results.(fnames{ff}).check = <span class="keyword">...</span>
0069 Mobj.(fnames{ff}) - Mobj_new.(fnames{ff});
0070 checkDiff = max(results.(fnames{ff}).check) - <span class="keyword">...</span>
0071 min(results.(fnames{ff}).check);
0072 <span class="keyword">if</span> checkDiff == 0
0073 results.(fnames{ff}).vectorValues = <span class="string">'PASS'</span>;
0074 <span class="keyword">end</span>
0075
0076 <span class="keyword">otherwise</span>
0077
0078 <span class="comment">%--------------------------------------------------------------</span>
0079 <span class="comment">% Set the pass/fail flags for the tests. Assume fail and only</span>
0080 <span class="comment">% change if proven otherwise.</span>
0081 <span class="comment">%--------------------------------------------------------------</span>
0082 results.(fnames{ff}).nodeNumber = <span class="string">'FAIL'</span>;
0083 results.(fnames{ff}).elementNumber = <span class="string">'FAIL'</span>;
0084 results.(fnames{ff}).numNodeTimes = <span class="string">'FAIL'</span>;
0085 results.(fnames{ff}).nodeValues = <span class="string">'FAIL'</span>;
0086
0087 <span class="comment">%--------------------------------------------------------------</span>
0088 <span class="comment">% Check we have the same number of points and time steps in the</span>
0089 <span class="comment">% new interpolation as in the original.</span>
0090 <span class="comment">%--------------------------------------------------------------</span>
0091 [~, results.(fnames{ff}).origNodeTimes] = <span class="keyword">...</span>
0092 size(Mobj.(fnames{ff}));
0093 [results.(fnames{ff}).nNodes, <span class="keyword">...</span>
0094 results.(fnames{ff}).nNodeTimes] = <span class="keyword">...</span>
0095 size(Mobj_new.(fnames{ff}));
0096
0097 <span class="keyword">if</span> results.(fnames{ff}).nNodes == Mobj.nVerts
0098 results.(fnames{ff}).nodeNumber = <span class="string">'PASS'</span>;
0099 <span class="keyword">end</span>
0100 <span class="keyword">if</span> results.(fnames{ff}).nNodeTimes == <span class="keyword">...</span>
0101 results.(fnames{ff}).origNodeTimes
0102 results.(fnames{ff}).numNodeTimes = <span class="string">'PASS'</span>;
0103 <span class="keyword">end</span>
0104
0105 <span class="comment">%--------------------------------------------------------------</span>
0106 <span class="comment">% Check the values in the node and element arrays match to</span>
0107 <span class="comment">% reference values.</span>
0108 <span class="comment">%--------------------------------------------------------------</span>
0109 results.(fnames{ff}).nodeDiff = <span class="keyword">...</span>
0110 Mobj.(fnames{ff}) - <span class="keyword">...</span>
0111 Mobj_new.(fnames{ff});
0112
0113 results.(fnames{ff}).nodeRange = <span class="keyword">...</span>
0114 max(results.(fnames{ff}).nodeDiff(:)) - <span class="keyword">...</span>
0115 min(results.(fnames{ff}).nodeDiff(:));
0116
0117 <span class="keyword">if</span> nodeRange == 0
0118 results.(fnames{ff}).nodeValues = <span class="string">'PASS'</span>;
0119 <span class="keyword">end</span>
0120 <span class="keyword">end</span>
0121 <span class="keyword">end</span>
0122
0123 <span class="comment">%%</span>
0124 <span class="comment">%--------------------------------------------------------------------------</span>
0125 <span class="comment">% Print a summary of the testing</span>
0126 <span class="comment">%--------------------------------------------------------------------------</span>
0127 totalTests = 0;
0128 totalPasses = 0;
0129
0130 <span class="keyword">for</span> ff = 1:length(fnames)
0131 resultnames = fieldnames(results.(fnames{ff}));
0132 numRes = length(resultnames);
0133
0134 <span class="keyword">for</span> fi = 1:numRes
0135
0136 <span class="comment">% Skip if the field is not a string (we're only interested in</span>
0137 <span class="comment">% pass/fail really.</span>
0138 <span class="keyword">if</span> ~ischar(results.(fnames{ff}).(resultnames{fi}))
0139 <span class="keyword">continue</span>
0140 <span class="keyword">else</span>
0141 <span class="comment">% Increment the number of tests performed.</span>
0142 totalTests = totalTests + 1;
0143 <span class="keyword">end</span>
0144
0145 <span class="comment">% Get the total number of PASSed tests.</span>
0146 <span class="keyword">if</span> strcmp(results.(fnames{ff}).(resultnames{fi}), <span class="string">'PASS'</span>)
0147 totalPasses = totalPasses + 1;
0148 <span class="keyword">end</span>
0149
0150 S = results.(fnames{ff}).(resultnames{fi});
0151
0152 <span class="keyword">switch</span> resultnames{fi}
0153 <span class="keyword">case</span> <span class="string">'vectorValues'</span>
0154 fprintf(<span class="string">'%s %s values test\n'</span>, S, fnames{ff})
0155 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0156 fprintf(<span class="string">'\tmin/max of %s range: %f, %f\n'</span>, <span class="keyword">...</span>
0157 fnames{ff}, <span class="keyword">...</span>
0158 min(results.(fnames{ff}).check), <span class="keyword">...</span>
0159 max(results.(fnames{ff}).check))
0160 <span class="keyword">end</span>
0161
0162 <span class="keyword">case</span> <span class="string">'nodeNumber'</span>
0163 fprintf(<span class="string">'%s %s node number test\n'</span>, S, fnames{ff})
0164 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0165 fprintf(<span class="string">'\toriginal/new number of %s nodes: %d, %d\n'</span>, <span class="keyword">...</span>
0166 fnames{ff}, <span class="keyword">...</span>
0167 Mobj.nVerts, <span class="keyword">...</span>
0168 results.(fnames{ff}).nNodes)
0169 <span class="keyword">end</span>
0170
0171 <span class="keyword">case</span> <span class="string">'elementNumber'</span>
0172 fprintf(<span class="string">'%s %s element number test\n'</span>, S, fnames{ff})
0173 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0174 fprintf(<span class="string">'\toriginal/new number of %s elements: %d, %d\n'</span>, <span class="keyword">...</span>
0175 fnames{ff}, <span class="keyword">...</span>
0176 Mobj.nElems, <span class="keyword">...</span>
0177 results.(fnames{ff}).nElems)
0178 <span class="keyword">end</span>
0179
0180 <span class="keyword">case</span> <span class="string">'numNodeTimes'</span>
0181 fprintf(<span class="string">'%s %s node time steps test\n'</span>, S, fnames{ff})
0182 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0183 fprintf(<span class="string">'\toriginal/new number of %s node times: %d, %d\n'</span>, <span class="keyword">...</span>
0184 fnames{ff}, <span class="keyword">...</span>
0185 results.(fnames{ff}).origNodeTimes, <span class="keyword">...</span>
0186 results.(fnames{ff}).nNodeTimes)
0187 <span class="keyword">end</span>
0188
0189 <span class="keyword">case</span> <span class="string">'numElementTimes'</span>
0190 fprintf(<span class="string">'%s %s element time steps test\n'</span>, S, fnames{ff})
0191 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0192 fprintf(<span class="string">'\toriginal/new number of %s element times: %d, %d\n'</span>, <span class="keyword">...</span>
0193 fnames{ff}, <span class="keyword">...</span>
0194 results.(fnames{ff}).origElementTimes, <span class="keyword">...</span>
0195 results.(fnames{ff}).nElementTimes)
0196 <span class="keyword">end</span>
0197
0198 <span class="keyword">case</span> <span class="string">'nodeValues'</span>
0199 fprintf(<span class="string">'%s %s node values test\n'</span>, S, fnames{ff})
0200 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0201 fprintf(<span class="string">'\trange of %s node values: %d\n'</span>, <span class="keyword">...</span>
0202 fnames{ff}, <span class="keyword">...</span>
0203 results.(fnames{ff}).nodeRange)
0204 <span class="keyword">end</span>
0205
0206 <span class="keyword">case</span> <span class="string">'elementValues'</span>
0207 fprintf(<span class="string">'%s %s element values test\n'</span>, S, fnames{ff})
0208 <span class="keyword">if</span> strcmp(S, <span class="string">'FAIL'</span>)
0209 fprintf(<span class="string">'\trange of %s element values: %d\n'</span>, <span class="keyword">...</span>
0210 fnames{ff}, <span class="keyword">...</span>
0211 results.(fnames{ff}).elemRange)
0212 <span class="keyword">end</span>
0213 <span class="keyword">end</span>
0214 <span class="keyword">end</span>
0215 <span class="keyword">end</span>
0216
0217 fprintf(<span class="string">'\n------------------SUMMARY------------------\n'</span>)
0218 fprintf(<span class="string">' %d of %d tests passed'</span>, totalPasses, totalTests)
0219 fprintf(<span class="string">'\n-------------------------------------------\n'</span>)</pre></div>
<hr><address>Generated on Tue 04-Jun-2013 12:21:29 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Description of test_grid2fvcom</title>
<meta name="keywords" content="test_grid2fvcom">
<meta name="description" content="Unit test for grid2fvcom.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt; <a href="#">tests</a> &gt; <a href="index.html">utilities</a> &gt; test_grid2fvcom.m</div>
<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for tests/utilities&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->
<h1>test_grid2fvcom
</h1>
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Unit test for grid2fvcom.</strong></div>
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>This is a script file. </strong></div>
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Unit test for grid2fvcom.
DESCRIPTION:
Currently checks against a reference data set for the following:
- number of nodes in the output
- number of elements in the output
- number of time steps in the output
- range of values in the node arrays
- range of values in the element arrays
It uses some NCEP data for the Irish Sea as the base input. This data is
from January, 2001. This includes an unstructured grid object (Mobj), the
NCEP forcing data struct (forcing) and a 'known good' result
(forcing_interp) for comparison against the new result.
Author(s):
Pierre Cazenave (Plymouth Marine Laboratory)
Revision history:
2013-05-17 First version.
==========================================================================</pre></div>
<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">% Unit test for grid2fvcom.</span>
0002 <span class="comment">%</span>
0003 <span class="comment">% DESCRIPTION:</span>
0004 <span class="comment">% Currently checks against a reference data set for the following:</span>
0005 <span class="comment">% - number of nodes in the output</span>
0006 <span class="comment">% - number of elements in the output</span>
0007 <span class="comment">% - number of time steps in the output</span>
0008 <span class="comment">% - range of values in the node arrays</span>
0009 <span class="comment">% - range of values in the element arrays</span>
0010 <span class="comment">%</span>
0011 <span class="comment">% It uses some NCEP data for the Irish Sea as the base input. This data is</span>
0012 <span class="comment">% from January, 2001. This includes an unstructured grid object (Mobj), the</span>
0013 <span class="comment">% NCEP forcing data struct (forcing) and a 'known good' result</span>
0014 <span class="comment">% (forcing_interp) for comparison against the new result.</span>
0015 <span class="comment">%</span>
0016 <span class="comment">% Author(s):</span>
0017 <span class="comment">% Pierre Cazenave (Plymouth Marine Laboratory)</span>
0018 <span class="comment">%</span>
0019 <span class="comment">% Revision history:</span>
0020 <span class="comment">% 2013-05-17 First version.</span>
0021 <span class="comment">%</span>
0022 <span class="comment">%==========================================================================</span>
0023
0024 matlabrc
0025 close all
0026 clc
0027
0028 addpath(<span class="string">'/users/modellers/pica/Code/fvcom-toolbox/utilities'</span>)
0029 addpath(<span class="string">'/users/modellers/pica/Code/fvcom-toolbox/fvcom_prepro/'</span>)
0030
0031 <span class="comment">% Temporary paths when on Riqui's machine</span>
0032 addpath(<span class="string">'/tmp/pica/fvcom-toolbox/fvcom_prepro/'</span>)
0033 addpath(<span class="string">'/tmp/pica/fvcom-toolbox/utilities/'</span>)
0034
0035 load(<span class="string">'/tmp/pica/fvcom-toolbox/tests/data/grid2fvcom_data.mat'</span>);
0036
0037 interpfields = {<span class="string">'uwnd'</span>, <span class="string">'vwnd'</span>, <span class="string">'slp'</span>, <span class="string">'nshf'</span>, <span class="string">'nlwrs'</span>, <span class="string">'nswrs'</span>, <span class="string">'P_E'</span>, <span class="keyword">...</span>
0038 <span class="string">'Et'</span>, <span class="string">'time'</span>, <span class="string">'lon'</span>, <span class="string">'lat'</span>, <span class="string">'x'</span>, <span class="string">'y'</span>};
0039
0040 <span class="comment">% Perform the interpolation using the new routine and check the outputs are</span>
0041 <span class="comment">% the same.</span>
0042 forcing_interp_new = grid2fvcom(Mobj, interpfields, forcing);
0043
0044 <span class="comment">% Check we have the same number of fields (if we don't, we can't go any</span>
0045 <span class="comment">% further).</span>
0046 fnames = fieldnames(forcing_interp);
0047 <span class="keyword">if</span> length(fnames) ~= length(fieldnames(forcing_interp_new))
0048 error([<span class="string">'The number of reference struct field names (%d) does'</span>, <span class="keyword">...</span>
0049 <span class="string">' not equal the number in the new struct (%d)'</span>], <span class="keyword">...</span>
0050 length(fnames), length(fieldnames(forcing_interp_new)))
0051 <span class="keyword">end</span>
0052
0053 <span class="comment">%%</span>
0054
0055 results = struct();
0056
0057 <span class="keyword">for</span> ff = 1:length(fnames)
0058
0059 results.(fnames{ff}) = struct();
0060
0061 <span class="keyword">switch</span> fnames{ff}
0062 <span class="keyword">case</span> {<span class="string">'time'</span>, <span class="string">'lon'</span>, <span class="string">'lat'</span>, <span class="string">'x'</span>, <span class="string">'y'</span>}
0063
0064 results.(fnames{ff}).vectorValues = <span class="string">'FAIL'</span>;
0065
0066 results.(fnames{ff}).check = <span class="keyword">...</span>
0067 forcing_interp.(fnames{ff}) - forcing_interp_new.(fnames{ff});
0068 checkDiff = max(results.(fnames{ff}).check) - <span class="keyword">...</span>
0069 min(results.(fnames{ff}).check);
0070 <span class="keyword">if</span> checkDiff == 0
0071 results.(fnames{ff}).vectorValues = <span class="string">'PASS'</span>;
0072 <span class="keyword">end</span>
0073
0074 <span class="keyword">otherwise</span>
0075
0076 <span class="comment">%--------------------------------------------------------------</span>
0077 <span class="comment">% Set the pass/fail flags for the tests. Assume fail and only</span>
0078 <span class="comment">% change if proven otherwise.</span>
0079 <span class="comment">%--------------------------------------------------------------</span>
0080 results.(fnames{ff}).nodeNumber = <span class="string">'FAIL'</span>;
0081 results.(fnames{ff}).elementNumber = <span class="string">'FAIL'</span>;
0082 results.(fnames{ff}).numNodeTimes = <span class="string">'FAIL'</span>;
0083 results.(fnames{ff}).numElementTimes = <span class="string">'FAIL'</span>;
0084 results.(fnames{ff}).nodeValues = <span class="string">'FAIL'</span>;
0085 results.(fnames{ff}).elementValues = <span class="string">'FAIL'</span>;
0086
0087 <span class="comment">%--------------------------------------------------------------</span>
0088 <span class="comment">% Check we have the same number of points and time steps in the</span>
0089 <span class="comment">% new interpolation as in the original.</span>
0090 <span class="comment">%--------------------------------------------------------------</span>
0091 [~, results.(fnames{ff}).origNodeTimes] = <span class="keyword">...</span>
0092 size(forcing_interp.(fnames{ff}).node);
0093 [~, results.(fnames{ff}).origElementTimes] = <span class="keyword">...</span>
0094 size(forcing_interp.(fnames{ff}).data);
0095 [results.(fnames{ff}).nNodes, <span class="keyword">...</span>
0096 results.(fnames{ff}).nNodeTimes] = <span class="keyword">...</span>
0097 size(forcing_interp_new.(fnames{ff}).node);
0098 [results.(fnames{ff}).nElems, <span class="keyword">...</span>
0099 results.(fnames{ff}).nElementTimes] = <span class="keyword">...</span>
0100 size(forcing_interp_new.(fnames{ff}).data);
0101
0102 <span class="keyword">if</span> results.(fnames{ff}).nNodes == Mobj.nVerts
0103 results.(fnames{ff}).nodeNumber = <span class="string">'PASS'</span>;
0104 <span class="keyword">end</span>
0105 <span class="keyword">if</span> results.(fnames{ff}).nElems == Mobj.nElems
0106 results.(fnames{ff}).elementNumber = <span class="string">'PASS'</span>;
0107 <span class="keyword">end</span>
0108 <span class="keyword">if</span> results.(fnames{ff}).nNodeTimes == <span class="keyword">...</span>
0109 results.(fnames{ff}).origNodeTimes
0110 results.(fnames{ff}).numNodeTimes = <span class="string">'PASS'</span>;
0111 <span class="keyword">end</span>
0112 <span class=