53 private :: landuse_read
59 character(len=H_LONG),
private :: landuse_in_basename =
'' 60 character(len=H_LONG),
private :: landuse_out_basename =
'' 61 character(len=H_MID),
private :: landuse_out_title =
'SCALE-RM LANDUSE' 62 character(len=H_MID),
private :: landuse_out_dtype =
'DEFAULT' 63 logical,
private :: landuse_allocean = .false.
64 logical,
private :: landuse_allland = .false.
65 logical,
private :: landuse_allurban = .false.
66 logical,
private :: landuse_mosaicworld = .false.
77 namelist / param_landuse / &
78 landuse_in_basename, &
79 landuse_out_basename, &
92 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[LANDUSE] / Categ[COUPLER] / Origin[SCALElib]' 98 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 99 elseif( ierr > 0 )
then 100 write(*,*)
'xxx Not appropriate names in namelist PARAM_LANDUSE. Check!' 126 if ( landuse_allocean )
then 129 elseif( landuse_allland )
then 133 elseif( landuse_allurban )
then 139 elseif( landuse_mosaicworld )
then 140 if(
io_l )
write(
io_fid_log,*)
'*** Assume all grids have ocean, land, and urban' 173 subroutine landuse_read
181 real(RP) :: temp(
ia,
ja)
183 character(len=H_SHORT) :: varname
190 if ( landuse_in_basename /=
'' )
then 193 landuse_in_basename,
'FRAC_LAND',
'XY', step=1 )
195 landuse_in_basename,
'FRAC_LAKE',
'XY', step=1 )
197 landuse_in_basename,
'FRAC_URBAN',
'XY', step=1 )
207 landuse_in_basename,
'FRAC_OCEAN_abs',
'XY', step=1 )
209 landuse_in_basename,
'FRAC_LAND_abs',
'XY', step=1 )
211 landuse_in_basename,
'FRAC_URBAN_abs',
'XY', step=1 )
221 write(varname,
'(A8,I1.1)')
'FRAC_PFT', p
224 landuse_in_basename, varname,
'XY', step=1 )
230 write(varname,
'(A9,I1.1)')
'INDEX_PFT', p
232 call fileio_read( temp(:,:), &
233 landuse_in_basename, varname,
'XY', step=1 )
236 call comm_vars8( temp(:,:), tag )
237 call comm_wait ( temp(:,:), tag )
243 if(
io_l )
write(
io_fid_log,*)
'*** landuse file is not specified.' 248 end subroutine landuse_read
257 real(RP) :: temp(
ia,
ja)
259 character(len=H_SHORT) :: varname
263 if ( landuse_out_basename /=
'' )
then 268 call fileio_write(
landuse_frac_land(:,:), landuse_out_basename, landuse_out_title, &
269 'FRAC_LAND',
'LAND fraction',
'1',
'XY', landuse_out_dtype, &
272 call fileio_write(
landuse_frac_lake(:,:), landuse_out_basename, landuse_out_title, &
273 'FRAC_LAKE',
'LAKE fraction',
'1',
'XY', landuse_out_dtype, &
275 call fileio_write(
landuse_frac_urban(:,:), landuse_out_basename, landuse_out_title, &
276 'FRAC_URBAN',
'URBAN fraction',
'1',
'XY', landuse_out_dtype, &
280 write(varname,
'(A8,I1.1)')
'FRAC_PFT', p
282 call fileio_write(
landuse_frac_pft(:,:,p), landuse_out_basename, landuse_out_title, &
283 varname,
'PFT fraction',
'1',
'XY', landuse_out_dtype, &
286 write(varname,
'(A9,I1.1)')
'INDEX_PFT', p
287 temp(:,:) =
real(LANDUSE_index_PFT(:,:,p),kind=
rp)
289 call fileio_write( temp(:,:), landuse_out_basename, landuse_out_title, &
290 varname,
'PFT index',
'1',
'XY', landuse_out_dtype, &
294 call fileio_write(
landuse_fact_ocean(:,:), landuse_out_basename, landuse_out_title, &
295 'FRAC_OCEAN_abs',
'absolute OCEAN fraction',
'0-1',
'XY', landuse_out_dtype, &
298 call fileio_write(
landuse_fact_land(:,:), landuse_out_basename, landuse_out_title, &
299 'FRAC_LAND_abs ',
'absolute LAND fraction',
'0-1',
'XY', landuse_out_dtype, &
302 call fileio_write(
landuse_fact_urban(:,:), landuse_out_basename, landuse_out_title, &
303 'FRAC_URBAN_abs',
'absolute URBAN fraction',
'0-1',
'XY', landuse_out_dtype, &
real(rp), dimension(:,:,:), allocatable, public landuse_frac_pft
fraction of PFT for each mosaic
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
logical, public io_l
output log or not? (this process)
subroutine, public landuse_setup
Setup.
subroutine, public landuse_calc_fact
real(rp), dimension(:,:), allocatable, public landuse_frac_urban
urban fraction
integer, public ia
of x whole cells (local, with HALO)
subroutine, public landuse_write
Write landuse data.
real(rp), dimension(:,:), allocatable, public landuse_fact_ocean
ocean factor
integer, public landuse_pft_mosaic
number of PFT mosaic
integer, dimension(:,:,:), allocatable, public landuse_index_pft
index of PFT for each mosaic
real(rp), dimension(:,:), allocatable, public landuse_frac_lake
lake fraction
logical, public io_lnml
output log or not? (for namelist, this process)
integer, public landuse_pft_nmax
number of plant functional type(PFT)
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
integer, public io_fid_log
Log file ID.
integer, parameter, public rp
real(rp), dimension(:,:), allocatable, public landuse_frac_land
land fraction
integer, public ja
of y whole cells (local, with HALO)