# Ocean Modeling Discussion

ROMS/TOMS

Search for:
 It is currently Tue Oct 16, 2018 12:12 pm

 Page 1 of 1 [ 3 posts ]
 All times are UTC
Author Message
 Post subject: Derivatives of U and V in curvilinear coordinatesPosted: Thu May 03, 2018 11:36 am

Joined: Fri Jul 07, 2017 7:34 pm
Posts: 7
Location: cicese
Hello
I want to compute the derivative of U and V in curvilinear coordinates but in sigma (no Z) with the aim of compute the conversion of barotropic energy (similar to Marchesiello et al 2003). I did the code in matlab but I'm sure it's good. Can you help me please? I used part of the ROMS-Agrif Visualizations_tool code

Thank you very much.

 Attachments: File comment: here the code curv_derivatives.m [1.85 KiB] Downloaded 23 times
Top

 Posted: Sun May 06, 2018 10:43 pm

Joined: Wed Feb 03, 2010 6:59 pm
Posts: 95
Location: Universidad Autonoma de Baja California Sur
Hello fcampos

You have this
uom(i,:,:) = 2*squeeze(Hu(i,:,:))./(pm(:,1:L)+pm(:,2:Lp));
uon(i,:,:) = 2*squeeze(Hu(i,:,:))./(pn(:,1:L)+pn(:,2:Lp));
von(i,:,:) = 2*squeeze(Hv(i,:,:))./(pn(1:M,:)+pn(2:Mp,:));
vom(i,:,:) = 2*squeeze(Hv(i,:,:))./(pm(1:M,:)+pm(2:Mp,:));

uom(i,:,:) = squeeze(2*((Hu(i,:,:))./(pm(:,1:L)+pm(:,2:Lp))));
uon(i,:,:) = squeeze(2*((Hu(i,:,:))./(pn(:,1:L)+pn(:,2:Lp))));
von(i,:,:) = squeeze(2*((Hv(i,:,:))./(pn(1:M,:)+pn(2:Mp,:))));
vom(i,:,:) = squeeze(2*((Hv(i,:,:))./(pm(1:M,:)+pm(2:Mp,:))));

perhaps it works

Top

 Posted: Mon May 07, 2018 12:59 am

Joined: Fri Jul 07, 2017 7:34 pm
Posts: 7
Location: cicese
Hello.
The 2 affects all the matrix. So if you put it before or after "squeeze" affect the multiplication in a similar way. The purpose of my question is if the structure of the transformation into sigma coordinates (in matlab) is indeed good. in my opinion it is well written XD.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Google [Bot] and 3 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ News, Events & Job Opportunities    Meetings/Workshops    Job Opportunities    Ocean News ROMS/TOMS    ROMS Adjoint    ROMS Benchmarks    ROMS Bugs    ROMS Discussion    ROMS Documentation    ROMS Ecosystem    ROMS FAQ    ROMS Ice    ROMS Information    ROMS Installation    ROMS Known Problems    ROMS Messages    ROMS Problems    ROMS Releases    ROMS Results    ROMS Sediment    ROMS Source    ROMS Tips    ROMS Tools and Techniques    ROMS Trivia    ROMS Usage    ROMS Webinar    ROMS Wish List ROMS/TOMS Applications    User Applications    Adriatic Sea Ocean Modeling    Ocean Modeling FAQ