<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="">Hello<div class=""><br class=""></div><div class="">Yes, I believe you have to convert phase to seconds</div><div class=""><br class=""></div><div class="">And TPXO does give amplitude in m/s if you pass it ‘u’ or ‘v’ instead of ‘z'</div><div class=""><br class=""></div><div class="">From </div><div class="">tmd_extract_HC.m</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">%                    'z' - elvation (m)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">%                    'u','v' - velocities (cm/s)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; color: rgb(77, 44, 220); background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">%                    'U','V' - transports (m^2/s);</span></div></div><div class=""><br class=""></div><div class="">I have attached relevant code snippet below that I have used to get amp and phase (here called <span style="font-family: Menlo; font-size: 16px; background-color: rgb(254, 244, 156);" class="">New_Gph_sec</span>)</div><div class=""><br class=""></div><div class="">I forget where I got this originally - maybe Ruth Musgrave?</div><div class="">Matt</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Menlo; 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="">consts = {</span><span style="font-variant-ligatures: no-common-ligatures" class="">'M2  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'S2  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'N2  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'K2  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'K1  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'O1  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'P1  '</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures" class="">'Q1  '</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; 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; background-color: rgb(254, 244, 156);" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: #e6e600" class="">freq</span><span style="font-variant-ligatures: no-common-ligatures" class="">=</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; 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; 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; 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; 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; 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; 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; background-color: #e6e600" class="">freq</span><span style="font-variant-ligatures: no-common-ligatures" class="">(jj)=const.</span><span style="font-variant-ligatures: no-common-ligatures; background-color: #e6e600" class="">freq</span><span style="font-variant-ligatures: no-common-ligatures" class="">(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; 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(77, 44, 220); 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(77, 44, 220); 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; color: rgb(77, 44, 220); 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="">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; 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; 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; 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; 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; 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; 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="">; %MAKE SURE TPXO depth consistent with mine</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="">    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; 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; color: rgb(77, 44, 220); 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; 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="">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><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=""><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; background-color: #e6e600" 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_2015v1.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_2015v1.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><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=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 23, 2019, at 7:53 AM, Ruan Xiaozhou <<a href="mailto:saberruan@hotmail.com" class="">saberruan@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear MITgcm users,<br class=""><br class="">This might be an old question (I couldn’t find a satisfying answer in the old posts though). I’m trying to force a nested patch with tidal forcing at the open boundaries using the OBCS package. However, the required tidal amplitude and phase input files have some weird units that confused me. In the OBCS_PARAMS.h file, it specifically says the ‘amplitude’ should have the unit of m/s and the ‘phase’ should have the unit of second. I guess maybe it makes sense for the ‘phase' if it is defined as ph * T/(2 pi) where T is the tidal period and ph is what I have from normal tidal output dataset (e.g. TPXO) that has the unit of radian. But the amplitude input is directly used to add to both velocities (u and v) at the open boundaries but it normally has the unit of meter in tidal datasets. I was wondering if anyone could share their experience converting the units of these tidal input files? <br class=""><br class="">Thanks for your time.<br class=""><br class="">Cheers,<br class="">Xiaozhou <br class="">_______________________________________________<br class="">MITgcm-support mailing list<br class=""><a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a><br class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support<br class=""></div></div></blockquote></div><br class=""></div></body></html>