Skip to content
Snippets Groups Projects
Commit 75d2bc3b authored by Lucie Bakels's avatar Lucie Bakels
Browse files

Petra: icloudbot and top in integers, conversion factor of 0-1 eta to integers set in com_mod

parent b938e8be
No related branches found
No related tags found
No related merge requests found
......@@ -532,7 +532,7 @@ module com_mod
!LB 04.05.2021, simple timing of IO and total running time
!*********************************************************
real :: s_readwind=0, s_writepartav=0, s_writepart=0, s_temp=0, s_total=0, s_firstt=0
real, parameter :: eta_convert=1000000., zfac=100.
contains
......
......@@ -1267,7 +1267,7 @@ subroutine interpol_rain(itime,kz,yint1,yint2,yint3,ytint,yint4,intiy1,intiy2,ic
implicit none
integer, intent(in) :: kz, icmv, itime
real, intent(out) :: intiy1,intiy2
integer, intent(out) :: intiy1,intiy2
real, intent(out) :: yint1,yint2,yint3,ytint,yint4
integer :: m
integer :: mm
......
......@@ -972,13 +972,13 @@ subroutine verttransform_ecmwf_cloud(lcw_tmp,lcwsum_tmp,nxlim,nylim,&
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: rho_tmp,tt_tmp,qv_tmp
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: uvzlev,wzlev
real,intent(out) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
integer,intent(out) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
integer :: ix,jy
! converted parameters for eta coordinates:
real :: max_cloudthck_eta
real, dimension(2) :: conv_clrange_eta,highconvp_clrange_eta,lowconvp_clrange_eta
integer :: max_cloudthck_eta
integer, dimension(2) :: conv_clrange_eta,highconvp_clrange_eta,lowconvp_clrange_eta
! AT, PS: for v11, we add back the quick fix to interpolate clouds in
! interpol_rain developed by PS for v8 and extend it to using
......@@ -1022,57 +1022,57 @@ subroutine convert_cloud_params(ix,jy,nxlim,nylim,max_cloudthck_eta,conv_clrange
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: uvzlev
! converted parameters for eta coordinates:
real,intent(out) :: max_cloudthck_eta
real, dimension(2),intent(out) :: conv_clrange_eta,highconvp_clrange_eta, &
integer,intent(out) :: max_cloudthck_eta
integer, dimension(2),intent(out) :: conv_clrange_eta,highconvp_clrange_eta, &
lowconvp_clrange_eta
integer :: kz
! Convert cloud parameters to eta coords.
! Reverse sign when using eta (eta:1-0, meter:0-max)
max_cloudthck_eta=uvheight(nz)
conv_clrange_eta=uvheight(nz)
highconvp_clrange_eta=uvheight(nz)
lowconvp_clrange_eta=uvheight(nz)
max_cloudthck_eta=int(uvheight(nz)*eta_convert)
conv_clrange_eta=int(uvheight(nz)*eta_convert)
highconvp_clrange_eta=int(uvheight(nz)*eta_convert)
lowconvp_clrange_eta=int(uvheight(nz)*eta_convert)
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.max_cloudthck) then
max_cloudthck_eta=uvheight(kz)
max_cloudthck_eta=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.conv_clrange(1)) then
conv_clrange_eta(1)=uvheight(kz)
conv_clrange_eta(1)=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.conv_clrange(2)) then
conv_clrange_eta(2)=uvheight(kz)
conv_clrange_eta(2)=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.highconvp_clrange(1)) then
highconvp_clrange_eta(1)=uvheight(kz)
highconvp_clrange_eta(1)=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.highconvp_clrange(2)) then
highconvp_clrange_eta(2)=uvheight(kz)
highconvp_clrange_eta(2)=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.lowconvp_clrange(1)) then
lowconvp_clrange_eta(1)=uvheight(kz)
lowconvp_clrange_eta(1)=int(uvheight(kz)*eta_convert)
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.lowconvp_clrange(2)) then
lowconvp_clrange_eta(2)=uvheight(kz)
lowconvp_clrange_eta(2)=int(uvheight(kz)*eta_convert)
exit
endif
end do
......@@ -1093,7 +1093,7 @@ subroutine identify_cloud(ix,jy,lcw_tmp,lcwsum_tmp,nxlim,nylim, &
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: rho_tmp,tt_tmp,qv_tmp
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: uvzlev,wzlev
real,intent(out) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
integer,intent(out) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
integer :: kz
real :: pressure,rh
......@@ -1123,12 +1123,12 @@ subroutine identify_cloud(ix,jy,lcw_tmp,lcwsum_tmp,nxlim,nylim, &
if (clw .gt. 0.) then ! cloud layer - maybe use threshold?
#ifdef ETA
if (icloudbot_tmp(ix,jy) .eq. icmv) & !cloud bottom set to first cloud instance
icloudbot_tmp(ix,jy) = uvheight(kz)
icloudtop_tmp(ix,jy) = uvheight(kz) !After the loop, icloudtop will be the top
icloudbot_tmp(ix,jy) = int(uvheight(kz)*eta_convert)
icloudtop_tmp(ix,jy) = int(uvheight(kz)*eta_convert) !After the loop, icloudtop will be the top
#else
if (icloudbot_tmp(ix,jy) .eq. icmv) &
icloudbot_tmp(ix,jy) = height(kz)
icloudtop_tmp(ix,jy) = height(kz)
icloudbot_tmp(ix,jy) = (height(kz))
icloudtop_tmp(ix,jy) = (height(kz))
#endif
endif
end do
......@@ -1143,14 +1143,14 @@ subroutine identify_cloud(ix,jy,lcw_tmp,lcwsum_tmp,nxlim,nylim, &
if (rh .ge. rhmin) then
#ifdef ETA
if (icloudbot_tmp(ix,jy) .eq. icmv) then
icloudbot_tmp(ix,jy)=uvheight(kz)
icloudbot_tmp(ix,jy)=int(uvheight(kz)*eta_convert)
endif
icloudtop_tmp(ix,jy)=uvheight(kz)
icloudtop_tmp(ix,jy)=int(uvheight(kz) *eta_convert)
#else
if (icloudbot_tmp(ix,jy) .eq. icmv) then
icloudbot_tmp(ix,jy)=height(kz)
icloudbot_tmp(ix,jy)=(height(kz))
endif
icloudtop_tmp(ix,jy)=height(kz)
icloudtop_tmp(ix,jy)=(height(kz))
#endif
endif
......@@ -1172,12 +1172,12 @@ subroutine apply_cloud_bounds(ix,jy,nxlim,nylim,lsprec_tmp,convprec_tmp,uvzlev,
real,intent(in),dimension(0:nxlim,0:nylim,nzmax) :: uvzlev
! converted parameters for eta coordinates:
real,intent(in) :: max_cloudthck_eta
real,intent(in),dimension(2) :: conv_clrange_eta,highconvp_clrange_eta,lowconvp_clrange_eta
integer,intent(in) :: max_cloudthck_eta
integer,intent(in),dimension(2) :: conv_clrange_eta,highconvp_clrange_eta,lowconvp_clrange_eta
real,intent(inout) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
integer,intent(inout) :: icloudbot_tmp(0:nxlim,0:nylim), icloudtop_tmp(0:nxlim,0:nylim)
real :: icloudtop_old, min_cloudtop
integer :: icloudtop_old, min_cloudtop
integer :: kz
real :: lsp,convp,prec
logical lconvectprec
......@@ -1205,14 +1205,14 @@ subroutine apply_cloud_bounds(ix,jy,nxlim,nylim,lsprec_tmp,convprec_tmp,uvzlev,
! 3) Convert this back to eta coordinates (min_cloudtop(eta))
! 4) Check if our cloudtop is higher (lower eta) than this minimum
do kz=1,nz
if (uvheight(kz).le.icloudbot_tmp(ix,jy)) then
if (int(uvheight(kz)*eta_convert).le.icloudbot_tmp(ix,jy)) then
min_cloudtop = uvzlev(ix,jy,kz)+min_cloudthck ! In meters
exit
endif
end do
do kz=1,nz
if (uvzlev(ix,jy,kz).gt.min_cloudtop) then ! back to eta
min_cloudtop=uvheight(kz)
if (int(uvzlev(ix,jy,kz)).gt.min_cloudtop) then ! back to eta
min_cloudtop=int(uvheight(kz)*eta_convert)
exit
endif
enddo
......
......@@ -269,7 +269,7 @@ subroutine get_wetscav(itime,jpart,ks,gridfract,wetscav)
integer(selected_int_kind(16)), dimension(nspec) :: blc_count, inc_count
integer :: indcloud
real :: icbot,ictop
integer :: icbot,ictop
real :: t_particle, si, cl, cle ! in cloud scavenging
real :: lsp,convp,cc,prec
!save lfr,cfr
......@@ -354,11 +354,11 @@ subroutine get_wetscav(itime,jpart,ks,gridfract,wetscav)
! NOTE this is just for z coordinate
! Reverse sign for eta
#ifdef ETA
if (part(jpart)%zeta .gt. ictop) then
if (part(jpart)%zeta .le. icbot) then
if (part(jpart)%zeta .gt. real(ictop)/eta_convert) then
if (part(jpart)%zeta .le. real(icbot)/eta_convert) then
#else
if (part(jpart)%z .le. ictop) then
if (part(jpart)%z .gt. icbot) then
if (part(jpart)%z .le. real(ictop)) then
if (part(jpart)%z .gt. real(icbot)) then
#endif
indcloud = 2 ! in-cloud
else
......
......@@ -91,7 +91,7 @@ module windfields_mod
ciwch ! original eta level ice [kg/kg] ZHG
real, allocatable,dimension(:,:,:) :: &
ctwc ! ESO: =icloud_stats(:,:,4,:) total cloud water content
real,allocatable,dimension(:,:,:) :: & ! new scavenging AT 2021
integer,allocatable,dimension(:,:,:) :: & ! new scavenging AT 2021
icloudbot, & ! cloud bottom height [m/eta]
icloudtop ! cloud top [m/eta]
......@@ -127,7 +127,7 @@ module windfields_mod
ciwchn ! original eta level ice [kg/kg] ZHG
real,allocatable,dimension(:,:,:,:) :: &
ctwcn ! ESO: =icloud_stats(:,:,4,:) total cloud water content
real,allocatable,dimension(:,:,:,:) :: & ! new scavenging AT 2021
integer,allocatable,dimension(:,:,:,:) :: & ! new scavenging AT 2021
icloudbotn, & ! cloud bottom height [m/eta]
icloudtopn ! cloud thickness [m/eta]
......
Dry: mean abs: 9.21681051e-06 max abs: 2.89734802e-04
Dry ETA: mean abs: 9.21777875e-06 max abs: 2.84630223e-04
Wet: mean abs: 1.65826858e-03 max abs: 2.79553115e-01
Wet ETA: mean abs: 1.64790814e-03 max abs: 2.79977024e-01
Dry: mean abs: 9.34575478e-06 max abs: 3.00163374e-04
Dry ETA: mean abs: 9.31242607e-06 max abs: 2.86252878e-04
Wet: mean abs: 7.71495336e-04 max abs: 1.37401134e-01
Wet ETA: mean abs: 7.66183068e-04 max abs: 1.37400538e-01
lon: mean abs: 1.97740594e+01 max abs: 3.07020264e+01
lon ETA: mean abs: 1.97740094e+01 max abs: 3.07033691e+01
lon_av: mean abs: 1.97848016e+01 max abs: 3.05876732e+01
lon_av: mean abs: 1.97848031e+01 max abs: 3.05876732e+01
lon_av ETA: mean abs: 1.97847625e+01 max abs: 3.05888042e+01
lat: mean abs: 3.48925750e+01 max abs: 5.04721527e+01
lat ETA: mean abs: 3.48925281e+01 max abs: 5.04734192e+01
lat_av: mean abs: 3.49040125e+01 max abs: 5.04243546e+01
lat ETA: mean abs: 3.48925312e+01 max abs: 5.04734192e+01
lat_av: mean abs: 3.49040125e+01 max abs: 5.04243584e+01
lat_av ETA: mean abs: 3.49039750e+01 max abs: 5.04254761e+01
z: mean abs: 4.84618125e+01 max abs: 1.31529022e+02
z ETA: mean abs: 4.85209250e+01 max abs: 1.31316452e+02
z_av: mean abs: 4.86866062e+01 max abs: 1.26583122e+02
z_av ETA: mean abs: 4.87390219e+01 max abs: 1.26399139e+02
pv: mean abs: 2.25662461e+00 max abs: 3.21795273e+01
pv ETA: mean abs: 2.24790391e+00 max abs: 3.22219543e+01
pv_av: mean abs: 2.23525410e+00 max abs: 3.22249832e+01
pv_av ETA: mean abs: 2.22549336e+00 max abs: 3.22536697e+01
qv: mean abs: 3.93889465e-03 max abs: 7.79772317e-03
qv ETA: mean abs: 3.93881683e-03 max abs: 7.79843284e-03
qv_av: mean abs: 3.92801132e-03 max abs: 7.75149744e-03
qv_av ETA: mean abs: 3.92791672e-03 max abs: 7.75184669e-03
z: mean abs: 4.84617813e+01 max abs: 1.31528992e+02
z ETA: mean abs: 4.85208813e+01 max abs: 1.31314911e+02
z_av: mean abs: 4.86865781e+01 max abs: 1.26583099e+02
z_av ETA: mean abs: 4.87389781e+01 max abs: 1.26397697e+02
pv: mean abs: 2.25664551e+00 max abs: 3.21795197e+01
pv ETA: mean abs: 2.24792422e+00 max abs: 3.22219505e+01
pv_av: mean abs: 2.23526914e+00 max abs: 3.22249832e+01
pv_av ETA: mean abs: 2.22550684e+00 max abs: 3.22536697e+01
qv: mean abs: 3.93889465e-03 max abs: 7.79772364e-03
qv ETA: mean abs: 3.93881683e-03 max abs: 7.79843098e-03
qv_av: mean abs: 3.92801170e-03 max abs: 7.75149744e-03
qv_av ETA: mean abs: 3.92791710e-03 max abs: 7.75184203e-03
rho: mean abs: 1.22830205e+00 max abs: 1.35756588e+00
rho ETA: mean abs: 1.22826748e+00 max abs: 1.35788083e+00
rho_av: mean abs: 1.22791484e+00 max abs: 1.35774088e+00
rho_av ETA: mean abs: 1.22787881e+00 max abs: 1.35802841e+00
T: mean abs: 2.77977625e+02 max abs: 2.87984131e+02
rho_av: mean abs: 1.22791484e+00 max abs: 1.35774064e+00
rho_av ETA: mean abs: 1.22787891e+00 max abs: 1.35802817e+00
T: mean abs: 2.77977625e+02 max abs: 2.87984100e+02
T ETA: mean abs: 2.77983450e+02 max abs: 2.87999176e+02
T_av: mean abs: 2.78092275e+02 max abs: 2.87902893e+02
T_av ETA: mean abs: 2.78098300e+02 max abs: 2.87902863e+02
T_av: mean abs: 2.78092275e+02 max abs: 2.87903900e+02
T_av ETA: mean abs: 2.78098275e+02 max abs: 2.87903931e+02
prs: mean abs: 9.81952768e+04 max abs: 1.04051203e+05
prs ETA: mean abs: 9.81946432e+04 max abs: 1.04050172e+05
prs_av: mean abs: 9.82031680e+04 max abs: 1.03865078e+05
prs_av ETA: mean abs: 9.82025088e+04 max abs: 1.03864344e+05
hmix: mean abs: 3.74020600e+02 max abs: 1.81797595e+03
hmix ETA: mean abs: 3.74021400e+02 max abs: 1.81805615e+03
hmix_av: mean abs: 3.72722150e+02 max abs: 1.79257666e+03
hmix_av ETA: mean abs: 3.72722300e+02 max abs: 1.79256348e+03
tro: mean abs: 1.12843584e+04 max abs: 1.57277559e+04
tro ETA: mean abs: 1.12844000e+04 max abs: 1.57281152e+04
prs_av: mean abs: 9.82031680e+04 max abs: 1.03865070e+05
prs_av ETA: mean abs: 9.82025088e+04 max abs: 1.03864328e+05
hmix: mean abs: 3.74020650e+02 max abs: 1.81797595e+03
hmix ETA: mean abs: 3.74021500e+02 max abs: 1.81805627e+03
hmix_av: mean abs: 3.72722200e+02 max abs: 1.79257666e+03
hmix_av ETA: mean abs: 3.72722425e+02 max abs: 1.79256348e+03
tro: mean abs: 1.12843584e+04 max abs: 1.57277539e+04
tro ETA: mean abs: 1.12843984e+04 max abs: 1.57281152e+04
tro_av: mean abs: 1.12753376e+04 max abs: 1.57058320e+04
tro_av ETA: mean abs: 1.12753728e+04 max abs: 1.57061426e+04
to: mean abs: 3.23780175e+02 max abs: 1.12426550e+03
to ETA: mean abs: 3.23776725e+02 max abs: 1.12414734e+03
to_av: mean abs: 3.23853525e+02 max abs: 1.11385352e+03
to_av ETA: mean abs: 3.23850750e+02 max abs: 1.11391516e+03
m001: mean abs: 9.86326694e-05 max abs: 9.99999975e-05
m001 ETA: mean abs: 9.86040950e-05 max abs: 9.99999975e-05
m_av001: mean abs: 9.89405155e-05 max abs: 9.99999975e-05
m_av001 ETA: mean abs: 9.89151716e-05 max abs: 9.99999975e-05
u: mean abs: 2.09955117e+00 max abs: 7.07874727e+00
u ETA: mean abs: 2.10246621e+00 max abs: 7.08937645e+00
u_av: mean abs: 2.10358008e+00 max abs: 7.12824774e+00
u_av ETA: mean abs: 2.10650977e+00 max abs: 7.13932705e+00
v: mean abs: 3.02053320e+00 max abs: 1.11122808e+01
v ETA: mean abs: 3.02394824e+00 max abs: 1.11222582e+01
v_av: mean abs: 3.05966055e+00 max abs: 1.12192631e+01
v_av ETA: mean abs: 3.06319102e+00 max abs: 1.12289562e+01
w: mean abs: 2.97906423e-04 max abs: 3.80160334e-03
w ETA: mean abs: 2.97123837e-04 max abs: 3.79444822e-03
w_av: mean abs: 2.96450257e-04 max abs: 3.69339995e-03
w_av ETA: mean abs: 2.96099424e-04 max abs: 3.68712889e-03
vset: mean abs: 3.56950760e-05 max abs: 3.88669978e-05
vset ETA: mean abs: 3.56949538e-05 max abs: 3.88667650e-05
vset_av: mean abs: 3.56949955e-05 max abs: 3.88597291e-05
vset_av ETA: mean abs: 3.56948853e-05 max abs: 3.88595181e-05
wetdepo001: mean abs: 6.09834818e-07 max abs: 2.30988608e-05
wetdepo001 ETA: mean abs: 6.38959650e-07 max abs: 2.30990718e-05
drydepo001: mean abs: 7.57480366e-07 max abs: 4.87260877e-06
drydepo001 ETA: mean abs: 7.56929256e-07 max abs: 4.87258103e-06
Concentrations: mean abs: 4.52137883e-05 max abs: 3.61566036e-03
Concentrations ETA: mean abs: 4.52048342e-05 max abs: 3.61566106e-03
WET deposition: mean abs: 7.88419117e-05 max abs: 2.12080628e-02
WET deposition ETA: mean abs: 8.39153350e-05 max abs: 2.46815812e-02
DRY deposition: mean abs: 9.21872407e-05 max abs: 2.45532882e-03
DRY deposition ETA: mean abs: 9.21631183e-05 max abs: 2.44458020e-03
tro_av ETA: mean abs: 1.12753728e+04 max abs: 1.57061416e+04
to: mean abs: 3.23780200e+02 max abs: 1.12426550e+03
to ETA: mean abs: 3.23776725e+02 max abs: 1.12415088e+03
to_av: mean abs: 3.23853500e+02 max abs: 1.11385352e+03
to_av ETA: mean abs: 3.23850750e+02 max abs: 1.11391602e+03
m001: mean abs: 9.87321079e-05 max abs: 9.99999975e-05
m001 ETA: mean abs: 9.86580849e-05 max abs: 9.99999975e-05
m_av001: mean abs: 9.90111351e-05 max abs: 9.99999975e-05
m_av001 ETA: mean abs: 9.89460289e-05 max abs: 9.99999975e-05
u: mean abs: 2.09955020e+00 max abs: 7.07874107e+00
u ETA: mean abs: 2.10246445e+00 max abs: 7.08939075e+00
u_av: mean abs: 2.10357930e+00 max abs: 7.12824345e+00
u_av ETA: mean abs: 2.10650801e+00 max abs: 7.13930893e+00
v: mean abs: 3.02053164e+00 max abs: 1.11122770e+01
v ETA: mean abs: 3.02394648e+00 max abs: 1.11222630e+01
v_av: mean abs: 3.05965898e+00 max abs: 1.12192640e+01
v_av ETA: mean abs: 3.06318945e+00 max abs: 1.12289639e+01
w: mean abs: 2.97905493e-04 max abs: 3.80159984e-03
w ETA: mean abs: 2.97119617e-04 max abs: 3.79439490e-03
w_av: mean abs: 2.96449280e-04 max abs: 3.69339623e-03
w_av ETA: mean abs: 2.96115828e-04 max abs: 3.68707534e-03
vset: mean abs: 3.55857462e-05 max abs: 3.88669905e-05
vset ETA: mean abs: 3.55858743e-05 max abs: 3.88668086e-05
vset_av: mean abs: 3.55930209e-05 max abs: 3.88597255e-05
vset_av ETA: mean abs: 3.55931044e-05 max abs: 3.88595618e-05
wetdepo001: mean abs: 4.97677177e-07 max abs: 3.10084833e-05
wetdepo001 ETA: mean abs: 5.72570320e-07 max abs: 3.10087562e-05
drydepo001: mean abs: 7.70202093e-07 max abs: 4.90112552e-06
drydepo001 ETA: mean abs: 7.69326324e-07 max abs: 4.90110233e-06
Concentrations: mean abs: 4.52316050e-05 max abs: 3.61591275e-03
Concentrations ETA: mean abs: 4.52076445e-05 max abs: 3.61591345e-03
WET deposition: mean abs: 6.56905919e-05 max abs: 2.21248250e-02
WET deposition ETA: mean abs: 7.84755508e-05 max abs: 3.06908134e-02
DRY deposition: mean abs: 9.38503127e-05 max abs: 2.49430700e-03
DRY deposition ETA: mean abs: 9.37944732e-05 max abs: 2.47154129e-03
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment