SCALE-RM
Functions/Subroutines | Variables
mod_realinput Module Reference

module REAL input More...

Functions/Subroutines

subroutine, public realinput_atmos
 
subroutine, public realinput_surface
 
subroutine land_interporation (kmax, imax, jmax, oimax, ojmax, tg, strg, lst, albg, tg_org, strg_org, smds_org, lst_org, albg_org, sst_org, lmask_org, lsmask_nest, topo_org, lz_org, llon_org, llat_org, LCZ, CX, CY, LON, LAT, maskval_tg, maskval_strg, init_landwater_ratio, use_file_landwater, use_waterratio, soilwater_ds2vc_flag, elevation_correction, intrp_iter_max, ol_interp)
 
subroutine ocean_interporation (imax, jmax, sst_org, tw_org, albw_org, z0w_org, CX, CY, elevation_correction_ocean, init_ocean_alb_lw, init_ocean_alb_sw, init_ocean_z0w, first_surface, sst, tw, albw, z0w)
 
subroutine urban_input (lst, albg, DENS, MOMX, MOMY, RHOT, QTRC, tc_urb, qc_urb, uc_urb, ust, albu)
 
subroutine make_mask (gmask, data, nx, ny, landdata)
 
subroutine replace_misval_const (data, maskval, frac_land)
 
subroutine replace_misval_map (data, maskval, nx, ny, elem)
 
subroutine get_ijrange (IS_org, IE_org, JS_org, JE_org, IA_org, JA_org, LON_min, LON_max, LAT_min, LAT_max, LON_all, LAT_all)
 

Variables

integer, parameter, public inetcdf = 1
 
integer, parameter, public igrads = 2
 

Detailed Description

module REAL input

Description
read data from file for real atmospheric simulations
Author
Team SCALE
NAMELIST
  • PARAM_MKINIT_REAL_ATMOS
    nametypedefault valuecomment
    NUMBER_OF_FILES integer 1
    NUMBER_OF_TSTEPS integer -1 num of time steps in one file
    NUMBER_OF_SKIP_TSTEPS integer 0 num of skipped first several data
    SERIAL_PROC_READ logical .true. read by one MPI process and broadcast
    FILETYPE_ORG character(len=H_LONG) ''
    BASENAME_ORG character(len=*)
    BASENAME_ADD_NUM logical .false.
    BASENAME_BOUNDARY character(len=H_LONG) ''
    BOUNDARY_POSTFIX_TIMELABEL logical .false.
    BOUNDARY_TITLE character(len=H_LONG) 'SCALE-RM BOUNDARY CONDITION for REAL CASE'
    BOUNDARY_DTYPE character(len=H_SHORT) 'DEFAULT'
    BOUNDARY_UPDATE_DT real(DP) 0.0_DP inteval time of boudary data update [s]
    FILTER_ORDER integer 8 order of the hyper-diffusion (must be even)
    FILTER_NITER integer 0 times for hyper-diffusion iteration
    USE_FILE_DENSITY logical .false. use density data from files
    PT_DRY logical .true. potential temperature is defined associated with dry air
    USE_NONHYDRO_DENS_BOUNDARY logical .false. > use non-hydrostatic density for boundary data
    USE_SFC_DIAGNOSES logical .false. > use surface diagnoses
    USE_DATA_UNDER_SFC logical .true. > use data under the surface
    SAME_MP_TYPE logical .false. microphysics type of the parent model is same as it in this model
    UPPER_QV_TYPE character(len=4) "ZERO" how qv is given at higher level than outer model
    INTRP_TYPE character(len=H_SHORT) "LINEAR" ! "LINEAR" or "DIST-WEIGHT"
    SKIP_VERTICAL_RANGE_CHECK logical .false. > skip chkecking if the domain top does not exceed that of the parent in the vertical direction

  • PARAM_MKINIT_REAL_LAND
    nametypedefault valuecomment
    NUMBER_OF_FILES integer 1
    NUMBER_OF_TSTEPS integer -1 num of time steps in one file
    NUMBER_OF_SKIP_TSTEPS integer 0 num of skipped first several data
    FILETYPE_ORG character(len=H_LONG) ''
    BASENAME_ORG character(len=*)
    BASENAME_ADD_NUM logical .false.
    BASENAME_BOUNDARY character(len=H_LONG) ''
    BOUNDARY_POSTFIX_TIMELABEL logical .false.
    BOUNDARY_TITLE character(len=H_LONG) 'SCALE-RM BOUNDARY CONDITION for REAL CASE'
    BOUNDARY_UPDATE_DT real(DP) 0.0_DP inteval time of boudary data update [s]
    USE_FILE_LANDWATER logical
    INIT_LANDWATER_RATIO real(RP)

  • PARAM_MKINIT_REAL_OCEAN
    nametypedefault valuecomment
    NUMBER_OF_FILES integer 1
    NUMBER_OF_TSTEPS integer -1 num of time steps in one file
    NUMBER_OF_SKIP_TSTEPS integer 0 num of skipped first several data
    FILETYPE_ORG character(len=H_LONG) ''
    BASENAME_ORG character(len=*)
    BASENAME_ADD_NUM logical .false.
    BASENAME_BOUNDARY character(len=H_LONG) ''
    BOUNDARY_POSTFIX_TIMELABEL logical .false.
    BOUNDARY_TITLE character(len=H_LONG) 'SCALE-RM BOUNDARY CONDITION for REAL CASE'
    BOUNDARY_UPDATE_DT real(DP) 0.0_DP inteval time of boudary data update [s]
    INIT_OCEAN_ALB_LW real(RP)
    INIT_OCEAN_ALB_SW real(RP)
    INIT_OCEAN_Z0W real(RP)
    INTRP_TYPE character(len=H_SHORT) "LINEAR" ! "LINEAR" or "DIST-WEIGHT"
    INTRP_OCEAN_TEMP character(len=*)
    INTRP_OCEAN_SFC_TEMP character(len=*)
    INTRP_ITER_MAX integer
    FILTER_ORDER integer 8 order of the hyper-diffusion (must be even)
    FILTER_NITER integer 0 times for hyper-diffusion iteration
    SERIAL_PROC_READ logical .true. read by one MPI process and broadcast

History Output
No history output

Function/Subroutine Documentation

◆ realinput_atmos()

subroutine, public mod_realinput::realinput_atmos

Definition at line 205 of file mod_realinput.F90.

205  use scale_const, only: &
206  p00 => const_pre00
207  use scale_time, only: &
209  use mod_atmos_vars, only: &
210  dens, &
211  momz, &
212  momx, &
213  momy, &
214  rhot, &
215  qtrc
216  use mod_atmos_admin, only: &
218  use scale_atmos_thermodyn, only: &
219  atmos_thermodyn_specific_heat
220  implicit none
221 
222  logical :: USE_SFC_DIAGNOSES = .false.
223  logical :: USE_DATA_UNDER_SFC = .true.
224  logical :: USE_NONHYDRO_DENS_BOUNDARY = .false.
225  logical :: SKIP_VERTICAL_RANGE_CHECK = .false.
226 
227 
228  namelist / param_mkinit_real_atmos / &
229  number_of_files, &
230  number_of_tsteps, &
231  number_of_skip_tsteps, &
232  serial_proc_read, &
233  filetype_org, &
234  basename_org, &
235  basename_add_num, &
236  basename_boundary, &
237  boundary_postfix_timelabel, &
238  boundary_title, &
239  boundary_dtype, &
240  boundary_update_dt, &
241  filter_order, &
242  filter_niter, &
243  use_file_density, &
244  pt_dry, &
245  use_nonhydro_dens_boundary, &
246  use_sfc_diagnoses, &
247  use_data_under_sfc, &
248  same_mp_type, &
249  upper_qv_type, &
250  intrp_type, &
251  skip_vertical_range_check
252 
253  character(len=6) :: basename_num
254  character(len=H_LONG) :: basename_out_mod
255  character(len=19) :: timelabel
256 
257  integer :: dims(6) ! dims 1-3: normal, 4-6: staggerd
258  integer :: timelen
259 
260  integer :: fid_atmos
261  integer :: vid_atmos(5+QA)
262  logical :: qtrc_flag(QA)
263 
264  real(RP) :: DENS_in(KA,IA,JA)
265  real(RP) :: MOMZ_in(KA,IA,JA) ! staggered point
266  real(RP) :: MOMX_in(KA,IA,JA) ! staggered point
267  real(RP) :: MOMY_in(KA,IA,JA) ! staggered point
268  real(RP) :: RHOT_in(KA,IA,JA)
269  real(RP) :: QTRC_in(KA,IA,JA,QA)
270 
271  real(RP) :: VELZ_in(KA,IA,JA) ! staggered point
272  real(RP) :: VELX_in(KA,IA,JA) ! staggered point
273  real(RP) :: VELY_in(KA,IA,JA) ! staggered point
274  real(RP) :: PT_in (KA,IA,JA)
275  real(RP) :: PRES_in(KA,IA,JA)
276 
277  real(RP) :: Qdry (KA,IA,JA)
278  real(RP) :: Rtot (KA,IA,JA)
279  real(RP) :: CPtot(KA,IA,JA)
280  real(RP) :: CVtot(KA,IA,JA)
281 
282  integer :: ifile, istep, t, tall
283  integer :: k, i, j, iq
284  integer :: ierr
285  !---------------------------------------------------------------------------
286 
287  log_newline
288  log_info('REALINPUT_atmos',*) 'Setup'
289 
290  !--- read namelist
291  rewind(io_fid_conf)
292  read(io_fid_conf,nml=param_mkinit_real_atmos,iostat=ierr)
293  if( ierr < 0 ) then !--- missing
294  log_info("REALINPUT_atmos",*) 'Not found namelist. Default used.'
295  elseif( ierr > 0 ) then !--- fatal error
296  log_error("REALINPUT_atmos",*) 'Not appropriate names in namelist PARAM_MKINIT_REAL_ATMOS. Check!'
297  call prc_abort
298  endif
299  log_nml(param_mkinit_real_atmos)
300 
301  if ( boundary_update_dt <= 0.0_dp ) then
302  log_error("REALINPUT_atmos",*) 'BOUNDARY_UPDATE_DT is necessary in real case preprocess'
303  call prc_abort
304  endif
305 
306  if ( number_of_files > 1 .OR. basename_add_num ) then
307  basename_num = '_00000'
308  else
309  basename_num = ''
310  endif
311 
312  select case( intrp_type )
313  case ( "LINEAR" )
314  itp_nh_a = 4
315  itp_type_a = i_intrp_linear
316  case ( "DIST-WEIGHT" )
317  itp_nh_a = comm_cartesc_nest_interp_level
318  itp_type_a = i_intrp_dstwgt
319  case default
320  log_error("REALINPUT_atmos",*) 'Unsupported type of INTRP_TYPE : ', trim(intrp_type)
321  log_error_cont(*) ' It must be "LINEAR" or "DIST-WEIGHT"'
322  call prc_abort
323  end select
324 
325  call parentatmossetup( filetype_org, & ! [IN]
326  basename_org, & ! [IN]
327  basename_num, & ! [IN]
328  serial_proc_read, & ! [IN]
329  same_mp_type, & ! [IN]
330  use_file_density, & ! [IN]
331  dims(:), & ! [OUT]
332  timelen, & ! [OUT]
333  qtrc_flag(:) ) ! [OUT]
334 
335  if ( timelen < number_of_tsteps ) then
336  log_error("REALINPUT_atmos",*) 'time dimension in file is shorter than NUMBER_OF_TSTEPS', timelen, number_of_tsteps
337  call prc_abort
338  end if
339  if ( number_of_tsteps < 1 ) then
340  number_of_tsteps = timelen
341  end if
342 
343  log_newline
344  log_info("REALINPUT_atmos",*) 'Number of temporal data in each file : ', number_of_tsteps
345 
346  do ifile = 1, number_of_files
347 
348  if ( number_of_files > 1 .OR. basename_add_num ) then
349  write(basename_num,'(A,I5.5)') '_', ifile-1
350  else
351  basename_num = ''
352  endif
353 
354  log_newline
355  if ( basename_num == "" ) then
356  log_info("REALINPUT_atmos",*) 'read external data from : ', trim(basename_org)
357  else
358  log_info("REALINPUT_atmos",*) 'read external data from : ', trim(basename_org), ' (', trim(basename_num), ')'
359  end if
360 
361  call parentatmosopen( filetype_org, basename_org, basename_num ) ![IN]
362 
363  do istep = 1, number_of_tsteps
364 
365  tall = number_of_tsteps * (ifile-1) + istep ! consecutive time step (input)
366  t = tall - number_of_skip_tsteps ! time step (output)
367 
368  if ( t <= 0 ) then
369  log_progress('(1x,A,I4,A,I5,A,I6,A)') &
370  '[file,step,cons.] = [', ifile, ',', istep, ',', tall, '] ...skip.'
371  cycle
372  endif
373 
374  if ( t == 1 .OR. basename_boundary /= '' ) then
375 
376  log_progress('(1x,A,I4,A,I5,A,I6,A)') &
377  '[file,step,cons.] = [', ifile, ',', istep, ',', tall, ']'
378 
379  ! read prepared data
380  call parentatmosinput( filetype_org, & ! [IN]
381  basename_num, & ! [IN]
382  dims(:), & ! [IN]
383  istep, & ! [IN]
384  use_sfc_diagnoses, & ! [IN]
385  use_data_under_sfc, & ! [IN]
386  same_mp_type, & ! [IN]
387  skip_vertical_range_check, & ! [IN]
388  qtrc_flag(:), & ! [IN]
389  dens_in(:,:,:), & ! [OUT]
390  momz_in(:,:,:), & ! [OUT]
391  momx_in(:,:,:), & ! [OUT]
392  momy_in(:,:,:), & ! [OUT]
393  rhot_in(:,:,:), & ! [OUT]
394  qtrc_in(:,:,:,:), & ! [OUT]
395  velz_in(:,:,:), & ! [OUT]
396  velx_in(:,:,:), & ! [OUT]
397  vely_in(:,:,:), & ! [OUT]
398  pt_in(:,:,:), & ! [OUT]
399  pres_in(:,:,:) ) ! [OUT]
400  else
401  log_progress('(1x,A,I4,A,I5,A,I6,A)') &
402  '[file,step,cons.] = [', ifile, ',', istep, ',', tall, '] ...skip.'
403  endif
404 
405  !--- store prognostic variables as initial
406  if ( t == 1 ) then
407  log_newline
408  log_info("REALINPUT_atmos",*) 'store initial state.'
409 
410  !$omp parallel do collapse(2)
411  !$acc kernels
412  !$acc loop collapse(3) independent
413  do j = 1, ja
414  do i = 1, ia
415  do k = 1, ka
416  dens(k,i,j) = dens_in(k,i,j)
417  momz(k,i,j) = momz_in(k,i,j)
418  momx(k,i,j) = momx_in(k,i,j)
419  momy(k,i,j) = momy_in(k,i,j)
420  rhot(k,i,j) = rhot_in(k,i,j)
421  enddo
422  enddo
423  enddo
424  !$acc end kernels
425 
426  !$omp parallel do collapse(3)
427  !$acc kernels
428  do iq = 1, qa
429  do j = 1, ja
430  do i = 1, ia
431  do k = 1, ka
432  qtrc(k,i,j,iq) = qtrc_in(k,i,j,iq)
433  enddo
434  enddo
435  enddo
436  enddo
437  !$acc end kernels
438 
439  endif
440 
441  !--- output boundary data
442  if ( basename_boundary /= '' ) then
443 
444  if ( t == 1 ) then
445  if ( boundary_postfix_timelabel ) then
446  call time_gettimelabel( timelabel )
447  basename_out_mod = trim(basename_boundary)//'_'//trim(timelabel)
448  else
449  basename_out_mod = trim(basename_boundary)
450  endif
451 
452  call boundaryatmossetup( basename_out_mod, & ! [IN]
453  boundary_title, & ! [IN]
454  boundary_dtype, & ! [IN]
455  boundary_update_dt, & ! [IN]
456  qtrc_flag(:), & ! [IN]
457  fid_atmos, & ! [OUT]
458  vid_atmos(:) ) ! [OUT]
459  endif
460 
461  if ( use_nonhydro_dens_boundary ) then
462  call atmos_thermodyn_specific_heat( ka, ks, ke, ia, 1, ia, ja, 1, ja, qa, &
463  qtrc_in(:,:,:,:), & ! [IN]
464  tracer_mass(:), tracer_r(:), tracer_cv(:), tracer_cp(:), & ! [IN]
465  qdry(:,:,:), rtot(:,:,:), cvtot(:,:,:), cptot(:,:,:) ) ! [OUT]
466  !$omp parallel do collapse(2)
467  do j = 1, ja
468  do i = 1, ia
469  do k = ks, ke
470  dens_in(k,i,j) = ( pres_in(k,i,j) / p00 )**( cvtot(k,i,j) / cptot(k,i,j) ) * p00 / ( rtot(k,i,j) * pt_in(k,i,j) )
471  end do
472  end do
473  end do
474  end if
475 
476  call boundaryatmosoutput( dens_in(:,:,:), & ! [IN]
477  velz_in(:,:,:), & ! [IN]
478  velx_in(:,:,:), & ! [IN]
479  vely_in(:,:,:), & ! [IN]
480  pt_in(:,:,:), & ! [IN]
481  qtrc_in(:,:,:,:), & ! [IN]
482  qtrc_flag(:), & ! [IN]
483  fid_atmos, & ! [IN]
484  vid_atmos(:), & ! [IN]
485  boundary_update_dt, & ! [IN]
486  t ) ! [IN]
487  endif
488 
489  enddo ! istep loop
490  enddo ! ifile loop
491 
492  call parentatmosfinalize( filetype_org ) ![IN]
493 
494  return

References mod_atmos_admin::atmos_phy_mp_type, scale_comm_cartesc_nest::comm_cartesc_nest_interp_level, scale_const::const_pre00, mod_atmos_vars::dens, scale_atmos_grid_cartesc_index::ia, scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::ja, scale_tracer::k, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, mod_atmos_vars::momx, mod_atmos_vars::momy, mod_atmos_vars::momz, scale_prc::prc_abort(), scale_tracer::qa, mod_atmos_vars::qtrc, mod_atmos_vars::rhot, scale_time::time_gettimelabel(), scale_tracer::tracer_cp, scale_tracer::tracer_cv, scale_tracer::tracer_mass, and scale_tracer::tracer_r.

Referenced by mod_mkinit::read_sounding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realinput_surface()

subroutine, public mod_realinput::realinput_surface

Definition at line 499 of file mod_realinput.F90.

499  use scale_const, only: &
500  tem00 => const_tem00
501  use scale_time, only: &
503  use scale_landuse, only: &
504  fact_ocean => landuse_fact_ocean, &
505  fact_land => landuse_fact_land, &
506  fact_urban => landuse_fact_urban, &
508  use mod_atmos_vars, only: &
509  dens, &
510  momx, &
511  momy, &
512  rhot, &
513  qtrc
514  use mod_atmos_phy_sf_vars, only: &
520  use mod_ocean_admin, only: &
521  ocean_do
522  use scale_ocean_phy_ice_simple, only: &
524  use mod_ocean_vars, only: &
525  ice_flag, &
526  ocean_temp, &
527  ocean_salt, &
528  ocean_uvel, &
529  ocean_vvel, &
530  ocean_ocn_z0m, &
531  ocean_ice_temp, &
532  ocean_ice_mass, &
533  ocean_sfc_temp, &
535  ocean_sfc_z0m, &
536  ocean_sfc_z0h, &
538  use mod_land_admin, only: &
539  land_do
540  use mod_land_vars, only: &
541  land_temp, &
542  land_water, &
543  land_ice, &
544  land_sfc_temp, &
546  use mod_urban_admin, only: &
547  urban_do
548  use mod_urban_vars, only: &
549  urban_tc, &
550  urban_qc, &
551  urban_uc, &
552  urban_tr, &
553  urban_tb, &
554  urban_tg, &
555  urban_trl, &
556  urban_tbl, &
557  urban_tgl, &
558  urban_rainr, &
559  urban_rainb, &
560  urban_raing, &
561  urban_roff, &
562  urban_sfc_temp, &
564  implicit none
565 
566  logical :: USE_FILE_LANDWATER = .true. ! use land water data from files
567  real(RP) :: INIT_LANDWATER_RATIO = 0.5_rp ! Ratio of land water to storage is constant, if USE_FILE_LANDWATER is ".false." (all PFT)
568 ! real(RP) :: INIT_LANDWATER_RATIO_EACH(LANDUSE_PFT_nmax) ! Ratio of land water to storage is constant, if USE_FILE_LANDWATER is ".false." (each PFT)
569  real(RP) :: INIT_OCEAN_ALB_LW = 0.04_rp ! initial LW albedo on the ocean
570  real(RP) :: INIT_OCEAN_ALB_SW = 0.10_rp ! initial SW albedo on the ocean
571  real(RP) :: INIT_OCEAN_Z0W = 1.0e-3_rp ! initial surface roughness on the ocean
572  character(len=H_SHORT) :: INTRP_LAND_TEMP = 'off'
573  character(len=H_SHORT) :: INTRP_LAND_WATER = 'off'
574  character(len=H_SHORT) :: INTRP_LAND_SFC_TEMP = 'off'
575  character(len=H_SHORT) :: INTRP_OCEAN_TEMP = 'off'
576  character(len=H_SHORT) :: INTRP_OCEAN_SFC_TEMP = 'off'
577  integer :: INTRP_ITER_MAX = 5
578  character(len=H_SHORT) :: SOILWATER_DS2VC = 'limit'
579  logical :: soilwater_DS2VC_flag ! true: 'critical', false: 'limit'
580  logical :: elevation_correction = .true.
581  logical :: elevation_correction_land
582  logical :: elevation_correction_ocean
583 
584  namelist / param_mkinit_real_land / &
585  number_of_files, &
586  number_of_tsteps, &
587  number_of_skip_tsteps, &
588  filetype_org, &
589  basename_org, &
590  basename_add_num, &
591  basename_boundary, &
592  boundary_postfix_timelabel, &
593  boundary_title, &
594  boundary_update_dt, &
595  use_file_landwater, &
596  init_landwater_ratio, &
597 ! INIT_LANDWATER_RATIO_EACH, &
598  intrp_type, &
599  intrp_land_temp, &
600  intrp_land_water, &
601  intrp_land_sfc_temp, &
602  intrp_iter_max, &
603  filter_order, &
604  filter_niter, &
605  soilwater_ds2vc, &
606  elevation_correction, &
607  serial_proc_read
608 
609  namelist / param_mkinit_real_ocean / &
610  number_of_files, &
611  number_of_tsteps, &
612  number_of_skip_tsteps, &
613  filetype_org, &
614  basename_org, &
615  basename_add_num, &
616  basename_boundary, &
617  boundary_postfix_timelabel, &
618  boundary_title, &
619  boundary_update_dt, &
620  init_ocean_alb_lw, &
621  init_ocean_alb_sw, &
622  init_ocean_z0w, &
623  intrp_type, &
624  intrp_ocean_temp, &
625  intrp_ocean_sfc_temp, &
626  intrp_iter_max, &
627  filter_order, &
628  filter_niter, &
629  serial_proc_read
630 
631  character(len=6) :: FILETYPE_LAND
632  character(len=6) :: FILETYPE_OCEAN
633  character(len=6) :: BASENAME_LAND
634  character(len=6) :: BASENAME_OCEAN
635 
636  ! land
637  real(RP) :: LAND_TEMP_in (LKMAX,IA,JA)
638  real(RP) :: LAND_WATER_in (LKMAX,IA,JA)
639  real(RP) :: LAND_SFC_TEMP_in ( IA,JA)
640  real(RP) :: LAND_SFC_albedo_in( IA,JA,N_RAD_DIR,N_RAD_RGN)
641 
642  ! urban
643  real(RP) :: URBAN_TC_in(IA,JA)
644  real(RP) :: URBAN_QC_in(IA,JA)
645  real(RP) :: URBAN_UC_in(IA,JA)
646  real(RP) :: URBAN_SFC_TEMP_in(IA,JA)
647  real(RP) :: URBAN_SFC_albedo_in(IA,JA,N_RAD_DIR,N_RAD_RGN)
648 
649  ! ocean
650  real(RP) :: OCEAN_TEMP_in (OKMAX,IA,JA)
651  real(RP) :: OCEAN_SFC_TEMP_in ( IA,JA)
652  real(RP) :: OCEAN_SFC_albedo_in( IA,JA,N_RAD_DIR,N_RAD_RGN)
653  real(RP) :: OCEAN_SFC_Z0_in ( IA,JA)
654 
655  integer :: NUMBER_OF_FILES_LAND = 1
656  integer :: NUMBER_OF_FILES_OCEAN = 1
657  integer :: NUMBER_OF_TSTEPS_LAND = 1 ! num of time steps in one file
658  integer :: NUMBER_OF_TSTEPS_OCEAN = 1 ! num of time steps in one file
659  integer :: NUMBER_OF_SKIP_TSTEPS_LAND = 0 ! num of skipped first several data
660  integer :: NUMBER_OF_SKIP_TSTEPS_OCEAN = 0 ! num of skipped first several data
661 
662  character(len=H_LONG) :: BASENAME_ORG_LAND = ''
663  character(len=H_LONG) :: BASENAME_ORG_OCEAN = ''
664  character(len=H_LONG) :: BASENAME_BOUNDARY_LAND = ''
665  character(len=H_LONG) :: BASENAME_BOUNDARY_OCEAN = ''
666  logical :: BOUNDARY_POSTFIX_TIMELABEL_LAND = .false.
667  logical :: BOUNDARY_POSTFIX_TIMELABEL_OCEAN = .false.
668  character(len=H_LONG) :: BOUNDARY_TITLE_LAND = 'SCALE-RM BOUNDARY CONDITION for REAL CASE'
669  character(len=H_LONG) :: BOUNDARY_TITLE_OCEAN = 'SCALE-RM BOUNDARY CONDITION for REAL CASE'
670  real(DP) :: BOUNDARY_UPDATE_DT_LAND = 0.0_dp ! inteval time of boudary data update [s]
671  real(DP) :: BOUNDARY_UPDATE_DT_OCEAN = 0.0_dp ! inteval time of boudary data update [s]
672  logical :: BASENAME_ADD_NUM_LAND
673  logical :: BASENAME_ADD_NUM_OCEAN
674 
675  real(RP), allocatable :: lst_ocean(:,:)
676  real(RP), allocatable :: lz_org(:)
677  real(RP), allocatable :: topo_org(:,:)
678  real(RP), allocatable :: lmask_org(:,:)
679  real(RP), allocatable :: omask_org(:,:)
680 
681  integer :: mdlid_land, mdlid_ocean
682  integer :: ldims(3), odims(2)
683 
684  integer :: totaltimesteps = 1
685  integer :: timelen_land, timelen_ocean
686  integer :: ierr
687 
688  character(len=H_LONG) :: basename_out_mod
689  character(len=19) :: timelabel
690 
691  integer :: fid_sfc
692  integer :: vid_sfc(10)
693 
694  logical :: land_flag
695  logical :: multi_land
696  logical :: multi_ocean
697 
698  integer :: oistep, listep
699  integer :: tall, t
700  integer :: idir, irgn
701 
702  integer :: k, i, j, n
703  !---------------------------------------------------------------------------
704 
705  if ( land_do .or. urban_do ) then
706  land_flag = .true.
707  else
708  land_flag = .false.
709  end if
710 
711  if ( .not. land_flag .or. .not. ocean_do ) then
712  log_error("REALINPUT_surface",*) 'OCEAN_ and LAND_DYN_TYPE must be set'
713  end if
714 
715 
716  log_newline
717  log_info('REALINPUT_surface',*) 'Setup LAND'
718 
719  ! LAND/URBAN
720 ! INIT_LANDWATER_RATIO_EACH(:) = -1.0_RP
721 
722  !--- read namelist
723  rewind(io_fid_conf)
724  read(io_fid_conf,nml=param_mkinit_real_land,iostat=ierr)
725  if( ierr < 0 ) then !--- missing
726  log_info("REALINPUT_surface",*) 'Not found namelist. Default used.'
727  elseif( ierr > 0 ) then !--- fatal error
728  log_error("REALINPUT_surface",*) 'Not appropriate names in namelist PARAM_MKINIT_REAL_LAND. Check!'
729  call prc_abort
730  endif
731  log_nml(param_mkinit_real_land)
732 
733  number_of_files_land = number_of_files
734  number_of_tsteps_land = number_of_tsteps
735  number_of_skip_tsteps_land = number_of_skip_tsteps
736  filetype_land = filetype_org
737  basename_org_land = basename_org
738  basename_add_num_land = basename_add_num
739  basename_boundary_land = basename_boundary
740  boundary_postfix_timelabel_land = boundary_postfix_timelabel
741  boundary_title_land = boundary_title
742  boundary_update_dt_land = boundary_update_dt
743  elevation_correction_land = elevation_correction
744 
745  if ( number_of_files > 1 .OR. basename_add_num_land ) then
746  basename_land = "_00000"
747  else
748  basename_land = ""
749  endif
750 
751 !!$ if( .NOT. USE_FILE_LANDWATER ) then
752 !!$ if( all( INIT_LANDWATER_RATIO_EACH(:) < 0.0_RP ) ) then
753 !!$ LOG_INFO("REALINPUT_surface",*) 'Applied INIT_LANDWATER_RATIO, instead of INIT_LANDWATER_RATIO_EACH.'
754 !!$ INIT_LANDWATER_RATIO_EACH(:) = INIT_LANDWATER_RATIO
755 !!$ else
756 !!$ if( any( INIT_LANDWATER_RATIO_EACH(:) < 0.0_RP ) ) then
757 !!$ LOG_ERROR("REALINPUT_surface",*) 'Insufficient elemtents of array (INIT_LANDWATER_RATIO_EACH):', INIT_LANDWATER_RATIO_EACH(:)
758 !!$ call PRC_abort
759 !!$ endif
760 !!$ endif
761 !!$ endif
762 
763  select case( soilwater_ds2vc )
764  case( 'critical' )
765  soilwater_ds2vc_flag = .true.
766  case('limit' )
767  soilwater_ds2vc_flag = .false.
768  case default
769  log_error("REALINPUT_surface",*) 'Unsupported SOILWATER_DS2CV TYPE:', trim(soilwater_ds2vc)
770  call prc_abort
771  end select
772 
773  !serial_land = SERIAL_PROC_READ
774  ! if serial_land = .false., interp_OceanLand_data may result in different value
775  serial_land = .true.
776 
777  select case( intrp_type )
778  case ( "LINEAR" )
779  itp_nh_l = 4
780  itp_type_l = i_intrp_linear
781  case ( "DIST-WEIGHT" )
782  itp_nh_l = comm_cartesc_nest_interp_level
783  itp_type_l = i_intrp_dstwgt
784  case default
785  log_error("REALINPUT_surface",*) 'Unsupported type of INTRP_TYPE : ', trim(intrp_type)
786  log_error_cont(*) ' It must be "LINEAR" or "DIST-WEIGHT"'
787  call prc_abort
788  end select
789 
790 
791 
792  log_newline
793  log_info('REALINPUT_surface',*) 'Setup OCEAN'
794 
795  !--- read namelist
796  rewind(io_fid_conf)
797  read(io_fid_conf,nml=param_mkinit_real_ocean,iostat=ierr)
798  if( ierr < 0 ) then !--- missing
799  log_info("REALINPUT_surface",*) 'Not found namelist. Default used.'
800  elseif( ierr > 0 ) then !--- fatal error
801  log_error("REALINPUT_surface",*) 'Not appropriate names in namelist PARAM_MKINIT_REAL_OCEAN. Check!'
802  call prc_abort
803  endif
804  log_nml(param_mkinit_real_ocean)
805 
806  number_of_files_ocean = number_of_files
807  number_of_tsteps_ocean = number_of_tsteps
808  number_of_skip_tsteps_ocean = number_of_skip_tsteps
809  filetype_ocean = filetype_org
810  basename_org_ocean = basename_org
811  basename_add_num_ocean = basename_add_num
812  basename_boundary_ocean = basename_boundary
813  boundary_postfix_timelabel_ocean = boundary_postfix_timelabel
814  boundary_title_ocean = boundary_title
815  boundary_update_dt_ocean = boundary_update_dt
816  elevation_correction_ocean = elevation_correction
817 
818  if ( number_of_files > 1 .OR. basename_add_num_ocean ) then
819  basename_ocean = "_00000"
820  else
821  basename_ocean = ""
822  endif
823 
824  ! if serial_ocean = .false., interp_OceanLand_data may result in different value
825  !serial_ocean = SERIAL_PROC_READ
826  serial_ocean = .true.
827 
828  select case( intrp_type )
829  case ( "LINEAR" )
830  itp_nh_o = 4
831  itp_type_o = i_intrp_linear
832  case ( "DIST-WEIGHT" )
833  itp_nh_o = comm_cartesc_nest_interp_level
834  itp_type_o = i_intrp_dstwgt
835  case default
836  log_error("REALINPUT_surface",*) 'Unsupported type of INTRP_TYPE : ', trim(intrp_type)
837  log_error_cont(*) ' It must be "LINEAR" or "DIST-WEIGHT"'
838  call prc_abort
839  end select
840 
841  itp_nh_ol = comm_cartesc_nest_interp_level
842 
843  multi_land = ( number_of_files_land * number_of_tsteps_land - number_of_skip_tsteps_land ) > 1
844  multi_ocean = basename_boundary_ocean .ne. ''
845 
846  if ( ( multi_land .and. multi_ocean ) .AND. &
847  ( ( number_of_files_land .NE. number_of_files_ocean ) .OR. &
848  ( number_of_tsteps_land .NE. number_of_tsteps_ocean ) .OR. &
849  ( number_of_skip_tsteps_land .NE. number_of_skip_tsteps_ocean ) .OR. &
850  ( basename_boundary_land .NE. basename_boundary_ocean ) .OR. &
851  ( boundary_postfix_timelabel_land .NEQV. boundary_postfix_timelabel_ocean ) .OR. &
852  ( boundary_title_land .NE. boundary_title_ocean ) .OR. &
853  ( boundary_update_dt_land .NE. boundary_update_dt_ocean ) ) ) then
854  log_error("REALINPUT_surface",*) 'The following LAND/OCEAN parameters must be consistent due to technical problem:'
855  log_error_cont(*) ' NUMBER_OF_FILES, NUMBER_OF_TSTEPS, NUMBER_OF_SKIP_TSTEPS,'
856  log_error_cont(*) ' BASENAME_BOUNDARY, BOUNDARY_POSTFIX_TIMELABEL, BOUNDARY_TITLE, BOUNDARY_UPDATE_DT.'
857  call prc_abort
858  end if
859 
860  if ( multi_land .and. .not. multi_ocean ) then
861  log_error("REALINPUT_surface",*) 'To output boundary data for land data, it is necessary to output ocean data'
862  call prc_abort
863  end if
864 
865  call parentsurfacesetup( ldims, odims, & ![OUT]
866  mdlid_land, & ![OUT]
867  mdlid_ocean, & ![OUT]
868  timelen_land, & ![OUT]
869  timelen_ocean, & ![OUT]
870  basename_org_land, & ![IN]
871  basename_org_ocean, & ![IN]
872  basename_land, & ![IN]
873  basename_ocean, & ![IN]
874  filetype_land, & ![IN]
875  filetype_ocean, & ![IN]
876  use_file_landwater, & ![IN]
877  intrp_iter_max, & ![IN]
878  intrp_land_temp, & ![IN]
879  intrp_land_water, & ![IN]
880  intrp_land_sfc_temp, & ![IN]
881  intrp_ocean_temp, & ![IN]
882  intrp_ocean_sfc_temp ) ![IN]
883 
884  if ( timelen_land < number_of_tsteps_land ) then
885  log_error("REALINPUT_surface",*) 'time dimension in file is shorter than NUMBER_OF_TSTEPS_LAND', timelen_land, number_of_tsteps_land
886  call prc_abort
887  end if
888 
889  if ( timelen_ocean < number_of_tsteps_ocean ) then
890  log_error("REALINPUT_surface",*) 'time dimension in file is shorter than NUMBER_OF_TSTEPS_OCEAN', timelen_ocean, number_of_tsteps_ocean
891  call prc_abort
892  end if
893 
894  if ( number_of_tsteps_land < 1 ) then
895  number_of_tsteps_land = timelen_land
896  end if
897  if ( number_of_tsteps_ocean < 1 ) then
898  number_of_tsteps_ocean = timelen_ocean
899  end if
900 
901  totaltimesteps = number_of_files_ocean * number_of_tsteps_ocean
902 
903  if ( totaltimesteps <= number_of_skip_tsteps_ocean ) then
904  log_error("REALSINPUT_surface",*) "NUMBER_OF_FILES_OCEAN * NUMBER_OF_TSTEPS_OCEAN <= NUMBER_OF_SKIP_TSTEPS_OCEAN"
905  call prc_abort
906  end if
907  if ( multi_ocean ) then
908  if ( boundary_update_dt_ocean <= 0.0_dp ) then
909  log_error("REALINPUT_surface",*) 'BOUNDARY_UPDATE_DT is necessary in real case preprocess'
910  call prc_abort
911  endif
912  end if
913 
914  allocate( lz_org(lka_org) )
915  allocate( topo_org(lia_org, lja_org) )
916  allocate( lmask_org(lia_org, lja_org) )
917  allocate( omask_org(oia_org, oja_org) )
918  allocate( lst_ocean(oia_org, oja_org) )
919 
920  !--- read external file
921  do n = 1, number_of_files_ocean
922 
923  if ( number_of_files_land > 1 .OR. basename_add_num_land ) then
924  if ( multi_land ) then
925  write(basename_land,'(A,I5.5)') '_', n-1
926  else
927  write(basename_land,'(A,I5.5)') '_', number_of_skip_tsteps_land / number_of_tsteps_land
928  end if
929  else
930  basename_land = ''
931  endif
932  if ( number_of_files_ocean > 1 .OR. basename_add_num_ocean ) then
933  write(basename_ocean,'(A,I5.5)') '_', n-1
934  else
935  basename_ocean = ''
936  endif
937 
938  log_newline
939  log_info("REALINPUT_surface",*) 'Target Postfix Name (Land) : ', trim(basename_land)
940  log_info("REALINPUT_surface",*) 'Target Postfix Name (Ocean): ', trim(basename_ocean)
941  log_info("REALINPUT_surface",*) 'Time Steps in One File : ', number_of_tsteps
942 
943  call parentsurfaceopen( filetype_land, filetype_ocean, & ! [IN]
944  basename_org_land, basename_org_ocean, & ! [IN]
945  basename_land, basename_ocean ) ! [IN]
946 
947  do oistep = 1, number_of_tsteps_ocean
948 
949  tall = number_of_tsteps_ocean * (n-1) + oistep
950  t = tall - number_of_skip_tsteps_ocean
951  if ( t <= 0 ) then
952  log_progress('(1x,A,I4,A,I5,A,I6,A)') &
953  '[file,step,cons.] = [', n, ',', oistep, ',', tall, '] ...skip.'
954  cycle
955  end if
956  if ( t > 1 .and. .not. multi_ocean .and. .not. multi_land ) exit
957 
958  if ( multi_land ) then
959  listep = oistep
960  else
961  listep = mod(number_of_skip_tsteps_land, number_of_tsteps_land) + 1
962  end if
963 
964  ! read all prepared data
965  !$acc update host(DENS,MOMX,MOMY,RHOT,QTRC)
966  call parentsurfaceinput( land_temp_in(:,:,:), &
967  land_water_in(:,:,:), &
968  land_sfc_temp_in(:,:), &
969  land_sfc_albedo_in(:,:,:,:), &
970  urban_tc_in(:,:), &
971  urban_qc_in(:,:), &
972  urban_uc_in(:,:), &
973  urban_sfc_temp_in(:,:), &
974  urban_sfc_albedo_in(:,:,:,:), &
975  lst_ocean(:,:), &
976  lz_org(:), topo_org(:,:), &
977  lmask_org(:,:), omask_org(:,:), &
978  ocean_temp_in(oks,:,:), &
979  ocean_sfc_temp_in( :,:), &
980  ocean_sfc_albedo_in( :,:,:,:), &
981  ocean_sfc_z0_in( :,:), &
982  basename_land, basename_ocean, &
983  mdlid_land, mdlid_ocean, &
984  ldims, odims, &
985  use_file_landwater, &
986  init_landwater_ratio, &
987 ! INIT_LANDWATER_RATIO_EACH(:), &
988  init_ocean_alb_lw, init_ocean_alb_sw, &
989  init_ocean_z0w, &
990  intrp_iter_max, &
991  soilwater_ds2vc_flag, &
992  elevation_correction_land, &
993  elevation_correction_ocean, &
994  oistep, listep, &
995  multi_land, &
996  urban_do, &
997  dens, momx, momy, rhot, qtrc )
998 
999  !--- input initial data
1000  if ( t == 1 ) then
1001 
1002  !$omp parallel do
1003  !$acc kernels
1004  do j = 1, ja
1005  do i = 1, ia
1006  ocean_sfc_temp(i,j) = ocean_sfc_temp_in(i,j)
1007  ocean_sfc_z0m(i,j) = ocean_sfc_z0_in(i,j)
1008  ocean_sfc_z0h(i,j) = ocean_sfc_z0_in(i,j)
1009  ocean_sfc_z0e(i,j) = ocean_sfc_z0_in(i,j)
1010  do irgn = i_r_ir, i_r_vis
1011  do idir = i_r_direct, i_r_diffuse
1012  ocean_sfc_albedo(i,j,idir,irgn) = ocean_sfc_albedo_in(i,j,idir,irgn)
1013  enddo
1014  enddo
1015  do k = 1, okmax
1016  ocean_temp(k,i,j) = ocean_temp_in(oks,i,j)
1017  ocean_salt(k,i,j) = 0.0_rp
1018  ocean_uvel(k,i,j) = 0.0_rp
1019  ocean_vvel(k,i,j) = 0.0_rp
1020  enddo
1021  ocean_ocn_z0m(i,j) = ocean_sfc_z0_in(i,j)
1022  if ( ice_flag ) then
1023  ocean_ice_temp(i,j) = min( ocean_sfc_temp_in(i,j), ocean_phy_ice_freezetemp )
1024  ocean_ice_mass(i,j) = 0.0_rp
1025  end if
1026 
1027  land_sfc_temp(i,j) = land_sfc_temp_in(i,j)
1028  do irgn = i_r_ir, i_r_vis
1029  do idir = i_r_direct, i_r_diffuse
1030  land_sfc_albedo(i,j,idir,irgn) = land_sfc_albedo_in(i,j,idir,irgn)
1031  enddo
1032  enddo
1033  do k = 1, lkmax
1034  land_temp(k,i,j) = land_temp_in(k,i,j)
1035  if ( land_temp(k,i,j) >= tem00 ) then
1036  land_water(k,i,j) = land_water_in(k,i,j)
1037  land_ice(k,i,j) = 0.0_rp
1038  else
1039  land_water(k,i,j) = 0.0_rp
1040  land_ice(k,i,j) = land_water_in(k,i,j)
1041  end if
1042  enddo
1043 
1044  if ( urban_do ) then
1045  urban_sfc_temp(i,j) = urban_sfc_temp_in(i,j)
1046  do irgn = i_r_ir, i_r_vis
1047  do idir = i_r_direct, i_r_diffuse
1048  urban_sfc_albedo(i,j,idir,irgn) = urban_sfc_albedo_in(i,j,idir,irgn)
1049  enddo
1050  enddo
1051  do k = 1, ukmax
1052  urban_trl(k,i,j) = urban_sfc_temp_in(i,j)
1053  urban_tbl(k,i,j) = urban_sfc_temp_in(i,j)
1054  urban_tgl(k,i,j) = urban_sfc_temp_in(i,j)
1055  enddo
1056  urban_tc(i,j) = urban_tc_in(i,j)
1057  urban_qc(i,j) = urban_qc_in(i,j)
1058  urban_uc(i,j) = urban_uc_in(i,j)
1059  urban_tr(i,j) = urban_sfc_temp_in(i,j)
1060  urban_tb(i,j) = urban_sfc_temp_in(i,j)
1061  urban_tg(i,j) = urban_sfc_temp_in(i,j)
1062  urban_rainr(i,j) = 0.0_rp
1063  urban_rainb(i,j) = 0.0_rp
1064  urban_raing(i,j) = 0.0_rp
1065  urban_roff(i,j) = 0.0_rp
1066  end if
1067 
1071 
1072  if ( urban_do ) then
1073  atmos_phy_sf_sfc_temp(i,j) = fact_ocean(i,j) * ocean_sfc_temp(i,j) &
1074  + fact_land(i,j) * land_sfc_temp(i,j) &
1075  + fact_urban(i,j) * urban_sfc_temp(i,j)
1076  do irgn = i_r_ir, i_r_vis
1077  do idir = i_r_direct, i_r_diffuse
1078  atmos_phy_sf_sfc_albedo(i,j,idir,irgn) = fact_ocean(i,j) * ocean_sfc_albedo(i,j,idir,irgn) &
1079  + fact_land(i,j) * land_sfc_albedo(i,j,idir,irgn) &
1080  + fact_urban(i,j) * urban_sfc_albedo(i,j,idir,irgn)
1081  enddo
1082  enddo
1083  else
1084  atmos_phy_sf_sfc_temp(i,j) = fact_ocean(i,j) * ocean_sfc_temp(i,j) &
1085  + fact_land(i,j) * land_sfc_temp(i,j)
1086  do irgn = i_r_ir, i_r_vis
1087  do idir = i_r_direct, i_r_diffuse
1088  atmos_phy_sf_sfc_albedo(i,j,idir,irgn) = fact_ocean(i,j) * ocean_sfc_albedo(i,j,idir,irgn) &
1089  + fact_land(i,j) * land_sfc_albedo(i,j,idir,irgn)
1090  enddo
1091  enddo
1092  endif
1093  enddo
1094  enddo
1095  !$acc end kernels
1096 
1097 
1098  end if ! t==1
1099 
1100 
1101  !--- output boundary data
1102  if ( multi_ocean ) then
1103 
1104  if ( t==1 ) then
1105  if ( boundary_postfix_timelabel_ocean ) then
1106  call time_gettimelabel( timelabel )
1107  basename_out_mod = trim(basename_boundary_ocean)//'_'//trim(timelabel)
1108  else
1109  basename_out_mod = trim(basename_boundary_ocean)
1110  endif
1111 
1112  call boundarysurfacesetup( basename_out_mod, & ! [IN]
1113  boundary_title_ocean, & ! [IN]
1114  boundary_update_dt_ocean, & ! [IN]
1115  multi_ocean, multi_land, & ! [IN]
1116  fid_sfc, & ! [OUT]
1117  vid_sfc(:) ) ! [OUT]
1118  end if ! t==1
1119 
1120  call boundarysurfaceoutput( land_temp_in(:,:,:), & ! [IN]
1121  land_water_in(:,:,:), & ! [IN]
1122  land_sfc_temp_in(:,:), & ! [IN]
1123  ocean_temp_in(:,:,:), & ! [IN]
1124  ocean_sfc_temp_in(:,:), & ! [IN]
1125  ocean_sfc_z0_in(:,:), & ! [IN]
1126  multi_ocean, multi_land, & ! [IN]
1127  fid_sfc, & ! [IN]
1128  vid_sfc(:), & ! [IN]
1129  boundary_update_dt_ocean, & ! [IN]
1130  t ) ! [IN]
1131  end if
1132 
1133  end do ! oistep
1134 
1135  ! required one-step data only
1136  if( t > 0 .and. .not. ( multi_land .or. multi_ocean ) ) exit
1137 
1138  enddo
1139 
1140  deallocate( lst_ocean )
1141  deallocate( lz_org )
1142  deallocate( topo_org )
1143  deallocate( lmask_org )
1144  deallocate( omask_org )
1145 
1146  call parentsurfacefinalize( filetype_land, & ![IN]
1147  filetype_ocean ) ![IN]
1148 
1149  return

References scale_atmos_grid_cartesc::atmos_grid_cartesc_cx, scale_atmos_grid_cartesc::atmos_grid_cartesc_cy, scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_rotc, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon, scale_atmos_hydrometeor::atmos_hydrometeor_dry, mod_atmos_phy_mp_driver::atmos_phy_mp_driver_qhyd2qtrc(), mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_albedo, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_temp, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0e, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0h, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0m, scale_comm_cartesc_nest::comm_cartesc_nest_interp_level, scale_comm_cartesc::comm_datatype, scale_comm_cartesc::comm_world, scale_const::const_cpdry, scale_const::const_cpvap, scale_const::const_eps, scale_const::const_epstvap, scale_const::const_epsvap, scale_const::const_grav, scale_const::const_i_lw, scale_const::const_i_sw, scale_const::const_laps, scale_const::const_pi, scale_const::const_pre00, scale_const::const_rdry, scale_const::const_tem00, scale_const::const_undef, mod_atmos_vars::dens, scale_precision::dp, scale_file_cartesc::file_cartesc_create(), scale_file_cartesc::file_cartesc_def_var(), scale_file_cartesc::file_cartesc_enddef(), get_ijrange(), scale_atmos_hydrometeor::i_qv, scale_cpl_sfc_index::i_r_diffuse, scale_cpl_sfc_index::i_r_direct, scale_cpl_sfc_index::i_r_ir, scale_cpl_sfc_index::i_r_vis, scale_atmos_grid_cartesc_index::ia, mod_ocean_vars::ice_flag, scale_atmos_grid_cartesc_index::ieb, igrads, inetcdf, scale_interp::interp_domain_compatibility(), scale_interp::interp_interp2d(), scale_interp::interp_interp3d(), scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::isb, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::jeb, scale_atmos_grid_cartesc_index::jsb, scale_tracer::k, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, mod_land_admin::land_do, scale_land_grid_cartesc::land_grid_cartesc_cz, mod_land_vars::land_ice, land_interporation(), mod_land_vars::land_sfc_albedo, mod_land_vars::land_sfc_temp, mod_land_vars::land_temp, mod_land_vars::land_water, scale_landuse::landuse_fact_land, scale_landuse::landuse_fact_ocean, scale_landuse::landuse_fact_urban, scale_landuse::landuse_frac_land, scale_landuse::landuse_pft_nmax, scale_land_grid_cartesc_index::lkmax, make_mask(), scale_mapprojection::mapprojection_get_param(), mod_atmos_vars::momx, mod_atmos_vars::momy, scale_atmos_hydrometeor::n_hyd, scale_cpl_sfc_index::n_rad_dir, scale_cpl_sfc_index::n_rad_rgn, mod_ocean_admin::ocean_do, mod_ocean_vars::ocean_ice_mass, mod_ocean_vars::ocean_ice_temp, ocean_interporation(), mod_ocean_vars::ocean_ocn_z0m, scale_ocean_phy_ice_simple::ocean_phy_ice_freezetemp, mod_ocean_vars::ocean_salt, mod_ocean_vars::ocean_sfc_albedo, mod_ocean_vars::ocean_sfc_temp, mod_ocean_vars::ocean_sfc_z0e, mod_ocean_vars::ocean_sfc_z0h, mod_ocean_vars::ocean_sfc_z0m, mod_ocean_vars::ocean_temp, mod_ocean_vars::ocean_uvel, mod_ocean_vars::ocean_vvel, scale_ocean_grid_cartesc_index::okmax, scale_ocean_grid_cartesc_index::oks, mod_realinput_netcdf::parentatmosfinalizenetcdf(), mod_realinput_grads::parentatmosinputgrads(), mod_realinput_netcdf::parentatmosinputnetcdf(), mod_realinput_netcdf::parentatmosopennetcdf(), mod_realinput_grads::parentatmossetupgrads(), mod_realinput_netcdf::parentatmossetupnetcdf(), mod_realinput_netcdf::parentlandfinalizenetcdf(), mod_realinput_grads::parentlandinputgrads(), mod_realinput_netcdf::parentlandinputnetcdf(), mod_realinput_netcdf::parentlandopennetcdf(), mod_realinput_grads::parentlandsetupgrads(), mod_realinput_netcdf::parentlandsetupnetcdf(), mod_realinput_netcdf::parentoceanfinalizenetcdf(), mod_realinput_grads::parentoceaninputgrads(), mod_realinput_netcdf::parentoceaninputnetcdf(), mod_realinput_netcdf::parentoceanopennetcdf(), mod_realinput_grads::parentoceansetupgrads(), mod_realinput_netcdf::parentoceansetupnetcdf(), scale_prc::prc_abort(), scale_prc::prc_ismaster, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), scale_tracer::qa, mod_atmos_phy_mp_vars::qe_mp, scale_atmos_hydrometeor::qle, scale_atmos_hydrometeor::qls, mod_atmos_phy_mp_vars::qs_mp, mod_atmos_vars::qtrc, replace_misval_map(), mod_atmos_vars::rhot, scale_time::time_gettimelabel(), scale_time::time_nowdate, scale_topography::topography_zsfc, scale_tracer::tracer_cp, scale_tracer::tracer_cv, scale_tracer::tracer_mass, scale_tracer::tracer_name, scale_tracer::tracer_r, scale_urban_grid_cartesc_index::ukmax, mod_urban_admin::urban_do, urban_input(), mod_urban_vars::urban_qc, mod_urban_vars::urban_rainb, mod_urban_vars::urban_raing, mod_urban_vars::urban_rainr, mod_urban_vars::urban_roff, mod_urban_vars::urban_sfc_albedo, mod_urban_vars::urban_sfc_temp, mod_urban_vars::urban_tb, mod_urban_vars::urban_tbl, mod_urban_vars::urban_tc, mod_urban_vars::urban_tg, mod_urban_vars::urban_tgl, mod_urban_vars::urban_tr, mod_urban_vars::urban_trl, and mod_urban_vars::urban_uc.

Referenced by mod_mkinit::read_sounding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ land_interporation()

subroutine mod_realinput::land_interporation ( integer, intent(in)  kmax,
integer, intent(in)  imax,
integer, intent(in)  jmax,
integer, intent(in)  oimax,
integer, intent(in)  ojmax,
real(rp), dimension(lkmax,ia,ja), intent(out)  tg,
real(rp), dimension(lkmax,ia,ja), intent(out)  strg,
real(rp), dimension(ia,ja), intent(out)  lst,
real(rp), dimension(ia,ja,n_rad_dir,n_rad_rgn), intent(out)  albg,
real(rp), dimension(kmax,imax,jmax), intent(inout)  tg_org,
real(rp), dimension(kmax,imax,jmax), intent(inout)  strg_org,
real(rp), dimension(kmax,imax,jmax), intent(inout)  smds_org,
real(rp), dimension(imax,jmax), intent(inout)  lst_org,
real(rp), dimension(imax,jmax,n_rad_dir,n_rad_rgn), intent(inout)  albg_org,
real(rp), dimension(oimax,ojmax), intent(inout)  sst_org,
real(rp), dimension(imax,jmax), intent(in)  lmask_org,
real(rp), dimension(ia,ja), intent(in)  lsmask_nest,
real(rp), dimension(imax,jmax), intent(in)  topo_org,
real(rp), dimension(kmax), intent(in)  lz_org,
real(rp), dimension(imax,jmax), intent(in)  llon_org,
real(rp), dimension(imax,jmax), intent(in)  llat_org,
real(rp), dimension(lkmax), intent(in)  LCZ,
real(rp), dimension(ia), intent(in)  CX,
real(rp), dimension(ja), intent(in)  CY,
real(rp), dimension(ia,ja), intent(in)  LON,
real(rp), dimension(ia,ja), intent(in)  LAT,
real(rp), intent(in)  maskval_tg,
real(rp), intent(in)  maskval_strg,
real(rp), intent(in)  init_landwater_ratio,
logical, intent(in)  use_file_landwater,
logical, intent(in)  use_waterratio,
logical, intent(in)  soilwater_ds2vc_flag,
logical, intent(in)  elevation_correction,
integer, intent(in)  intrp_iter_max,
logical, intent(in)  ol_interp 
)

Definition at line 3796 of file mod_realinput.F90.

3796  use scale_prc, only: &
3797  prc_abort
3798  use scale_const, only: &
3799  undef => const_undef, &
3800  eps => const_eps, &
3801  i_sw => const_i_sw, &
3802  i_lw => const_i_lw, &
3803  pi => const_pi, &
3804  laps => const_laps
3805  use scale_interp, only: &
3806  interp_factor2d, &
3807  interp_factor3d, &
3808  interp_interp2d, &
3810  use scale_mapprojection, only: &
3811  mapprojection_lonlat2xy
3812  use scale_comm_cartesc, only: &
3813  comm_vars8, &
3814  comm_wait
3815  use scale_filter, only: &
3816  filter_hyperdiff
3817  use scale_topography, only: &
3819  use scale_landuse, only: &
3820  landuse_pft_nmax, &
3822  use mod_land_vars, only: &
3824  implicit none
3825  integer, intent(in) :: kmax, imax, jmax
3826  integer, intent(in) :: oimax, ojmax
3827  real(RP), intent(out) :: tg(LKMAX,IA,JA)
3828  real(RP), intent(out) :: strg(LKMAX,IA,JA)
3829  real(RP), intent(out) :: lst(IA,JA)
3830  real(RP), intent(out) :: albg(IA,JA,N_RAD_DIR,N_RAD_RGN)
3831  real(RP), intent(inout) :: tg_org(kmax,imax,jmax)
3832  real(RP), intent(inout) :: strg_org(kmax,imax,jmax)
3833  real(RP), intent(inout) :: smds_org(kmax,imax,jmax)
3834  real(RP), intent(inout) :: lst_org(imax,jmax)
3835  real(RP), intent(inout) :: albg_org(imax,jmax,N_RAD_DIR,N_RAD_RGN)
3836  real(RP), intent(inout) :: sst_org(oimax,ojmax)
3837  real(RP), intent(in) :: lmask_org(imax,jmax)
3838  real(RP), intent(in) :: lsmask_nest(IA,JA)
3839  real(RP), intent(in) :: topo_org(imax,jmax)
3840  real(RP), intent(in) :: lz_org(kmax)
3841  real(RP), intent(in) :: llon_org(imax,jmax)
3842  real(RP), intent(in) :: llat_org(imax,jmax)
3843  real(RP), intent(in) :: LCZ(LKMAX)
3844  real(RP), intent(in) :: CX(IA)
3845  real(RP), intent(in) :: CY(JA)
3846  real(RP), intent(in) :: LON(IA,JA)
3847  real(RP), intent(in) :: LAT(IA,JA)
3848  real(RP), intent(in) :: maskval_tg
3849  real(RP), intent(in) :: maskval_strg
3850  real(RP), intent(in) :: init_landwater_ratio
3851 ! real(RP), intent(in) :: init_landwater_ratio_each(LANDUSE_PFT_nmax)
3852  logical, intent(in) :: use_file_landwater
3853  logical, intent(in) :: use_waterratio
3854  logical, intent(in) :: soilwater_ds2vc_flag
3855  logical, intent(in) :: elevation_correction
3856  integer, intent(in) :: intrp_iter_max
3857  logical, intent(in) :: ol_interp
3858 
3859  real(RP) :: lmask(imax,jmax)
3860  real(RP) :: smds(LKMAX,IA,JA)
3861 
3862  ! data for interporation
3863  real(RP) :: hfact_l(imax,jmax,itp_nh_ol)
3864  integer :: igrd_l (imax,jmax,itp_nh_ol)
3865  integer :: jgrd_l (imax,jmax,itp_nh_ol)
3866  real(RP) :: lX_org (imax,jmax)
3867  real(RP) :: lY_org (imax,jmax)
3868  logical :: zonal, pole
3869  integer :: igrd ( IA,JA,itp_nh_l)
3870  integer :: jgrd ( IA,JA,itp_nh_l)
3871  real(RP) :: hfact( IA,JA,itp_nh_l)
3872  integer :: kgrdl (LKMAX,2,IA,JA,itp_nh_l)
3873  real(RP) :: vfactl(LKMAX, IA,JA,itp_nh_l)
3874 
3875 
3876  real(RP) :: sst_land(imax,jmax)
3877  real(RP) :: work (imax,jmax)
3878  real(RP) :: work2(imax,jmax)
3879 
3880  real(RP) :: lz3d_org(kmax,imax,jmax)
3881  real(RP) :: lcz_3D(LKMAX,IA,JA)
3882 
3883  ! elevation correction
3884  real(RP) :: topo(IA,JA)
3885  real(RP) :: tdiff
3886 
3887  real(RP) :: one2d(IA,JA)
3888  real(RP) :: one3d(LKMAX,IA,JA)
3889 
3890  integer :: k, i, j, m, n
3891 
3892 
3893  ! Surface skin temp: interpolate over the ocean
3894  if ( i_intrp_land_sfc_temp .ne. i_intrp_off ) then
3895  select case( i_intrp_land_sfc_temp )
3896  case( i_intrp_mask )
3897  call make_mask( lmask, lst_org, imax, jmax, landdata=.true.)
3898  !$omp parallel do
3899  do j = 1, jmax
3900  do i = 1, imax
3901  if ( lmask_org(i,j) .ne. undef ) lmask(i,j) = lmask_org(i,j)
3902  end do
3903  end do
3904  case( i_intrp_fill )
3905  call make_mask( lmask, lst_org, imax, jmax, landdata=.true.)
3906  case default
3907  log_error("land_interporation",*) 'INTRP_LAND_SFC_TEMP is invalid.'
3908  call prc_abort
3909  end select
3910  call interp_oceanland_data(lst_org, lmask, imax, jmax, .true., intrp_iter_max)
3911  end if
3912 
3913  if ( ol_interp ) then
3914  ! interpolation facter between outer land grid and ocean grid
3915  call interp_factor2d( itp_nh_ol, & ! [IN]
3916  oimax, ojmax, & ! [IN]
3917  imax, jmax, & ! [IN]
3918  olon_org(:,:), & ! [IN]
3919  olat_org(:,:), & ! [IN]
3920  llon_org(:,:), & ! [IN]
3921  llat_org(:,:), & ! [IN]
3922  igrd_l(:,:,:), & ! [OUT]
3923  jgrd_l(:,:,:), & ! [OUT]
3924  hfact_l(:,:,:) ) ! [OUT]
3925 
3926  ! sst on land grid
3927  call interp_interp2d( itp_nh_ol, & ! [IN]
3928  oimax, ojmax, & ! [IN]
3929  imax, jmax, & ! [IN]
3930  igrd_l(:,:,:), & ! [IN]
3931  jgrd_l(:,:,:), & ! [IN]
3932  hfact_l(:,:,:), & ! [IN]
3933  sst_org(:,:), & ! [IN]
3934  sst_land(:,:) ) ! [OUT]
3935  else
3936  !$omp parallel do
3937  do j = 1, jmax
3938  do i = 1, imax
3939  sst_land(i,j) = sst_org(i,j)
3940  end do
3941  end do
3942  end if
3943 
3944  !$omp parallel do
3945  do j = 1, jmax
3946  do i = 1, imax
3947  if ( topo_org(i,j) > undef + eps ) then ! ignore UNDEF value
3948  sst_land(i,j) = sst_land(i,j) - topo_org(i,j) * laps
3949  end if
3950  end do
3951  end do
3952 
3953  call replace_misval_map( lst_org, sst_land, imax, jmax, "SKINT" )
3954 
3955  ! replace missing value
3956  !$omp parallel do
3957  do j = 1, jmax
3958  do i = 1, imax
3959 ! if ( skinw_org(i,j) == UNDEF ) skinw_org(i,j) = 0.0_RP
3960 ! if ( snowq_org(i,j) == UNDEF ) snowq_org(i,j) = 0.0_RP
3961 ! if ( snowt_org(i,j) == UNDEF ) snowt_org(i,j) = TEM00
3962  do m = 1, n_rad_dir
3963  if( albg_org(i,j,m,i_r_ir ) == undef ) albg_org(i,j,m,i_r_ir ) = 0.03_rp ! emissivity of general ground surface : 0.95-0.98
3964  if( albg_org(i,j,m,i_r_nir) == undef ) albg_org(i,j,m,i_r_nir) = 0.22_rp
3965  if( albg_org(i,j,m,i_r_vis) == undef ) albg_org(i,j,m,i_r_vis) = 0.22_rp
3966  end do
3967  end do
3968  end do
3969 
3970  ! Land temp: interpolate over the ocean
3971  if ( i_intrp_land_temp .ne. i_intrp_off ) then
3972  do k = 1, kmax
3973  !$omp parallel do
3974  do j = 1, jmax
3975  do i = 1, imax
3976  work(i,j) = tg_org(k,i,j)
3977  end do
3978  end do
3979  select case( i_intrp_land_temp )
3980  case( i_intrp_mask )
3981  call make_mask( lmask, work, imax, jmax, landdata=.true.)
3982  !$omp parallel do
3983  do j = 1, jmax
3984  do i = 1, imax
3985  if ( lmask_org(i,j) .ne. undef ) lmask(i,j) = lmask_org(i,j)
3986  end do
3987  end do
3988  case( i_intrp_fill )
3989  call make_mask( lmask, work, imax, jmax, landdata=.true.)
3990  end select
3991  call interp_oceanland_data( work, lmask, imax, jmax, .true., intrp_iter_max )
3992  !replace land temp using skin temp
3993  call replace_misval_map( work, lst_org, imax, jmax, "STEMP")
3994  !$omp parallel do
3995  do j = 1, jmax
3996  do i = 1, imax
3997  tg_org(k,i,j) = work(i,j)
3998  end do
3999  end do
4000  end do
4001  end if
4002 
4003 
4004  ! fill grid data
4005  !$omp parallel do collapse(2)
4006  do j = 1, jmax
4007  do i = 1, imax
4008  lz3d_org(:,i,j) = lz_org(:)
4009  end do
4010  end do
4011 
4012  !$omp parallel do collapse(2)
4013  do j = 1, ja
4014  do i = 1, ia
4015  lcz_3d(:,i,j) = lcz(:)
4016  enddo
4017  enddo
4018 
4019  select case( itp_type_l )
4020  case ( i_intrp_linear )
4021 
4022  if ( imax == 1 .or. jmax == 1 ) then
4023  log_error("land_interporation",*) 'LINER interpolation requires nx, ny > 1'
4024  log_error_cont(*) 'Use "DIST-WEIGHT" as INTRP_TYPE of PARAM_MKINIT_REAL_LAND'
4025  call prc_abort
4026  end if
4027 
4028  !$omp parallel do
4029  do j = 1, jmax
4030  do i = 1, imax
4031  work(i,j) = sign( min( abs(llat_org(i,j)), pi * 0.499999_rp ), llat_org(i,j) )
4032  end do
4033  end do
4034 
4035  call mapprojection_lonlat2xy( imax, 1, imax, jmax, 1, jmax, &
4036  llon_org(:,:), work(:,:), & ! [IN]
4037  lx_org(:,:), ly_org(:,:) ) ! [OUT]
4038 
4039  zonal = ( maxval(llon_org) - minval(llon_org) ) > 2.0_rp * pi * 0.9_rp
4040  pole = ( maxval(llat_org) > pi * 0.5_rp * 0.9_rp ) .or. ( minval(llat_org) < - pi * 0.5_rp * 0.9_rp )
4041  call interp_factor3d( kmax, 1, kmax, & ! [IN]
4042  imax, jmax, & ! [IN]
4043  lkmax, lks, lke, & ! [IN]
4044  ia, ja, & ! [IN]
4045  lx_org(:,:), & ! [IN]
4046  ly_org(:,:), & ! [IN]
4047  lz3d_org(:,:,:), & ! [IN]
4048  cx(:), cy(:), & ! [IN]
4049  lcz_3d(:,:,:), & ! [IN]
4050  igrd( :,:,:), & ! [OUT]
4051  jgrd( :,:,:), & ! [OUT]
4052  hfact( :,:,:), & ! [OUT]
4053  kgrdl(:,:,:,:,:), & ! [OUT]
4054  vfactl(:, :,:,:), & ! [OUT]
4055  flag_extrap = .true., & ! [IN, optional]
4056  zonal = zonal, & ! [IN, optional]
4057  pole = pole ) ! [IN, optional]
4058 
4059  case ( i_intrp_dstwgt )
4060 
4061  call interp_factor3d( itp_nh_l, & ! [IN]
4062  kmax, 1, kmax, & ! [IN]
4063  imax, jmax, & ! [IN]
4064  lkmax, lks, lke, & ! [IN]
4065  ia, ja, & ! [IN]
4066  llon_org(:,:), & ! [IN]
4067  llat_org(:,:), & ! [IN]
4068  lz3d_org(:,:,:), & ! [IN]
4069  lon(:,:), lat(:,:), & ! [IN]
4070  lcz_3d(:,:,:), & ! [IN]
4071  igrd( :,:,:), & ! [OUT]
4072  jgrd( :,:,:), & ! [OUT]
4073  hfact( :,:,:), & ! [OUT]
4074  kgrdl(:,:,:,:,:), & ! [OUT]
4075  vfactl(:, :,:,:), & ! [OUT]
4076  flag_extrap = .true. ) ! [IN, optional]
4077 
4078  end select
4079 
4080  call interp_interp2d( itp_nh_l, & ! [IN]
4081  imax, jmax, & ! [IN]
4082  ia, ja, & ! [IN]
4083  igrd(:,:,:), & ! [IN]
4084  jgrd(:,:,:), & ! [IN]
4085  hfact(:,:,:), & ! [IN]
4086  lst_org(:,:), & ! [IN]
4087  lst(:,:) ) ! [OUT]
4088  if ( filter_niter > 0 ) then
4089  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4090  lst(:,:), filter_order, filter_niter )
4091  call comm_vars8( lst(:,:), 1 )
4092  call comm_wait ( lst(:,:), 1, .false. )
4093  end if
4094 
4095 
4096  if ( filter_niter > 0 ) then
4097  !$omp parallel do
4098  do j = 1, ja
4099  do i = 1, ia
4100  one2d(i,j) = 1.0_rp
4101  end do
4102  end do
4103  end if
4104 
4105  do n = 1, n_rad_rgn
4106  do m = 1, n_rad_dir
4107 
4108  call interp_interp2d( itp_nh_l, & ! [IN]
4109  imax, jmax, & ! [IN]
4110  ia, ja, & ! [IN]
4111  igrd(:,:,:), & ! [IN]
4112  jgrd(:,:,:), & ! [IN]
4113  hfact(:,:,:), & ! [IN]
4114  albg_org(:,:,m,n), & ! [IN]
4115  albg(:,:,m,n) ) ! [OUT]
4116  if ( filter_niter > 0 ) then
4117  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4118  albg(:,:,m,n), filter_order, filter_niter, &
4119  limiter_sign = one2d(:,:) )
4120  call comm_vars8( albg(:,:,m,n), 1 )
4121  call comm_wait ( albg(:,:,m,n), 1, .false. )
4122  end if
4123  end do
4124  end do
4125 
4126  call interp_interp3d( itp_nh_l, &
4127  kmax, 1, kmax, &
4128  imax, jmax, &
4129  lkmax, lks, lke, &
4130  ia, ja, &
4131  igrd( :,:,:), & ! [IN]
4132  jgrd( :,:,:), & ! [IN]
4133  hfact( :,:,:), & ! [IN]
4134  kgrdl(:,:,:,:,:), & ! [IN]
4135  vfactl(:, :,:,:), & ! [IN]
4136  lz3d_org(:,:,:), & ! [IN]
4137  lcz_3d(:,:,:), & ! [IN]
4138  tg_org(:,:,:), & ! [IN]
4139  tg(:,:,:) ) ! [OUT]
4140 
4141  !$omp parallel do
4142  do j = 1, ja
4143  do i = 1, ia
4144  tg(lkmax,i,j) = tg(lkmax-1,i,j)
4145  enddo
4146  enddo
4147 
4148  ! replace values over the ocean
4149  do k = 1, lkmax
4150  call replace_misval_const( tg(k,:,:), maskval_tg, lsmask_nest )
4151  enddo
4152  if ( filter_niter > 0 ) then
4153  call filter_hyperdiff( lkmax, 1, lkmax, ia, isb, ieb, ja, jsb, jeb, &
4154  tg(:,:,:), filter_order, filter_niter )
4155  call comm_vars8( tg(:,:,:), 1 )
4156  call comm_wait ( tg(:,:,:), 1, .false. )
4157  end if
4158 
4159 
4160  ! elevation correction
4161  if ( elevation_correction ) then
4162  call interp_interp2d( itp_nh_l, & ! [IN]
4163  imax, jmax, & ! [IN]
4164  ia, ja, & ! [IN]
4165  igrd(:,:,:), & ! [IN]
4166  jgrd(:,:,:), & ! [IN]
4167  hfact(:,:,:), & ! [IN]
4168  topo_org(:,:), & ! [IN]
4169  topo(:,:) ) ! [OUT]
4170  if ( filter_niter > 0 ) then
4171  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4172  topo(:,:), filter_order, filter_niter )
4173  call comm_vars8( topo(:,:), 1 )
4174  call comm_wait ( topo(:,:), 1, .false. )
4175  end if
4176 
4177  !$omp parallel do &
4178  !$omp private(tdiff)
4179  do j = 1, ja
4180  do i = 1, ia
4181  if ( topo(i,j) > undef + eps ) then ! ignore UNDEF value
4182  tdiff = ( topography_zsfc(i,j) - topo(i,j) ) * laps
4183  lst(i,j) = lst(i,j) - tdiff
4184  do k = 1, lkmax
4185  tg(k,i,j) = tg(k,i,j) - tdiff
4186  end do
4187  end if
4188  end do
4189  end do
4190 
4191  end if
4192 
4193 
4194 
4195  ! Land water: interpolate over the ocean
4196  if( use_file_landwater )then
4197 
4198  if ( use_waterratio ) then
4199 
4200  if ( i_intrp_land_water .ne. i_intrp_off ) then
4201  do k = 1, kmax
4202  !$omp parallel do
4203  do j = 1, jmax
4204  do i = 1, imax
4205  work(i,j) = smds_org(k,i,j)
4206  end do
4207  end do
4208  select case( i_intrp_land_water )
4209  case( i_intrp_mask )
4210  call make_mask( lmask, work, imax, jmax, landdata=.true.)
4211  !$omp parallel do
4212  do j = 1, jmax
4213  do i = 1, imax
4214  if ( lmask_org(i,j) .ne. undef ) lmask(i,j) = lmask_org(i,j)
4215  end do
4216  end do
4217  case( i_intrp_fill )
4218  call make_mask( lmask, work, imax, jmax, landdata=.true.)
4219  end select
4220  call interp_oceanland_data(work, lmask, imax, jmax, .true., intrp_iter_max)
4221  !$omp parallel do
4222  do j = 1, jmax
4223  do i = 1, imax
4224 ! work2(i,j) = init_landwater_ratio_each( LANDUSE_index_PFT(i,j,1) )
4225  work2(i,j) = init_landwater_ratio
4226  end do
4227  end do
4228  !replace missing value to init_landwater_ratio_each
4229  call replace_misval_map( work, work2, imax, jmax, "SMOISDS")
4230  !$omp parallel do
4231  do j = 1, jmax
4232  do i = 1, imax
4233  smds_org(k,i,j) = work(i,j)
4234  end do
4235  end do
4236  enddo
4237  end if
4238 
4239  call interp_interp3d( itp_nh_l, &
4240  kmax, 1, kmax, &
4241  imax, jmax, &
4242  lkmax, lks, lke, &
4243  ia, ja, &
4244  igrd( :,:,:), & ! [IN]
4245  jgrd( :,:,:), & ! [IN]
4246  hfact( :,:,:), & ! [IN]
4247  kgrdl(:,:,:,:,:), & ! [IN]
4248  vfactl(:, :,:,:), & ! [IN]
4249  lz3d_org(:,:,:), & ! [IN]
4250  lcz_3d(:,:,:), & ! [IN]
4251  smds_org(:,:,:), & ! [IN]
4252  smds(:,:,:) ) ! [OUT]
4253 
4254  do k = 1, lkmax-1
4255  strg(k,:,:) = convert_ws2vwc( smds(k,:,:), critical=soilwater_ds2vc_flag )
4256  end do
4257 
4258  else
4259 
4260  if ( i_intrp_land_water .ne. i_intrp_off ) then
4261  do k = 1, kmax
4262  !$omp parallel do
4263  do j = 1, jmax
4264  do i = 1, imax
4265  work(i,j) = strg_org(k,i,j)
4266  end do
4267  end do
4268  select case( i_intrp_land_water )
4269  case( i_intrp_mask )
4270  call make_mask( lmask, work, imax, jmax, landdata=.true.)
4271  !$omp parallel do
4272  do j = 1, jmax
4273  do i = 1, imax
4274  if ( lmask_org(i,j) .ne. undef ) lmask(i,j) = lmask_org(i,j)
4275  end do
4276  end do
4277  case( i_intrp_fill )
4278  call make_mask( lmask, work, imax, jmax, landdata=.true.)
4279  end select
4280  call interp_oceanland_data(work, lmask, imax, jmax, .true., intrp_iter_max)
4281  !$omp parallel do
4282  do j = 1, jmax
4283  do i = 1, imax
4284  lmask(i,j) = maskval_strg
4285  end do
4286  end do
4287  !replace missing value to init_landwater_ratio
4288  call replace_misval_map( work, lmask, imax, jmax, "SMOIS")
4289  !$omp parallel do
4290  do j = 1, jmax
4291  do i = 1, imax
4292  strg_org(k,i,j) = work(i,j)
4293  end do
4294  end do
4295  enddo
4296  end if
4297 
4298  call interp_interp3d( itp_nh_l, &
4299  kmax, 1, kmax, &
4300  imax, jmax, &
4301  lkmax, lks, lke, &
4302  ia, ja, &
4303  igrd( :,:,:), & ! [IN]
4304  jgrd( :,:,:), & ! [IN]
4305  hfact( :,:,:), & ! [IN]
4306  kgrdl(:,:,:,:,:), & ! [IN]
4307  vfactl(:, :,:,:), & ! [IN]
4308  lz3d_org(:,:,:), & ! [IN]
4309  lcz_3d(:,:,:), & ! [IN]
4310  strg_org(:,:,:), & ! [IN]
4311  strg(:,:,:) ) ! [OUT]
4312  end if
4313 
4314  ! replace values over the ocean
4315  do k = 1, lkmax-1
4316  call replace_misval_const( strg(k,:,:), maskval_strg, lsmask_nest )
4317  enddo
4318 
4319  !$omp parallel do collapse(2)
4320  do j = 1, ja
4321  do i = 1, ia
4322  do k = 1, lkmax
4323  strg(k,i,j) = max( min( strg(k,i,j), 1.0_rp ), 0.0_rp )
4324  end do
4325  end do
4326  end do
4327 
4328  if ( filter_niter > 0 ) then
4329  !$omp parallel do collapse(2)
4330  do j = 1, ja
4331  do i = 1, ia
4332  do k = 1, lkmax-1
4333  one3d(k,i,j) = 1.0_rp
4334  end do
4335  end do
4336  end do
4337  call filter_hyperdiff( lkmax, 1, lkmax-1, ia, isb, ieb, ja, jsb, jeb, &
4338  strg(:,:,:), filter_order, filter_niter, &
4339  limiter_sign = one3d(:,:,:) )
4340  call comm_vars8( strg(:,:,:), 1 )
4341  call comm_wait ( strg(:,:,:), 1, .false. )
4342  end if
4343 
4344  !$omp parallel do
4345  do j = 1, ja
4346  do i = 1, ia
4347  strg(lkmax,i,j) = strg(lkmax-1,i,j)
4348  enddo
4349  enddo
4350 
4351  else ! not read from boundary file
4352 
4353  do k = 1, lkmax
4354  !$omp parallel do
4355  do j = 1, ja
4356  do i = 1, ia
4357 ! work(i,j) = init_landwater_ratio_each( LANDUSE_index_PFT(i,j,1) )
4358  work(i,j) = init_landwater_ratio
4359  end do
4360  end do
4361  ! conversion from water saturation [fraction] to volumetric water content [m3/m3]
4362  strg(k,:,:) = convert_ws2vwc( work(:,:), critical=soilwater_ds2vc_flag )
4363  end do
4364 
4365  endif ! use_file_waterratio
4366 
4367 
4368  return

References scale_const::const_eps, scale_const::const_i_lw, scale_const::const_i_sw, scale_const::const_laps, scale_const::const_pi, scale_const::const_undef, mod_land_vars::convert_ws2vwc(), scale_cpl_sfc_index::i_r_ir, scale_cpl_sfc_index::i_r_nir, scale_cpl_sfc_index::i_r_vis, scale_atmos_grid_cartesc_index::ieb, scale_interp::interp_interp2d(), scale_interp::interp_interp3d(), scale_atmos_grid_cartesc_index::isb, scale_atmos_grid_cartesc_index::jeb, scale_atmos_grid_cartesc_index::jsb, scale_landuse::landuse_index_pft, scale_landuse::landuse_pft_nmax, scale_land_grid_cartesc_index::lke, scale_land_grid_cartesc_index::lks, make_mask(), scale_prc::prc_abort(), replace_misval_const(), replace_misval_map(), and scale_topography::topography_zsfc.

Referenced by realinput_surface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ocean_interporation()

subroutine mod_realinput::ocean_interporation ( integer, intent(in)  imax,
integer, intent(in)  jmax,
real(rp), dimension (imax,jmax), intent(in)  sst_org,
real(rp), dimension (imax,jmax), intent(in)  tw_org,
real(rp), dimension(imax,jmax,n_rad_dir,n_rad_rgn), intent(inout)  albw_org,
real(rp), dimension (imax,jmax), intent(inout)  z0w_org,
real(rp), dimension(ia), intent(in)  CX,
real(rp), dimension(ja), intent(in)  CY,
logical, intent(in)  elevation_correction_ocean,
real(rp), intent(in)  init_ocean_alb_lw,
real(rp), intent(in)  init_ocean_alb_sw,
real(rp), intent(in)  init_ocean_z0w,
logical, intent(in)  first_surface,
real(rp), dimension (ia,ja), intent(out)  sst,
real(rp), dimension (ia,ja), intent(out)  tw,
real(rp), dimension(ia,ja,n_rad_dir,n_rad_rgn), intent(out)  albw,
real(rp), dimension (ia,ja), intent(out)  z0w 
)

Definition at line 4380 of file mod_realinput.F90.

4380  use scale_const, only: &
4381  undef => const_undef, &
4382  pi => const_pi, &
4383  laps => const_laps
4384  use scale_topography, only: &
4386  use scale_interp, only: &
4387  interp_factor2d, &
4389  use scale_filter, only: &
4390  filter_hyperdiff
4391  use scale_mapprojection, only: &
4392  mapprojection_lonlat2xy
4393  use scale_comm_cartesc, only: &
4394  comm_vars8, &
4395  comm_wait
4396  implicit none
4397  integer, intent(in) :: imax, jmax
4398  real(RP), intent(in) :: sst_org (imax,jmax)
4399  real(RP), intent(in) :: tw_org (imax,jmax)
4400  real(RP), intent(inout) :: albw_org(imax,jmax,N_RAD_DIR,N_RAD_RGN)
4401  real(RP), intent(inout) :: z0w_org (imax,jmax)
4402  real(RP), intent(in) :: CX(IA)
4403  real(RP), intent(in) :: CY(JA)
4404  logical, intent(in) :: elevation_correction_ocean
4405  real(RP), intent(in) :: init_ocean_alb_lw
4406  real(RP), intent(in) :: init_ocean_alb_sw
4407  real(RP), intent(in) :: init_ocean_z0w
4408  logical, intent(in) :: first_surface
4409 
4410  real(RP), intent(out) :: sst (IA,JA)
4411  real(RP), intent(out) :: tw (IA,JA)
4412  real(RP), intent(out) :: albw(IA,JA,N_RAD_DIR,N_RAD_RGN)
4413  real(RP), intent(out) :: z0w (IA,JA)
4414 
4415  ! for interpolation
4416  real(RP) :: oX_org(imax,jmax)
4417  real(RP) :: oY_org(imax,jmax)
4418  logical :: zonal, pole
4419 
4420  real(RP) :: one(IA,JA)
4421  real(RP) :: tdiff
4422 
4423  integer :: i, j, m, n
4424 
4425  !$omp parallel do
4426  do j = 1, jmax
4427  do i = 1, imax
4428  do m = 1, n_rad_dir
4429  if ( albw_org(i,j,m,i_r_ir ) == undef ) albw_org(i,j,m,i_r_ir ) = init_ocean_alb_lw
4430  if ( albw_org(i,j,m,i_r_nir) == undef ) albw_org(i,j,m,i_r_nir) = init_ocean_alb_sw
4431  if ( albw_org(i,j,m,i_r_vis) == undef ) albw_org(i,j,m,i_r_vis) = init_ocean_alb_sw
4432  if ( albw_org(i,j,m,i_r_vis) == undef ) albw_org(i,j,m,i_r_vis) = init_ocean_alb_sw
4433  end do
4434  if ( z0w_org(i,j) == undef ) z0w_org(i,j) = init_ocean_z0w
4435  end do
4436  end do
4437 
4438  if ( first_surface ) then
4439 
4440  ! interporation for ocean variables
4441 
4442  select case( itp_type_a )
4443  case ( i_intrp_linear )
4444 
4445  if ( imax == 1 .or. jmax == 1 ) then
4446  log_error("ocean_interporation",*) 'LINER interpolation requires nx, ny > 1'
4447  log_error_cont(*) 'Use "DIST-WEIGHT" as INTRP_TYPE of PARAM_MKINIT_REAL_OCEAN'
4448  call prc_abort
4449  end if
4450 
4451  !$omp parallel do
4452  do j = 1, jmax
4453  do i = 1, imax
4454  olat_org(i,j) = sign( min( abs(olat_org(i,j)), pi * 0.499999_rp ), olat_org(i,j) )
4455  end do
4456  end do
4457 
4458  call mapprojection_lonlat2xy( imax, 1, imax, jmax, 1, jmax, &
4459  olon_org(:,:), olat_org(:,:), & ! [IN]
4460  ox_org(:,:), oy_org(:,:) ) ! [OUT]
4461 
4462  zonal = ( maxval(olon_org) - minval(olon_org) ) > 2.0_rp * pi * 0.9_rp
4463  pole = ( maxval(olat_org) > pi * 0.5_rp * 0.9_rp ) .or. ( minval(olat_org) < - pi * 0.5_rp * 0.9_rp )
4464  call interp_factor2d( imax, jmax, & ! [IN]
4465  ia, ja, & ! [IN]
4466  ox_org(:,:), & ! [IN]
4467  oy_org(:,:), & ! [IN]
4468  cx(:), cy(:), & ! [IN]
4469  oigrd(:,:,:), & ! [OUT]
4470  ojgrd(:,:,:), & ! [OUT]
4471  ohfact(:,:,:), & ! [OUT]
4472  zonal = zonal, & ! [IN]
4473  pole = pole ) ! [IN]
4474 
4475  case ( i_intrp_dstwgt )
4476 
4477  call interp_factor2d( itp_nh_o, & ! [IN]
4478  imax, jmax, & ! [IN]
4479  ia, ja, & ! [IN]
4480  olon_org(:,:), & ! [IN]
4481  olat_org(:,:), & ! [IN]
4482  lon(:,:), lat(:,:), & ! [IN]
4483  oigrd(:,:,:), & ! [OUT]
4484  ojgrd(:,:,:), & ! [OUT]
4485  ohfact(:,:,:) ) ! [OUT]
4486 
4487  end select
4488 
4489  end if
4490 
4491 
4492  call interp_interp2d( itp_nh_o, & ! [IN]
4493  imax, jmax, & ! [IN]
4494  ia, ja, & ! [IN]
4495  oigrd(:,:,:), & ! [IN]
4496  ojgrd(:,:,:), & ! [IN]
4497  ohfact(:,:,:), & ! [IN]
4498  tw_org(:,:), & ! [IN]
4499  tw(:,:) ) ! [OUT]
4500  if ( filter_niter > 0 ) then
4501  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4502  tw(:,:), filter_order, filter_niter )
4503  call comm_vars8( tw(:,:), 1 )
4504  call comm_wait ( tw(:,:), 1, .false. )
4505  end if
4506 
4507  call interp_interp2d( itp_nh_o, & ! [IN]
4508  imax, jmax, & ! [IN]
4509  ia, ja, & ! [IN]
4510  oigrd(:,:,:), & ! [IN]
4511  ojgrd(:,:,:), & ! [IN]
4512  ohfact(:,:,:), & ! [IN]
4513  sst_org(:,:), & ! [IN]
4514  sst(:,:) ) ! [OUT]
4515  if ( filter_niter > 0 ) then
4516  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4517  sst(:,:), filter_order, filter_niter )
4518  call comm_vars8( sst(:,:), 1 )
4519  call comm_wait ( sst(:,:), 1, .false. )
4520  end if
4521 
4522  ! elevation correction
4523  if ( elevation_correction_ocean ) then
4524 
4525  !$omp parallel do &
4526  !$omp private(tdiff)
4527  do j = 1, ja
4528  do i = 1, ia
4529  tdiff = topography_zsfc(i,j) * laps
4530  sst(i,j) = sst(i,j) - tdiff
4531  tw(i,j) = tw(i,j) - tdiff
4532  end do
4533  end do
4534 
4535  end if
4536 
4537 
4538  if ( filter_niter > 0 ) then
4539  !$omp parallel do
4540  do j = 1, ja
4541  do i = 1, ia
4542  one(i,j) = 1.0_rp
4543  end do
4544  end do
4545  end if
4546 
4547  do n = 1, n_rad_rgn
4548  do m = 1, n_rad_dir
4549 
4550  call interp_interp2d( itp_nh_o, & ! [IN]
4551  imax, jmax, & ! [IN]
4552  ia, ja, & ! [IN]
4553  oigrd(:,:,:), & ! [IN]
4554  ojgrd(:,:,:), & ! [IN]
4555  ohfact(:,:,:), & ! [IN]
4556  albw_org(:,:,m,n), & ! [IN]
4557  albw(:,:,m,n) ) ! [OUT]
4558  if ( filter_niter > 0 ) then
4559  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4560  albw(:,:,m,n), filter_order, filter_niter, &
4561  limiter_sign = one(:,:) )
4562  call comm_vars8( albw(:,:,m,n), 1 )
4563  call comm_wait ( albw(:,:,m,n), 1, .false. )
4564  end if
4565 
4566  end do
4567  end do
4568 
4569  call interp_interp2d( itp_nh_o, & ! [IN]
4570  imax, jmax, & ! [IN]
4571  ia, ja, & ! [IN]
4572  oigrd(:,:,:), & ! [IN]
4573  ojgrd(:,:,:), & ! [IN]
4574  ohfact(:,:,:), & ! [IN]
4575  z0w_org(:,:), & ! [IN]
4576  z0w(:,:) ) ! [OUT]
4577  if ( filter_niter > 0 ) then
4578  call filter_hyperdiff( ia, isb, ieb, ja, jsb, jeb, &
4579  z0w(:,:), filter_order, filter_niter, &
4580  limiter_sign = one(:,:) )
4581  call comm_vars8( z0w(:,:), 1 )
4582  call comm_wait ( z0w(:,:), 1, .false. )
4583  end if
4584 
4585 
4586  return

References scale_const::const_laps, scale_const::const_pi, scale_const::const_undef, scale_cpl_sfc_index::i_r_ir, scale_cpl_sfc_index::i_r_nir, scale_cpl_sfc_index::i_r_vis, scale_atmos_grid_cartesc_index::ieb, scale_interp::interp_interp2d(), scale_atmos_grid_cartesc_index::isb, scale_atmos_grid_cartesc_index::jeb, scale_atmos_grid_cartesc_index::jsb, scale_prc::prc_abort(), and scale_topography::topography_zsfc.

Referenced by realinput_surface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urban_input()

subroutine mod_realinput::urban_input ( real(rp), dimension (ia,ja), intent(in)  lst,
real(rp), dimension (ia,ja,n_rad_dir,n_rad_rgn), intent(in)  albg,
real(rp), dimension(ka,ia,ja), intent(in)  DENS,
real(rp), dimension(ka,ia,ja), intent(in)  MOMX,
real(rp), dimension(ka,ia,ja), intent(in)  MOMY,
real(rp), dimension(ka,ia,ja), intent(in)  RHOT,
real(rp), dimension(ka,ia,ja,qa), intent(in)  QTRC,
real(rp), dimension(ia,ja), intent(out)  tc_urb,
real(rp), dimension(ia,ja), intent(out)  qc_urb,
real(rp), dimension(ia,ja), intent(out)  uc_urb,
real(rp), dimension (ia,ja), intent(out)  ust,
real(rp), dimension (ia,ja,n_rad_dir,n_rad_rgn), intent(out)  albu 
)

Definition at line 4596 of file mod_realinput.F90.

4596  use scale_atmos_hydrometeor, only: &
4597  i_qv
4598  use scale_atmos_thermodyn, only: &
4599  thermodyn_specific_heat => atmos_thermodyn_specific_heat, &
4600  thermodyn_rhot2temp_pres => atmos_thermodyn_rhot2temp_pres
4601  use scale_comm_cartesc, only: &
4602  comm_vars8, &
4603  comm_wait
4604  implicit none
4605  real(RP), intent(in) :: lst (IA,JA)
4606  real(RP), intent(in) :: albg (IA,JA,N_RAD_DIR,N_RAD_RGN)
4607  real(RP), intent(in) :: DENS(KA,IA,JA)
4608  real(RP), intent(in) :: MOMX(KA,IA,JA)
4609  real(RP), intent(in) :: MOMY(KA,IA,JA)
4610  real(RP), intent(in) :: RHOT(KA,IA,JA)
4611  real(RP), intent(in) :: QTRC(KA,IA,JA,QA)
4612  real(RP), intent(out) :: tc_urb(IA,JA)
4613  real(RP), intent(out) :: qc_urb(IA,JA)
4614  real(RP), intent(out) :: uc_urb(IA,JA)
4615  real(RP), intent(out) :: ust (IA,JA)
4616  real(RP), intent(out) :: albu (IA,JA,N_RAD_DIR,N_RAD_RGN)
4617 
4618  real(RP) :: temp, pres
4619  real(RP) :: Qdry
4620  real(RP) :: Rtot
4621  real(RP) :: CVtot
4622  real(RP) :: CPtot
4623 
4624  integer :: i, j
4625 
4626  ! urban data
4627 
4628  !$omp parallel do collapse(2) &
4629  !$omp private(Qdry,Rtot,CVtot,CPtot,temp,pres)
4630  do j = 1, ja
4631  do i = 1, ia
4632  call thermodyn_specific_heat( qa, &
4633  qtrc(ks,i,j,:), &
4634  tracer_mass(:), tracer_r(:), tracer_cv(:), tracer_cp(:), & ! [IN]
4635  qdry, rtot, cvtot, cptot ) ! [OUT]
4636  call thermodyn_rhot2temp_pres( dens(ks,i,j), rhot(ks,i,j), rtot, cvtot, cptot, & ! [IN]
4637  temp, pres ) ! [OUT]
4638 
4639  tc_urb(i,j) = temp
4640  if ( i_qv > 0 ) then
4641  qc_urb(i,j) = qtrc(ks,i,j,i_qv)
4642  else
4643  qc_urb(i,j) = 0.0_rp
4644  end if
4645  enddo
4646  enddo
4647 
4648  !$omp parallel do
4649  do j = 1, ja-1
4650  do i = 1, ia-1
4651  uc_urb(i,j) = max(sqrt( ( momx(ks,i,j) / (dens(ks,i+1, j)+dens(ks,i,j)) * 2.0_rp )**2.0_rp &
4652  + ( momy(ks,i,j) / (dens(ks, i,j+1)+dens(ks,i,j)) * 2.0_rp )**2.0_rp ), &
4653  0.01_rp)
4654  enddo
4655  enddo
4656  !$omp parallel do
4657  do j = 1, ja-1
4658  uc_urb(ia,j) = max(sqrt( ( momx(ks,ia,j) / dens(ks,ia,j ) )**2.0_rp &
4659  + ( momy(ks,ia,j) / (dens(ks,ia,j+1)+dens(ks,ia,j)) * 2.0_rp )**2.0_rp ), &
4660  0.01_rp)
4661  enddo
4662  !$omp parallel do
4663  do i = 1, ia-1
4664  uc_urb(i,ja) = max(sqrt( ( momx(ks,i,ja) / (dens(ks,i+1,ja)+dens(ks,i,ja)) * 2.0_rp )**2.0_rp &
4665  + ( momy(ks,i,ja) / dens(ks,i ,ja) )**2.0_rp ), 0.01_rp)
4666  enddo
4667  uc_urb(ia,ja) = max(sqrt( ( momx(ks,ia,ja) / dens(ks,ia,ja) )**2.0_rp &
4668  + ( momy(ks,ia,ja) / dens(ks,ia,ja) )**2.0_rp ), 0.01_rp)
4669 
4670  call comm_vars8( uc_urb, 1 )
4671  call comm_wait ( uc_urb, 1, .false. )
4672 
4673 
4674 !!$ ! Urban surface temp: interpolate over the ocean
4675 !!$ if ( i_INTRP_URB_SFC_TEMP .ne. i_intrp_off ) then
4676 !!$ select case( i_INTRP_URB_SFC_TEMP )
4677 !!$ case( i_intrp_mask )
4678 !!$ call make_mask( lmask, ust_org, imax, jmax, landdata=.true.)
4679 !!$ !$omp parallel do
4680 !!$ do j = 1, jmax
4681 !!$ do i = 1, imax
4682 !!$ if ( lmask_org(i,j) .ne. UNDEF ) lmask(i,j) = lmask_org(i,j)
4683 !!$ end do
4684 !!$ end do
4685 !!$ case( i_intrp_fill )
4686 !!$ call make_mask( lmask, ust_org, imax, jmax, landdata=.true.)
4687 !!$ case default
4688 !!$ LOG_ERROR("urban_input",*) 'INTRP_URB_SFC_TEMP is invalid.'
4689 !!$ call PRC_abort
4690 !!$ end select
4691 !!$ call interp_OceanLand_data(ust_org, lmask, imax, jmax, .true., intrp_iter_max)
4692 !!$ end if
4693 !!$
4694 !!$ !$omp parallel do
4695 !!$ do j = 1, jmax
4696 !!$ do i = 1, imax
4697 !!$ if ( ust_org(i,j) == UNDEF ) ust_org(i,j) = lst_org(i,j)
4698 !!$ end do
4699 !!$ end do
4700 !!$
4701 !!$ call INTERP_interp2d( itp_nh_l, & ! [IN]
4702 !!$ imax, jmax, & ! [IN]
4703 !!$ IA, JA, & ! [IN]
4704 !!$ igrd (:,:,:), & ! [IN]
4705 !!$ jgrd (:,:,:), & ! [IN]
4706 !!$ hfact (:,:,:), & ! [IN]
4707 !!$ ust_org (:,:), & ! [IN]
4708 !!$ ust (:,:) ) ! [OUT]
4709 !!$ if ( FILTER_NITER > 0 ) then
4710 !!$ call FILTER_hyperdiff( IA, ISB, IEB, JA, JSB, JEB, &
4711 !!$ ust(:,:), FILTER_ORDER, FILTER_NITER )
4712 !!$ call COMM_vars8( ust(:,:), 1 )
4713 !!$ call COMM_wait ( ust(:,:), 1, .false. )
4714 !!$ end if
4715 !!$
4716 !!$ !$omp parallel do
4717 !!$ do j = 1, JA
4718 !!$ do i = 1, IA
4719 !!$ if( abs(lsmask_nest(i,j)-0.0_RP) < EPS ) then ! ocean grid
4720 !!$ ust(i,j) = sst(i,j,nn)
4721 !!$ endif
4722 !!$ enddo
4723 !!$ enddo
4724 !!$
4725 !!$ !$omp parallel do &
4726 !!$ !$omp private(tdiff)
4727 !!$ do j = 1, JA
4728 !!$ do i = 1, IA
4729 !!$ if ( topo(i,j) > 0.0_RP ) then ! ignore UNDEF value
4730 !!$ tdiff = ( TOPOGRAPHY_Zsfc(i,j) - topo(i,j) ) * LAPS
4731 !!$ ust(i,j) = ust(i,j) - tdiff
4732 !!$ end if
4733 !!$ end do
4734 !!$ end do
4735 
4736 
4737  !$omp parallel do
4738  do j = 1, ja
4739  do i = 1, ia
4740  ust(i,j) = lst(i,j)
4741  end do
4742  end do
4743 
4744 
4745  ! copy albedo of land to urban
4746  !$omp parallel do
4747  do j = 1, ja
4748  do i = 1, ia
4749  albu(i,j,:,:) = albg(i,j,:,:)
4750  enddo
4751  enddo
4752 
4753  return

References scale_atmos_hydrometeor::i_qv, scale_atmos_grid_cartesc_index::ks, scale_tracer::tracer_cp, scale_tracer::tracer_cv, scale_tracer::tracer_mass, and scale_tracer::tracer_r.

Referenced by realinput_surface().

Here is the caller graph for this function:

◆ make_mask()

subroutine mod_realinput::make_mask ( real(rp), dimension(:,:), intent(out)  gmask,
real(rp), dimension(:,:), intent(in)  data,
integer, intent(in)  nx,
integer, intent(in)  ny,
logical, intent(in)  landdata 
)

Definition at line 4763 of file mod_realinput.F90.

4763  use scale_const, only: &
4764  eps => const_eps, &
4765  undef => const_undef
4766  implicit none
4767  real(RP), intent(out) :: gmask(:,:)
4768  real(RP), intent(in) :: data(:,:)
4769  integer, intent(in) :: nx
4770  integer, intent(in) :: ny
4771  logical, intent(in) :: landdata ! .true. => land data , .false. => ocean data
4772 
4773  real(RP) :: dd
4774  integer :: i,j
4775 
4776  if( landdata )then
4777  !$omp parallel do
4778  do j = 1, ny
4779  do i = 1, nx
4780  gmask(i,j) = 1.0_rp ! gmask=1 will be skip in "interp_OceanLand_data"
4781  end do
4782  end do
4783  dd = 0.0_rp
4784  else
4785  !$omp parallel do
4786  do j = 1, ny
4787  do i = 1, nx
4788  gmask(i,j) = 0.0_rp ! gmask=0 will be skip in "interp_OceanLand_data"
4789  end do
4790  end do
4791  dd = 1.0_rp
4792  endif
4793 
4794  !$omp parallel do
4795  do j = 1, ny
4796  do i = 1, nx
4797  if( abs(data(i,j) - undef) < sqrt(eps) )then
4798  gmask(i,j) = dd
4799  endif
4800  enddo
4801  enddo
4802 
4803  return

References scale_const::const_eps, and scale_const::const_undef.

Referenced by land_interporation(), and realinput_surface().

Here is the caller graph for this function:

◆ replace_misval_const()

subroutine mod_realinput::replace_misval_const ( real(rp), dimension(:,:), intent(inout)  data,
real(rp), intent(in)  maskval,
real(rp), dimension(:,:), intent(in)  frac_land 
)

Definition at line 4938 of file mod_realinput.F90.

4938  use scale_const, only: &
4939  eps => const_eps
4940  implicit none
4941  real(RP), intent(inout) :: data(:,:)
4942  real(RP), intent(in) :: maskval
4943  real(RP), intent(in) :: frac_land(:,:)
4944  integer :: i, j
4945 
4946  !$omp parallel do
4947  do j = 1, ja
4948  do i = 1, ia
4949  if( abs(frac_land(i,j)-0.0_rp) < eps )then ! ocean grid
4950  data(i,j) = maskval
4951  endif
4952  enddo
4953  enddo
4954 

References scale_const::const_eps, scale_atmos_grid_cartesc_index::ia, and scale_atmos_grid_cartesc_index::ja.

Referenced by land_interporation().

Here is the caller graph for this function:

◆ replace_misval_map()

subroutine mod_realinput::replace_misval_map ( real(rp), dimension(:,:), intent(inout)  data,
real(rp), dimension(:,:), intent(in)  maskval,
integer, intent(in)  nx,
integer, intent(in)  ny,
character(len=*), intent(in)  elem 
)

Definition at line 4959 of file mod_realinput.F90.

4959  use scale_const, only: &
4960  eps => const_eps, &
4961  undef => const_undef
4962  implicit none
4963 
4964  real(RP), intent(inout) :: data(:,:)
4965  real(RP), intent(in) :: maskval(:,:)
4966  integer, intent(in) :: nx, ny
4967  character(len=*), intent(in) :: elem
4968 
4969  integer :: i, j
4970  logical :: error
4971 
4972  error = .false.
4973  !$omp parallel do
4974  do j = 1, ny
4975  if ( error ) cycle
4976  do i = 1, nx
4977  if( abs(data(i,j) - undef) < sqrt(eps) )then
4978  if( abs(maskval(i,j) - undef) < sqrt(eps) )then
4979  log_error("replace_misval_map",*) "data for mask of "//trim(elem)//"(",i,",",j,") includes missing value."
4980  error = .true.
4981  exit
4982  else
4983  data(i,j) = maskval(i,j)
4984  endif
4985  endif
4986  enddo
4987  enddo
4988 
4989  if ( error ) then
4990  log_error_cont(*) "Please check input data of SKINTEMP or SST. "
4991  call prc_abort
4992  end if
4993 
4994  return

References scale_const::const_eps, scale_const::const_undef, and scale_prc::prc_abort().

Referenced by land_interporation(), and realinput_surface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_ijrange()

subroutine mod_realinput::get_ijrange ( integer, intent(out)  IS_org,
integer, intent(out)  IE_org,
integer, intent(out)  JS_org,
integer, intent(out)  JE_org,
integer, intent(in)  IA_org,
integer, intent(in)  JA_org,
real(rp), intent(in)  LON_min,
real(rp), intent(in)  LON_max,
real(rp), intent(in)  LAT_min,
real(rp), intent(in)  LAT_max,
real(rp), dimension(ia_org,ja_org), intent(in)  LON_all,
real(rp), dimension(ia_org,ja_org), intent(in)  LAT_all 
)

Definition at line 5002 of file mod_realinput.F90.

5002  use scale_const, only: &
5003  eps => const_eps
5004  use scale_atmos_grid_cartesc_real, only: &
5007  integer, intent(out) :: IS_org
5008  integer, intent(out) :: IE_org
5009  integer, intent(out) :: JS_org
5010  integer, intent(out) :: JE_org
5011 
5012  integer, intent(in) :: IA_org
5013  integer, intent(in) :: JA_org
5014  real(RP), intent(in) :: LON_min, LON_max
5015  real(RP), intent(in) :: LAT_min, LAT_max
5016  real(RP), intent(in) :: LON_all(IA_org,JA_org)
5017  real(RP), intent(in) :: LAT_all(IA_org,JA_org)
5018 
5019  real(RP) :: min, max
5020 
5021  logical :: LON_mask(IA_org)
5022  logical :: LAT_mask(JA_org)
5023 
5024  integer :: i, j
5025 
5026  if ( lon_min < minval( lon_all ) .or. lon_max > maxval( lon_all ) ) then
5027  ! probably global (cyclic) data
5028  is_org = 1
5029  ie_org = ia_org
5030  else
5031  min = maxval( minval( lon_all(:,:), dim=2 ), mask=all( lon_all(:,:) < lon_min, dim=2 ) )
5032  max = minval( maxval( lon_all(:,:), dim=2 ), mask=all( lon_all(:,:) > lon_max, dim=2 ) )
5033  lon_mask(:) = any( lon_all(:,:) - min > -eps, dim=2 ) .AND. any( lon_all(:,:) - max < eps, dim=2 )
5034  do i = 1, ia_org
5035  if( lon_mask(i) ) then
5036  is_org = i
5037  exit
5038  endif
5039  end do
5040  do i = ia_org, 1, -1
5041  if( lon_mask(i) ) then
5042  ie_org = i
5043  exit
5044  endif
5045  end do
5046  end if
5047 
5048  if ( lat_min < minval( lat_all ) .or. lat_max > maxval( lat_all ) ) then
5049  ! unexpected
5050  ! INTERP_domain_compatibility should been called
5051  log_error("get_IJrange",*) "unexpected error", lat_min, lat_max, minval( lat_all ), maxval( lat_all )
5052  call prc_abort
5053  end if
5054  min = maxval( minval( lat_all(:,:), dim=1 ), mask=all( lat_all(:,:) < lat_min, dim=1 ) )
5055  max = minval( maxval( lat_all(:,:), dim=1 ), mask=all( lat_all(:,:) > lat_max, dim=1 ) )
5056  lat_mask(:) = any( lat_all(:,:) - min > -eps, dim=1 ) .AND. any( lat_all(:,:) - max < eps, dim=1 )
5057  do j = 1, ja_org
5058  if( lat_mask(j) ) then
5059  js_org = j
5060  exit
5061  endif
5062  end do
5063  do j = ja_org, 1, -1
5064  if( lat_mask(j) ) then
5065  je_org = j
5066  exit
5067  endif
5068  end do
5069 
5070  return

References scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon, scale_const::const_eps, and scale_prc::prc_abort().

Referenced by realinput_surface().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ inetcdf

integer, parameter, public mod_realinput::inetcdf = 1

Definition at line 77 of file mod_realinput.F90.

77  integer, public, parameter :: iNetCDF = 1

Referenced by realinput_surface().

◆ igrads

integer, parameter, public mod_realinput::igrads = 2

Definition at line 78 of file mod_realinput.F90.

78  integer, public, parameter :: iGrADS = 2

Referenced by realinput_surface().

mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
Definition: mod_atmos_phy_sf_vars.F90:67
scale_interp::interp_interp2d
subroutine, public interp_interp2d(npoints, IA_ref, JA_ref, IA, JA, idx_i, idx_j, hfact, val_ref, val, threshold_undef, wsum, val2)
Definition: scale_interp.F90:1377
mod_ocean_vars::ocean_ocn_z0m
real(rp), dimension(:,:), allocatable, public ocean_ocn_z0m
surface roughness length for momentum, open ocean [m]
Definition: mod_ocean_vars.F90:66
scale_landuse::landuse_fact_ocean
real(rp), dimension(:,:), allocatable, public landuse_fact_ocean
ocean factor
Definition: scale_landuse.F90:45
mod_land_vars::land_temp
real(rp), dimension(:,:,:), allocatable, public land_temp
temperature of each soil layer [K]
Definition: mod_land_vars.F90:62
mod_urban_admin::urban_do
logical, public urban_do
Definition: mod_urban_admin.F90:32
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
mod_urban_vars::urban_sfc_temp
real(rp), dimension(:,:), allocatable, public urban_sfc_temp
Definition: mod_urban_vars.F90:75
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
mod_ocean_vars::ocean_ice_temp
real(rp), dimension(:,:), allocatable, public ocean_ice_temp
sea ice temperature [K]
Definition: mod_ocean_vars.F90:74
scale_tracer::qa
integer, public qa
Definition: scale_tracer.F90:35
mod_urban_vars::urban_tb
real(rp), dimension(:,:), allocatable, public urban_tb
Definition: mod_urban_vars.F90:65
mod_ocean_vars::ocean_sfc_z0e
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0e
ocean surface roughness length for vapor [m]
Definition: mod_ocean_vars.F90:72
scale_ocean_phy_ice_simple
module ocean / physics / ice / simple
Definition: scale_ocean_phy_ice_simple.F90:12
scale_tracer::tracer_mass
real(rp), dimension(qa_max), public tracer_mass
Definition: scale_tracer.F90:47
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
Definition: mod_atmos_phy_sf_vars.F90:69
mod_land_vars::land_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public land_sfc_albedo
land surface albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
Definition: mod_land_vars.F90:66
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
mod_ocean_vars::ice_flag
logical, public ice_flag
Definition: mod_ocean_vars.F90:142
mod_atmos_admin
module ATMOS admin
Definition: mod_atmos_admin.F90:11
mod_urban_vars::urban_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public urban_sfc_albedo
Definition: mod_urban_vars.F90:76
scale_atmos_phy_rd_common::i_lw
integer, parameter, public i_lw
Definition: scale_atmos_phy_rd_common.F90:37
scale_interp
module INTERPOLATION
Definition: scale_interp.F90:12
scale_land_grid_cartesc_index::lkmax
integer, public lkmax
Definition: scale_land_grid_cartesC_index.F90:32
mod_land_vars::land_water
real(rp), dimension(:,:,:), allocatable, public land_water
moisture of each soil layer [m3/m3]
Definition: mod_land_vars.F90:63
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:35
mod_urban_vars::urban_trl
real(rp), dimension(:,:,:), allocatable, public urban_trl
Definition: mod_urban_vars.F90:61
scale_atmos_hydrometeor
module atmosphere / hydrometeor
Definition: scale_atmos_hydrometeor.F90:12
mod_atmos_phy_sf_vars
module ATMOSPHERIC Surface Variables
Definition: mod_atmos_phy_sf_vars.F90:12
scale_ocean_grid_cartesc_index::okmax
integer, public okmax
Definition: scale_ocean_grid_cartesC_index.F90:32
mod_urban_vars::urban_raing
real(rp), dimension(:,:), allocatable, public urban_raing
Definition: mod_urban_vars.F90:72
scale_topography
module TOPOGRAPHY
Definition: scale_topography.F90:11
mod_urban_vars::urban_qc
real(rp), dimension(:,:), allocatable, public urban_qc
Definition: mod_urban_vars.F90:68
mod_ocean_vars::ocean_sfc_z0m
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0m
ocean surface roughness length for momentum [m]
Definition: mod_ocean_vars.F90:70
mod_atmos_vars::rhot
real(rp), dimension(:,:,:), allocatable, target, public rhot
Definition: mod_atmos_vars.F90:80
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0h
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
Definition: mod_atmos_phy_sf_vars.F90:68
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_temp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
Definition: mod_atmos_phy_sf_vars.F90:65
mod_atmos_vars::qtrc
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
Definition: mod_atmos_vars.F90:81
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:49
scale_const::const_i_sw
integer, public const_i_sw
short-wave radiation index
Definition: scale_const.F90:108
scale_urban_grid_cartesc_index::ukmax
integer, public ukmax
Definition: scale_urban_grid_cartesC_index.F90:32
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_mapprojection
module Map projection
Definition: scale_mapprojection.F90:12
mod_atmos_vars::dens
real(rp), dimension(:,:,:), allocatable, target, public dens
Definition: mod_atmos_vars.F90:76
mod_ocean_vars::ocean_sfc_z0h
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0h
ocean surface roughness length for heat [m]
Definition: mod_ocean_vars.F90:71
mod_ocean_admin
module Ocean admin
Definition: mod_ocean_admin.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
mod_ocean_vars::ocean_uvel
real(rp), dimension(:,:,:), allocatable, public ocean_uvel
ocean zonal velocity [m/s]
Definition: mod_ocean_vars.F90:63
mod_land_admin
module Land admin
Definition: mod_land_admin.F90:11
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
Definition: mod_atmos_phy_sf_vars.F90:66
mod_atmos_vars::momz
real(rp), dimension(:,:,:), allocatable, target, public momz
Definition: mod_atmos_vars.F90:77
mod_urban_vars::urban_tgl
real(rp), dimension(:,:,:), allocatable, public urban_tgl
Definition: mod_urban_vars.F90:63
scale_landuse::landuse_index_pft
integer, dimension(:,:,:), allocatable, public landuse_index_pft
index of PFT for each mosaic
Definition: scale_landuse.F90:68
scale_tracer::tracer_cv
real(rp), dimension(qa_max), public tracer_cv
Definition: scale_tracer.F90:42
mod_land_vars
module LAND Variables
Definition: mod_land_vars.F90:11
scale_landuse::landuse_pft_nmax
integer, public landuse_pft_nmax
number of plant functional type(PFT)
Definition: scale_landuse.F90:64
scale_ocean_phy_ice_simple::ocean_phy_ice_freezetemp
real(rp), public ocean_phy_ice_freezetemp
Definition: scale_ocean_phy_ice_simple.F90:44
mod_atmos_vars::momx
real(rp), dimension(:,:,:), allocatable, target, public momx
Definition: mod_atmos_vars.F90:78
mod_ocean_vars
module OCEAN Variables
Definition: mod_ocean_vars.F90:12
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
mod_atmos_vars::momy
real(rp), dimension(:,:,:), allocatable, target, public momy
Definition: mod_atmos_vars.F90:79
scale_time
module TIME
Definition: scale_time.F90:11
scale_interp::interp_interp3d
subroutine, public interp_interp3d(npoints, KA_ref, KS_ref, KE_ref, IA_ref, JA_ref, KA, KS, KE, IA, JA, idx_i, idx_j, hfact, idx_k, vfact, hgt_ref, hgt, val_ref, val, spline, logwgt, threshold_undef, wsum, val2)
Definition: scale_interp.F90:1470
scale_const::const_pi
real(rp), parameter, public const_pi
pi
Definition: scale_const.F90:32
scale_const::const_i_lw
integer, public const_i_lw
long-wave radiation index
Definition: scale_const.F90:107
mod_urban_vars::urban_tc
real(rp), dimension(:,:), allocatable, public urban_tc
Definition: mod_urban_vars.F90:67
mod_urban_vars::urban_tg
real(rp), dimension(:,:), allocatable, public urban_tg
Definition: mod_urban_vars.F90:66
scale_atmos_hydrometeor::i_qv
integer, public i_qv
Definition: scale_atmos_hydrometeor.F90:93
mod_land_vars::convert_ws2vwc
real(rp) function, dimension(lia, lja), public convert_ws2vwc(WS, critical)
conversion from water saturation [fraction] to volumetric water content [m3/m3]
Definition: mod_land_vars.F90:1422
scale_ocean_grid_cartesc_index::oimax
integer, public oimax
Definition: scale_ocean_grid_cartesC_index.F90:33
mod_urban_vars::urban_uc
real(rp), dimension(:,:), allocatable, public urban_uc
Definition: mod_urban_vars.F90:69
scale_atmos_phy_rd_common::i_sw
integer, parameter, public i_sw
Definition: scale_atmos_phy_rd_common.F90:38
scale_landuse::landuse_fact_land
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
Definition: scale_landuse.F90:46
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
scale_topography::topography_zsfc
real(rp), dimension(:,:), allocatable, public topography_zsfc
absolute ground height [m]
Definition: scale_topography.F90:39
mod_land_vars::land_sfc_temp
real(rp), dimension(:,:), allocatable, public land_sfc_temp
land surface skin temperature [K]
Definition: mod_land_vars.F90:65
scale_tracer::tracer_cp
real(rp), dimension(qa_max), public tracer_cp
Definition: scale_tracer.F90:43
mod_ocean_admin::ocean_do
logical, public ocean_do
Definition: mod_ocean_admin.F90:32
mod_ocean_vars::ocean_ice_mass
real(rp), dimension(:,:), allocatable, public ocean_ice_mass
sea ice mass [kg]
Definition: mod_ocean_vars.F90:75
scale_const::const_tem00
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
Definition: scale_const.F90:99
mod_ocean_vars::ocean_vvel
real(rp), dimension(:,:,:), allocatable, public ocean_vvel
ocean meridional velocity [m/s]
Definition: mod_ocean_vars.F90:64
scale_time::time_gettimelabel
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:93
scale_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
mod_atmos_vars
module ATMOSPHERIC Variables
Definition: mod_atmos_vars.F90:12
scale_tracer::tracer_r
real(rp), dimension(qa_max), public tracer_r
Definition: scale_tracer.F90:44
mod_land_admin::land_do
logical, public land_do
Definition: mod_land_admin.F90:41
mod_urban_vars::urban_rainb
real(rp), dimension(:,:), allocatable, public urban_rainb
Definition: mod_urban_vars.F90:71
mod_ocean_vars::ocean_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public ocean_sfc_albedo
ocean surface albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
Definition: mod_ocean_vars.F90:69
mod_urban_vars::urban_tr
real(rp), dimension(:,:), allocatable, public urban_tr
Definition: mod_urban_vars.F90:64
mod_ocean_vars::ocean_sfc_temp
real(rp), dimension(:,:), allocatable, public ocean_sfc_temp
ocean surface skin temperature [K]
Definition: mod_ocean_vars.F90:68
scale_filter
module FILTER
Definition: scale_filter.F90:11
mod_atmos_admin::atmos_phy_mp_type
character(len=h_short), public atmos_phy_mp_type
Definition: mod_atmos_admin.F90:36
scale_atmos_thermodyn
module atmosphere / thermodyn
Definition: scale_atmos_thermodyn.F90:11
mod_urban_vars::urban_roff
real(rp), dimension(:,:), allocatable, public urban_roff
Definition: mod_urban_vars.F90:92
scale_const::const_laps
real(rp), public const_laps
lapse rate of ISA [K/m]
Definition: scale_const.F90:62
scale_landuse::landuse_fact_urban
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
Definition: scale_landuse.F90:47
scale_land_grid_cartesc_index::lke
integer, public lke
Definition: scale_land_grid_cartesC_index.F90:39
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:53
mod_ocean_vars::ocean_salt
real(rp), dimension(:,:,:), allocatable, public ocean_salt
ocean salinity [PSU]
Definition: mod_ocean_vars.F90:62
mod_urban_vars::urban_tbl
real(rp), dimension(:,:,:), allocatable, public urban_tbl
Definition: mod_urban_vars.F90:62
scale_landuse
module LANDUSE
Definition: scale_landuse.F90:19
mod_urban_admin
module Urban admin
Definition: mod_urban_admin.F90:11
mod_land_vars::land_ice
real(rp), dimension(:,:,:), allocatable, public land_ice
ice of each soil layer [m3/m3]
Definition: mod_land_vars.F90:64
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_ocean_grid_cartesc_index::ojmax
integer, public ojmax
Definition: scale_ocean_grid_cartesC_index.F90:34
mod_urban_vars::urban_rainr
real(rp), dimension(:,:), allocatable, public urban_rainr
Definition: mod_urban_vars.F90:70
scale_const::const_pre00
real(rp), public const_pre00
pressure reference [Pa]
Definition: scale_const.F90:97
scale_land_grid_cartesc_index::lks
integer, public lks
Definition: scale_land_grid_cartesC_index.F90:38
mod_urban_vars
module URBAN Variables
Definition: mod_urban_vars.F90:12
mod_ocean_vars::ocean_temp
real(rp), dimension(:,:,:), allocatable, public ocean_temp
ocean temperature [K]
Definition: mod_ocean_vars.F90:61
scale_ocean_grid_cartesc_index::oks
integer, public oks
Definition: scale_ocean_grid_cartesC_index.F90:38