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 3791 of file mod_realinput.F90.

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

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

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

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

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

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 4954 of file mod_realinput.F90.

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

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