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_allland = .false.
64 logical,
private :: landuse_allurban = .false.
65 logical,
private :: landuse_mosaicworld = .false.
76 namelist / param_landuse / &
77 landuse_in_basename, &
78 landuse_out_basename, &
90 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[LANDUSE] / Categ[COUPLER] / Origin[SCALElib]' 96 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 97 elseif( ierr > 0 )
then 98 write(*,*)
'xxx Not appropriate names in namelist PARAM_LANDUSE. Check!' 124 if ( landuse_allland )
then 128 elseif( landuse_allurban )
then 134 elseif( landuse_mosaicworld )
then 135 if(
io_l )
write(
io_fid_log,*)
'*** Assume all grids have ocean, land, and urban' 168 subroutine landuse_read
176 real(RP) :: temp(
ia,
ja)
178 character(len=H_SHORT) :: varname
185 if ( landuse_in_basename /=
'' )
then 188 landuse_in_basename,
'FRAC_LAND',
'XY', step=1 )
190 landuse_in_basename,
'FRAC_LAKE',
'XY', step=1 )
192 landuse_in_basename,
'FRAC_URBAN',
'XY', step=1 )
202 landuse_in_basename,
'FRAC_OCEAN_abs',
'XY', step=1 )
204 landuse_in_basename,
'FRAC_LAND_abs',
'XY', step=1 )
206 landuse_in_basename,
'FRAC_URBAN_abs',
'XY', step=1 )
216 write(varname,
'(A8,I1.1)')
'FRAC_PFT', p
219 landuse_in_basename, varname,
'XY', step=1 )
225 write(varname,
'(A9,I1.1)')
'INDEX_PFT', p
227 call fileio_read( temp(:,:), &
228 landuse_in_basename, varname,
'XY', step=1 )
231 call comm_vars8( temp(:,:), tag )
232 call comm_wait ( temp(:,:), tag )
238 if(
io_l )
write(
io_fid_log,*)
'*** landuse file is not specified.' 243 end subroutine landuse_read
252 real(RP) :: temp(
ia,
ja)
254 character(len=H_SHORT) :: varname
258 if ( landuse_out_basename /=
'' )
then 263 call fileio_write(
landuse_frac_land(:,:), landuse_out_basename, landuse_out_title, &
264 'FRAC_LAND',
'LAND fraction',
'1',
'XY', landuse_out_dtype, &
267 call fileio_write(
landuse_frac_lake(:,:), landuse_out_basename, landuse_out_title, &
268 'FRAC_LAKE',
'LAKE fraction',
'1',
'XY', landuse_out_dtype, &
270 call fileio_write(
landuse_frac_urban(:,:), landuse_out_basename, landuse_out_title, &
271 'FRAC_URBAN',
'URBAN fraction',
'1',
'XY', landuse_out_dtype, &
275 write(varname,
'(A8,I1.1)')
'FRAC_PFT', p
277 call fileio_write(
landuse_frac_pft(:,:,p), landuse_out_basename, landuse_out_title, &
278 varname,
'PFT fraction',
'1',
'XY', landuse_out_dtype, &
281 write(varname,
'(A9,I1.1)')
'INDEX_PFT', p
282 temp(:,:) =
real(LANDUSE_index_PFT(:,:,p),kind=
rp)
284 call fileio_write( temp(:,:), landuse_out_basename, landuse_out_title, &
285 varname,
'PFT index',
'1',
'XY', landuse_out_dtype, &
289 call fileio_write(
landuse_fact_ocean(:,:), landuse_out_basename, landuse_out_title, &
290 'FRAC_OCEAN_abs',
'absolute OCEAN fraction',
'0-1',
'XY', landuse_out_dtype, &
293 call fileio_write(
landuse_fact_land(:,:), landuse_out_basename, landuse_out_title, &
294 'FRAC_LAND_abs ',
'absolute LAND fraction',
'0-1',
'XY', landuse_out_dtype, &
297 call fileio_write(
landuse_fact_urban(:,:), landuse_out_basename, landuse_out_title, &
298 '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)