Skip to content

Commit

Permalink
Further modified the transition between isopycnic and constant pressu…
Browse files Browse the repository at this point in the history
…re interfaces for hybrid vertical coordinate and introduced lateral interface smoothing in the transition zone.
  • Loading branch information
matsbn committed Aug 15, 2024
1 parent 4757aea commit e0680c2
Show file tree
Hide file tree
Showing 4 changed files with 500 additions and 270 deletions.
39 changes: 37 additions & 2 deletions cime_config/namelist_definition_blom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
<category>vcoord</category>
<group>vcoord</group>
<values>
<value>0</value>
<value>4</value>
</values>
<desc>add desc</desc>
</entry>
Expand All @@ -1073,7 +1073,42 @@
<category>vcoord</category>
<group>vcoord</group>
<values>
<value>0</value>
<value>2</value>
</values>
<desc>add desc</desc>
</entry>

<entry id="regrid_nudge_ts">
<type>real</type>
<category>vcoord</category>
<group>vcoord</group>
<values>
<value>86400.</value>
</values>
<desc>add desc</desc>
</entry>

<entry id="stab_fac_limit">
<type>real</type>
<category>vcoord</category>
<group>vcoord</group>
<values>
<value>.75</value>
</values>
<desc>add desc</desc>
</entry>

<entry id="smooth_diff_max">
<type>real</type>
<category>vcoord</category>
<group>vcoord</group>
<values>
<value>50000.</value>
<value blom_unit="cgs">50000.e4</value>
<value ocn_grid="tnx0.25v4" blom_unit="mks">40000.</value>
<value ocn_grid="tnx0.25v4" blom_unit="cgs">40000.e4</value>
<value ocn_grid="tnx0.125v4" blom_unit="mks">20000.</value>
<value ocn_grid="tnx0.125v4" blom_unit="cgs">20000.e4</value>
</values>
<desc>add desc</desc>
</entry>
Expand Down
2 changes: 1 addition & 1 deletion phy/mod_blom_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ subroutine blom_init()
! update some halos
! ------------------------------------------------------------------

call xctilr(sigmar, 1,kk, 2,2, halo_ps)
call xctilr(uflx, 1,2*kk, 1,1, halo_uv)
call xctilr(vflx, 1,2*kk, 1,1, halo_vv)
call xctilr(phi(1-nbdy,1-nbdy,kk+1), 1,1, 2,2, halo_ps)
Expand All @@ -343,7 +344,6 @@ subroutine blom_init()
call xctilr(pgfym, 1,2, 1,2, halo_vv)
call xctilr(xiyp, 1,2, 1,2, halo_vs)
call xctilr(xiym, 1,2, 1,2, halo_vs)
call xctilr(sigmar, 1,kk, 1,1, halo_ps)
if (vcoord_type_tag == isopyc_bulkml) then
call xctilr(uml, 1,4, 1,0, halo_uv)
call xctilr(vml, 1,4, 0,1, halo_vv)
Expand Down
26 changes: 12 additions & 14 deletions phy/mod_ndiff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ subroutine ndiff_vflx_jslice(ksmx_rs, tpc_src_rs, t_srcdi_rs, &
p_dst_rs, kdmx_rs, p_srcdi_rs, &
drhodt_srcdi_rs, drhods_srcdi_rs, &
flxconv_rs, &
ntr_loc, i_lb, i_ub, j, j_rs, mm, nn)
ntr_loc, i_lb, i_ub, j, j_rs_m, j_rs_p, mm, nn)

integer, dimension(1-nbdy:,:), intent(in) :: ksmx_rs, kdmx_rs
real(r8), dimension(:,:,:,1-nbdy:,:), target, intent(in) :: &
Expand All @@ -1002,7 +1002,7 @@ subroutine ndiff_vflx_jslice(ksmx_rs, tpc_src_rs, t_srcdi_rs, &
real(r8), dimension(:,:,1-nbdy:,:), target, intent(in) :: &
p_srcdi_rs, drhodt_srcdi_rs, drhods_srcdi_rs
real(r8), dimension(:,:,1-nbdy:,:), intent(inout) :: flxconv_rs
integer, intent(in) :: ntr_loc, i_lb, i_ub, j, j_rs, mm, nn
integer, intent(in) :: ntr_loc, i_lb, i_ub, j, j_rs_m, j_rs_p, mm, nn

real(r8), dimension(:,:,:), pointer :: &
t_srcdi_m, tpc_src_m, t_srcdi_p, tpc_src_p
Expand All @@ -1012,29 +1012,27 @@ subroutine ndiff_vflx_jslice(ksmx_rs, tpc_src_rs, t_srcdi_rs, &
real(r8), dimension(:), pointer :: &
p_dst_m, p_dst_p
real(r8) :: cdiff, cnslp
integer :: j_rs_m, l, i, ksmx_m, ksmx_p, kdmx_m, kdmx_p

j_rs_m = 3 - j_rs
integer :: l, i, ksmx_m, ksmx_p, kdmx_m, kdmx_p

do l = 1, isv(j)
do i = max(i_lb, ifv(j, l)), min(i_ub, ilv(j, l))

p_srcdi_m => p_srcdi_rs(:,:,i,j_rs_m)
p_srcdi_p => p_srcdi_rs(:,:,i,j_rs )
p_srcdi_p => p_srcdi_rs(:,:,i,j_rs_p)
t_srcdi_m => t_srcdi_rs(:,:,:,i,j_rs_m)
t_srcdi_p => t_srcdi_rs(:,:,:,i,j_rs )
t_srcdi_p => t_srcdi_rs(:,:,:,i,j_rs_p)
tpc_src_m => tpc_src_rs(:,:,:,i,j_rs_m)
tpc_src_p => tpc_src_rs(:,:,:,i,j_rs )
tpc_src_p => tpc_src_rs(:,:,:,i,j_rs_p)
drhodt_srcdi_m => drhodt_srcdi_rs(:,:,i,j_rs_m)
drhodt_srcdi_p => drhodt_srcdi_rs(:,:,i,j_rs )
drhodt_srcdi_p => drhodt_srcdi_rs(:,:,i,j_rs_p)
drhods_srcdi_m => drhods_srcdi_rs(:,:,i,j_rs_m)
drhods_srcdi_p => drhods_srcdi_rs(:,:,i,j_rs )
drhods_srcdi_p => drhods_srcdi_rs(:,:,i,j_rs_p)
p_dst_m => p_dst_rs(:,i,j_rs_m)
p_dst_p => p_dst_rs(:,i,j_rs )
p_dst_p => p_dst_rs(:,i,j_rs_p)
ksmx_m = ksmx_rs(i,j_rs_m)
ksmx_p = ksmx_rs(i,j_rs )
ksmx_p = ksmx_rs(i,j_rs_p)
kdmx_m = kdmx_rs(i,j_rs_m)
kdmx_p = kdmx_rs(i,j_rs )
kdmx_p = kdmx_rs(i,j_rs_p)
cdiff = delt1*scvx(i,j)*scvyi(i,j)
cnslp = alpha0*scvyi(i,j)/g

Expand All @@ -1046,7 +1044,7 @@ subroutine ndiff_vflx_jslice(ksmx_rs, tpc_src_rs, t_srcdi_rs, &
p_dst_p, ksmx_p, kdmx_p, &
cdiff, cnslp, pv, flxconv_rs, &
vtflld, vsflld, vtflx, vsflx, nslpy, &
ntr_loc, i, j-1, i, j, j_rs_m, j_rs, mm, nn)
ntr_loc, i, j-1, i, j, j_rs_m, j_rs_p, mm, nn)

enddo
enddo
Expand Down
Loading

0 comments on commit e0680c2

Please sign in to comment.