95 private :: atmos_grid_cartesc_real_calc_latlon
96 private :: atmos_grid_cartesc_real_calc_z
123 character(len=H_LONG) :: DOMAIN_CATALOGUE_FNAME =
'latlon_domain_catalogue.txt' 124 logical :: DOMAIN_CATALOGUE_OUTPUT = .false.
126 namelist / param_domain_catalogue / &
127 domain_catalogue_fname, &
128 domain_catalogue_output
134 log_info(
"ATMOS_GRID_CARTESC_REAL_setup",*)
'Setup' 138 read(
io_fid_conf,nml=param_domain_catalogue,iostat=ierr)
140 log_info(
"ATMOS_GRID_CARTESC_REAL_setup",*)
'Not found namelist. Default used.' 141 elseif( ierr > 0 )
then 142 log_error(
"ATMOS_GRID_CARTESC_REAL_setup",*)
'Not appropriate names in namelist PARAM_DOMAIN_CATALOGUE. Check!' 145 log_nml(param_domain_catalogue)
192 call atmos_grid_cartesc_real_calc_latlon( domain_catalogue_fname, domain_catalogue_output )
195 call atmos_grid_cartesc_real_calc_z
222 call atmos_grid_cartesc_real_calc_z
240 subroutine atmos_grid_cartesc_real_calc_latlon( &
261 mapprojection_xy2lonlat
264 character(len=*),
intent(in) :: catalogue_fname
265 logical,
intent(in) :: catalogue_output
267 integer,
parameter :: I_MIN = 1
268 integer,
parameter :: I_MAX = 2
269 integer,
parameter :: I_LON = 1
270 integer,
parameter :: I_LAT = 2
272 real(RP) :: mine (2,2)
283 log_info(
"ATMOS_GRID_CARTESC_REAL_calc_latlon",*)
'Base position in the global domain (lat,lon)' 325 log_error(
"ATMOS_GRID_CARTESC_REAL_calc_latlon",*)
'Invalid grid distance in lat-lon! i,j=', i,j
334 log_info(
"ATMOS_GRID_CARTESC_REAL_calc_latlon",*)
'Position on the earth (Local)' 335 log_info_cont(
'(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
339 log_info_cont(
'(1x,A)')
' | |' 340 log_info_cont(
'(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
349 call comm_gather( whole(:,:,:), mine(:,:), 2, 2 )
352 if ( catalogue_output )
then 356 file = trim(catalogue_fname), &
357 form =
'formatted', &
358 status =
'replace', &
361 if ( ierr /= 0 )
then 362 log_error(
"ATMOS_GRID_CARTESC_REAL_calc_latlon",*)
'cannot create latlon-catalogue file!' 367 write(fid,
'(I8,8F32.24)',iostat=ierr) i, whole(i_min,i_lon,i), whole(i_max,i_lon,i), &
368 whole(i_min,i_lat,i), whole(i_max,i_lat,i)
369 if ( ierr /= 0 )
exit 387 end subroutine atmos_grid_cartesc_real_calc_latlon
391 subroutine atmos_grid_cartesc_real_calc_z
423 zs = ( zsfc(i,j) + zsfc(i+1,j) ) * 0.5_rp
438 zs = ( zsfc(i,j) + zsfc(i,j+1) ) * 0.5_rp
453 zs = ( zsfc(i,j) + zsfc(i+1,j) + zsfc(i,j+1) + zsfc(i+1,j+1) ) * 0.25_rp
460 zs = ( zsfc(
ia,j) + zsfc(
ia,j+1) ) * 0.5_rp
466 zs = ( zsfc(i,
ja) + zsfc(i+1,
ja) ) * 0.5_rp
488 zs = ( zsfc(i,j) + zsfc(i+1,j) ) * 0.5_rp
503 zs = ( zsfc(i,j) + zsfc(i,j+1) ) * 0.5_rp
518 zs = ( zsfc(i,j) + zsfc(i+1,j) + zsfc(i,j+1) + zsfc(i+1,j+1) ) * 0.25_rp
525 zs = ( zsfc(
ia,j) + zsfc(
ia,j+1) ) * 0.5_rp
531 zs = ( zsfc(i,
ja) + zsfc(i+1,
ja) ) * 0.5_rp
559 log_info(
"ATMOS_GRID_CARTESC_REAL_calc_Z",*)
'Minimum & maximum aspect ratio' 563 end subroutine atmos_grid_cartesc_real_calc_z
585 real(RP),
intent(in) :: MAPF(
ia,
ja,2,4)
587 real(RP) :: AREAUV(
ia,
ja)
629 call comm_vars8( areauv(:,:), 4 )
662 call comm_wait( areauv(:,:), 4 )
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdy
y-length of control volume [m]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawuy_x
virtical area (wuy, normal x) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_phi
geopotential [m2/s2] (cell center)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdx
x-length of control volume [m]
subroutine, public mapprojection_setup(DOMAIN_CENTER_X, DOMAIN_CENTER_Y)
Setup.
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuv
longitude at staggered point (uv) [rad,0-2pi]
real(rp), public atmos_grid_cartesc_real_basepoint_lon
position of base point in real world [rad,0-2pi]
integer, public ia
of whole cells: x, local, with HALO
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_domain_catalogue
domain latlon catalogue [rad]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areaxv
horizontal area ( xv, normal z) [m2]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areauy
horizontal area ( uy, normal z) [m2]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzuy
geopotential height [m] (wuy)
real(rp), public atmos_grid_cartesc_real_totvolzxv
total volume (zxv, local) [m3]
module INTERPOLATION vertical
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawxv_y
virtical area (wxv, normal y) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzuv
geopotential height [m] (wuv)
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
real(rp), public const_d2r
degree to radian
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fz
face coordinate [m]: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuy_x
virtical area (zuy, normal x) [m2]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdy
y-length of grid(j+1) to grid(j) [m]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
subroutine, public atmos_grid_cartesc_real_setup
Setup.
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czxv
geopotential height [m] (zxv)
integer, public prc_nprocs
myrank in local communicator
real(rp), public atmos_grid_cartesc_real_aspect_min
minimum aspect ratio of the grid cell
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_z1
Height of the lowermost grid from surface (cell center) [m].
real(rp), public atmos_grid_cartesc_real_totvolzuy
total volume (zuy, local) [m3]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cy
center coordinate [m]: y, local
integer, public is
start point of inner domain: x, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czuy
geopotential height [m] (zuy)
real(rp), public atmos_grid_cartesc_real_totareauy
total area (uy, local) [m2]
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_dlon
delta longitude
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuy
latitude at staggered point (uy) [rad,-pi,pi]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdx
x-length of grid(i+1) to grid(i) [m]
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
integer function, public io_get_available_fid()
search & get available file ID
subroutine, public file_cartesc_set_coordinates_atmos(CZ, FZ, LON, LONUY, LONXV, LONUV, LAT, LATUY, LATXV, LATUV, TOPO, LSMASK, AREA, AREAZUY_X, AREAZXV_Y, AREAWUY_X, AREAWXV_Y, AREAUY, AREAZXY_X, AREAZUV_Y, AREAXV, AREAZUV_X, AREAZXY_Y, VOL, VOLWXY, VOLZUY, VOLZXV)
set latlon and z for atmosphere
real(rp), public atmos_grid_cartesc_real_basepoint_lat
position of base point in real world [rad,-pi,pi]
integer, public je
end point of inner domain: y, local
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cx
center coordinate [m]: x, local
real(rp), public const_grav
standard acceleration of gravity [m/s2]
subroutine, public atmos_grid_cartesc_real_update_z
Re-setup with updated topography.
module atmosphere / grid / cartesC
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonxv
longitude at staggered point (xv) [rad,0-2pi]
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuy
longitude at staggered point (uy) [rad,0-2pi]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_y
virtical area (zxy, normal y) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czuv
geopotential height [m] (zuv)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_dlat
delta latitude
subroutine, public prc_abort
Abort Process.
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fy
face coordinate [m]: y, local
integer, public js
start point of inner domain: y, local
real(rp), public atmos_grid_cartesc_real_totvolwxy
total volume (wxy, local) [m3]
real(rp), public mapprojection_basepoint_lon
logical, public topo_exist
topography exists?
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_x
virtical area (zxy, normal x) [m2]
logical, public prc_ismaster
master process in local communicator?
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
real(rp), public atmos_grid_cartesc_real_totareaxv
total area (xv, local) [m2]
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fx
face coordinate [m]: x, local
integer, public ka
of whole cells: z, local, with HALO
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzxv
geopotential height [m] (wxv)
real(rp), public const_pi
pi
subroutine, public interp_vert_setcoef(KA, KS, KE, IA, IS, IE, JA, JS, JE, TOPO_exist, Xi, Xih, Z, Zh)
Setup.
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuv
latitude at staggered point (uv) [rad,-pi,pi]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latxv
latitude at staggered point (xv) [rad,-pi,pi]
real(rp), public atmos_grid_cartesc_domain_center_x
center position of global domain [m]: x
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_x
virtical area (zuv, normal x) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_y
virtical area (zuv, normal y) [m2]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cz
center coordinate [m]: z, local
subroutine, public atmos_grid_cartesc_real_calc_areavol(MAPF)
Calc control area/volume.
real(rp), public atmos_grid_cartesc_domain_center_y
center position of global domain [m]: y
real(rp), public mapprojection_basepoint_lat
real(rp), public atmos_grid_cartesc_real_aspect_max
maximum aspect ratio of the grid cell
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
real(rp), dimension(:,:), allocatable, public landuse_frac_land
land fraction
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxv_y
virtical area (zxv, normal y) [m2]
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]