Commit 187be914 authored by Espen Sollum's avatar Espen Sollum
Browse files

Minor changes

parent 964f28f5
......@@ -17,10 +17,10 @@ LIBPATH = /usr/lib/
LNK = -o
CMPL = -c
LIBS = -lnetcdf -lnetcdff $(NCOPT)
FFLAGS = -O2 -g -m64 -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -ffree-form \
-fbacktrace $(NCOPT)
#FFLAGS = -O2 -cpp -fconvert=little-endian -frecord-marker=4 -ffree-form -mcmodel=medium \
#FFLAGS = -O2 -g -m64 -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -ffree-form \
# -fbacktrace $(NCOPT)
FFLAGS = -O0 -g -cpp -fconvert=little-endian -frecord-marker=4 -ffree-form -mcmodel=medium \
-fbacktrace -fcheck=all -fsignaling-nans $(NCOPT)
LDFLAGS = $(FFLAGS) -L$(LIBPATH) -I$(INCPATH) $(LIBS)
MAIN = flexpartnoresm
......
......@@ -972,8 +972,6 @@ subroutine concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridto
end do
end do
! print*,gridtotal,maxpointspec_act
!*******************************************************************
! Generate output: may be in concentration (ng/m3) or in mixing
! ratio (ppt) or both
......@@ -1000,11 +998,12 @@ subroutine concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridto
(/ 1,1,tpointer,kp,nage /), (/ numxgrid,numygrid,1,1,1 /)))
endif
! Concentrations
! Concentrations
call nf90_err(nf90_put_var(ncid,specID(ks),grid(0:numxgrid-1,0:numygrid-1,&
1:numzgrid)*factor3d(0:numxgrid-1,0:numygrid-1,1:numzgrid)/tot_mu(ks,kp),&
1:numzgrid)*factor3d(0:numxgrid-1,0:numygrid-1,1:numzgrid)/tot_mu(ks,kp),&
(/ 1,1,1,tpointer,kp,nage /), (/ numxgrid,numygrid,numzgrid,1,1,1 /) ))
endif ! concentration output
! Mixing ratio output
......@@ -1041,6 +1040,8 @@ subroutine concoutput_netcdf(itime,outnum,gridtotalunc,wetgridtotalunc,drygridto
end do
! Close netCDF file
!**************************
call nf90_err(nf90_close(ncid))
......
......@@ -207,7 +207,7 @@ module par_mod
!**************************************
!integer,parameter :: maxageclass=1,maxzgrid=10,nclassunc=1
integer,parameter :: maxageclass=9,nclassunc=1
integer,parameter :: maxageclass=1,nclassunc=1
! nclassunc number of classes used to calculate the uncertainty
! of the output
......@@ -230,7 +230,7 @@ module par_mod
!**************************************************
integer,parameter :: maxpart=20000000
integer,parameter :: maxspec=4
integer,parameter :: maxspec=2
real,parameter :: minmass=0.0001
......
......@@ -501,69 +501,69 @@
if (varname.eq.'U') then
do kz=1,nuvz-1 !recall that there is an augmented surface layer where U10 will be stored
uuh(:,:,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
uuh(0:nxfield-1,0:nymin1,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
end do
else if (varname.eq.'V') then
do kz=1,nuvz-1 !recall taht there is an augmented surface layer where V10 will be stored
vvh(:,:,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
vvh(0:nxfield-1,0:nymin1,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
end do
else if (varname.eq.'OMEGA') then
do kz=1,nuvz-1 !recall that there is an augmented surface layer where W must be defined
wwh(:,:,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
wwh(0:nxfield-1,0:nymin1,nuvz+1-kz)=dumarray4D_real(:,:,kz,1)
end do
else if (varname.eq.'T') then
do kz=1,nuvz-1 !recall that there is an augmented surface layer where T must be defined
tth(:,:,nuvz+1-kz,n)=dumarray4D_real(:,:,kz,1)
tth(0:nxfield-1,0:nymin1,nuvz+1-kz,n)=dumarray4D_real(:,:,kz,1)
end do
else if (varname.eq.'Q') then
do kz=1,nuvz-1 !recall that there is an augmented surface layer where Q must be defined
qvh(:,:,nuvz+1-kz,n)=dumarray4D_real(:,:,kz,1)
qvh(0:nxfield-1,0:nymin1,nuvz+1-kz,n)=dumarray4D_real(:,:,kz,1)
! if (qvh(ix,jy,nuvz+1-kz,n) < 0.0) qvh(ix,jy,nuvz+1-kz,n) = 0.0
end do
where (qvh(:,:,:,n) < 0.0) qvh(:,:,:,n)=0.
where (qvh(0:nxfield-1,0:nymin1,:,n) < 0.0) qvh(0:nxfield-1,0:nymin1,:,n)=0.
else if (varname.eq.'PS') then
! ps(:,:,1,n)=dumarray3D_real(:,:,itime)
ps(:,:,1,n)=dumarray3D_real_nt(:,:,1)
ps(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)
else if (varname.eq.'CLDTOT') then
!tcc(:,:,1,n)=dumarray3D_real(:,:,itime)
tcc(:,:,1,n)=dumarray3D_real_nt(:,:,1)
tcc(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)
else if (varname.eq.'TREFHT') then
! tt2(:,:,1,n)=dumarray3D_real(:,:,itime)
tt2(:,:,1,n)=dumarray3D_real_nt(:,:,1)
tt2(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)
else if (varname.eq.'PRECL') then
! lsprec(:,:,1,n)=dumarray3D_real(:,:,itime)* &
lsprec(:,:,1,n)=dumarray3D_real_nt(:,:,1)* &
lsprec(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)* &
3600.*1000. !convet from m/s to mm/hour this must be controlled and eventually replaced with cumulated values
else if (varname.eq.'PRECC') then
! convprec(:,:,1,n)=dumarray3D_real(:,:,itime)* &
convprec(:,:,1,n)=dumarray3D_real_nt(:,:,1)* &
convprec(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)* &
3600.*1000. !convet from m/s to mm/hour
else if (varname.eq.'SHFLX') then
sshf(:,:,1,n)=-dumarray3D_real_nt(:,:,1)
sshf(0:nxfield-1,0:nymin1,1,n)=-dumarray3D_real_nt(:,:,1)
!sshf(:,:,1,n)=-dumarray3D_real(:,:,itime) ! note the minus sign here because FLEXPART assume positive FLUX downward like ECMWF: see e.g.http://tigge.ecmwf.int/tigge/d/show_object/table=parameters/name=time_integrated_surface_sensible_heat_flux/levtype=sfc/
hflswitch=.true. ! Heat flux available
else if (varname.eq.'TAUX') then
! ewss(:,:)=dumarray3D_real(:,:,itime)
ewss(:,:)=dumarray3D_real_nt(:,:,1)
ewss(0:nxfield-1,0:nymin1)=dumarray3D_real_nt(:,:,1)
strswitch=.true. ! put this to true if stress are avilable
else if (varname.eq.'TAUY') then
! nsss(:,:)=dumarray3D_real(:,:,itime)
nsss(:,:)=dumarray3D_real_nt(:,:,1)
nsss(0:nxfield-1,0:nymin1)=dumarray3D_real_nt(:,:,1)
else if (varname.eq.'U10') then ! in NORESM U10 contain sped not component so it is partitioned using ground stresses, see below
if (strswitch) then
! u10(:,:,1,n)=dumarray3D_real(:,:,itime)* ewss(:,:)/ &
! sqrt(ewss(:,:)**2+nsss(:,:)**2)
! v10(:,:,1,n)=dumarray3D_real(:,:,itime)* nsss(:,:)/ &
! sqrt(ewss(:,:)**2+nsss(:,:)**2)
u10(:,:,1,n)=dumarray3D_real_nt(:,:,1)* ewss(:,:)/ &
sqrt(ewss(:,:)**2+nsss(:,:)**2)
v10(:,:,1,n)=dumarray3D_real_nt(:,:,1)* nsss(:,:)/ &
sqrt(ewss(:,:)**2+nsss(:,:)**2)
u10(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)* ewss(0:nxfield-1,0:nymin1)/ &
sqrt(ewss(0:nxfield-1,0:nymin1)**2+nsss(0:nxfield-1,0:nymin1)**2)
v10(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)* nsss(0:nxfield-1,0:nymin1)/ &
sqrt(ewss(0:nxfield-1,0:nymin1)**2+nsss(0:nxfield-1,0:nymin1)**2)
else
! u10(:,:,1,n)=dumarray3D_real(:,:,itime) ! if stress not available then see below
! v10(:,:,1,n)=dumarray3D_real(:,:,itime)
u10(:,:,1,n)=dumarray3D_real_nt(:,:,1) ! if stress not available then see below
v10(:,:,1,n)=dumarray3D_real_nt(:,:,1)
u10(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1) ! if stress not available then see below
v10(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)
end if
else if (varname.eq.'QREFHT') then !
do jy=0,nymin1
......@@ -574,15 +574,15 @@
end do
end do
! qv2(:,:,1,n)=dumarray3D_real(:,:,itime)
qv2(:,:,1,n)=dumarray3D_real_nt(:,:,1)
qv2(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1)
!else if (varname.eq.'SOLARRADIATION') then !
! ssr(:,:,1,n)=
else if (varname.eq.'SNOWHLND') then
!sd(:,:,1,n)=dumarray3D_real(:,:,itime) !m of water equivalent
sd(:,:,1,n)=dumarray3D_real_nt(:,:,1) !m of water equivalent
sd(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1) !m of water equivalent
else if (varname.eq.'FSDS') then
! ssr(:,:,1,n)=dumarray3D_real(:,:,itime) !downwelling solar radition flux in w/m^2
ssr(:,:,1,n)=dumarray3D_real_nt(:,:,1) !downwelling solar radition flux in w/m^2
ssr(0:nxfield-1,0:nymin1,1,n)=dumarray3D_real_nt(:,:,1) !downwelling solar radition flux in w/m^2
end if
! end do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment