Commit 41ae6e6b authored by Knut's avatar Knut

meteo: calculate heatflux_net

parent 8ddebd81
......@@ -136,6 +136,9 @@
allocate(light(I3DFIELD),stat=rc) ! light advection velocity
if (rc /= 0) stop 'init_3d: Error allocating memory (light)'
allocate(heatflux_net(I2DFIELD),stat=rc) ! net heatflux
if (rc /= 0) stop 'init_3d: Error allocating memory (heatflux_net)'
#endif
#ifdef SPM
......
......@@ -39,6 +39,7 @@
REALTYPE, dimension(:,:,:), allocatable :: alpha,beta
REALTYPE, dimension(:,:,:), allocatable :: idpdx,idpdy
REALTYPE, dimension(:,:,:), allocatable :: rad,light
REALTYPE, dimension(:,:) , allocatable :: heatflux_net
#endif
! suspended matter
......
......@@ -63,6 +63,7 @@
REALTYPE :: idpdx(I3DFIELD)
REALTYPE :: idpdy(I3DFIELD)
REALTYPE :: light(I3DFIELD)
REALTYPE :: heatflux_net(I2DFIELD)
#endif
#ifdef SPM
......
......@@ -18,7 +18,7 @@
! !USES:
use exceptions
use domain, only: imin,jmin,imax,kmax,jmax,H,az,dry_z
use variables_3d, only: T,rad,hn,kmin,A,g1,g2
use variables_3d, only: T,rad,hn,kmin,A,g1,g2,heatflux_net
use meteo, only: metforcing,met_method,nudge_sst,sst,sst_const
use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT
use halo_zones, only: update_3d_halo,wait_halo,D_TAG,H_TAG
......@@ -477,6 +477,7 @@
*(A(i,j)*exp(-zz/g1(i,j))+(1-A(i,j))*exp(-zz/g2(i,j)))
end do
end if
heatflux_net(i,j) = rad1d(kmax) - rad1d(0) + shf_loc
do k=0,kmax
rad1d(k)=rad1d(k)*rho_0_cpi ! note this
end do
......
Markdown is supported
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