<p><b>laura@ucar.edu</b> 2012-03-26 09:55:22 -0600 (Mon, 26 Mar 2012)</p><p>added the subroutine updated_convection_step1 and updated_convection_step2 so that the convection schemes can be called for longer time-steps than the dynamics time-step.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_convection_deep.F
===================================================================
--- branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_convection_deep.F        2012-03-26 15:50:12 UTC (rev 1717)
+++ branches/atmos_physics/src/core_atmos_physics/mpas_atmphys_driver_convection_deep.F        2012-03-26 15:55:22 UTC (rev 1718)
@@ -16,7 +16,8 @@
deallocate_convection_deep, &
init_convection_deep, &
driver_convection_deep, &
- update_convection_deep
+ update_convection_step1, &
+ update_convection_step2
integer, private:: i,k,j
@@ -164,6 +165,7 @@
!variables specific to Kain_Fritsch parameterization:
logical:: warm_rain,adapt_step_flag
+ integer:: ktau
real(kind=RKIND):: curr_secs
real(kind=RKIND):: cudt
real(kind=RKIND):: cudtacttime
@@ -193,9 +195,14 @@
convection_select: select case(conv_deep_scheme)
case ("kain_fritsch")
- write(0,*) '--- enter subroutine kf_eta_cps:'
+ if(itimestep == 1) then
+ ktau = itimestep
+ else
+ ktau = itimestep + 1
+ endif
call kf_eta_cps ( &
- dt = dt_dyn , ktau = itimestep , &
+! dt = dt_dyn , ktau = itimestep , &
+ dt = dt_dyn , ktau = ktau , &
areaCell = area_p , cudt = cudt , &
curr_secs = curr_secs , adapt_step_flag = adapt_step_flag , &
rho = rho_p , raincv = raincv_p , &
@@ -224,7 +231,6 @@
ims = ims , ime = ime , jms = jms , jme = jme , kms = kds , kme = kme , &
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
)
- write(0,*) '--- end subroutine kf_eta_cps'
case("tiedtke")
write(0,*) '--- enter subroutine cu_tiedtke:'
@@ -296,24 +302,24 @@
!are reset to zero (note that this is also done in subroutine kf_eta_cps).
nca_p(i,j) = diag_physics % nca % array(i)
- if(nca_p(i,j) .gt. 0.) then
- nca_p(i,j) = nca_p(i,j) - dt_dyn
+! if(nca_p(i,j) .gt. 0.) then
+! nca_p(i,j) = nca_p(i,j) - dt_dyn
- if(nca_p(i,j) .lt. 0.5*dt_dyn) then
- do k = kts,kte
- rthcuten_p(i,k,j) = 0.
- rqvcuten_p(i,k,j) = 0.
- rqccuten_p(i,k,j) = 0.
- rqrcuten_p(i,k,j) = 0.
- rqicuten_p(i,k,j) = 0.
- rqscuten_p(i,k,j) = 0.
- enddo
- raincv_p(i,j) = 0.
- pratec_p(i,j) = 0.
- cubot_p(i,j) = kte+1
- cutop_p(i,j) = kts
- endif
- endif
+! if(nca_p(i,j) .lt. 0.5*dt_dyn) then
+! do k = kts,kte
+! rthcuten_p(i,k,j) = 0.
+! rqvcuten_p(i,k,j) = 0.
+! rqccuten_p(i,k,j) = 0.
+! rqrcuten_p(i,k,j) = 0.
+! rqicuten_p(i,k,j) = 0.
+! rqscuten_p(i,k,j) = 0.
+! enddo
+! raincv_p(i,j) = 0.
+! pratec_p(i,j) = 0.
+! cubot_p(i,j) = kte+1
+! cutop_p(i,j) = kts
+! endif
+! endif
do k = kts,kte
w0avg_p(i,k,j) = diag_physics % w0avg % array(k,i)
@@ -413,9 +419,75 @@
end subroutine convection_to_MPAS
!=============================================================================================
- subroutine update_convection_deep(bucket_rainc,mesh,diag_physics)
+ subroutine update_convection_step1(mesh,diag_physics,tend_physics)
!=============================================================================================
+!input arguments:
+ type(mesh_type),intent(in):: mesh
+!inout arguments:
+ type(diag_physics_type),intent(inout):: diag_physics
+ type(tend_physics_type),intent(inout):: tend_physics
+
+!local variables:
+ integer:: iCell,k
+
+!---------------------------------------------------------------------------------------------
+ write(0,*)
+ write(0,*) '--- enter subroutine update_convection_step1:'
+ write(0,*) 'deep convection:'
+ do iCell = 1,mesh%nCellsSolve
+ if(diag_physics%nca%array(iCell).gt.0. .and. diag_physics%cuprec%array(iCell).gt.0.) &
+ write(0,101) iCell,diag_physics%nca%array(iCell),diag_physics%cuprec%array(iCell)
+ enddo
+ write(0,*) 'shallow convection:'
+ do iCell = 1,mesh%nCellsSolve
+ if(diag_physics%nca%array(iCell).gt.0. .and. diag_physics%cuprec%array(iCell).eq.0.) &
+ write(0,101) iCell,diag_physics%nca%array(iCell),diag_physics%cuprec%array(iCell)
+ enddo
+ 101 format(i8,2(1x,e15.8))
+
+ convection_select: select case(conv_deep_scheme)
+
+ case ("kain_fritsch")
+
+ do iCell = 1, mesh%nCellsSolve
+ !decreases the characteristic time period that convection remains active. When nca_p
+ !becomes less than the convective timestep, convective tendencies and precipitation
+ !are reset to zero (note that this is also done in subroutine kf_eta_cps).
+ if(diag_physics % nca % array(iCell) .gt. 0.) then
+ diag_physics % nca % array(iCell) = diag_physics % nca % array(iCell) - dt_dyn
+
+ if(diag_physics % nca % array(iCell) .lt. 0.5*dt_dyn) then
+ do k = 1, mesh%nVertLevels
+ tend_physics % rthcuten % array(k,iCell) = 0._RKIND
+ tend_physics % rqvcuten % array(k,iCell) = 0._RKIND
+ tend_physics % rqccuten % array(k,iCell) = 0._RKIND
+ tend_physics % rqrcuten % array(k,iCell) = 0._RKIND
+ tend_physics % rqicuten % array(k,iCell) = 0._RKIND
+ tend_physics % rqscuten % array(k,iCell) = 0._RKIND
+ enddo
+ diag_physics % raincv % array(iCell) = 0._RKIND
+ diag_physics % cuprec % array(iCell) = 0._RKIND
+ diag_physics % cubot % array(iCell) = kte+1
+ diag_physics % cutop % array(iCell) = kts
+ endif
+ endif
+ enddo
+
+ case default
+
+ end select convection_select
+ write(0,*) '--- end subroutine update_convection_step1:'
+ do iCell = 1,mesh%nCellsSolve
+ if(diag_physics%nca%array(iCell) .gt. 0.) write(0,101) iCell,diag_physics%nca%array(iCell)
+ enddo
+
+ end subroutine update_convection_step1
+
+!=============================================================================================
+ subroutine update_convection_step2(bucket_rainc,mesh,diag_physics)
+!=============================================================================================
+
!input arguments:
type(mesh_type),intent(in):: mesh
real(kind=RKIND),intent(in):: bucket_rainc
@@ -442,7 +514,7 @@
enddo
- end subroutine update_convection_deep
+ end subroutine update_convection_step2
!=============================================================================================
end module mpas_atmphys_driver_convection_deep
</font>
</pre>