Skip to content
Snippets Groups Projects
Commit a068ce00 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 30/06/2020: remove non-local corrections in resolved_cloud

parent 97467602
No related branches found
No related tags found
No related merge requests found
...@@ -275,6 +275,7 @@ END MODULE MODI_RESOLVED_CLOUD ...@@ -275,6 +275,7 @@ END MODULE MODI_RESOLVED_CLOUD
! P. Wautelet + Benoit Vié 06/2020: improve removal of negative scalar variables + adapt the corresponding budgets ! P. Wautelet + Benoit Vié 06/2020: improve removal of negative scalar variables + adapt the corresponding budgets
! P. Wautelet 23/06/2020: remove ZSVS and ZSVT to improve code readability ! P. Wautelet 23/06/2020: remove ZSVS and ZSVT to improve code readability
! P. Wautelet 30/06/2020: move removal of negative scalar variables to Sources_neg_correct ! P. Wautelet 30/06/2020: move removal of negative scalar variables to Sources_neg_correct
! P. Wautelet 30/06/2020: remove non-local corrections
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
...@@ -576,38 +577,38 @@ ENDIF ...@@ -576,38 +577,38 @@ ENDIF
! !
!* 3.1 Non local correction for precipitating species (Rood 87) !* 3.1 Non local correction for precipitating species (Rood 87)
! !
IF ( HCLOUD == 'KESS' & ! IF ( HCLOUD == 'KESS' &
.OR. HCLOUD == 'ICE3' .OR. HCLOUD == 'ICE4' & ! .OR. HCLOUD == 'ICE3' .OR. HCLOUD == 'ICE4' &
.OR. HCLOUD == 'C2R2' .OR. HCLOUD == 'C3R5' & ! .OR. HCLOUD == 'C2R2' .OR. HCLOUD == 'C3R5' &
.OR. HCLOUD == 'KHKO' .OR. HCLOUD == 'LIMA' ) THEN ! .OR. HCLOUD == 'KHKO' .OR. HCLOUD == 'LIMA' ) THEN
! ! !
DO JRR = 3,KRR ! DO JRR = 3,KRR
SELECT CASE (JRR) ! SELECT CASE (JRR)
CASE(3,5,6,7) ! rain, snow, graupel and hail ! CASE(3,5,6,7) ! rain, snow, graupel and hail
!
IF ( MIN_ll( PRS(:,:,:,JRR), IINFO_ll) < 0.0 ) THEN ! IF ( MIN_ll( PRS(:,:,:,JRR), IINFO_ll) < 0.0 ) THEN
! ! !
! compute the total water mass computation ! ! compute the total water mass computation
! ! !
ZMASSTOT = MAX( 0. , SUM3D_ll( PRS(:,:,:,JRR), IINFO_ll ) ) ! ZMASSTOT = MAX( 0. , SUM3D_ll( PRS(:,:,:,JRR), IINFO_ll ) )
! ! !
! remove the negative values ! ! remove the negative values
! ! !
PRS(:,:,:,JRR) = MAX( 0., PRS(:,:,:,JRR) ) ! PRS(:,:,:,JRR) = MAX( 0., PRS(:,:,:,JRR) )
! ! !
! compute the new total mass ! ! compute the new total mass
! ! !
ZMASSPOS = MAX(XMNH_TINY,SUM3D_ll( PRS(:,:,:,JRR), IINFO_ll ) ) ! ZMASSPOS = MAX(XMNH_TINY,SUM3D_ll( PRS(:,:,:,JRR), IINFO_ll ) )
! ! !
! correct again in such a way to conserve the total mass ! ! correct again in such a way to conserve the total mass
! ! !
ZRATIO = ZMASSTOT / ZMASSPOS ! ZRATIO = ZMASSTOT / ZMASSPOS
PRS(:,:,:,JRR) = PRS(:,:,:,JRR) * ZRATIO ! PRS(:,:,:,JRR) = PRS(:,:,:,JRR) * ZRATIO
! ! !
END IF ! END IF
END SELECT ! END SELECT
END DO ! END DO
END IF ! END IF
! !
!* 3.2 Adjustement for liquid and solid cloud !* 3.2 Adjustement for liquid and solid cloud
! !
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
!----------------------------------------------------------------- !-----------------------------------------------------------------
! Author: P. Wautelet 25/06/2020 (deduplication of code from advection_metsv, resolved_cloud and turb) ! Author: P. Wautelet 25/06/2020 (deduplication of code from advection_metsv, resolved_cloud and turb)
! Modifications: ! Modifications:
! ! P. Wautelet 30/06/2020: remove non-local corrections in resolved_cloud for NEGA => new local corrections here
!----------------------------------------------------------------- !-----------------------------------------------------------------
module mode_sources_neg_correct module mode_sources_neg_correct
...@@ -71,11 +71,7 @@ deallocate( zt ) ...@@ -71,11 +71,7 @@ deallocate( zt )
CLOUD: select case ( hcloud ) CLOUD: select case ( hcloud )
case ( 'KESS' ) case ( 'KESS' )
if ( hbudname == 'NEGA' ) then jrmax = Size( prrs, 4 )
jrmax = 2
else
jrmax = Size( prrs, 4 )
end if
do jr = 2, jrmax do jr = 2, jrmax
where ( prrs(:, :, :, jr) < 0. ) where ( prrs(:, :, :, jr) < 0. )
prrs(:, :, :, 1) = prrs(:, :, :, 1) + prrs(:, :, :, jr) prrs(:, :, :, 1) = prrs(:, :, :, 1) + prrs(:, :, :, jr)
...@@ -94,7 +90,7 @@ CLOUD: select case ( hcloud ) ...@@ -94,7 +90,7 @@ CLOUD: select case ( hcloud )
case( 'ICE3', 'ICE4' ) case( 'ICE3', 'ICE4' )
if ( hbudname == 'NETUR' .or. hbudname == 'NEGA' ) then if ( hbudname == 'NETUR' ) then
jrmax = 4 jrmax = 4
else else
jrmax = Size( prrs, 4 ) jrmax = Size( prrs, 4 )
...@@ -109,7 +105,7 @@ CLOUD: select case ( hcloud ) ...@@ -109,7 +105,7 @@ CLOUD: select case ( hcloud )
end do end do
! !
! cloud ! cloud
if ( hbudname == 'NETUR' .or. hbudname == 'NEGA' ) then if ( hbudname == 'NETUR' ) then
jrmax = 2 jrmax = 2
else else
jrmax = 3 jrmax = 3
...@@ -203,7 +199,7 @@ CLOUD: select case ( hcloud ) ...@@ -203,7 +199,7 @@ CLOUD: select case ( hcloud )
prrs(:, :, :, 4) = 0. prrs(:, :, :, 4) = 0.
prsvs(:, :, :, nsv_lima_ni) = 0. prsvs(:, :, :, nsv_lima_ni) = 0.
end where end where
if ( hbudname /= 'NETUR' .and. hbudname /= 'NEGA' ) then if ( hbudname /= 'NETUR' ) then
do jr = 5, Size( prrs, 4 ) do jr = 5, Size( prrs, 4 )
where ( prrs(:, :, :, jr) < 0. ) where ( prrs(:, :, :, jr) < 0. )
prrs(:, :, :, 1) = prrs(:, :, :, 1) + prrs(:, :, :, jr) prrs(:, :, :, 1) = prrs(:, :, :, 1) + prrs(:, :, :, jr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment