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
2b1349d7
Commit
2b1349d7
authored
5 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
adding surface definitions
parent
34d1cad2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
srcF/sfx_config.f90
+9
-5
9 additions, 5 deletions
srcF/sfx_config.f90
srcF/sfx_main.f90
+0
-1
0 additions, 1 deletion
srcF/sfx_main.f90
srcF/sfx_run.f90
+2
-2
2 additions, 2 deletions
srcF/sfx_run.f90
srcF/sfx_surface.f90
+44
-0
44 additions, 0 deletions
srcF/sfx_surface.f90
with
55 additions
and
8 deletions
srcF/sfx_config.f90
+
9
−
5
View file @
2b1349d7
...
...
@@ -17,8 +17,8 @@ module sfx_config
!> @brief model enum def.
integer
,
parameter
::
model_esm
=
0
!< ESM model
integer
,
parameter
::
model_log
=
1
!< LOG simplified model
integer
,
parameter
::
model_most
=
2
!< MOST
simplified
model
integer
,
parameter
::
model_sheba
=
3
!< SHEBA
simplified
model
integer
,
parameter
::
model_most
=
2
!< MOST model
integer
,
parameter
::
model_sheba
=
3
!< SHEBA model
character
(
len
=
16
),
parameter
::
model_esm_tag
=
'esm'
character
(
len
=
16
),
parameter
::
model_log_tag
=
'log'
...
...
@@ -47,7 +47,7 @@ module sfx_config
character
(
len
=
256
)
::
filename
integer
::
nmax
integer
::
surface
_type
integer
::
surface
real
::
h
,
z0_m
,
z0_h
end
type
...
...
@@ -139,6 +139,7 @@ contains
end
function
subroutine
set_dataset
(
dataset
,
id
)
use
sfx_surface
implicit
none
type
(
sfxDatasetType
),
intent
(
out
)
::
dataset
integer
,
intent
(
in
)
::
id
...
...
@@ -151,8 +152,8 @@ contains
dataset
%
id
=
id
dataset
%
filename
=
get_dataset_filename
(
id
)
dataset
%
nmax
=
0
! *: temporary surface type & z0(h) def.
dataset
%
surface
_type
=
1
dataset
%
surface
=
surface_land
dataset
%
z0_h
=
-1.0
if
(
id
==
dataset_mosaic
)
then
...
...
@@ -167,13 +168,16 @@ contains
else
if
(
id
==
dataset_lake
)
then
! *: check & fix values
dataset
%
h
=
10.0
dataset
%
surface
=
surface_lake
dataset
%
z0_m
=
-1.0
else
if
(
id
==
dataset_papa
)
then
dataset
%
h
=
10.0
dataset
%
surface
=
surface_ocean
dataset
%
z0_m
=
-1.0
else
if
(
id
==
dataset_toga
)
then
! *: check & fix values
dataset
%
h
=
15.0
dataset
%
surface
=
surface_ocean
dataset
%
z0_m
=
-1.0
end
if
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_main.f90
+
0
−
1
View file @
2b1349d7
...
...
@@ -12,7 +12,6 @@ program sfx_main
implicit
none
! --------------------------------------------------------------------------------
type
(
sfxDatasetType
)
::
dataset
integer
::
model
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_run.f90
+
2
−
2
View file @
2b1349d7
...
...
@@ -65,14 +65,14 @@ contains
integer
::
i
integer
::
io
,
status
! --------------------------------------------------------------------------------
write
(
*
,
*
)
' Running SFX:'
write
(
*
,
'(a,a)'
)
' model = '
,
trim
(
get_model_tag
(
model
))
write
(
*
,
'(a,a)'
)
' dataset = '
,
trim
(
get_dataset_tag
(
dataset
%
id
))
write
(
*
,
'(a,a)'
)
' filename[IN] = '
,
trim
(
dataset
%
filename
)
write
(
*
,
'(a,a)'
)
' filename[OUT] = '
,
trim
(
filename_out
)
write
(
*
,
'(a,g0)'
)
' surface type = '
,
dataset
%
surface
_type
write
(
*
,
'(a,g0)'
)
' surface type = '
,
dataset
%
surface
write
(
*
,
'(a,g0)'
)
' h = '
,
dataset
%
h
write
(
*
,
'(a,g0)'
)
' z0(m) = '
,
dataset
%
z0_m
write
(
*
,
'(a,g0)'
)
' z0(h) = '
,
dataset
%
z0_h
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_surface.f90
+
44
−
0
View file @
2b1349d7
...
...
@@ -24,6 +24,12 @@ module sfx_surface
integer
,
public
,
parameter
::
surface_ocean
=
0
!< ocean surface
integer
,
public
,
parameter
::
surface_land
=
1
!< land surface
integer
,
public
,
parameter
::
surface_lake
=
2
!< lake surface
integer
,
public
,
parameter
::
surface_snow
=
3
!< snow covered surface
character
(
len
=
16
),
parameter
::
surface_ocean_tag
=
'ocean'
character
(
len
=
16
),
parameter
::
surface_land_tag
=
'land'
character
(
len
=
16
),
parameter
::
surface_lake_tag
=
'lake'
character
(
len
=
16
),
parameter
::
surface_snow_tag
=
'snow'
! --------------------------------------------------------------------------------
real
,
parameter
,
private
::
kappa
=
0.40
!< von Karman constant [n/d]
...
...
@@ -60,6 +66,44 @@ module sfx_surface
contains
! surface type definition
! --------------------------------------------------------------------------------
function
get_surface_id
(
tag
)
result
(
id
)
implicit
none
character
(
len
=*
),
intent
(
in
)
::
tag
integer
::
id
id
=
-
1
if
(
trim
(
tag
)
==
trim
(
surface_ocean_tag
))
then
id
=
surface_ocean
else
if
(
trim
(
tag
)
==
trim
(
surface_land_tag
))
then
id
=
surface_land
else
if
(
trim
(
tag
)
==
trim
(
surface_lake_tag
))
then
id
=
surface_lake
else
if
(
trim
(
tag
)
==
trim
(
surface_snow_tag
))
then
id
=
surface_snow
end
if
end
function
function
get_surface_tag
(
id
)
result
(
tag
)
implicit
none
integer
::
id
character
(
len
=
:),
allocatable
::
tag
tag
=
'undefined'
if
(
id
==
surface_ocean
)
then
tag
=
surface_ocean_tag
else
if
(
id
==
surface_land
)
then
tag
=
surface_land_tag
else
if
(
id
==
surface_lake
)
then
tag
=
surface_lake_tag
else
if
(
id
==
surface_snow
)
then
tag
=
surface_snow_tag
end
if
end
function
! charnock roughness definition
! --------------------------------------------------------------------------------
subroutine
get_charnock_roughness
(
z0_m
,
u_dyn0
,
U
,
h
,
maxiters
)
...
...
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