DOI-USGS / COAWST

COAWST modeling system git repository
Other
109 stars 52 forks source link

tpx_uv.mat and tpx_h.mat #307

Closed dkobashi closed 2 months ago

dkobashi commented 3 months ago

Hi,

Where can we download tpx_uv.mat and tpx_h.mat to process tidal forcing using TPXO data set?

Thanks,

-DJ

jcwarner-usgs commented 3 months ago

https://geoport.whoi.edu/thredds/catalog/vortexfs1/usgs/Projects/Tide_prediction/catalog.html

i have them as .mat.nc, but they are just .nc you will need to rename them to just .mat -j

dkobashi commented 3 months ago

Thanks for the files, John. They worked fine.

Just wanted to make clear about Adcirc tidal database. ADCIRC tidal database only covers US coast and Caribbean. For the region other than US/Caribbean, OSU TPXO is the one we should use for ROMS. Am I correct?

I am checking tidal databases because the model output I have and tidal prediction (not measurement) have 1-hour time lag (compared GMT vs GMT time). The region of interest is in open water in east Asia though it is shallow (30 m-ish). I am trying to figure out what causes the time lag. Unfortunately, I've lost access to TPXO database, so cannot use up-to-date TPXO dataset.

Bests,

-DJ

jcwarner-usgs commented 3 months ago

yes, ADCIRC is only US east coast and caribbean. they also have one for the US west coast (eastern pacific) https://adcirc.org/products/adcirc-tidal-databases/

here is a relevant post for the TPXO data that might help.

does this help: https://www.tpxo.net/global

-j

John C. Warner, Ph.D. U.S. Geological Survey 384 Woods Hole Road Woods Hole, MA 02543 508-457-2237 ph. 508-457-2310 fax @.**@.>

https://www.usgs.gov/staff-profiles/john-warner


From: DJ Kobashi @.> Sent: Tuesday, August 27, 2024 12:37 PM To: DOI-USGS/COAWST @.> Cc: Warner, John C @.>; Comment @.> Subject: [EXTERNAL] Re: [DOI-USGS/COAWST] tpx_uv.mat and tpx_h.mat (Issue #307)

This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.

Thanks for the files, John. They worked fine.

Just wanted to make clear about Adcirc tidal database. ADCIRC tidal database only covers US coast and Caribbean. For the region other than US/Caribbean, OSU TPXO is the one we should use for ROMS. Am I correct?

I am checking tidal databases because the model output I have and tidal prediction (not measurement) have 1-hour time lag (compared GMT vs GMT time). The region of interest is in open water in east Asia though it is shallow (30 m-ish). I am trying to figure out what causes the time lag. Unfortunately, I've lost access to TPXO database, so cannot use up-to-date TPXO dataset.

Bests,

-DJ

— Reply to this email directly, view it on GitHubhttps://github.com/DOI-USGS/COAWST/issues/307#issuecomment-2313038870, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACZ6MOARV7V3URBWQPQ7BM3ZTSTK3AVCNFSM6AAAAABNEJX5EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTGAZTQOBXGA. You are receiving this because you commented.Message ID: @.***>

dkobashi commented 2 months ago

Hi John,

How did you create tpx_uv.mat and tpx_h.mat from TPXO? I tried to create tidal forcing with TPXO9 using AusTide's ROMS tidal forcing scripts (TPXO9v5_ROMS.m and TPXO9v5_ROMS_script.m), but it ends up blowing up the model at the very beginning of the model run; while, tidal forcing using your COAWST script works just fine for running (no blowup). I just briefly checked the ROMS tidal forcing file and it does not look suspicious. I wonder if you don't mind sharing Matlab scripts converting TPXO9 netcdf files to two Matlab tidal data files.

Thanks,

-DJ

dkobashi commented 2 months ago

I compared tpx_h.mat and one of TPXO atlas netcdf file (m2). So in tpx_h.mat, there are the following variables con ha hp lat_z lon_z

whereas, tpxo atlas (e.g. m2) has con hIm hRe lat_z lon_z

So I assume hp and ha correpond to hIm, hRe. hRe and hIm should be real and imaginary part, respectively. The same applies to tpx_uv.mat. If my assumption is correct, I wonder which one corresponds to which.

dkobashi commented 2 months ago

Maybe ha and hp represent amplitude and phase, not Re and Im. Same for u and v. If that's correct, the calculation of ha and hp from TPXO may be as follows.

ha = abs(hRe+i*hIm); hp = atan2(hIm,hRe);

I wonder if someone can confirm this.

jcwarner-usgs commented 2 months ago

If i look in Tools/mfiles/tides/create_roms_tides i can see how ha and hp are used to create the amplitudes and phases from ha and hp:

... tmp2=squeeze(ha(:,:,k)); tmp=griddata(lon_z',lat_z',tmp2',rlon,rlat); eia(:,:,kk)=tmp;

tmp2=squeeze(hp(:,:,k));
tmp=griddata(lon_z',lat_z',tmp2',rlon,rlat);
eip(:,:,kk)=tmp;

... ei_phase(:,:,k) = eip(:,:,k) - vv(k) - uu(k); % degrees ei_amplitude(:,:,k) = eia(:,:,k) .* ff(k); etc. all that is just for water levels.

i found this on the web https://arcticdata.io/metacat/d1/mn/v2/object/doi%3A10.18739%2FA2QB9V73G

hlm imaginary component of height constituent hRe real component of height constituent URe real component of U transport constituent. This is the zonal (east-west) flow component in geographic coordinates. Ulm imaginary component of U transport constituent. This is the zonal (east-west) flow component in geographic coordinates.
dkobashi commented 2 months ago

John,

I tried to convert TPXO9 to tpx_h.mat and tpx_uv.mat, but the phase did not match.

I used TPXO MATLAB script from Austide with TPXO9 and now the phase matched (but the magnitude did not (ROMS overestimated by 0.2-0.3 m-ish). I compared ROMS output to tidal prediction, not measurements, that may be why).

Anyway, I may revisit this conversion in the future, but I close this.

Thanks for your comments.

-DJ