relative/potential vorticity outputs

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

relative/potential vorticity outputs

#1 Unread post by osean »

I am in the process of doing some diagnostics of an idealized experiment which turned out pretty well.

On the Wiki ROMS page, it looks like I should be able to get 3D relative and potential vorticity diagnostics in the diagnostic .nc file if I turn the logical switches on for pvorticity and rvorticity: https://www.myroms.org/wiki/Model_Diagnostics

However in the new roms_.in input file, it does not seem to have these variable options for diagnostic files, but I find them in the setting for average output file:
Aout(id2dRV) == F ! pvorticity_bar 2D relative vorticity
Aout(id3dRV) == F ! pvorticity 3D relative vorticity
Aout(id2dPV) == F ! rvorticity_bar 2D potential vorticity
Aout(id3dPV) == F ! rvorticity 3D potential vorticity
Is there a way I can pvorticity and rvorticity outputs for each time step (either thru the diagnostic output or maybe set the timestep for average output to 1?)

Cheers

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: relative/potential vorticity outputs

#2 Unread post by arango »

Nope, the vorticity fields are only available in the AVERAGES output NetCDF file. You control the time-averaging window, NAVG > 1. It is not in the DIAGNOSTICS file because it only contains the various terms of the governing equations, and vorticity is not one of them. You will find vorticity in the governing equations of QG and rigid lid models. In ROMS vorticity is only computed for output. It can be easily added to the HISTORY and QUICKSAVE output files as instantaneous fields. It will involve some coding.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: relative/potential vorticity outputs

#3 Unread post by wilkin »

For vorticity at an individual timestamp you can calculate this from output of other variables in the History file.

In Averages and Diagnostics we save things that cannot be saved (accurately) otherwise unless computed online at runtime.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: relative/potential vorticity outputs

#4 Unread post by arango »

Yes, there is a relative vorticity script rvorticty.m in the Matlab repository.

jpringle
Posts: 108
Joined: Sun Jul 27, 2003 6:49 pm
Location: UNH, USA

Re: relative/potential vorticity outputs

#5 Unread post by jpringle »

I have a python code to compute these from history file that is based on the ROMS Fortran code; ask if interested.
Jamie

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: relative/potential vorticity outputs

#6 Unread post by arango »

Notice that we use pden as potential density referenced to the surface. This quantity is not written in ROMS history files, but it can be computed using eos.m, which computes the different quantities from the ROMS equation of state. Notice that:

Code: Select all

  pden = den1 - 1000
where den1 is the density at standard one-atmosphere pressure and it is independent of the secant bulk modulus. Check rho_eos.F for details.

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: relative/potential vorticity outputs

#7 Unread post by osean »

jpringle wrote: Tue Oct 12, 2021 1:42 pm I have a python code to compute these from history file that is based on the ROMS Fortran code; ask if interested.
Jamie
Hello Jamie,
thanks - if you could share the python code that would be immensely useful
Sean

jpringle
Posts: 108
Joined: Sun Jul 27, 2003 6:49 pm
Location: UNH, USA

Re: relative/potential vorticity outputs

#8 Unread post by jpringle »

No problem. Note this is a straight translation from the code, accelerated via numba. Also note the many ways you can define Ertel's PV depending on how you define the conserved quantity...

One note -- this code is accelerated with Numba; you need not do so, but it will be unbearably slow. If found numba was faster then parallelizing the inner loops. But if you don't want numba, you
can do the later for a considerable increase in speed.

Jamie
Attachments
calcRomsVort_withRi.py
(19.08 KiB) Downloaded 515 times

Post Reply