Potential Vorticity
Potential Vorticity
Hi guys;
Anyone have used the new logic to get the Potential Vorticity on the average files (see Herman post
https://www.myroms.org/projects/src/ticket/421).
I updated the ROMS code yesterday, my *.in and varinfo.dat files, but the my 3D potential vorticity results are all zeros. The 2D field looks ok and 2D and 3D relative vorticity also work fine. I spent some time trying to debug why I'm not getting any results for the 3D PVORT, but couldn't find the reason.
Does anyone have already successful used it?
Cheers;
Carlos Teixeira
Anyone have used the new logic to get the Potential Vorticity on the average files (see Herman post
https://www.myroms.org/projects/src/ticket/421).
I updated the ROMS code yesterday, my *.in and varinfo.dat files, but the my 3D potential vorticity results are all zeros. The 2D field looks ok and 2D and 3D relative vorticity also work fine. I spent some time trying to debug why I'm not getting any results for the 3D PVORT, but couldn't find the reason.
Does anyone have already successful used it?
Cheers;
Carlos Teixeira
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Potential Vorticity
Hmm, I ran my North Atlantic application for 10 years last night and I am getting nonzero potential vorticity. I can see the sub-tropical gyres and Gulf Stream.
Re: Potential Vorticity
Thanks Herman;
I will do some tests with different applications, to see where is the problem.
Cheers;
Carlos
I will do some tests with different applications, to see where is the problem.
Cheers;
Carlos
Re: Potential Vorticity
Herman;
I think I have found the problem, but not the solution:
If I have DIAGNOSTICS_UV and DIAGNOSTICS_TS (and AVERAGES) defined it works and I get nonzero for the 3D field of the potential vorticity.
If these options are NOT defined (only AVERAGES is defined) I don't get the 3D potential vorticity.
Do you have DIAGNOSTICS_UV and DIAGNOSTICS_TS in your North Atlantic application?
I had a look into the code to find the problem, but no success.
Cheers;
Carlos
I think I have found the problem, but not the solution:
If I have DIAGNOSTICS_UV and DIAGNOSTICS_TS (and AVERAGES) defined it works and I get nonzero for the 3D field of the potential vorticity.
If these options are NOT defined (only AVERAGES is defined) I don't get the 3D potential vorticity.
Do you have DIAGNOSTICS_UV and DIAGNOSTICS_TS in your North Atlantic application?
I had a look into the code to find the problem, but no success.
Cheers;
Carlos
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Potential Vorticity
I ran with and without DIAGNOSTICS_UV and DIAGNOSTICS_TS and get the same results: a nonzero 2D/3D potential and relative vorticity.
Have you made changes to set_avg.F or set_diags.F? The vorticity fields are all computed at the same time in routine vorticity.F. Notice that the 3D relative and potential vorticity are computed in the same block and have couple of terms in common. I don't see how potential vorticity is all zero and relative vorticity is not.
Have you made changes to set_avg.F or set_diags.F? The vorticity fields are all computed at the same time in routine vorticity.F. Notice that the 3D relative and potential vorticity are computed in the same block and have couple of terms in common. I don't see how potential vorticity is all zero and relative vorticity is not.
Re: Potential Vorticity
Herman;
I haven't changed set_avg.F or set_diags.F. I don't know what is happening . I got the results that I need using DIAGNOSTICS. Lets leave it and see if someone else have the same kind of problem in the future. Thanks a lot.
I haven't changed set_avg.F or set_diags.F. I don't know what is happening . I got the results that I need using DIAGNOSTICS. Lets leave it and see if someone else have the same kind of problem in the future. Thanks a lot.
Re: Potential Vorticity
I just ran into this problem. The issue is that potential density, pden=0 unless you have DIAGNOSTICS or LMD mixing defined.
vorticity.F uses pden to calculate grad(rho) for PV. However, pden is defined in Nonlinear/rho_eos.F as
and then later on...
So, pden=0 unless you have one of those 3 options (LMD_SKPP, LMD_BKPP, DIAGNOSTICS) defined. Adding " || defined AVERAGES" after every occurence of "|| defined DIAGNOSTICS" in rho_eos.F fixes it.
Deepak
vorticity.F uses pden to calculate grad(rho) for PV. However, pden is defined in Nonlinear/rho_eos.F as
Code: Select all
# if defined LMD_SKPP || defined LMD_BKPP || defined DIAGNOSTICS
real(r8), intent(out) :: pden(LBi:,LBj:,:)
# endif
Code: Select all
# if defined LMD_SKPP || defined LMD_BKPP || defined DIAGNOSTICS
pden(i,j,k)=(den1(i,k)-1000.0_r8)
# ifdef MASKING
pden(i,j,k)=pden(i,j,k)*rmask(i,j)
# endif
# endif
Deepak
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Potential Vorticity
Yes, good catch. Every time that I computed potential vorticity I have one of those CPP activated. I correct this and now the potential density, pden, is always computed. I removed CPP directive. We will use this field in the future for other algorithms.
Thank you for finding the cause of this problem. Please update...
Thank you for finding the cause of this problem. Please update...
Re: Potential Vorticity
Also, the horizontal derivatives for the relative vorticity are calculated as
Isn't this only valid for a flat bottom? Shouldn't the chain rule (https://www.myroms.org/wiki/index.php/T ... sformation) be used when taking horizontal derivatives on a stretched grid?
Deepak
Code: Select all
dUde(i,j)=om_u(i,j )*u(i,j ,k,nout)- &
& om_u(i,j-1)*u(i,j-1,k,nout)
dVdx(i,j)=on_v(i ,j)*v(i ,j,k,nout)- &
& on_v(i-1,j)*v(i-1,j,k,nout)
cff=pm(i,j)*pn(i,j)
rvor(i,j,k)=cff*(dVdx(i,j)-dUde(i,j))
Deepak