40 real(RP),
public,
allocatable ::
real_cz (:,:,:)
41 real(RP),
public,
allocatable ::
real_fz (:,:,:)
55 real(RP),
public,
allocatable ::
real_z1 (:,:)
59 real(RP),
public,
allocatable ::
real_phi (:,:,:)
62 real(RP),
public,
allocatable ::
real_vol (:,:,:)
73 private :: real_calc_latlon
74 private :: real_calc_z
97 character(len=H_LONG) :: domain_catalogue_fname =
'latlon_domain_catalogue.txt' 98 logical :: domain_catalogue_output = .false.
100 namelist / param_domain_catalogue / &
101 domain_catalogue_fname, &
102 domain_catalogue_output
108 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[GRID_REAL] / Categ[ATMOS-RM GRID] / Origin[SCALElib]' 112 read(
io_fid_conf,nml=param_domain_catalogue,iostat=ierr)
114 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 115 elseif( ierr > 0 )
then 116 write(*,*)
'xxx Not appropriate names in namelist PARAM_DOMAIN_CATALOGUE. Check!' 146 call real_calc_latlon( domain_catalogue_fname, domain_catalogue_output )
185 subroutine real_calc_latlon( &
209 character(len=*),
intent(in) :: catalogue_fname
210 logical,
intent(in) :: catalogue_output
212 integer,
parameter :: i_lon = 1
213 integer,
parameter :: i_lat = 2
214 integer,
parameter :: i_nw = 1
215 integer,
parameter :: i_ne = 2
216 integer,
parameter :: i_sw = 3
217 integer,
parameter :: i_se = 4
219 real(RP) :: mine (4,2)
230 if(
io_l )
write(
io_fid_log,*)
'*** Base position in the global domain (lat,lon)' 267 write(*,*)
'xxx Invalid grid distance in lat-lon! i,j=', i,j
276 if(
io_l )
write(
io_fid_log,*)
'*** Position on the earth (Local)' 277 if(
io_l )
write(
io_fid_log,
'(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
283 if(
io_l )
write(
io_fid_log,
'(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
296 call comm_gather( whole(:,:), mine(:,:), 4, 2 )
299 if ( catalogue_output )
then 303 file = trim(catalogue_fname), &
304 form =
'formatted', &
305 status =
'replace', &
308 if ( ierr /= 0 )
then 309 write(*,*)
'xxx [REAL_calc_latlon] cannot create latlon-catalogue file!' 314 write(fid,
'(I8,8F32.24)',iostat=ierr) i, whole(i_nw,i_lon+2*(i-1)), whole(i_ne,i_lon+2*(i-1)), &
315 whole(i_sw,i_lon+2*(i-1)), whole(i_se,i_lon+2*(i-1)), &
316 whole(i_nw,i_lat+2*(i-1)), whole(i_ne,i_lat+2*(i-1)), &
317 whole(i_sw,i_lat+2*(i-1)), whole(i_se,i_lat+2*(i-1))
318 if ( ierr /= 0 )
exit 340 end subroutine real_calc_latlon
344 subroutine real_calc_z
367 real_cz(k,i,j) = ( htop - zsfc(i,j) ) / htop *
grid_cz(k) + zsfc(i,j)
375 real_fz(k,i,j) = ( htop - zsfc(i,j) ) / htop *
grid_fz(k) + zsfc(i,j)
397 if(
io_l )
write(
io_fid_log,*)
'*** Minimum & maximum aspect ratio' 401 end subroutine real_calc_z
414 real(RP),
intent(in) :: mapf(
ia,
ja,2)
integer, public is
start point of inner domain: x, local
real(rp), public grid_domain_center_x
center position of global domain [m]: x
integer, public je
end point of inner domain: y, local
logical, public prc_ismaster
master process in local communicator?
real(rp), public dy
length in the main region [m]: y
subroutine, public prc_mpistop
Abort MPI.
real(rp), public real_basepoint_lat
position of base point in real world [rad,-pi,pi]
real(rp), public mprj_basepoint_lat
real(rp), public dx
length in the main region [m]: x
logical, public io_l
output log or not? (this process)
real(rp), dimension(:), allocatable, public grid_cz
center coordinate [m]: z, local=global
subroutine, public mprj_xy2lonlat(x, y, lon, lat)
(x,y) -> (lon,lat)
real(rp), public const_radius
radius of the planet [m]
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public real_fz
geopotential height [m] (cell face )
real(rp), public real_aspect_max
maximum aspect ratio of the grid cell
real(rp), dimension(:,:,:), allocatable, public real_cz
geopotential height [m] (cell center)
real(rp), public const_d2r
degree to radian
real(rp), public mprj_basepoint_lon
real(rp), public dz
length in the main region [m]: z
real(rp), dimension(:), allocatable, public grid_fx
face coordinate [m]: x, local
logical, public io_nml
output log or not? (for namelist, this process)
subroutine, public real_setup
Setup.
integer, public ia
of whole cells: x, local, with HALO
real(rp), dimension(:,:), allocatable, public real_latx
latitude at staggered point (uy) [rad,-pi,pi]
integer function, public io_get_available_fid()
search & get available file ID
real(rp), dimension(:,:), allocatable, public real_z1
Height of the lowermost grid from surface (cell center) [m].
real(rp), dimension(:,:), allocatable, public real_dlon
delta longitude
integer, public ka
of whole cells: z, local, with HALO
real(rp), dimension(:,:), allocatable, public real_area
horizontal area [m2]
real(rp), dimension(:), allocatable, public grid_fz
face coordinate [m]: z, local=global
real(rp), dimension(:,:), allocatable, public real_lonxy
longitude at staggered point (uv) [rad,0-2pi]
real(rp), public real_aspect_min
minimum aspect ratio of the grid cell
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, public js
start point of inner domain: y, local
real(rp), dimension(:,:), allocatable, public real_dlat
delta latitude
real(rp), dimension(:,:,:), allocatable, public real_vol
control volume [m3]
real(rp), public real_totvol
total volume (local) [m3]
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:), allocatable, public grid_cx
center coordinate [m]: x, local
real(rp), dimension(:,:,:), allocatable, public real_domain_catalogue
domain latlon catalogue [rad]
subroutine, public real_update_z
Re-setup with updated topography.
real(rp), public grid_domain_center_y
center position of global domain [m]: y
integer, public ie
end point of inner domain: x, local
subroutine, public real_calc_areavol(MAPF)
Calc control area/volume.
real(rp), dimension(:,:,:), allocatable, public real_phi
geopotential [m2/s2] (cell center)
real(rp), public real_totarea
total area (local) [m2]
real(rp), dimension(:,:), allocatable, public real_lon
longitude [rad,0-2pi]
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
real(rp), dimension(:), allocatable, public grid_cdy
y-length of control volume [m]
real(rp), public const_pi
pi
subroutine, public fileio_set_coordinates(LON, LONX, LONY, LONXY, LAT, LATX, LATY, LATXY, CZ, FZ)
set latlon and z
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public real_lat
latitude [rad,-pi,pi]
real(rp), dimension(:,:), allocatable, public real_lony
longitude at staggered point (xv) [rad,0-2pi]
integer, public io_fid_log
Log file ID.
subroutine, public mprj_setup(DOMAIN_CENTER_X, DOMAIN_CENTER_Y)
Setup.
integer, public prc_nprocs
myrank in local communicator
real(rp), dimension(:,:), allocatable, public real_latxy
latitude at staggered point (uv) [rad,-pi,pi]
real(rp), dimension(:,:), allocatable, public real_lonx
longitude at staggered point (uy) [rad,0-2pi]
real(rp), dimension(:), allocatable, public grid_cdx
x-length of control volume [m]
integer, public io_fid_nml
Log file ID (only for output namelist)
real(rp), dimension(:), allocatable, public grid_cy
center coordinate [m]: y, local
real(rp), public real_basepoint_lon
position of base point in real world [rad,0-2pi]
real(rp), dimension(:,:), allocatable, public real_laty
latitude at staggered point (xv) [rad,-pi,pi]
integer, public ja
of whole cells: y, local, with HALO
real(rp), dimension(:), allocatable, public grid_fy
face coordinate [m]: y, local