Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
getm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knut Klingbeil
getm
Commits
83a4d644
Commit
83a4d644
authored
Jul 19, 2012
by
Knut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed allocation and output of save_numerical_analyses variables
parent
d1c1d75c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
68 deletions
+60
-68
src/3d/dynamic_allocations_3d.h
src/3d/dynamic_allocations_3d.h
+0
-31
src/3d/dynamic_declarations_3d.h
src/3d/dynamic_declarations_3d.h
+0
-6
src/3d/m3d.F90
src/3d/m3d.F90
+42
-1
src/3d/static_3d.h
src/3d/static_3d.h
+0
-11
src/3d/variables_3d.F90
src/3d/variables_3d.F90
+7
-3
src/ncdf/init_3d_ncdf.F90
src/ncdf/init_3d_ncdf.F90
+2
-2
src/ncdf/init_mean_ncdf.F90
src/ncdf/init_mean_ncdf.F90
+2
-2
src/ncdf/save_3d_ncdf.F90
src/ncdf/save_3d_ncdf.F90
+3
-3
src/ncdf/save_mean_ncdf.F90
src/ncdf/save_mean_ncdf.F90
+3
-4
src/output/calc_mean_fields.F90
src/output/calc_mean_fields.F90
+1
-5
No files found.
src/3d/dynamic_allocations_3d.h
View file @
83a4d644
...
...
@@ -133,39 +133,8 @@
allocate
(
light
(
I3DFIELD
),
stat
=
rc
)
!
light
advection
velocity
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
light
)
'
allocate
(
nummix3d_S
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
nummix3d_S
)
'
allocate
(
nummix2d_S
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
nummix2d_S
)
'
allocate
(
nummix3d_T
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
nummix3d_T
)
'
allocate
(
nummix2d_T
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
nummix2d_T
)
'
allocate
(
phymix3d_S
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
phymix3d_S
)
'
allocate
(
phymix2d_S
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
phymix2d_S
)
'
allocate
(
phymix3d_T
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
phymix3d_T
)
'
allocate
(
phymix2d_T
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
phymix2d_T
)
'
#endif
allocate
(
numdis3d
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
numdis3d
)
'
allocate
(
numdis2d
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
numdis2d
)
'
#ifdef SPM
allocate
(
spm
(
I3DFIELD
),
stat
=
rc
)
!
Suspended
particulate
matter
if
(
rc
/=
0
)
stop
'
init_3d
:
Error
allocating
memory
(
spm
)
'
...
...
src/3d/dynamic_declarations_3d.h
View file @
83a4d644
...
...
@@ -39,13 +39,7 @@
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
alpha
,
beta
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
idpdx
,
idpdy
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
rad
,
light
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
nummix3d_S
,
nummix3d_T
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
phymix3d_S
,
phymix3d_T
REALTYPE
,
dimension
(
:
,
:
),
allocatable
::
nummix2d_S
,
nummix2d_T
REALTYPE
,
dimension
(
:
,
:
),
allocatable
::
phymix2d_S
,
phymix2d_T
#endif
REALTYPE
,
dimension
(
:
,
:
,
:
),
allocatable
::
numdis3d
REALTYPE
,
dimension
(
:
,
:
),
allocatable
::
numdis2d
!
suspended
matter
#ifndef NO_SUSP_MATTER
...
...
src/3d/m3d.F90
View file @
83a4d644
...
...
@@ -294,7 +294,7 @@
! of a hotstart file.
!
! !LOCAL VARIABLES:
integer
::
i
,
j
integer
::
i
,
j
,
rc
!EOP
!-------------------------------------------------------------------------
!BOC
...
...
@@ -306,6 +306,47 @@
LEVEL1
'postinit_3d'
if
(
do_numerical_analyses
)
then
allocate
(
numdis3d
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (numdis3d)'
numdis3d
=
_
ZERO_
allocate
(
numdis2d
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (numdis2d)'
numdis2d
=
_
ZERO_
if
(
calc_temp
)
then
allocate
(
phymix3d_T
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (phymix3d_T)'
phymix3d_T
=
_
ZERO_
allocate
(
phymix2d_T
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (phymix2d_T)'
phymix2d_T
=
_
ZERO_
allocate
(
nummix3d_T
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (nummix3d_T)'
nummix3d_T
=
_
ZERO_
allocate
(
nummix2d_T
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (nummix2d_T)'
nummix2d_T
=
_
ZERO_
end
if
if
(
calc_salt
)
then
allocate
(
phymix3d_S
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (phymix3d_S)'
phymix3d_S
=
_
ZERO_
allocate
(
phymix2d_S
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (phymix2d_S)'
phymix2d_S
=
_
ZERO_
allocate
(
nummix3d_S
(
I3DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (nummix3d_S)'
nummix3d_S
=
_
ZERO_
allocate
(
nummix2d_S
(
I2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
stop
'postinit_3d: Error allocating memory (nummix2d_S)'
nummix2d_S
=
_
ZERO_
end
if
end
if
! Hotstart fix - see postinit_2d
if
(
hotstart
)
then
...
...
src/3d/static_3d.h
View file @
83a4d644
...
...
@@ -65,18 +65,7 @@
REALTYPE
::
idpdx
(
I3DFIELD
)
REALTYPE
::
idpdy
(
I3DFIELD
)
REALTYPE
::
light
(
I3DFIELD
)
REALTYPE
::
nummix3d_S
(
I3DFIELD
)
REALTYPE
::
nummix2d_S
(
I2DFIELD
)
REALTYPE
::
nummix3d_T
(
I3DFIELD
)
REALTYPE
::
nummix2d_T
(
I2DFIELD
)
REALTYPE
::
phymix3d_S
(
I3DFIELD
)
REALTYPE
::
phymix2d_S
(
I2DFIELD
)
REALTYPE
::
phymix3d_T
(
I3DFIELD
)
REALTYPE
::
phymix2d_T
(
I2DFIELD
)
#endif
REALTYPE
::
numdis3d
(
I3DFIELD
)
REALTYPE
::
numdis2d
(
I2DFIELD
)
#ifdef SPM
!
suspended
matter
...
...
src/3d/variables_3d.F90
View file @
83a4d644
...
...
@@ -125,6 +125,13 @@
#include "dynamic_declarations_3d.h"
#endif
REALTYPE
,
dimension
(:,:,:),
allocatable
::
numdis3d
REALTYPE
,
dimension
(:,:),
allocatable
::
numdis2d
REALTYPE
,
dimension
(:,:,:),
allocatable
::
nummix3d_S
,
nummix3d_T
REALTYPE
,
dimension
(:,:,:),
allocatable
::
phymix3d_S
,
phymix3d_T
REALTYPE
,
dimension
(:,:),
allocatable
::
nummix2d_S
,
nummix2d_T
REALTYPE
,
dimension
(:,:),
allocatable
::
phymix2d_S
,
phymix2d_T
#ifdef GETM_BIO
REALTYPE
,
allocatable
::
cc3d
(:,:,:,:)
REALTYPE
,
allocatable
::
ws3d
(:,:,:,:)
...
...
@@ -204,10 +211,7 @@
light
=
_
ONE_
idpdx
=
_
ZERO_
idpdy
=
_
ZERO_
nummix3d_S
=
_
ZERO_
;
nummix2d_S
=
_
ZERO_
nummix3d_T
=
_
ZERO_
;
nummix2d_T
=
_
ZERO_
#endif
numdis3d
=
_
ZERO_
;
numdis2d
=
_
ZERO_
#ifdef DEBUG
write
(
debug
,
*
)
'Leaving init_variables_3d()'
...
...
src/ncdf/init_3d_ncdf.F90
View file @
83a4d644
...
...
@@ -402,6 +402,7 @@
end
if
if
(
save_numerical_analyses
)
then
fv
=
nummix_missing
mv
=
nummix_missing
vr
(
1
)
=
-100.0
...
...
@@ -413,7 +414,6 @@
units
=
'W/kg'
,&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
#ifndef NO_BAROCLINIC
if
(
calc_salt
)
then
err
=
nf90_def_var
(
ncid
,
'nummix3d_S'
,
NCDF_FLOAT_PRECISION
,
f4_dims
,
nm3dS_id
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
...
...
@@ -445,7 +445,7 @@
units
=
'degC**2/s'
,&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
end
if
#endif
end
if
#ifdef SPM
if
(
spm_save
)
then
...
...
src/ncdf/init_mean_ncdf.F90
View file @
83a4d644
...
...
@@ -171,6 +171,7 @@
#endif
if
(
save_numerical_analyses
)
then
fv
=
nummix_missing
mv
=
nummix_missing
vr
(
1
)
=
-100.0
...
...
@@ -189,7 +190,6 @@
units
=
'Wm/kg'
,&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
#ifndef NO_BAROCLINIC
if
(
calc_salt
)
then
err
=
nf90_def_var
(
ncid
,
'nummix3d_S'
,
NCDF_FLOAT_PRECISION
,
f4_dims
,
nm3dS_id
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
...
...
@@ -249,7 +249,7 @@
units
=
'degC**2 m/s'
,&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
end
if
#endif
end
if
#ifdef GETM_BIO
...
...
src/ncdf/save_3d_ncdf.F90
View file @
83a4d644
...
...
@@ -33,8 +33,8 @@
#endif
#ifndef NO_BAROCLINIC
use
variables_3d
,
only
:
S
,
T
,
rho
,
rad
,
NN
use
variables_3d
,
only
:
nummix3d_S
,
nummix3d_T
,
phymix3d_S
,
phymix3d_T
#endif
use
variables_3d
,
only
:
nummix3d_S
,
nummix3d_T
,
phymix3d_S
,
phymix3d_T
use
variables_3d
,
only
:
numdis3d
use
variables_3d
,
only
:
tke
,
num
,
nuh
,
eps
#ifdef SPM
...
...
@@ -362,12 +362,12 @@
end
if
! save_ss_nn
if
(
save_numerical_analyses
)
then
call
cnv_3d
(
imin
,
jmin
,
imax
,
jmax
,
kmin
,
kmax
,
az
,
numdis3d
,
nummix_missing
,
&
imin
,
imax
,
jmin
,
jmax
,
0
,
kmax
,
ws
)
err
=
nf90_put_var
(
ncid
,
nm3d_id
,
ws
(
_
3
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
#ifndef NO_BAROCLINIC
if
(
calc_salt
)
then
call
cnv_3d
(
imin
,
jmin
,
imax
,
jmax
,
kmin
,
kmax
,
az
,
nummix3d_S
,
nummix_missing
,
&
imin
,
imax
,
jmin
,
jmax
,
0
,
kmax
,
ws
)
...
...
@@ -391,7 +391,7 @@
err
=
nf90_put_var
(
ncid
,
pm3dT_id
,
ws
(
_
3
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
end
if
#endif
end
if
! save_numerical_analyses
#ifdef SPM
...
...
src/ncdf/save_mean_ncdf.F90
View file @
83a4d644
...
...
@@ -138,12 +138,13 @@
#endif
if
(
save_numerical_analyses
)
then
call
cnv_3d
(
imin
,
jmin
,
imax
,
jmax
,
kmin
,
kmax
,
az
,
&
numdis3d_mean
,
nummix_missing
,
&
imin
,
imax
,
jmin
,
jmax
,
0
,
kmax
,
ws3d
)
err
=
nf90_put_var
(
ncid
,
nm3d_id
,
ws3d
(
_
3
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
#ifndef NO_BAROCLINIC
if
(
calc_salt
)
then
call
cnv_3d
(
imin
,
jmin
,
imax
,
jmax
,
kmin
,
kmax
,
az
,
&
nummix3d_S_mean
,
nummix_missing
,
&
...
...
@@ -171,7 +172,6 @@
err
=
nf90_put_var
(
ncid
,
pm3dT_id
,
ws3d
(
_
3
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
end
if
#endif
start
(
1
)
=
1
start
(
2
)
=
1
...
...
@@ -185,7 +185,6 @@
err
=
nf90_put_var
(
ncid
,
nm2d_id
,
ws2d
(
_
2
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
#ifndef NO_BAROCLINIC
if
(
calc_salt
)
then
call
cnv_2d
(
imin
,
jmin
,
imax
,
jmax
,
az
,
nummix2d_S_mean
,
nummix_missing
,
&
imin
,
jmin
,
imax
,
jmax
,
ws2d
)
...
...
@@ -209,7 +208,7 @@
err
=
nf90_put_var
(
ncid
,
pm2dT_id
,
ws2d
(
_
2
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
end
if
#endif
end
if
#ifdef GETM_BIO
...
...
src/output/calc_mean_fields.F90
View file @
83a4d644
...
...
@@ -18,9 +18,9 @@
use
variables_3d
,
only
:
hn
,
uu
,
hun
,
vv
,
hvn
,
ww
,
taub
#ifndef NO_BAROCLINIC
use
variables_3d
,
only
:
S
,
T
#endif
use
variables_3d
,
only
:
nummix3d_S
,
nummix2d_S
,
nummix3d_T
,
nummix2d_T
use
variables_3d
,
only
:
phymix3d_S
,
phymix2d_S
,
phymix3d_T
,
phymix2d_T
#endif
use
variables_3d
,
only
:
numdis3d
,
numdis2d
#ifdef GETM_BIO
use
bio
,
only
:
bio_calc
...
...
@@ -222,7 +222,6 @@
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
...
...
@@ -235,7 +234,6 @@
phymix3d_S_mean
=
phymix3d_S_mean
+
phymix3d_S
phymix2d_S_mean
=
phymix2d_S_mean
+
phymix2d_S
end
if
#endif
end
if
#ifdef GETM_BIO
if
(
bio_calc
)
cc3dmean
=
cc3dmean
+
cc3d
...
...
@@ -270,7 +268,6 @@
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
...
...
@@ -283,7 +280,6 @@
phymix3d_S_mean
=
phymix3d_S_mean
/
step
phymix2d_S_mean
=
phymix2d_S_mean
/
step
end
if
#endif
end
if
#ifdef GETM_BIO
if
(
bio_calc
)
cc3dmean
=
cc3dmean
/
step
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment