-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vorticity as a diagnostic output #924
Changes from 5 commits
a098554
005ba4a
43b6847
9d3107f
1345aa5
0425cbd
baf25d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,10 +118,10 @@ subroutine eap (dt) | |
stressp_1, stressp_2, stressp_3, stressp_4, & | ||
stressm_1, stressm_2, stressm_3, stressm_4, & | ||
stress12_1, stress12_2, stress12_3, stress12_4 | ||
use ice_grid, only: tmask, umask, dxT, dyT, dxhy, dyhx, cxp, cyp, cxm, cym, & | ||
use ice_grid, only: tmask, umask, dxT, dyT, dxU, dyU, dxhy, dyhx, cxp, cyp, cxm, cym, & | ||
tarear, uarear, grid_average_X2Y, & | ||
grid_atm_dynu, grid_atm_dynv, grid_ocn_dynu, grid_ocn_dynv | ||
use ice_state, only: aice, aiU, vice, vsno, uvel, vvel, divu, shear, & | ||
use ice_state, only: aice, aiU, vice, vsno, uvel, vvel, divu, shear, vort, & | ||
aice_init, aice0, aicen, vicen, strength | ||
use ice_timers, only: timer_dynamics, timer_bound, & | ||
ice_timer_start, ice_timer_stop | ||
|
@@ -195,6 +195,7 @@ subroutine eap (dt) | |
rdg_shear(i,j,iblk) = c0 ! always zero. Could be moved | ||
divu (i,j,iblk) = c0 | ||
shear(i,j,iblk) = c0 | ||
vort(i,j,iblk) = c0 | ||
e11(i,j,iblk) = c0 | ||
e12(i,j,iblk) = c0 | ||
e22(i,j,iblk) = c0 | ||
|
@@ -433,6 +434,7 @@ subroutine eap (dt) | |
arlx1i, denom1, & | ||
uvel (:,:,iblk), vvel (:,:,iblk), & | ||
dxT (:,:,iblk), dyT (:,:,iblk), & | ||
dxU (:,:,iblk), dyU (:,:,iblk), & | ||
dxhy (:,:,iblk), dyhx (:,:,iblk), & | ||
cxp (:,:,iblk), cyp (:,:,iblk), & | ||
cxm (:,:,iblk), cym (:,:,iblk), & | ||
|
@@ -448,6 +450,7 @@ subroutine eap (dt) | |
stress12_1(:,:,iblk), stress12_2(:,:,iblk), & | ||
stress12_3(:,:,iblk), stress12_4(:,:,iblk), & | ||
shear (:,:,iblk), divu (:,:,iblk), & | ||
vort (:,:,iblk), & | ||
e11 (:,:,iblk), e12 (:,:,iblk), & | ||
e22 (:,:,iblk), & | ||
s11 (:,:,iblk), s12 (:,:,iblk), & | ||
|
@@ -1162,6 +1165,7 @@ subroutine stress_eap (nx_block, ny_block, & | |
arlx1i, denom1, & | ||
uvel, vvel, & | ||
dxT, dyT, & | ||
dxU, dyU, & | ||
dxhy, dyhx, & | ||
cxp, cyp, & | ||
cxm, cym, & | ||
|
@@ -1175,6 +1179,7 @@ subroutine stress_eap (nx_block, ny_block, & | |
stress12_1, stress12_2, & | ||
stress12_3, stress12_4, & | ||
shear, divu, & | ||
vort, & | ||
e11, e12, & | ||
e22, & | ||
s11, s12, & | ||
|
@@ -1206,6 +1211,8 @@ subroutine stress_eap (nx_block, ny_block, & | |
vvel , & ! y-component of velocity (m/s) | ||
dxT , & ! width of T-cell through the middle (m) | ||
dyT , & ! height of T-cell through the middle (m) | ||
dxU , & ! width of U-cell through the middle (m) | ||
dyU , & ! height of U-cell through the middle (m) | ||
dxhy , & ! 0.5*(HTE - HTW) | ||
dyhx , & ! 0.5*(HTN - HTS) | ||
cyp , & ! 1.5*HTE - 0.5*HTW | ||
|
@@ -1226,6 +1233,7 @@ subroutine stress_eap (nx_block, ny_block, & | |
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: & | ||
shear , & ! strain rate II component (1/s) | ||
divu , & ! strain rate I component, velocity divergence (1/s) | ||
vort , & ! vorticity (1/s) | ||
e11 , & ! components of strain rate tensor (1/s) | ||
e12 , & ! | ||
e22 , & ! | ||
|
@@ -1255,6 +1263,7 @@ subroutine stress_eap (nx_block, ny_block, & | |
divune, divunw, divuse, divusw , & ! divergence | ||
tensionne, tensionnw, tensionse, tensionsw, & ! tension | ||
shearne, shearnw, shearse, shearsw , & ! shearing | ||
dvdxn, dvdxs, dudye, dudyw , & ! for vorticity calc | ||
ssigpn, ssigps, ssigpe, ssigpw , & | ||
ssigmn, ssigms, ssigme, ssigmw , & | ||
ssig12n, ssig12s, ssig12e, ssig12w , & | ||
|
@@ -1357,6 +1366,13 @@ subroutine stress_eap (nx_block, ny_block, & | |
(tensionne + tensionnw + tensionse + tensionsw)**2 & | ||
+ (shearne + shearnw + shearse + shearsw)**2) | ||
|
||
! vorticity | ||
dvdxn = dyU(i,j)*vvel(i,j) - dyU(i-1,j)*vvel(i-1,j) | ||
dvdxs = dyU(i,j-1)*vvel(i,j-1) - dyU(i-1,j-1)*vvel(i-1,j-1) | ||
dudye = dxU(i,j)*uvel(i,j) - dxU(i,j-1)*uvel(i,j-1) | ||
dudyw = dxU(i-1,j)*uvel(i-1,j) - dxU(i-1,j-1)*uvel(i-1,j-1) | ||
vort(i,j) = p5*tarear(i,j)*(dvdxn + dvdxs - dudye - dudyw) | ||
|
||
Comment on lines
+1369
to
+1375
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here the computation of vorticity is the same as in If so, I would prefer we compute the vorticity in a separate subroutine, and call that subroutine from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But then it is the same thing for divu and shear...the same computations are done in ice_dyn_eap and ice_dyn_shared. It has been like this for a long time...I say we keep it simple the way it is done right now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm okay with this as it is, for now. We do need to do a massive cleanup of the whole dynamics code, to fix these kinds of things. There is a lot of duplication for historical reasons. |
||
divu(i,j) = p25*(divune + divunw + divuse + divusw) * tarear(i,j) | ||
rdg_conv(i,j) = -min(p25*(alpharne + alpharnw & | ||
+ alpharsw + alpharse),c0) * tarear(i,j) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we specify at which location
vort
is defined ? I see shear, divu and strength do not mention it , but most other fields do.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It is done.