different pm and pn using COAWST and Rutgers Toolkits

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
Dan_chan
Posts: 38
Joined: Wed Apr 17, 2019 2:37 am
Location: IAP, UCAS

different pm and pn using COAWST and Rutgers Toolkits

#1 Unread post by Dan_chan »

Hi,

I am currently experimenting with the generation of grid.nc using two different toolkits (coawst and roms-web). But I noticed a significant disparity in the values of pm and pn obtained from these two sources. I then stick some steps briefly to show how I generated pm and pn below. (lon and lat at rho, u, v, psi points generated by two toolkits are same )
using coawst:

Code: Select all

eval(['mat2roms_mw(''temp_grid.mat'',''',roms_grid,''');'])
using grid/roms_metrics.m

Code: Select all

G.ncname = roms_grid;
G.lon_rho = ncread(roms_grid,'lon_rho');
G.lat_rho = ncread(roms_grid,'lat_rho');
......
S = roms_metrics(G);
But, pm and pn values are very very different:
mean of pm using coawst = 3.6492e-07;
mean of pn using coawst = 5.5690e-08;
mean of pm using roms_metrics = 2.2567e-04;
mean of pn usingroms_metrics = 2.2561e-04;

I am confused why so big error. Which one is right?

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: different pm and pn using COAWST and Rutgers Toolkits

#2 Unread post by jcwarner »

yes sorry.
i was changing the way to compute the metrics to be more in line with gridbuilder and i messed up the x y values used to compute dx dy and angle.
sorry.
i reverted my method back to what i had before. if you do a git pull it should be better now.

-j

Dan_chan
Posts: 38
Joined: Wed Apr 17, 2019 2:37 am
Location: IAP, UCAS

Re: different pm and pn using COAWST and Rutgers Toolkits

#3 Unread post by Dan_chan »

Thank you.

I have followed your suggestion and updated the mat2roms_mw.m. I am pleased to report that the results are now align correctly with another.

mean of pm using coawst = 2.2583e-04;
mean of pn using coawst = 2.2577e-04;
mean of pm using roms_metrics = 2.2567e-04;
mean of pn using roms_metrics = 2.2561e-04;

Thank you once again for your assistance and the useful mtools. :D

Post Reply