61 integer,
parameter :: handle = 1
63 real(RP),
allocatable :: read2d(:,:)
64 real(RP),
allocatable :: read3d(:,:,:)
65 real(RP),
allocatable :: read3dl(:,:,:)
75 integer,
intent(out) :: dims(6)
80 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Atom Input File Type: SCALE-RM' 108 real(RP),
intent(out) :: lon_org(:,:)
109 real(RP),
intent(out) :: lat_org(:,:)
110 real(RP),
intent(out) :: cz_org (:,:,:)
111 character(len=*),
intent(in) :: basename_org
112 integer,
intent(in) :: dims(6)
115 integer :: xloc, yloc
116 integer :: xs, xe, ys, ye
120 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[AtomOpenSCALE]' 127 yloc = int(
real(i-1) /
real(NEST_TILE_NUM_X) ) + 1
134 call fileread( read2d(:,:), basename_org,
"lon", 1, rank )
135 lon_org(xs:xe,ys:ye) = read2d(:,:) * d2r
137 call fileread( read2d(:,:), basename_org,
"lat", 1, rank )
138 lat_org(xs:xe,ys:ye) = read2d(:,:) * d2r
140 call fileread( read3d(:,:,:), basename_org,
"height", 1, rank )
142 cz_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
145 call fileread( read2d(:,:), basename_org,
"topo", 1, rank )
146 cz_org(2,xs:xe,ys:ye) = read2d(:,:)
150 cz_org(1,:,:) = 0.0_rp
179 hydrostatic_buildrho_real => atmos_hydrostatic_buildrho_real
181 thermodyn_temp_pres => atmos_thermodyn_temp_pres, &
182 thermodyn_pott => atmos_thermodyn_pott
195 real(RP),
intent(out) :: velz_org(:,:,:)
196 real(RP),
intent(out) :: velx_org(:,:,:)
197 real(RP),
intent(out) :: vely_org(:,:,:)
198 real(RP),
intent(out) :: pres_org(:,:,:)
199 real(RP),
intent(out) :: dens_org(:,:,:)
200 real(RP),
intent(out) :: pott_org(:,:,:)
201 real(RP),
intent(out) :: qtrc_org(:,:,:,:)
202 logical,
intent(in) :: flg_bin
203 logical,
intent(in) :: flg_intrp
204 character(len=*),
intent(in) :: basename_org
205 integer,
intent(in) :: mptype_parent
206 integer,
intent(in) :: dims(6)
207 integer,
intent(in) :: it
211 real(RP) :: momz_org(dims(1)+2,dims(2),dims(3))
212 real(RP) :: momx_org(dims(1)+2,dims(2),dims(3))
213 real(RP) :: momy_org(dims(1)+2,dims(2),dims(3))
214 real(RP) :: rhot_org(dims(1)+2,dims(2),dims(3))
215 real(RP) :: tsfc_org( dims(2),dims(3))
220 integer :: xloc, yloc
223 integer :: k, i, j, iq
224 logical :: lack_of_val
228 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[AtomInputSCALE]' 235 yloc = int(
real(i-1) /
real(NEST_TILE_NUM_X) ) + 1
242 call fileread( read2d(:,:), basename_org,
"T2", it, rank )
243 tsfc_org(xs:xe,ys:ye) = read2d(:,:)
245 call fileread( read2d(:,:), basename_org,
"MSLP", it, rank )
246 pres_org(1,xs:xe,ys:ye) = read2d(:,:)
248 call fileread( read3d(:,:,:), basename_org,
"DENS", it, rank )
250 dens_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
253 call fileread( read3d(:,:,:), basename_org,
"MOMZ", it, rank )
255 momz_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
258 call fileread( read3d(:,:,:), basename_org,
"MOMX", it, rank )
260 momx_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
263 call fileread( read3d(:,:,:), basename_org,
"MOMY", it, rank )
265 momy_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
268 call fileread( read3d(:,:,:), basename_org,
"RHOT", it, rank )
270 rhot_org(k+2,xs:xe,ys:ye) = read3d(:,:,k)
273 if( flg_bin .and. flg_intrp )
then 275 if(
io_l )
write(
io_fid_log,*)
'+++ SDF of SBM(S10) is interpolated from Qxx and Nxx' 288 qtrc_org(2,xs:xe,ys:ye,iq) = qtrc_org(3,xs:xe,ys:ye,iq)
293 do iq = 1, mptype_parent
294 call fileread( read3d(:,:,:), basename_org,
aq_name(iq), it, rank )
296 qtrc_org(k+2,xs:xe,ys:ye,iq) = read3d(:,:,k)
298 qtrc_org(2,xs:xe,ys:ye,iq) = qtrc_org(3,xs:xe,ys:ye,iq)
300 do iq = mptype_parent+1,
qa 301 qtrc_org(:,xs:xe,ys:ye,iq) = 0.0_rp
315 velz_org(k,i,j) = ( momz_org(k-1,i,j) + momz_org(k,i,j) ) / dens_org(k,i,j) * 0.5_rp
321 velz_org(1:3 ,i,j) = 0.0_rp
322 velz_org(dims(1)+2,i,j) = 0.0_rp
330 velx_org(k,i,j) = ( momx_org(k,i-1,j) + momx_org(k,i,j) ) / dens_org(k,i,j) * 0.5_rp
336 velx_org(k,1,j) = momx_org(k,1,j) / dens_org(k,1,j)
339 velx_org(1:2,:,:) = 0.0_rp
345 vely_org(k,i,j) = ( momy_org(k,i,j-1) + momy_org(k,i,j) ) / dens_org(k,i,j) * 0.5_rp
351 vely_org(k,i,1) = momy_org(k,i,1) / dens_org(k,i,1)
354 vely_org(1:2,:,:) = 0.0_rp
364 call thermodyn_temp_pres( temp_org, &
369 pott_org(k,i,j) = rhot_org(k,i,j) / dens_org(k,i,j)
371 pott_org(1:2,i,j) = pott_org(3,i,j)
372 pres_org(2,i,j) = p00 * ( tsfc_org(i,j) / pott_org(2,i,j) )**(cpdry/rdry)
373 dens_org(1,i,j) = p00 * ( p00/pres_org(1,i,j) )**(rdry/cpdry-1.0_rp)
374 dens_org(2,i,j) = pres_org(2,i,j) / ( tsfc_org(i,j) * rdry )
375 qtrc_org(1,i,j,:) = qtrc_org(2,i,j,:)
388 integer,
intent(out) :: ldims(3)
393 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Land Input File Type: SCALE-RM' 398 if ( .not.
allocated(read2d) )
then 420 use_file_landwater, &
428 real(RP),
intent(out) :: tg_org(:,:,:)
429 real(RP),
intent(out) :: strg_org(:,:,:)
430 real(RP),
intent(out) :: lst_org(:,:)
431 real(RP),
intent(out) :: ust_org(:,:)
432 real(RP),
intent(out) :: albg_org(:,:,:)
433 real(RP),
intent(out) :: topo_org(:,:)
434 real(RP),
intent(out) :: lmask_org(:,:)
435 real(RP),
intent(out) :: llon_org(:,:)
436 real(RP),
intent(out) :: llat_org(:,:)
437 real(RP),
intent(out) :: lz_org(:)
439 character(len=*),
intent(in) :: basename_land
440 integer,
intent(in) :: ldims(3)
441 logical,
intent(in) :: use_file_landwater
442 integer,
intent(in) :: it
446 integer :: k, i, j, n
447 integer :: xloc, yloc
452 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[LandInputSCALE]' 459 yloc = int(
real(i-1) /
real(NEST_TILE_NUM_X) ) + 1
466 call fileread( read3dl(:,:,:), basename_land,
"LAND_TEMP", it, rank )
468 tg_org(k,xs:xe,ys:ye) = read3dl(:,:,k)
471 if( use_file_landwater )
then 472 call fileread( read3dl(:,:,:), basename_land,
"LAND_WATER", it, rank )
474 strg_org(k,xs:xe,ys:ye) = read3dl(:,:,k)
478 call fileread( read2d(:,:), basename_land,
"lon", 1, rank )
479 llon_org(xs:xe,ys:ye) = read2d(:,:) * d2r
481 call fileread( read2d(:,:), basename_land,
"lat", 1, rank )
482 llat_org(xs:xe,ys:ye) = read2d(:,:) * d2r
484 call fileread( read2d(:,:), basename_land,
"LAND_SFC_TEMP", it, rank )
485 lst_org(xs:xe,ys:ye) = read2d(:,:)
487 call fileread( read2d(:,:), basename_land,
"URBAN_SFC_TEMP", it, rank )
488 ust_org(xs:xe,ys:ye) = read2d(:,:)
490 call fileread( read2d(:,:), basename_land,
"LAND_ALB_LW", it, rank )
491 albg_org(xs:xe,ys:ye,1) = read2d(:,:)
493 call fileread( read2d(:,:), basename_land,
"LAND_ALB_SW", it, rank )
494 albg_org(xs:xe,ys:ye,2) = read2d(:,:)
496 call fileread( read2d(:,:), basename_land,
"topo", it, rank )
497 topo_org(xs:xe,ys:ye) = read2d(:,:)
499 call fileread( read2d(:,:), basename_land,
"lsmask", it, rank )
500 lmask_org(xs:xe,ys:ye) = read2d(:,:)
504 call fileread( lz_org(:), basename_land,
"lz", 1, rank )
515 integer,
intent(out) :: odims(2)
520 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Ocean Input File Type: SCALE-RM' 524 if ( .not.
allocated(read2d) )
then 543 real(RP),
intent(out) :: olon_org (:,:)
544 real(RP),
intent(out) :: olat_org (:,:)
545 real(RP),
intent(out) :: omask_org(:,:)
546 character(len=*),
intent(in) :: basename_ocean
547 integer,
intent(in) :: odims(2)
550 integer :: xloc, yloc
551 integer :: xs, xe, ys, ye
555 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[OceanOpenSCALE]' 562 yloc = int(
real(i-1) /
real(NEST_TILE_NUM_X) ) + 1
569 call fileread( read2d(:,:), basename_ocean,
"lon", 1, rank )
570 olon_org(xs:xe,ys:ye) = read2d(:,:) * d2r
572 call fileread( read2d(:,:), basename_ocean,
"lat", 1, rank )
573 olat_org(xs:xe,ys:ye) = read2d(:,:) * d2r
575 call fileread( read2d(:,:), basename_ocean,
"lsmask", 1, rank )
576 omask_org(xs:xe,ys:ye) = read2d(:,:)
597 real(RP),
intent(out) :: tw_org(:,:)
598 real(RP),
intent(out) :: sst_org(:,:)
599 real(RP),
intent(out) :: albw_org(:,:,:)
600 real(RP),
intent(out) :: z0w_org(:,:)
601 real(RP),
intent(out) :: omask_org(:,:)
603 character(len=*),
intent(in) :: basename_ocean
604 integer,
intent(in) :: odims(2)
605 integer,
intent(in) :: it
610 integer :: xloc, yloc
615 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[OceanInputSCALE]' 622 yloc = int(
real(i-1) /
real(NEST_TILE_NUM_X) ) + 1
629 call fileread( read2d(:,:), basename_ocean,
"OCEAN_TEMP", it, rank )
630 tw_org(xs:xe,ys:ye) = read2d(:,:)
632 call fileread( read2d(:,:), basename_ocean,
"OCEAN_SFC_TEMP", it, rank )
633 sst_org(xs:xe,ys:ye) = read2d(:,:)
635 call fileread( read2d(:,:), basename_ocean,
"OCEAN_ALB_LW", it, rank )
636 albw_org(xs:xe,ys:ye,1) = read2d(:,:)
638 call fileread( read2d(:,:), basename_ocean,
"OCEAN_ALB_SW", it, rank )
639 albw_org(xs:xe,ys:ye,2) = read2d(:,:)
641 call fileread( read2d(:,:), basename_ocean,
"OCEAN_SFC_Z0M", it, rank )
642 z0w_org(xs:xe,ys:ye) = read2d(:,:)
644 call fileread( read2d(:,:), basename_ocean,
"lsmask", it, rank )
645 omask_org(xs:xe,ys:ye) = read2d(:,:)
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
subroutine, public prc_mpistop
Abort MPI.
module ATMOSPHERE / Physics Cloud Microphysics - Convert
integer, dimension(2), public parent_jmax
parent max number in y-direction
module GRID (nesting system)
logical, public io_l
output log or not? (this process)
subroutine, public atmos_phy_mp_bulk2bin(xs, xe, ys, ye, dims, it, rank, handle, basename_org, dens_org, qtrc_org)
Bulk to Bin.
real(rp), public const_d2r
degree to radian
procedure(intrpnest_intfc_interp_2d), pointer, public intrpnest_interp_2d
integer, dimension(:), allocatable, public nest_tile_id
parent tile real id
subroutine, public intrpnest_interp_fact_llz(hfact, vfact, kgrd, igrd, jgrd, ncopy, myhgt, mylat, mylon, myKS, myKE, myIA, myJA, inhgt, inlat, inlon, inKA, inIA, inJA, landgrid)
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
real(rp), public const_pre00
pressure reference [Pa]
character(len=h_short), dimension(:), allocatable, public aq_name
module ATMOSPHERE / Hydrostatic barance
real(rp), dimension(:,:,:), allocatable, public gtrans_rotc
rotation coefficient
integer, dimension(2), public parent_lkmax
parent max number in lz-direction
procedure(intrpnest_intfc_interp_3d), pointer, public intrpnest_interp_3d
integer, public nest_tile_num_y
parent tile number in y-direction
integer, dimension(2), public parent_kmax
parent max number in z-direction
integer, public prc_myrank
process num in local communicator
module INTERPOLATION (nesting system)
integer, dimension(2), public parent_imax
parent max number in x-direction
module ATMOSPHERE / Thermodynamics
integer, public nest_tile_num_x
parent tile number in x-direction
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
integer, public io_fid_log
Log file ID.