Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CarbonCycleConstruction
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
Sumbel Shangareeva
CarbonCycleConstruction
Commits
e09a4757
Commit
e09a4757
authored
8 months ago
by
Georgiy Faikin
Browse files
Options
Downloads
Plain Diff
Cleaning the INMCM_aux.f90
parents
55552fd6
2f69b8cb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/inmcm_05x05/control_point_for_carbon_pools.nc
+0
-0
0 additions, 0 deletions
data/inmcm_05x05/control_point_for_carbon_pools.nc
source/carbon/carbon_models/carbon_model_INMCM_aux.f90
+69
-5
69 additions, 5 deletions
source/carbon/carbon_models/carbon_model_INMCM_aux.f90
with
69 additions
and
5 deletions
data/inmcm_05x05/control_point_for_carbon_pools.nc
0 → 100644
+
0
−
0
View file @
e09a4757
File added
This diff is collapsed.
Click to expand it.
source/carbon/carbon_models/carbon_model_INMCM_aux.f90
+
69
−
5
View file @
e09a4757
...
...
@@ -16,7 +16,7 @@ module carbon_model_inmcm_aux
! -------------------------------------------------------------------------------------------------------------------
! ------- Station of observation ------
character
(
len
=
10
)
::
station
=
'Rostov'
!< Станция наблюдения за климатом !!! Нужно указать название !!!
character
(
len
=
2
)
::
opt
=
'
1
'
!< Имя варианта подачи удобрения !!! Нужно указать номер !!!
character
(
len
=
2
)
::
opt
=
'
3
'
!< Имя варианта подачи удобрения !!! Нужно указать номер !!!
! ------- Serve value -------
integer
,
parameter
::
mnc
=
(
year_max
-
year_min
+
1
)
*
nmonth
!Как часть параметров для задания климатических данных
...
...
@@ -48,6 +48,7 @@ module carbon_model_inmcm_aux
! ---- Landuse ----
real
,
parameter
::
gt2year_to_kg2s
=
1.e+12
/
yrs
real
,
parameter
::
defor0
=
1.
*
gt2year_to_kg2s
!real, parameter :: defor1861 = 0.54 * gt2year_to_kg2s
real
,
parameter
::
adefr
=
0.6
!< deforest/(deforest+soil erosion)
real
,
parameter
::
defr
(
nv2
)
=
(/
1.
,
0.2
,
0.2
,
0.05
,
0.05
,
0.2
,
0.2
,
0.2
,
0.02
,
0.02
,
0.2
,
0.5
,
0.5
/)
real
,
parameter
::
soer
(
nv2
)
=
(/
1.
,
0.2
,
0.2
,
0.05
,
0.05
,
0.2
,
0.2
,
0.2
,
0.02
,
0.02
,
0.2
,
0.5
,
0.5
/)
...
...
@@ -70,12 +71,15 @@ contains
! ---- Part of INMCM carbon_model_init() ----
use
grid
,
only
:
i0
,
i1
,
j0
,
j1
,
mask
,
area
,
date_c
,
dlon
,
dlat
,
nlon
,
nlat
,
ich
!use environment_model_inmcm, only : vegg_nv2
use
netcdf
use
netcdf_kit
,
only
:
nc_errhand
use
paths
,
only
:
path_inmcm_data
integer
::
i
,
j
,
n
,
na
!< count
integer
::
ncid
,
varid
!real :: fill_v
real
,
allocatable
,
dimension
(:,:,:)
::
cveg_global
,
csoil_global
real
::
sc6_global
,
sc6_regional
...
...
@@ -163,6 +167,65 @@ contains
conversion_defor_global_to_regional
=
1.
endif
!!landuseTot = landuseDfrA + landuseDfrB + landuseErs:
!landuseTot = defor0 * conversion_defor_global_to_regional
!landuseDfrA = adefr * min(defor0,defor1861) * conversion_defor_global_to_regional
!landuseDfrB = adefr * (defor0 - min(defor0,defor1861)) * conversion_defor_global_to_regional
landuseErs
=
(
1.
-
adefr
)
*
defor0
*
conversion_defor_global_to_regional
!allocate(admAreaFrac(720,360,nadm))
!call nc_errhand( nf90_open(path_inmcm_data//'admAreaFrac_NED_grid05x05.nc', nf90_nowrite, ncid) )
!call nc_errhand( nf90_inq_varid(ncid, 'admAreaFrac', varid) )
!call nc_errhand( nf90_get_att(ncid, varid, '_FillValue', fill_v) )
!call nc_errhand( nf90_get_var(ncid, varid, admAreaFrac(:,:,:), (/1,1,1/), (/720,360,nadm/)) )
!call nc_errhand( nf90_close(ncid) )
!where (admAreaFrac == fill_v) admAreaFrac = 0.
allocate
(
cveg_global
(
nlon
,
nlat
,
nv2
))
allocate
(
csoil_global
(
nlon
,
nlat
,
nv2
))
call
nc_errhand
(
nf90_open
(
path_inmcm_data
//
'control_point_for_carbon_pools.nc'
,
nf90_nowrite
,
ncid
)
)
call
nc_errhand
(
nf90_inq_varid
(
ncid
,
'cveg'
,
varid
)
)
call
nc_errhand
(
nf90_get_var
(
ncid
,
varid
,
cveg_global
(:,:,:),
(/
1
,
1
,
1
/),
(/
nlon
,
nlat
,
nv2
/))
)
call
nc_errhand
(
nf90_inq_varid
(
ncid
,
'csoil'
,
varid
)
)
call
nc_errhand
(
nf90_get_var
(
ncid
,
varid
,
csoil_global
(:,:,:),
(/
1
,
1
,
1
/),
(/
nlon
,
nlat
,
nv2
/))
)
call
nc_errhand
(
nf90_close
(
ncid
)
)
sc6_global
=
0.
sc8_global
=
0.
do
j
=
1
,
nlat
! sum for the whole globe
do
i
=
1
,
nlon
if
(
ich
(
i
,
j
)
/
=
0
)
then
do
n
=
1
,
nv2
sc6_global
=
sc6_global
+
cveg_global
(
i
,
j
,
n
)
*
defr
(
n
)
*
area
(
i
,
j
)
sc8_global
=
sc8_global
+
csoil_global
(
i
,
j
,
n
)
*
soer
(
n
)
*
area
(
i
,
j
)
enddo
endif
enddo
enddo
if
(
sc6_global
>
0.
.and.
sc8_global
>
0.
)
then
sc6_regional
=
0.
sc8_regional
=
0.
do
j
=
j0
,
j1
! sum for the regional simulation domain
do
i
=
i0
,
i1
if
(
ich
(
i
,
j
)
/
=
0
)
then
do
n
=
1
,
nv2
sc6_regional
=
sc6_regional
+
cveg_global
(
i
,
j
,
n
)
*
defr
(
n
)
*
area
(
i
,
j
)
sc8_regional
=
sc8_regional
+
csoil_global
(
i
,
j
,
n
)
*
soer
(
n
)
*
area
(
i
,
j
)
enddo
endif
enddo
enddo
conversion_defor_global_to_regional
=
adefr
*
sc6_regional
/
sc6_global
+
&
&
(
1.
-
adefr
)
*
sc8_regional
/
sc8_global
else
conversion_defor_global_to_regional
=
1.
endif
deallocate
(
cveg_global
)
deallocate
(
csoil_global
)
landuseErs
=
(
1.
-
adefr
)
*
defor0
*
conversion_defor_global_to_regional
end
subroutine
...
...
@@ -174,6 +237,7 @@ contains
use
grid
,
only
:
i0
,
i1
,
j0
,
j1
,
area
integer
::
ii
,
jj
,
n
real
::
sc8
sc8
=
0.
...
...
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