Commit d1c1d75c authored by Knut's avatar Knut
Browse files

fixed mean numdis output

parent 3397478b
......@@ -20,8 +20,8 @@
use variables_3d, only: S,T
use variables_3d, only: nummix3d_S,nummix2d_S,nummix3d_T,nummix2d_T
use variables_3d, only: phymix3d_S,phymix2d_S,phymix3d_T,phymix2d_T
use variables_3d, only: numdis3d,numdis2d
#endif
use variables_3d, only: numdis3d,numdis2d
#ifdef GETM_BIO
use bio, only: bio_calc
use bio_var, only: numc
......@@ -92,6 +92,7 @@
allocate(Smean(I3DFIELD),stat=rc)
if (rc /= 0) &
stop 'calc_mean_fields.F90: Error allocating memory (Smean)'
#endif
if (do_numerical_analyses) then
allocate(numdis3d_mean(I3DFIELD),stat=rc)
......@@ -129,7 +130,6 @@
stop 'calc_mean_fields.F90: Error allocating memory (nummix2d_S_mean)'
end if
end if
#endif
#ifdef GETM_BIO
allocate(cc3dmean(numc,I3DFIELD),stat=rc)
if (rc /= 0) &
......@@ -162,6 +162,7 @@
humean=_ZERO_; hvmean=_ZERO_; hmean=_ZERO_
#ifndef NO_BAROCLINIC
Tmean=_ZERO_; Smean=_ZERO_
#endif
if (do_numerical_analyses) then
numdis3d_mean=_ZERO_; numdis2d_mean=_ZERO_
if (calc_temp) then
......@@ -173,7 +174,6 @@
phymix3d_S_mean=_ZERO_; phymix2d_S_mean=_ZERO_
end if
end if
#endif
#ifdef GETM_BIO
cc3dmean=_ZERO_
#endif
......@@ -218,9 +218,11 @@
#ifndef NO_BAROCLINIC
Tmean = Tmean + T
Smean = Smean + S
#endif
if (do_numerical_analyses) then
numdis3d_mean = numdis3d_mean + numdis3d
numdis2d_mean = numdis2d_mean + numdis2d
#ifndef NO_BAROCLINIC
if (calc_temp) then
nummix3d_T_mean = nummix3d_T_mean + nummix3d_T
nummix2d_T_mean = nummix2d_T_mean + nummix2d_T
......@@ -233,8 +235,8 @@
phymix3d_S_mean = phymix3d_S_mean + phymix3d_S
phymix2d_S_mean = phymix2d_S_mean + phymix2d_S
end if
end if
#endif
end if
#ifdef GETM_BIO
if (bio_calc) cc3dmean=cc3dmean + cc3d
#endif
......@@ -264,9 +266,11 @@
#ifndef NO_BAROCLINIC
Tmean = Tmean / step
Smean = Smean / step
#endif
if (do_numerical_analyses) then
numdis3d_mean = numdis3d_mean / step
numdis2d_mean = numdis2d_mean / step
#ifndef NO_BAROCLINIC
if (calc_temp) then
nummix3d_T_mean = nummix3d_T_mean / step
nummix2d_T_mean = nummix2d_T_mean / step
......@@ -279,8 +283,8 @@
phymix3d_S_mean = phymix3d_S_mean / step
phymix2d_S_mean = phymix2d_S_mean / step
end if
end if
#endif
end if
#ifdef GETM_BIO
if (bio_calc) cc3dmean = cc3dmean / step
#endif
......
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