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
95f87b7a
Commit
95f87b7a
authored
5 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
model setup update
parent
8ce1f52b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includeF/sfx_def.fi
+1
-0
1 addition, 0 deletions
includeF/sfx_def.fi
srcF/sfx_config.f90
+53
-6
53 additions, 6 deletions
srcF/sfx_config.f90
srcF/sfx_main.f90
+6
-24
6 additions, 24 deletions
srcF/sfx_main.f90
with
60 additions
and
30 deletions
includeF/sfx_def.fi
+
1
−
0
View file @
95f87b7a
...
...
@@ -3,3 +3,4 @@
!#define SFX_FORCE_DEPRECATED_ESM_CODE
!#define SFX_CHECK_NAN
!#define USE_CONFIG_PARSER
#define DATASET_DIR "data/"
This diff is collapsed.
Click to expand it.
srcF/sfx_config.f90
+
53
−
6
View file @
95f87b7a
#include "../includeF/sfx_def.fi"
!> @brief surface flux model config subroutines
module
sfx_config
...
...
@@ -40,6 +42,7 @@ module sfx_config
character
(
len
=
16
),
parameter
::
dataset_toga_tag
=
'toga'
character
(
len
=
16
),
parameter
::
dataset_user_tag
=
'user'
contains
function
get_model_id
(
tag
)
result
(
id
)
...
...
@@ -56,7 +59,7 @@ contains
id
=
model_most
else
if
(
trim
(
tag
)
==
trim
(
model_sheba_tag
))
then
id
=
model_sheba
endif
end
if
end
function
...
...
@@ -65,7 +68,7 @@ contains
integer
::
id
character
(
len
=
:),
allocatable
::
tag
tag
=
"
undefined
"
tag
=
'
undefined
'
if
(
id
==
model_esm
)
then
tag
=
model_esm_tag
else
if
(
id
==
model_log
)
then
...
...
@@ -74,7 +77,7 @@ contains
tag
=
model_most_tag
else
if
(
id
==
model_sheba
)
then
tag
=
model_sheba_tag
endif
end
if
end
function
...
...
@@ -98,7 +101,7 @@ contains
id
=
dataset_toga
else
if
(
trim
(
tag
)
==
trim
(
dataset_user_tag
))
then
id
=
dataset_user
endif
end
if
end
function
...
...
@@ -107,7 +110,7 @@ contains
integer
::
id
character
(
len
=
:),
allocatable
::
tag
tag
=
"
undefined
"
tag
=
'
undefined
'
if
(
id
==
dataset_mosaic
)
then
tag
=
dataset_mosaic_tag
else
if
(
id
==
dataset_irgason
)
then
...
...
@@ -122,7 +125,51 @@ contains
tag
=
dataset_toga_tag
else
if
(
id
==
dataset_user
)
then
tag
=
dataset_user_tag
endif
end
if
end
function
function
get_dataset_filename
(
id
)
result
(
filename
)
implicit
none
integer
::
id
character
(
len
=
:),
allocatable
::
filename
filename
=
''
if
(
id
==
dataset_mosaic
)
then
filename
=
DATASET_DIR
//
'MOSAiC.txt'
else
if
(
id
==
dataset_irgason
)
then
filename
=
DATASET_DIR
//
'Irgason1.txt'
else
if
(
id
==
dataset_sheba
)
then
filename
=
DATASET_DIR
//
'Sheba1.txt'
else
if
(
id
==
dataset_lake
)
then
filename
=
DATASET_DIR
//
'Kuivajarvi.txt'
else
if
(
id
==
dataset_papa
)
then
filename
=
DATASET_DIR
//
'Papa.txt'
else
if
(
id
==
dataset_toga
)
then
filename
=
DATASET_DIR
//
'Toga.txt'
end
if
end
function
function
get_dataset_param_filename
(
id
)
result
(
filename
)
implicit
none
integer
::
id
character
(
len
=
:),
allocatable
::
filename
filename
=
""
if
(
id
==
dataset_mosaic
)
then
filename
=
DATASET_DIR
//
'MOSAiC_zh.txt'
else
if
(
id
==
dataset_irgason
)
then
filename
=
DATASET_DIR
//
'IRGASON_zh.txt'
else
if
(
id
==
dataset_sheba
)
then
filename
=
DATASET_DIR
//
'Sheba1_zh.txt'
else
if
(
id
==
dataset_lake
)
then
filename
=
DATASET_DIR
//
'Kuivajarvi_zh.txt'
else
if
(
id
==
dataset_papa
)
then
filename
=
DATASET_DIR
//
'Papa_zh.txt'
else
if
(
id
==
dataset_toga
)
then
filename
=
DATASET_DIR
//
'Toga_zh.txt'
end
if
end
function
...
...
This diff is collapsed.
Click to expand it.
srcF/sfx_main.f90
+
6
−
24
View file @
95f87b7a
...
...
@@ -249,32 +249,14 @@ program sfx_main
!< @brief set name & filenames for specific dataset
dataset_name
=
get_dataset_tag
(
dataset_id
)
if
(
dataset_id
==
dataset_mosaic
)
then
filename_in_common
=
'data/MOSAiC_zh.txt'
filename_in
=
'data/MOSAiC.txt'
else
if
(
dataset_id
==
dataset_irgason
)
then
filename_in_common
=
'data/IRGASON_zh.txt'
filename_in
=
'data/Irgason1.txt'
else
if
(
dataset_id
==
dataset_sheba
)
then
filename_in_common
=
'data/Sheba1_zh.txt'
filename_in
=
'data/Sheba1.txt'
else
if
(
dataset_id
==
dataset_lake
)
then
filename_in_common
=
'data/Kuivajarvi_zh.txt'
filename_in
=
'data/Kuivajarvi.txt'
else
if
(
dataset_id
==
dataset_papa
)
then
filename_in_common
=
'data/Papa_zh.txt'
filename_in
=
'data/Papa.txt'
else
if
(
dataset_id
==
dataset_toga
)
then
filename_in_common
=
'data/Toga_zh.txt'
filename_in
=
'data/Toga.txt'
else
if
(
dataset_id
==
dataset_user
)
then
! ---> skipping
else
write
(
*
,
*
)
' FAILURE! > unknown dataset id: '
,
dataset_id
stop
end
if
if
(
dataset_id
/
=
dataset_user
)
then
filename_in_common
=
get_dataset_param_filename
(
dataset_id
)
filename_in
=
get_dataset_filename
(
dataset_id
)
end
if
if
(
is_output_set
==
0
)
filename_out
=
'output-'
//
trim
(
dataset_name
)
//
'.txt'
write
(
*
,
*
)
' Running SFX model'
write
(
*
,
*
)
' model = '
,
trim
(
model_name
)
write
(
*
,
*
)
' dataset = '
,
trim
(
dataset_name
)
...
...
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