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
4ea66446
Commit
4ea66446
authored
May 08, 2015
by
Knut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meteo: save mean net heat fluxes (hfmean)
parent
41ae6e6b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
24 deletions
+37
-24
src/3d/temperature.F90
src/3d/temperature.F90
+1
-1
src/3d/variables_3d.F90
src/3d/variables_3d.F90
+1
-0
src/ncdf/init_mean_ncdf.F90
src/ncdf/init_mean_ncdf.F90
+11
-8
src/ncdf/ncdf_mean.F90
src/ncdf/ncdf_mean.F90
+3
-2
src/ncdf/save_mean_ncdf.F90
src/ncdf/save_mean_ncdf.F90
+9
-5
src/output/calc_mean_fields.F90
src/output/calc_mean_fields.F90
+11
-7
src/output/diagnostic_variables.F90
src/output/diagnostic_variables.F90
+1
-1
No files found.
src/3d/temperature.F90
View file @
4ea66446
...
...
@@ -477,7 +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
heatflux_net
(
i
,
j
)
=
dry_z
(
i
,
j
)
*
(
rad1d
(
kmax
)
-
rad1d
(
0
)
+
shf_loc
)
do
k
=
0
,
kmax
rad1d
(
k
)
=
rad1d
(
k
)
*
rho_0_cpi
! note this
end
do
...
...
src/3d/variables_3d.F90
View file @
4ea66446
...
...
@@ -223,6 +223,7 @@
#ifndef NO_BAROCLINIC
NN
=
_
ZERO_
rad
=
_
ZERO_
heatflux_net
=
_
ZERO_
light
=
_
ONE_
idpdx
=
_
ZERO_
idpdy
=
_
ZERO_
...
...
src/ncdf/init_mean_ncdf.F90
View file @
4ea66446
...
...
@@ -18,6 +18,7 @@
use
domain
,
only
:
imin
,
imax
,
jmin
,
jmax
,
kmax
use
domain
,
only
:
vert_cord
use
m3d
,
only
:
update_temp
,
update_salt
use
meteo
,
only
:
metforcing
#ifdef GETM_BIO
use
bio_var
,
only
:
numc
,
var_names
,
var_units
,
var_long
#endif
...
...
@@ -88,14 +89,6 @@
call
set_attributes
(
ncid
,
elevmean_id
,
long_name
=
'mean elevation'
,
units
=
'm'
,
&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
! short wave radiation
fv
=
swr_missing
;
mv
=
swr_missing
;
vr
(
1
)
=
0
;
vr
(
2
)
=
1500.
err
=
nf90_def_var
(
ncid
,
'swrmean'
,
NCDF_FLOAT_PRECISION
,
f3_dims
,
swrmean_id
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
call
set_attributes
(
ncid
,
swrmean_id
,
&
long_name
=
'mean short wave radiation'
,
units
=
'W/m2'
,
&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
! Ustar at bottom
fv
=
vel_missing
;
mv
=
vel_missing
;
vr
(
1
)
=
-1
;
vr
(
2
)
=
1.
err
=
nf90_def_var
(
ncid
,
'ustarmean'
,
NCDF_FLOAT_PRECISION
,
f3_dims
,
ustarmean_id
)
...
...
@@ -186,6 +179,16 @@
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
end
if
! net heat flux
if
(
metforcing
)
then
fv
=
hf_missing
;
mv
=
hf_missing
;
vr
(
1
)
=
0
;
vr
(
2
)
=
1500.
err
=
nf90_def_var
(
ncid
,
'hfmean'
,
NCDF_FLOAT_PRECISION
,
f3_dims
,
hfmean_id
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
call
set_attributes
(
ncid
,
hfmean_id
,
&
long_name
=
'mean net heat flux'
,
units
=
'W/m2'
,
&
FillValue
=
fv
,
missing_value
=
mv
,
valid_range
=
vr
)
end
if
#endif
if
(
do_numerical_analyses_3d
)
then
...
...
src/ncdf/ncdf_mean.F90
View file @
4ea66446
...
...
@@ -20,13 +20,14 @@
integer
::
time_dim
integer
::
time_id
integer
::
swrmean_id
,
ustarmean_id
,
ustar2mean_id
integer
::
ustarmean_id
,
ustar2mean_id
integer
::
elevmean_id
integer
::
uumean_id
,
vvmean_id
,
wmean_id
integer
::
hmean_id
=
-1
integer
::
saltmean_id
=
-1
integer
::
tempmean_id
=
-1
integer
::
sigma_tmean_id
=
-1
integer
::
hfmean_id
=
-1
integer
::
nd3d_id
=
-1
,
nd3do_id
=
-1
,
pd3d_id
=
-1
integer
::
ndint_id
=
-1
,
pdint_id
=
-1
integer
::
nmS_id
=
-1
...
...
@@ -45,7 +46,7 @@
REALTYPE
,
parameter
::
elev_missing
=
-9999.0
REALTYPE
,
parameter
::
hh_missing
=
-9999.0
REALTYPE
,
parameter
::
swr
_missing
=
-9999.0
REALTYPE
,
parameter
::
hf
_missing
=
-9999.0
REALTYPE
,
parameter
::
vel_missing
=
-9999.0
REALTYPE
,
parameter
::
salt_missing
=
-9999.0
REALTYPE
,
parameter
::
temp_missing
=
-9999.0
...
...
src/ncdf/save_mean_ncdf.F90
View file @
4ea66446
...
...
@@ -72,11 +72,15 @@
err
=
nf90_put_var
(
ncid
,
elevmean_id
,
ws2d
(
_
2
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
! Short wave radiation
call
cnv_2d
(
imin
,
jmin
,
imax
,
jmax
,
az
,
swrmean
,
swr_missing
,
&
imin
,
jmin
,
imax
,
jmax
,
ws2d
)
err
=
nf90_put_var
(
ncid
,
swrmean_id
,
ws2d
(
_
2
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
#ifndef NO_BAROCLINIC
! net heat flux
if
(
hfmean_id
.ne.
-1
)
then
call
cnv_2d
(
imin
,
jmin
,
imax
,
jmax
,
az
,
hfmean
,
hf_missing
,
&
imin
,
jmin
,
imax
,
jmax
,
ws2d
)
err
=
nf90_put_var
(
ncid
,
hfmean_id
,
ws2d
(
_
2
D_W_
),
start
,
edges
)
if
(
err
.NE.
NF90_NOERR
)
go to
10
end
if
#endif
! mean friction velocity
call
cnv_2d
(
imin
,
jmin
,
imax
,
jmax
,
az
,
ustarmean
,
vel_missing
,
&
...
...
src/output/calc_mean_fields.F90
View file @
4ea66446
...
...
@@ -12,12 +12,13 @@
! !USES:
use
domain
,
only
:
imax
,
imin
,
jmax
,
jmin
,
kmax
use
domain
,
only
:
az
,
au
,
av
use
meteo
,
only
:
swr
use
m3d
,
only
:
M
,
update_temp
,
update_salt
use
meteo
,
only
:
metforcing
use
variables_3d
,
only
:
do_numerical_analyses_3d
use
variables_3d
,
only
:
ssen
,
hn
,
uu
,
hun
,
vv
,
hvn
,
ww
,
taub
#ifndef NO_BAROCLINIC
use
variables_3d
,
only
:
S
,
T
,
rho
use
variables_3d
,
only
:
heatflux_net
#endif
use
variables_3d
,
only
:
nummix_S
,
nummix_T
use
variables_3d
,
only
:
nummix_S_old
,
nummix_S_int
,
nummix_T_old
,
nummix_T_int
...
...
@@ -62,9 +63,6 @@
if
(
first
)
then
LEVEL3
'calc_mean_fields(): initialising variables'
allocate
(
swrmean
(
E2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
&
stop
'calc_mean_fields.F90: Error allocating memory (swrmean)'
allocate
(
ustarmean
(
E2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
&
stop
'calc_mean_fields.F90: Error allocating memory (ustarmean)'
...
...
@@ -108,6 +106,11 @@
if
(
rc
/
=
0
)
&
stop
'calc_mean_fields.F90: Error allocating memory (rhomean)'
end
if
if
(
metforcing
)
then
allocate
(
hfmean
(
E2DFIELD
),
stat
=
rc
)
if
(
rc
/
=
0
)
&
stop
'calc_mean_fields.F90: Error allocating memory (hfmean)'
end
if
#endif
if
(
do_numerical_analyses_3d
)
then
...
...
@@ -207,6 +210,7 @@
if
(
save_t
)
Tmean
=
_
ZERO_
if
(
save_s
)
Smean
=
_
ZERO_
if
(
save_rho
)
rhomean
=
_
ZERO_
if
(
metforcing
)
hfmean
=
_
ZERO_
#endif
if
(
do_numerical_analyses_3d
)
then
numdis_3d_mean
=
_
ZERO_
...
...
@@ -240,10 +244,9 @@
fabmmean_diag_hz
=
_
ZERO_
end
if
#endif
ustarmean
=
_
ZERO_
;
ustar2mean
=
_
ZERO_
;
swrmean
=
_
ZERO_
ustarmean
=
_
ZERO_
;
ustar2mean
=
_
ZERO_
end
if
swrmean
=
swrmean
+
swr
! AS this has to be checked, if it is the correct ustar,
! so we must not divide by rho_0 !!
ustarmean
=
ustarmean
+
sqrt
(
taub
)
...
...
@@ -272,6 +275,7 @@
if
(
save_t
)
Tmean
=
Tmean
+
T
*
hn
if
(
save_s
)
Smean
=
Smean
+
S
*
hn
if
(
save_rho
)
rhomean
=
rhomean
+
rho
*
hn
if
(
metforcing
)
hfmean
=
hfmean
+
heatflux_net
#endif
if
(
do_numerical_analyses_3d
)
then
numdis_3d_mean
=
numdis_3d_mean
+
numdis_3d
*
hn
...
...
@@ -331,6 +335,7 @@
if
(
save_t
)
Tmean
=
Tmean
/
step
if
(
save_s
)
Smean
=
Smean
/
step
if
(
save_rho
)
rhomean
=
rhomean
/
step
if
(
metforcing
)
hfmean
=
hfmean
/
step
#endif
if
(
do_numerical_analyses_3d
)
then
numdis_3d_mean
=
numdis_3d_mean
/
step
/
hmean
...
...
@@ -371,7 +376,6 @@
end
if
#endif
ustarmean
=
ustarmean
/
step
swrmean
=
swrmean
/
step
end
if
...
...
src/output/diagnostic_variables.F90
View file @
4ea66446
...
...
@@ -16,7 +16,7 @@
IMPLICIT
NONE
!
! !PUBLIC DATA MEMBERS:
REALTYPE
,
dimension
(:,:),
allocatable
::
swr
mean
REALTYPE
,
dimension
(:,:),
allocatable
::
hf
mean
REALTYPE
,
dimension
(:,:),
allocatable
::
ustarmean
REALTYPE
,
dimension
(:,:),
allocatable
::
ustar2mean
REALTYPE
,
dimension
(:,:),
allocatable
::
elevmean
...
...
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