Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sfx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inmcm-mirror
sfx
Commits
bd6ea9aa
Commit
bd6ea9aa
authored
8 months ago
by
Виктория Суязова
Committed by
Anna Shestakova
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
added choise z0m in most_snow
parent
7e5dcea5
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
makefile
+1
-1
1 addition, 1 deletion
makefile
srcF/sfx_most_snow.f90
+10
-2
10 additions, 2 deletions
srcF/sfx_most_snow.f90
srcF/sfx_surface.f90
+154
-7
154 additions, 7 deletions
srcF/sfx_surface.f90
srcF/sfx_z0m_all.f90
+9
-15
9 additions, 15 deletions
srcF/sfx_z0m_all.f90
with
174 additions
and
25 deletions
makefile
+
1
−
1
View file @
bd6ea9aa
...
@@ -10,7 +10,7 @@ ifeq ($(COMPILER),gnu)
...
@@ -10,7 +10,7 @@ ifeq ($(COMPILER),gnu)
FC
=
gfortran
FC
=
gfortran
endif
endif
OBJ_F90
=
sfx_phys_const.o sfx_common.o
sfx_config.o
sfx_io.o sfx_data.o sfx_surface.o sfx_log_param.o sfx_log.o sfx_most_param.o sfx_most.o sfx_most_snow_param.o sfx_most_snow.o sfx_sheba_param.o sfx_sheba.o sfx_esm_param.o sfx_esm.o sfx_run.o sfx_main.o
OBJ_F90
=
sfx_phys_const.o sfx_common.o sfx_io.o sfx_data.o
sfx_z0m_all_surface.o
sfx_surface.o
sfx_config.o
sfx_log_param.o sfx_log.o sfx_most_param.o sfx_most.o sfx_most_snow_param.o sfx_most_snow.o sfx_sheba_param.o sfx_sheba.o sfx_esm_param.o sfx_esm.o sfx_run.o sfx_main.o
OBJ_F
=
OBJ_F
=
OBJ
=
$(
OBJ_F90
)
$(
OBJ_F
)
OBJ
=
$(
OBJ_F90
)
$(
OBJ_F
)
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_most_snow.f90
+
10
−
2
View file @
bd6ea9aa
...
@@ -24,6 +24,7 @@ module sfx_most_snow
...
@@ -24,6 +24,7 @@ module sfx_most_snow
public
::
get_surface_fluxes
public
::
get_surface_fluxes
public
::
get_surface_fluxes_vec
public
::
get_surface_fluxes_vec
public
::
get_psi
public
::
get_psi
integer
z0m_id
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
...
@@ -91,6 +92,7 @@ contains
...
@@ -91,6 +92,7 @@ contains
real
::
Tsemi
!< semi-sum of potential temperature at 'h' and at surface [K]
real
::
Tsemi
!< semi-sum of potential temperature at 'h' and at surface [K]
real
::
dQ
!< difference between humidity at 'h' and at surface [g/g]
real
::
dQ
!< difference between humidity at 'h' and at surface [g/g]
real
::
z0_m
!< surface aerodynamic roughness (should be < 0 for water bodies surface)
real
::
z0_m
!< surface aerodynamic roughness (should be < 0 for water bodies surface)
real
::
z0_map
!< surface aerodynamic roughness (should be < 0 for water bodies surface)
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
! --- local variables
! --- local variables
...
@@ -153,8 +155,14 @@ contains
...
@@ -153,8 +155,14 @@ contains
dT
=
meteo
%
dT
dT
=
meteo
%
dT
dQ
=
meteo
%
dQ
dQ
=
meteo
%
dQ
h
=
meteo
%
h
h
=
meteo
%
h
z0_m
=
meteo
%
z0_m
!z0_m = meteo%z0_m
z0_map
=
meteo
%
z0_m
call
get_dynamic_roughness_definition
(
surface_type
,
ocean_z0m_id
,
land_z0m_id
,
lake_z0m_id
,
snow_z0m_id
,
&
forest_z0m_id
,
usersf_z0m_id
,
z0m_id
)
call
get_dynamic_roughness_all
(
z0_m
,
u_dyn0
,
U
,
depth
,
h
,
numerics
%
maxiters_charnock
,
z0_map
,
z0m_id
)
! --- define surface type
! --- define surface type
if
(
z0_m
<
0.0
)
then
if
(
z0_m
<
0.0
)
then
surface_type
=
surface_ocean
surface_type
=
surface_ocean
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_surface.f90
+
154
−
7
View file @
bd6ea9aa
...
@@ -6,6 +6,7 @@ module sfx_surface
...
@@ -6,6 +6,7 @@ module sfx_surface
! modules used
! modules used
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
use
sfx_phys_const
use
sfx_phys_const
use
sfx_z0m_all_surface
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
! directives list
! directives list
...
@@ -20,6 +21,8 @@ module sfx_surface
...
@@ -20,6 +21,8 @@ module sfx_surface
#endif
#endif
public
::
get_charnock_roughness
public
::
get_charnock_roughness
public
::
get_thermal_roughness
public
::
get_thermal_roughness
public
::
get_dynamic_roughness_all
public
::
get_dynamic_roughness_definition
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
...
@@ -28,12 +31,39 @@ module sfx_surface
...
@@ -28,12 +31,39 @@ module sfx_surface
integer
,
public
,
parameter
::
surface_land
=
1
!< land surface
integer
,
public
,
parameter
::
surface_land
=
1
!< land surface
integer
,
public
,
parameter
::
surface_lake
=
2
!< lake surface
integer
,
public
,
parameter
::
surface_lake
=
2
!< lake surface
integer
,
public
,
parameter
::
surface_snow
=
3
!< snow covered surface
integer
,
public
,
parameter
::
surface_snow
=
3
!< snow covered surface
integer
,
public
,
parameter
::
surface_forest
=
4
!< snow covered surface
integer
,
public
,
parameter
::
surface_user
=
5
!< snow covered surface
character
(
len
=
16
),
parameter
::
surface_ocean_tag
=
'ocean'
character
(
len
=
16
),
parameter
::
surface_ocean_tag
=
'ocean'
character
(
len
=
16
),
parameter
::
surface_land_tag
=
'land'
character
(
len
=
16
),
parameter
::
surface_land_tag
=
'land'
character
(
len
=
16
),
parameter
::
surface_lake_tag
=
'lake'
character
(
len
=
16
),
parameter
::
surface_lake_tag
=
'lake'
character
(
len
=
16
),
parameter
::
surface_snow_tag
=
'snow'
character
(
len
=
16
),
parameter
::
surface_snow_tag
=
'snow'
character
(
len
=
16
),
parameter
::
surface_forest_tag
=
'forest'
character
(
len
=
16
),
parameter
::
surface_user_tag
=
'user'
integer
,
public
,
parameter
::
z0m_ch
=
0
integer
,
public
,
parameter
::
z0m_fe
=
1
integer
,
public
,
parameter
::
z0m_ow
=
2
integer
,
public
,
parameter
::
z0m_map
=
3
integer
,
public
,
parameter
::
z0m_user
=
4
character
(
len
=
16
),
parameter
::
z0m_tag_ch
=
'charnock'
character
(
len
=
16
),
parameter
::
z0m_tag_fe
=
'fetch'
character
(
len
=
16
),
parameter
::
z0m_tag_ow
=
'owen'
character
(
len
=
16
),
parameter
::
z0m_tag_map
=
'map'
character
(
len
=
16
),
parameter
::
z0m_tag_user
=
'user'
integer
,
public
,
parameter
::
ocean_z0m_id
=
z0m_ch
!< ocean surface
integer
,
public
,
parameter
::
land_z0m_id
=
z0m_map
!< land surface
integer
,
public
,
parameter
::
lake_z0m_id
=
z0m_fe
!< lake surface
integer
,
public
,
parameter
::
snow_z0m_id
=
z0m_ow
!< snow covered surface
integer
,
public
,
parameter
::
forest_z0m_id
=
z0m_map
!< forest csurface
integer
,
public
,
parameter
::
usersf_z0m_id
=
z0m_map
!< user surface
real
,
public
,
parameter
::
depth
=
1.0
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
real
,
parameter
,
private
::
kappa
=
0.40
!< von Karman constant [n/d]
real
,
parameter
,
private
::
kappa
=
0.40
!< von Karman constant [n/d]
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
...
@@ -42,12 +72,12 @@ module sfx_surface
...
@@ -42,12 +72,12 @@ module sfx_surface
!< z0 = Re_visc_min * (nu / u_dyn) + gamma_c * (u_dyn^2 / g)
!< z0 = Re_visc_min * (nu / u_dyn) + gamma_c * (u_dyn^2 / g)
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
real
,
parameter
::
gamma_c
=
0.0144
!
real, parameter :: gamma_c = 0.0144
real
,
parameter
::
Re_visc_min
=
0.111
!
real, parameter :: Re_visc_min = 0.111
real
,
parameter
::
h_charnock
=
10.0
!
real, parameter :: h_charnock = 10.0
real
,
parameter
::
c1_charnock
=
log
(
h_charnock
*
(
g
/
gamma_c
))
!
real, parameter :: c1_charnock = log(h_charnock * (g / gamma_c))
real
,
parameter
::
c2_charnock
=
Re_visc_min
*
nu_air
*
(
g
/
gamma_c
)
!
real, parameter :: c2_charnock = Re_visc_min * nu_air * (g / gamma_c)
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
!< Re fully roughness minimum value [n/d]
!< Re fully roughness minimum value [n/d]
...
@@ -85,6 +115,10 @@ contains
...
@@ -85,6 +115,10 @@ contains
id
=
surface_lake
id
=
surface_lake
else
if
(
trim
(
tag
)
==
trim
(
surface_snow_tag
))
then
else
if
(
trim
(
tag
)
==
trim
(
surface_snow_tag
))
then
id
=
surface_snow
id
=
surface_snow
else
if
(
trim
(
tag
)
==
trim
(
surface_forest_tag
))
then
id
=
surface_forest
else
if
(
trim
(
tag
)
==
trim
(
surface_user_tag
))
then
id
=
surface_user
end
if
end
if
end
function
end
function
...
@@ -103,10 +137,55 @@ contains
...
@@ -103,10 +137,55 @@ contains
tag
=
surface_lake_tag
tag
=
surface_lake_tag
else
if
(
id
==
surface_snow
)
then
else
if
(
id
==
surface_snow
)
then
tag
=
surface_snow_tag
tag
=
surface_snow_tag
else
if
(
id
==
surface_forest
)
then
tag
=
surface_forest_tag
else
if
(
id
==
surface_user
)
then
tag
=
surface_user_tag
end
if
end
if
end
function
end
function
function
get_surface_z0m_id
(
tag_z0m
)
result
(
z0m_id
)
implicit
none
character
(
len
=*
),
intent
(
in
)
::
tag_z0m
integer
::
z0m_id
z0m_id
=
-
1
if
(
trim
(
tag_z0m
)
==
trim
(
z0m_tag_ch
))
then
z0m_id
=
z0m_ch
else
if
(
trim
(
tag_z0m
)
==
trim
(
z0m_tag_fe
))
then
z0m_id
=
z0m_fe
else
if
(
trim
(
tag_z0m
)
==
trim
(
z0m_tag_ow
))
then
z0m_id
=
z0m_ow
else
if
(
trim
(
tag_z0m
)
==
trim
(
z0m_tag_map
))
then
z0m_id
=
z0m_map
else
if
(
trim
(
tag_z0m
)
==
trim
(
z0m_tag_user
))
then
z0m_id
=
z0m_user
end
if
end
function
function
get_surface_z0m_tag
(
z0m_id
)
result
(
tag_z0m
)
implicit
none
integer
::
z0m_id
character
(
len
=
:),
allocatable
::
tag_z0m
tag_z0m
=
'undefined'
if
(
z0m_id
==
z0m_ch
)
then
tag_z0m
=
z0m_tag_ch
else
if
(
z0m_id
==
z0m_fe
)
then
tag_z0m
=
z0m_tag_fe
else
if
(
z0m_id
==
z0m_ow
)
then
tag_z0m
=
z0m_tag_ow
else
if
(
z0m_id
==
z0m_map
)
then
tag_z0m
=
z0m_tag_map
else
if
(
z0m_id
==
z0m_user
)
then
tag_z0m
=
z0m_tag_user
end
if
end
function
#if defined(INCLUDE_CXX)
#if defined(INCLUDE_CXX)
subroutine
set_c_struct_sfx_surface_param_values
(
surface_param
)
subroutine
set_c_struct_sfx_surface_param_values
(
surface_param
)
use
sfx_data
use
sfx_data
...
@@ -133,8 +212,76 @@ contains
...
@@ -133,8 +212,76 @@ contains
end
subroutine
set_c_struct_sfx_surface_param_values
end
subroutine
set_c_struct_sfx_surface_param_values
#endif
#endif
!
charnock
roughness definition
!
dynamic
roughness definition
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
subroutine
get_dynamic_roughness_definition
(
surface_type
,
ocean_z0m_id
,
land_z0m_id
,
lake_z0m_id
,
snow_z0m_id
,
&
forest_z0m_id
,
usersf_z0m_id
,
z0m_id
)
! ----------------------------------------------------------------------------
integer
,
intent
(
out
)
::
z0m_id
integer
,
intent
(
in
)
::
surface_type
integer
,
intent
(
in
)
::
ocean_z0m_id
integer
,
intent
(
in
)
::
land_z0m_id
integer
,
intent
(
in
)
::
lake_z0m_id
integer
,
intent
(
in
)
::
snow_z0m_id
integer
,
intent
(
in
)
::
forest_z0m_id
integer
,
intent
(
in
)
::
usersf_z0m_id
! ---------------------------------------------------------------------------
if
(
surface_type
==
surface_ocean
)
then
z0m_id
=
ocean_z0m_id
else
if
(
surface_type
==
surface_land
)
then
z0m_id
=
land_z0m_id
else
if
(
surface_type
==
surface_snow
)
then
z0m_id
=
snow_z0m_id
else
if
(
surface_type
==
surface_lake
)
then
z0m_id
=
lake_z0m_id
else
if
(
surface_type
==
surface_forest
)
then
z0m_id
=
forest_z0m_id
else
if
(
surface_type
==
surface_user
)
then
z0m_id
=
usersf_z0m_id
end
if
end
subroutine
! ----------------------------------------------------------------------------
subroutine
get_dynamic_roughness_all
(
z0_m
,
u_dyn0
,
U
,
depth
,
h
,&
maxiters
,
z0m_map
,
z0m_id
)
! ----------------------------------------------------------------------------
real
,
intent
(
out
)
::
z0_m
!< aerodynamic roughness [m]
real
,
intent
(
out
)
::
u_dyn0
!< dynamic velocity in neutral conditions [m/s]
real
,
intent
(
in
)
::
U
!< abs(wind speed) [m/s]
real
,
intent
(
in
)
::
depth
!< depth [m]
real
,
intent
(
in
)
::
h
!< constant flux layer height [m]
real
,
intent
(
in
)
::
z0m_map
!< aerodynamic roughness from map [m]
integer
,
intent
(
in
)
::
maxiters
!< maximum number of iterations
integer
,
intent
(
in
)
::
z0m_id
! ---------------------------------------------------------------------------
if
(
z0m_id
==
z0m_ch
)
then
call
get_dynamic_roughness_ch
(
z0_m
,
u_dyn0
,
U
,
h
,
maxiters
)
else
if
(
z0m_id
==
z0m_fe
)
then
call
get_dynamic_roughness_fetch
(
z0_m
,
u_dyn0
,
U
,
depth
,
h
,
maxiters
)
else
if
(
z0m_id
==
z0m_ow
)
then
call
get_dynamic_roughness_ow
(
z0_m
,
u_dyn0
,
U
,
h
,
maxiters
)
else
if
(
z0m_id
==
z0m_map
)
then
call
get_dynamic_roughness_map
(
z0_m
,
u_dyn0
,
U
,
h
,
z0m_map
)
else
if
(
z0m_id
==
z0m_user
)
then
write
(
*
,
*
)
'z0m_user'
end
if
end
subroutine
! --------------------------------------------------------------------------------
subroutine
get_charnock_roughness
(
z0_m
,
u_dyn0
,
U
,
h
,
maxiters
)
subroutine
get_charnock_roughness
(
z0_m
,
u_dyn0
,
U
,
h
,
maxiters
)
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
real
,
intent
(
out
)
::
z0_m
!< aerodynamic roughness [m]
real
,
intent
(
out
)
::
z0_m
!< aerodynamic roughness [m]
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_z0m_all.f90
+
9
−
15
View file @
bd6ea9aa
...
@@ -168,15 +168,9 @@ module sfx_z0m_all
...
@@ -168,15 +168,9 @@ module sfx_z0m_all
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
subroutine
get_dynamic_roughness_definition
(
surface_type
,
id_ocean
,
id_land
,
id_snow
,
id_lake
,
&
subroutine
get_dynamic_roughness_definition
(
surface_type
,
id_ocean
,
id_land
,
id_snow
,
id_lake
,
&
id_forest
,
id_user
,
ocean_z0m_id
,
land_z0m_id
,
lake_z0m_id
,
snow_z0m_id
,
&
id_forest
,
id_user
,
z0m_id
)
forest_z0m_id
,
usersf_z0m_id
)
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
real
,
intent
(
out
)
::
ocean_z0m_id
real
,
intent
(
out
)
::
z0m_id
real
,
intent
(
out
)
::
land_z0m_id
real
,
intent
(
out
)
::
lake_z0m_id
real
,
intent
(
out
)
::
snow_z0m_id
real
,
intent
(
out
)
::
forest_z0m_id
real
,
intent
(
out
)
::
usersf_z0m_id
real
,
intent
(
in
)
::
surface_type
real
,
intent
(
in
)
::
surface_type
...
@@ -190,17 +184,17 @@ module sfx_z0m_all
...
@@ -190,17 +184,17 @@ module sfx_z0m_all
! ---------------------------------------------------------------------------
! ---------------------------------------------------------------------------
if
(
surface_type
==
surface_ocean
)
then
if
(
surface_type
==
surface_ocean
)
then
ocean_
z0m_id
=
id_ocean
z0m_id
=
id_ocean
else
if
(
surface_type
==
surface_land
)
then
else
if
(
surface_type
==
surface_land
)
then
land_
z0m_id
=
id_land
z0m_id
=
id_land
else
if
(
surface_type
==
surface_snow
)
then
else
if
(
surface_type
==
surface_snow
)
then
snow_
z0m_id
=
id_snow
z0m_id
=
id_snow
else
if
(
surface_type
==
surface_lake
)
then
else
if
(
surface_type
==
surface_lake
)
then
lake_
z0m_id
=
id_lake
z0m_id
=
id_lake
else
if
(
surface_type
==
surface_forest
)
then
else
if
(
surface_type
==
surface_forest
)
then
forest_
z0m_id
=
id_forest
z0m_id
=
id_forest
else
if
(
surface_type
==
surface_user
)
then
else
if
(
surface_type
==
surface_user
)
then
usersf_
z0m_id
=
id_user
z0m_id
=
id_user
end
if
end
if
end
subroutine
end
subroutine
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment