<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The meat of the matlab code I used for TPXO is pasted below<div class=""><br class=""></div><div class="">(I think this code came mostly from Heriberto Vazquez Peralta and Ruth Musgrave.)</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">start_date = datenum(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">201</span><span style="font-variant-ligatures: no-common-ligatures; color: #990000; background-color: #e6e600" class="">5</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">01</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">01</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">start_date = start_date</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">+</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">12</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class="">%MODEL STARTS 2:00</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">load </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures" class="">data</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures" class="">SO12</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures" class="">SWOT</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures" class="">GRID</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures" class="">grid XC YC hFacW hFacS DRF</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="color: rgb(77, 44, 220);" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="color: rgb(77, 44, 220);" class="">% Using transport instead of amplitude I need the depth at each boundary</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">transport=</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> transport</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures" class="">NX NY NZ</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">size</span><span style="font-variant-ligatures: no-common-ligatures" class="">(hFacW)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_w = </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">zeros</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">,NY,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'double'</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_s = </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">zeros</span><span style="font-variant-ligatures: no-common-ligatures" class="">(NX,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'double'</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_n = </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">zeros</span><span style="font-variant-ligatures: no-common-ligatures" class="">(NX,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'double'</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">for</span><span style="font-variant-ligatures: no-common-ligatures" class=""> k = </span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">:NZ</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_w = depth_w </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">+</span><span style="font-variant-ligatures: no-common-ligatures" class=""> DRF(k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures" class="">hFacW(iobcs,:,k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_s = depth_s </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">+</span><span style="font-variant-ligatures: no-common-ligatures" class=""> DRF(k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures" class="">hFacS(:,iobcs,k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> depth_n = depth_n </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">+</span><span style="font-variant-ligatures: no-common-ligatures" class=""> DRF(k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures" class="">hFacS(:,</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">end-</span><span style="font-variant-ligatures: no-common-ligatures" class="">iobcs</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">+</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">,k)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">end</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(197, 114, 28);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">end</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(77, 44, 220);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">% Loading names from Pawlowicz set</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">load t_constituents</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">names=mat2cell(const.name,</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">ones</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">146</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">),</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">4</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19px;" class=""><br class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">consts = {</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'M2 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'S2 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'N2 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'K2 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'K1 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'O1 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'P1 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">,</span><span style="color: rgb(189, 49, 27); font-variant-ligatures: no-common-ligatures;" class="">'Q1 '</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">}</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(206, 50, 204);" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">phase_date=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">zeros</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">8</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">freq=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">zeros</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">8</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">for</span><span style="font-variant-ligatures: no-common-ligatures" class=""> jj = </span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class=""> : numel(consts)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ind = find(strcmp(names,consts{jj}))</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class="">% Index of constituents in Pawlowicz</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> names(ind,:)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures" class="">v,u,f</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures" class="">=t_vuf(start_date,ind,nan)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class="">% Phase correction for real forcing</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> phase_date(jj)=v</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> freq(jj)=const.freq(ind)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(197, 114, 28); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">end</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">% Western Boundary</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">lat = YC(iobcs,:)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> lon = XC(iobcs,:)</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">-</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">360</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures" class="">amp,Gph,Depth,conList</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures" class="">=tmd_extract_HC(</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures" class="">dir_tpxo,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'DATA/'</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'Model_tpxo7.2'</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures" class="">,lat,lon,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">'u'</span><span style="font-variant-ligatures: no-common-ligatures" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">8</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> transport</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> unos=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">ones</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">size</span><span style="font-variant-ligatures: no-common-ligatures" class="">(amp,</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">),</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> amp=amp</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">.*</span><span style="font-variant-ligatures: no-common-ligatures" class="">(unos</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures" class="">Depth)</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">./</span><span style="font-variant-ligatures: no-common-ligatures" class="">(unos</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures" class="">depth_w)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> dd=isfinite(amp)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> amp(</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">~</span><span style="font-variant-ligatures: no-common-ligatures" class="">dd)=</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(197, 114, 28); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">end</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">Gph=Gph</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">/</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">360</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">% To cycles.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">New_Gph = bsxfun(@minus,Gph,phase_date)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class="">% Correcting the phase to date</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">% Transforming the phase to seconds</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">T = </span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">3600</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">*</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">./</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">freq</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">% Periods for each constituent</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">New_Gph_sec = bsxfun(@times,New_Gph,T)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4d2cdc" class="">% Phase in seconds</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">New_Gph_sec = New_Gph_sec</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">'</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">amp=amp</span><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">'/</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">100</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">% Transforming to m/s</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(189, 49, 27); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">prec = </span><span style="font-variant-ligatures: no-common-ligatures" class="">'single'</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c5721c" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> transport</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(189, 49, 27); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> tr=</span><span style="font-variant-ligatures: no-common-ligatures" class="">'_trans'</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(197, 114, 28); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">else</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> tr=</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[]</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(197, 114, 28); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">end</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">amp(isnan(amp))=</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">New_Gph_sec(isnan(New_Gph_sec))=</span><span style="font-variant-ligatures: no-common-ligatures; color: #bd311b" class="">0</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(189, 49, 27); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">fid = fopen(</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">save_dir </span><span style="font-variant-ligatures: no-common-ligatures" class="">'OBW_SWOT_TdlAmp'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,tr,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'_Jan_201</span><span style="font-variant-ligatures: no-common-ligatures; color: #990000; background-color: #e6e600" class="">5</span><span style="font-variant-ligatures: no-common-ligatures" class="">v1.bin'</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'w'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'b'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">fwrite(fid,amp,prec)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">fclose(fid)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156); min-height: 19px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(189, 49, 27); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">fid = fopen(</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">save_dir </span><span style="font-variant-ligatures: no-common-ligatures" class="">'OBW_SWOT_TdlPhs'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,tr,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'_Jan_201</span><span style="font-variant-ligatures: no-common-ligatures; color: #990000; background-color: #e6e600" class="">5</span><span style="font-variant-ligatures: no-common-ligatures" class="">v1.bin'</span><span style="font-variant-ligatures: no-common-ligatures; color: #25b2bf" class="">]</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'w'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'b'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">fwrite(fid,New_Gph_sec,prec)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">fclose(fid)</span><span style="font-variant-ligatures: no-common-ligatures; color: #ce32cc" class="">;</span></div></span></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 11, 2019, at 5:30 PM, Richet, Oceane (O&A, Hobart) <<a href="mailto:Oceane.Richet@csiro.au" class="">Oceane.Richet@csiro.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">Hello everyone,<div style="" class=""><div dir="ltr" class=""><div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I am implementing the tides at the boundaries of my regional domain and I am wondering what is exactly the tidal phase that I have to put in input. I know that this tidal phase is in second in the MITgcm but what I am trying to figure out is, in the case of the tpxo data, what are the corrections that I have to apply to the tpxo tidal phase. The phase is already in degree GMT but do I have to apply a nodal correction (and also on the amplitude?)? Does the input phase in the MITgcm correspond to the Greenwich phase lag (difference between the astronomical argument and the observed phase - this is what I saw in a previous study)? I am a bit confused by all the things that I read and I would like to clarify this point.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Thank you!<br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="x_Signature" class=""><div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class="">Océane<span class="Apple-converted-space"> </span><br class=""></div></div></div></div></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">MITgcm-support mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:MITgcm-support@mitgcm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">MITgcm-support@mitgcm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></div></blockquote></div><br class=""></div></div></body></html>