57 private :: parentatmossetup
58 private :: parentatmosopen
59 private :: parentatmosinput
60 private :: boundaryatmossetup
61 private :: boundaryatmosoutput
63 private :: parentsurfacesetup
64 private :: parentsurfaceinput
65 private :: parentsurfaceboundary
66 private :: interp_oceanland_data
72 integer,
public,
parameter ::
iscale = 1
75 integer,
public,
parameter ::
igrads = 4
77 real(RP),
private,
allocatable :: lon_org (:,:)
78 real(RP),
private,
allocatable :: lat_org (:,:)
79 real(RP),
private,
allocatable :: cz_org (:,:,:)
81 real(RP),
private,
allocatable :: w_org (:,:,:)
82 real(RP),
private,
allocatable :: u_org (:,:,:)
83 real(RP),
private,
allocatable :: v_org (:,:,:)
84 real(RP),
private,
allocatable :: dens_org(:,:,:)
85 real(RP),
private,
allocatable :: pott_org(:,:,:)
86 real(RP),
private,
allocatable :: temp_org(:,:,:)
87 real(RP),
private,
allocatable :: pres_org(:,:,:)
88 real(RP),
private,
allocatable :: qtrc_org (:,:,:,:)
89 real(RP),
private,
allocatable :: qv_org (:,:,:)
90 real(RP),
private,
allocatable :: qhyd_org (:,:,:,:)
91 real(RP),
private,
allocatable :: qnum_org (:,:,:,:)
93 real(RP),
private,
allocatable :: rn222_org(:,:,:)
95 integer,
private,
allocatable :: igrd (:,:,:)
96 integer,
private,
allocatable :: jgrd (:,:,:)
97 real(RP),
private,
allocatable :: hfact(:,:,:)
98 integer,
private,
allocatable :: kgrd (:,:,:,:,:)
99 real(RP),
private,
allocatable :: vfact(:,:,:,:,:)
101 real(RP),
private,
allocatable :: tw_org (:,:)
102 real(RP),
private,
allocatable :: sst_org (:,:)
103 real(RP),
private,
allocatable :: albw_org (:,:,:,:)
104 real(RP),
private,
allocatable :: olon_org (:,:)
105 real(RP),
private,
allocatable :: olat_org (:,:)
106 real(RP),
private,
allocatable :: omask_org(:,:)
108 integer,
private :: itp_nh = 4
109 integer,
private :: itp_nv = 2
111 logical,
private :: serial_atmos
112 logical,
private :: serial_land
113 logical,
private :: serial_ocean
114 logical,
private :: read_by_myproc_atmos
115 logical,
private :: do_read_land
116 logical,
private :: do_read_ocean
118 logical,
private :: temp2pott
119 logical,
private :: apply_rotate_uv
120 logical,
private :: update_coord
121 logical,
private :: use_waterratio
123 integer,
private,
parameter :: i_intrp_off = 0
124 integer,
private,
parameter :: i_intrp_mask = 1
125 integer,
private,
parameter :: i_intrp_fill = 2
127 integer,
private :: i_intrp_land_temp
128 integer,
private :: i_intrp_land_water
129 integer,
private :: i_intrp_land_sfc_temp
130 integer,
private :: i_intrp_ocean_temp
131 integer,
private :: i_intrp_ocean_sfc_temp
134 real(RP),
private,
parameter :: maskval_tg = 298.0_rp
135 real(RP),
private,
parameter :: maskval_strg = 0.02_rp
140 integer,
private :: number_of_files = 1
141 integer,
private :: number_of_tsteps = 1
142 integer,
private :: number_of_skip_tsteps = 0
144 logical,
private :: serial_proc_read = .true.
146 character(len=H_LONG),
private :: filetype_org =
'' 147 character(len=H_LONG),
private :: basename_org =
'' 148 logical,
private :: basename_add_num = .false.
150 character(len=H_LONG),
private :: basename_boundary =
'' 151 logical,
private :: boundary_postfix_timelabel = .false.
152 character(len=H_LONG),
private :: boundary_title =
'SCALE-RM BOUNDARY CONDITION for REAL CASE' 153 character(len=H_SHORT),
private :: boundary_dtype =
'DEFAULT' 154 real(DP),
private :: boundary_update_dt = 0.0_dp
156 integer,
private :: filter_order = 8
157 integer,
private :: filter_niter = 5
159 logical,
private :: use_file_density = .false.
160 logical,
private :: same_mp_type = .false.
162 logical,
private :: first = .true.
180 namelist / param_mkinit_real_atmos / &
183 number_of_skip_tsteps, &
189 boundary_postfix_timelabel, &
192 boundary_update_dt, &
198 character(len=H_LONG) :: basename_mod
199 character(len=H_LONG) :: basename_out_mod
200 character(len=19) :: timelabel
206 integer :: vid_atmos(5+
qa)
208 real(RP) :: DENS_in(
ka,
ia,
ja)
209 real(RP) :: MOMZ_in(
ka,
ia,
ja)
210 real(RP) :: MOMX_in(
ka,
ia,
ja)
211 real(RP) :: MOMY_in(
ka,
ia,
ja)
212 real(RP) :: RHOT_in(
ka,
ia,
ja)
215 real(RP) :: VELZ_in(
ka,
ia,
ja)
216 real(RP) :: VELX_in(
ka,
ia,
ja)
217 real(RP) :: VELY_in(
ka,
ia,
ja)
218 real(RP) :: POTT_in(
ka,
ia,
ja)
220 integer :: ifile, istep, t, tall
221 integer :: k, i, j, iq
226 log_info(
'REALINPUT_atmos',*)
'Setup' 230 read(
io_fid_conf,nml=param_mkinit_real_atmos,iostat=ierr)
232 log_info(
"REALINPUT_atmos",*)
'Not found namelist. Default used.' 233 elseif( ierr > 0 )
then 234 log_error(
"REALINPUT_atmos",*)
'Not appropriate names in namelist PARAM_MKINIT_REAL_ATMOS. Check!' 237 log_nml(param_mkinit_real_atmos)
239 if ( boundary_update_dt <= 0.0_dp )
then 240 log_error(
"REALINPUT_atmos",*)
'BOUNDARY_UPDATE_DT is necessary in real case preprocess' 244 if ( filetype_org ==
'GrADS' )
then 245 basename_mod = trim(basename_org)
247 if ( number_of_files > 1 .OR. basename_add_num )
then 248 basename_mod = trim(basename_org)//
'_00000' 250 basename_mod = trim(basename_org)
254 call parentatmossetup( filetype_org, &
261 if ( timelen > 0 )
then 262 number_of_tsteps = timelen
266 log_info(
"REALINPUT_atmos",*)
'Number of temporal data in each file : ', number_of_tsteps
268 do ifile = 1, number_of_files
270 if ( filetype_org ==
'GrADS' )
then 271 if ( number_of_files > 1 .OR. basename_add_num )
then 272 write(basename_mod,
'(A,I5.5)')
'_', ifile-1
277 if ( number_of_files > 1 .OR. basename_add_num )
then 278 write(basename_mod,
'(A,A,I5.5)') trim(basename_org),
'_', ifile-1
280 basename_mod = trim(basename_org)
285 log_info(
"REALINPUT_atmos",*)
'read external data from : ', trim(basename_mod)
287 call parentatmosopen( filetype_org, &
291 do istep = 1, number_of_tsteps
293 tall = number_of_tsteps * (ifile-1) + istep
294 t = tall - number_of_skip_tsteps
297 log_progress(
'(1x,A,I4,A,I5,A,I6,A)') &
298 '[file,step,cons.] = [', ifile,
',', istep,
',', tall,
'] ...skip.' 302 if ( t == 1 .OR. basename_boundary /=
'' )
then 304 log_progress(
'(1x,A,I4,A,I5,A,I6,A)') &
305 '[file,step,cons.] = [', ifile,
',', istep,
',', tall,
']' 308 call parentatmosinput( filetype_org, &
324 log_progress(
'(1x,A,I4,A,I5,A,I6,A)') &
325 '[file,step,cons.] = [', ifile,
',', istep,
',', tall,
'] ...skip.' 331 log_info(
"REALINPUT_atmos",*)
'store initial state.' 336 dens(k,i,j) = dens_in(k,i,j)
337 momz(k,i,j) = momz_in(k,i,j)
338 momx(k,i,j) = momx_in(k,i,j)
339 momy(k,i,j) = momy_in(k,i,j)
340 rhot(k,i,j) = rhot_in(k,i,j)
349 qtrc(k,i,j,iq) = qtrc_in(k,i,j,iq)
358 if ( basename_boundary /=
'' )
then 361 if ( boundary_postfix_timelabel )
then 363 basename_out_mod = trim(basename_boundary)//
'_'//trim(timelabel)
365 basename_out_mod = trim(basename_boundary)
368 call boundaryatmossetup( basename_out_mod, &
371 boundary_update_dt, &
376 call boundaryatmosoutput( dens_in(:,:,:), &
384 boundary_update_dt, &
452 logical :: USE_FILE_LANDWATER = .true.
453 real(RP) :: INIT_LANDWATER_RATIO = 0.5_rp
454 real(RP) :: INIT_OCEAN_ALB_LW = 0.04_rp
455 real(RP) :: INIT_OCEAN_ALB_SW = 0.10_rp
456 real(RP) :: INIT_OCEAN_Z0W = 1.0e-3_rp
457 character(len=H_SHORT) :: INTRP_LAND_TEMP =
'off' 458 character(len=H_SHORT) :: INTRP_LAND_WATER =
'off' 459 character(len=H_SHORT) :: INTRP_LAND_SFC_TEMP =
'off' 460 character(len=H_SHORT) :: INTRP_OCEAN_TEMP =
'off' 461 character(len=H_SHORT) :: INTRP_OCEAN_SFC_TEMP =
'off' 462 integer :: INTRP_ITER_MAX = 100
463 character(len=H_SHORT) :: SOILWATER_DS2VC =
'limit' 464 logical :: soilwater_DS2VC_flag
465 logical :: elevation_collection = .true.
466 logical :: elevation_collection_land
467 logical :: elevation_collection_ocean
469 namelist / param_mkinit_real_land / &
472 number_of_skip_tsteps, &
477 boundary_postfix_timelabel, &
479 boundary_update_dt, &
480 use_file_landwater, &
481 init_landwater_ratio, &
484 intrp_land_sfc_temp, &
489 elevation_collection, &
492 namelist / param_mkinit_real_ocean / &
495 number_of_skip_tsteps, &
500 boundary_postfix_timelabel, &
502 boundary_update_dt, &
507 intrp_ocean_sfc_temp, &
513 character(len=H_LONG) :: FILETYPE_LAND
514 character(len=H_LONG) :: FILETYPE_OCEAN
515 character(len=H_LONG) :: BASENAME_LAND
516 character(len=H_LONG) :: BASENAME_OCEAN
517 character(len=5) :: NUM =
'' 520 real(RP),
allocatable :: LAND_TEMP_org (:,:,:,:)
521 real(RP),
allocatable :: LAND_WATER_org (:,:,:,:)
522 real(RP),
allocatable :: LAND_SFC_TEMP_org (:,:,:)
523 real(RP),
allocatable :: LAND_SFC_albedo_org(:,:,:,:,:)
526 real(RP) :: URBAN_TC_ORG(
ia,
ja)
527 real(RP) :: URBAN_QC_ORG(
ia,
ja)
528 real(RP) :: URBAN_UC_ORG(
ia,
ja)
529 real(RP) :: URBAN_SFC_TEMP_ORG(
ia,
ja)
533 real(RP),
allocatable :: OCEAN_TEMP_org (:,:,:,:)
534 real(RP),
allocatable :: OCEAN_SFC_TEMP_org (:,:,:)
535 real(RP),
allocatable :: OCEAN_SFC_albedo_org(:,:,:,:,:)
536 real(RP),
allocatable :: OCEAN_SFC_Z0_org (:,:,:)
538 integer :: NUMBER_OF_FILES_LAND = 1
539 integer :: NUMBER_OF_FILES_OCEAN = 1
540 integer :: NUMBER_OF_TSTEPS_LAND = 1
541 integer :: NUMBER_OF_TSTEPS_OCEAN = 1
542 integer :: NUMBER_OF_SKIP_TSTEPS_LAND = 0
543 integer :: NUMBER_OF_SKIP_TSTEPS_OCEAN = 0
545 character(len=H_LONG) :: BASENAME_BOUNDARY_LAND =
'' 546 character(len=H_LONG) :: BASENAME_BOUNDARY_OCEAN =
'' 547 logical :: BOUNDARY_POSTFIX_TIMELABEL_LAND = .false.
548 logical :: BOUNDARY_POSTFIX_TIMELABEL_OCEAN = .false.
549 character(len=H_LONG) :: BOUNDARY_TITLE_LAND =
'SCALE-RM BOUNDARY CONDITION for REAL CASE' 550 character(len=H_LONG) :: BOUNDARY_TITLE_OCEAN =
'SCALE-RM BOUNDARY CONDITION for REAL CASE' 551 real(DP) :: BOUNDARY_UPDATE_DT_LAND = 0.0_dp
552 real(DP) :: BOUNDARY_UPDATE_DT_OCEAN = 0.0_dp
554 integer :: mdlid_land, mdlid_ocean
555 integer :: ldims(3), odims(2)
557 integer :: totaltimesteps = 1
559 integer :: skip_steps
562 character(len=H_LONG) :: basename_out_mod
563 character(len=19) :: timelabel
565 logical :: boundary_flag = .false.
568 integer :: k, i, j, n, ns, ne, idir, irgn
577 if ( .not. land_flag .or. .not.
ocean_do )
then 578 log_error(
"REALINPUT_surface",*)
'OCEAN_ and LAND_DYN_TYPE must be set' 583 log_info(
'REALINPUT_surface',*)
'Setup LAND' 589 read(
io_fid_conf,nml=param_mkinit_real_land,iostat=ierr)
591 log_info(
"REALINPUT_surface",*)
'Not found namelist. Default used.' 592 elseif( ierr > 0 )
then 593 log_error(
"REALINPUT_surface",*)
'Not appropriate names in namelist PARAM_MKINIT_REAL_LAND. Check!' 596 log_nml(param_mkinit_real_land)
598 number_of_files_land = number_of_files
599 number_of_tsteps_land = number_of_tsteps
600 number_of_skip_tsteps_land = number_of_skip_tsteps
601 filetype_land = filetype_org
602 basename_boundary_land = basename_boundary
603 boundary_postfix_timelabel_land = boundary_postfix_timelabel
604 boundary_title_land = boundary_title
605 boundary_update_dt_land = boundary_update_dt
606 elevation_collection_land = elevation_collection
608 if ( filetype_land .ne.
"GrADS" .and. ( number_of_files > 1 .OR. basename_add_num ) )
then 609 basename_land = trim(basename_org)//
"_00000" 611 basename_land = trim(basename_org)
614 select case( soilwater_ds2vc )
616 soilwater_ds2vc_flag = .true.
618 soilwater_ds2vc_flag = .false.
620 log_error(
"REALINPUT_surface",*)
'Unsupported SOILWATER_DS2CV TYPE:', trim(soilwater_ds2vc)
624 serial_land = serial_proc_read
627 log_info(
'REALINPUT_surface',*)
'Setup OCEAN' 631 read(
io_fid_conf,nml=param_mkinit_real_ocean,iostat=ierr)
633 log_info(
"REALINPUT_surface",*)
'Not found namelist. Default used.' 634 elseif( ierr > 0 )
then 635 log_error(
"REALINPUT_surface",*)
'Not appropriate names in namelist PARAM_MKINIT_REAL_OCEAN. Check!' 638 log_nml(param_mkinit_real_ocean)
640 number_of_files_ocean = number_of_files
641 number_of_tsteps_ocean = number_of_tsteps
642 number_of_skip_tsteps_ocean = number_of_skip_tsteps
643 filetype_ocean = filetype_org
644 basename_boundary_ocean = basename_boundary
645 boundary_postfix_timelabel_ocean = boundary_postfix_timelabel
646 boundary_title_ocean = boundary_title
647 boundary_update_dt_ocean = boundary_update_dt
648 elevation_collection_ocean = elevation_collection
650 if ( filetype_ocean .ne.
"GrADS" .and. ( number_of_files > 1 .OR. basename_add_num ) )
then 651 basename_ocean = trim(basename_org)//
"_00000" 653 basename_ocean = trim(basename_org)
656 serial_ocean = serial_proc_read
659 if( number_of_files_land .NE. number_of_files_ocean .OR. &
660 number_of_tsteps_land .NE. number_of_tsteps_ocean .OR. &
661 number_of_skip_tsteps_land .NE. number_of_skip_tsteps_ocean .OR. &
662 basename_boundary_land .NE. basename_boundary_ocean .OR. &
663 boundary_postfix_timelabel_land .NEQV. boundary_postfix_timelabel_ocean .OR. &
664 boundary_title_land .NE. boundary_title_ocean .OR. &
665 boundary_update_dt_land .NE. boundary_update_dt_ocean )
then 666 log_error(
"REALINPUT_surface",*)
'The following LAND/OCEAN parameters must be consistent due to technical problem:' 667 log_error_cont(*)
' NUMBER_OF_FILES, NUMBER_OF_TSTEPS, NUMBER_OF_SKIP_TSTEPS,' 668 log_error_cont(*)
' BASENAME_BOUNDARY, BOUNDARY_POSTFIX_TIMELABEL, BOUNDARY_TITLE, BOUNDARY_UPDATE_DT.' 672 call parentsurfacesetup( ldims, odims, &
680 use_file_landwater, &
683 intrp_land_sfc_temp, &
685 intrp_ocean_sfc_temp )
687 if ( timelen > 0 )
then 688 number_of_tsteps = timelen
691 totaltimesteps = number_of_files * number_of_tsteps
693 allocate( land_temp_org(
lkmax,
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
694 allocate( land_water_org(
lkmax,
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
695 allocate( land_sfc_temp_org(
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
698 allocate( ocean_temp_org(
okmax,
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
699 allocate( ocean_sfc_temp_org(
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
701 allocate( ocean_sfc_z0_org(
ia,
ja, 1+number_of_skip_tsteps:totaltimesteps) )
703 if ( mdlid_ocean ==
igrads )
then 707 if ( basename_boundary /=
'' )
then 708 boundary_flag = .true.
712 do n = 1, number_of_files
714 if ( number_of_files > 1 .OR. basename_add_num )
then 715 write(num,
'(I5.5)') n-1
716 basename_land = trim(basename_org)//
"_"//num
717 basename_ocean = trim(basename_org)//
"_"//num
719 basename_land = trim(basename_org)
720 basename_ocean = trim(basename_org)
724 log_info(
"REALINPUT_surface",*)
'Target File Name (Land) : ', trim(basename_land)
725 log_info(
"REALINPUT_surface",*)
'Target File Name (Ocean): ', trim(basename_ocean)
726 log_info(
"REALINPUT_surface",*)
'Time Steps in One File : ', number_of_tsteps
728 ns = number_of_tsteps * (n - 1) + 1
729 ne = ns + (number_of_tsteps - 1)
731 if ( ne <= number_of_skip_tsteps )
then 732 log_info(
"REALINPUT_surface",*)
' SKIP' 736 skip_steps = max(number_of_skip_tsteps - ns + 1, 0)
737 ns = max(ns, number_of_skip_tsteps+1)
740 call parentsurfaceinput( land_temp_org(:,:,:, ns:ne), &
741 land_water_org(:,:,:, ns:ne), &
742 land_sfc_temp_org(:,:, ns:ne), &
743 land_sfc_albedo_org(:,:,:,:,ns:ne), &
747 urban_sfc_temp_org, &
748 urban_sfc_albedo_org, &
749 ocean_temp_org(
oks,:,:, ns:ne), &
750 ocean_sfc_temp_org( :,:, ns:ne), &
751 ocean_sfc_albedo_org( :,:,:,:,ns:ne), &
752 ocean_sfc_z0_org( :,:, ns:ne), &
755 mdlid_land, mdlid_ocean, &
757 use_file_landwater, &
758 init_landwater_ratio, &
763 soilwater_ds2vc_flag, &
764 elevation_collection_land, &
765 elevation_collection_ocean, &
767 number_of_tsteps, skip_steps, &
771 if( basename_boundary ==
'' )
exit 777 ns = number_of_skip_tsteps + 1
807 land_temp(k,i,j) = land_temp_org(k,i,j,ns)
819 urban_trl(k,i,j) = urban_sfc_temp_org(i,j)
820 urban_tbl(k,i,j) = urban_sfc_temp_org(i,j)
821 urban_tgl(k,i,j) = urban_sfc_temp_org(i,j)
826 urban_tr(i,j) = urban_sfc_temp_org(i,j)
827 urban_tb(i,j) = urban_sfc_temp_org(i,j)
828 urban_tg(i,j) = urban_sfc_temp_org(i,j)
865 if( basename_boundary /=
'' )
then 866 totaltimesteps = totaltimesteps - number_of_skip_tsteps
867 if ( totaltimesteps > 1 )
then 868 if ( boundary_update_dt <= 0.0_dp )
then 869 log_error(
"REALINPUT_surface",*)
'BOUNDARY_UPDATE_DT is necessary in real case preprocess' 873 if ( boundary_postfix_timelabel )
then 875 basename_out_mod = trim(basename_boundary)//
'_'//trim(timelabel)
877 basename_out_mod = trim(basename_boundary)
880 call parentsurfaceboundary( land_temp_org(:,:,:,ns:ne), &
881 land_water_org(:,:,:,ns:ne), &
882 land_sfc_temp_org( :,:,ns:ne), &
883 ocean_temp_org(:,:,:,ns:ne), &
884 ocean_sfc_temp_org( :,:,ns:ne), &
885 ocean_sfc_z0_org( :,:,ns:ne), &
887 boundary_update_dt, &
894 deallocate( land_temp_org )
895 deallocate( land_water_org )
896 deallocate( land_sfc_temp_org )
897 deallocate( land_sfc_albedo_org )
898 deallocate( ocean_temp_org )
899 deallocate( ocean_sfc_temp_org )
900 deallocate( ocean_sfc_albedo_org )
901 deallocate( ocean_sfc_z0_org )
909 subroutine parentatmossetup( &
913 use_file_density_in, &
931 character(len=*),
intent(in) :: inputtype
932 character(len=*),
intent(in) :: basename
933 logical,
intent(in) :: serial_in
934 logical,
intent(in) :: use_file_density_in
935 integer,
intent(out) :: dims(6)
936 integer,
intent(out) :: timelen
939 serial_atmos = serial_in
940 if ( serial_atmos )
then 942 read_by_myproc_atmos = .true.
944 read_by_myproc_atmos = .false.
947 read_by_myproc_atmos = .true.
950 select case(inputtype)
953 serial_atmos = .false.
954 read_by_myproc_atmos = .true.
959 use_file_density = use_file_density_in
961 update_coord = .false.
962 apply_rotate_uv = .false.
966 if ( read_by_myproc_atmos )
then 972 use_file_density = use_file_density_in
974 update_coord = .true.
975 apply_rotate_uv = .true.
979 if ( read_by_myproc_atmos )
then 985 use_file_density = .false.
987 update_coord = .true.
988 apply_rotate_uv = .true.
1005 log_error(
"ParentAtmosSetup",*)
'Unsupported type of input data : ', trim(inputtype)
1010 if ( serial_atmos )
then 1011 call comm_bcast( dims(:), 6 )
1012 call comm_bcast( timelen )
1015 allocate( lon_org( dims(2), dims(3) ) )
1016 allocate( lat_org( dims(2), dims(3) ) )
1017 allocate( cz_org( dims(1)+2, dims(2), dims(3) ) )
1019 allocate( w_org( dims(1)+2, dims(2), dims(3) ) )
1020 allocate( u_org( dims(1)+2, dims(2), dims(3) ) )
1021 allocate( v_org( dims(1)+2, dims(2), dims(3) ) )
1022 allocate( pott_org( dims(1)+2, dims(2), dims(3) ) )
1023 allocate( temp_org( dims(1)+2, dims(2), dims(3) ) )
1024 allocate( pres_org( dims(1)+2, dims(2), dims(3) ) )
1025 allocate( dens_org( dims(1)+2, dims(2), dims(3) ) )
1026 allocate( qtrc_org( dims(1)+2, dims(2), dims(3),
qa ) )
1028 allocate( qv_org( dims(1)+2, dims(2), dims(3) ) )
1029 allocate( qhyd_org( dims(1)+2, dims(2), dims(3),
n_hyd ) )
1030 allocate( qnum_org( dims(1)+2, dims(2), dims(3),
n_hyd ) )
1031 allocate( rn222_org( dims(1)+2, dims(2), dims(3) ) )
1037 allocate( igrd(
ia,
ja,itp_nh) )
1038 allocate( jgrd(
ia,
ja,itp_nh) )
1039 allocate( hfact(
ia,
ja,itp_nh) )
1040 allocate( kgrd(
ka,itp_nv,
ia,
ja,itp_nh) )
1041 allocate( vfact(
ka,itp_nv,
ia,
ja,itp_nh) )
1044 end subroutine parentatmossetup
1048 subroutine parentatmosopen( &
1062 character(len=*),
intent(in) :: inputtype
1063 character(len=*),
intent(in) :: basename
1064 integer,
intent(in) :: dims(6)
1067 if ( read_by_myproc_atmos )
then 1069 select case(inputtype)
1091 end subroutine parentatmosopen
1095 subroutine parentatmosinput( &
1122 thermodyn_qdry => atmos_thermodyn_qdry, &
1123 thermodyn_r => atmos_thermodyn_r, &
1124 thermodyn_cp => atmos_thermodyn_cp, &
1125 thermodyn_temp_pres2pott => atmos_thermodyn_temp_pres2pott
1127 hydrostatic_buildrho_real => atmos_hydrostatic_buildrho_real
1156 character(len=*),
intent(in) :: inputtype
1157 character(len=*),
intent(in) :: basename
1158 integer,
intent(in) :: dims(6)
1159 integer,
intent(in) :: istep
1160 logical,
intent(in) :: same_mptype
1161 real(RP),
intent(out) :: DENS(
ka,
ia,
ja)
1162 real(RP),
intent(out) :: MOMZ(
ka,
ia,
ja)
1163 real(RP),
intent(out) :: MOMX(
ka,
ia,
ja)
1164 real(RP),
intent(out) :: MOMY(
ka,
ia,
ja)
1165 real(RP),
intent(out) :: RHOT(
ka,
ia,
ja)
1166 real(RP),
intent(out) :: QTRC(
ka,
ia,
ja,
qa)
1167 real(RP),
intent(out) :: VELZ(
ka,
ia,
ja)
1168 real(RP),
intent(out) :: VELX(
ka,
ia,
ja)
1169 real(RP),
intent(out) :: VELY(
ka,
ia,
ja)
1170 real(RP),
intent(out) :: POTT(
ka,
ia,
ja)
1172 real(RP) :: PRES (
ka,
ia,
ja)
1173 real(RP) :: TEMP (
ka,
ia,
ja)
1177 real(RP) :: QV (
ka,
ia,
ja)
1178 real(RP) :: QC (
ka,
ia,
ja)
1179 real(RP) :: u_on_map, v_on_map
1181 real(RP) :: qdry, Rtot, CPtot
1183 logical,
save :: first = .true.
1185 logical :: same_mptype_ = .false.
1187 real(RP) :: one(
ka,
ia,
ja)
1189 integer :: k, i, j, iq
1194 if ( read_by_myproc_atmos )
then 1195 select case(inputtype)
1204 qtrc_org(:,:,:,:), &
1210 same_mptype_ = .true.
1219 qhyd_org(:,:,:,:), &
1227 same_mptype_ = .false.
1228 qnum_org(:,:,:,:) = 0.0_rp
1236 qhyd_org(:,:,:,:), &
1237 qnum_org(:,:,:,:), &
1244 same_mptype_ = .false.
1245 dens_org(:,:,:) = 0.0_rp
1259 if ( .not. same_mptype_ )
then 1261 qv_org(:,:,:), qhyd_org(:,:,:,:), &
1263 qnum=qnum_org(:,:,:,:) )
1267 qtrc_org(:,:,:,
qs_ch) = rn222_org(:,:,:)
1270 if ( temp2pott )
then 1274 call thermodyn_qdry(
qa, qtrc_org(k,i,j,:),
tracer_mass(:), qdry )
1275 call thermodyn_r (
qa, qtrc_org(k,i,j,:),
tracer_r(:), qdry, rtot )
1276 call thermodyn_cp (
qa, qtrc_org(k,i,j,:),
tracer_cp(:), qdry, cptot )
1277 call thermodyn_temp_pres2pott( temp_org(k,i,j), pres_org(k,i,j), cptot, rtot, &
1290 if ( serial_atmos )
then 1291 if ( first .OR. update_coord )
then 1292 call comm_bcast( lon_org, dims(2), dims(3) )
1293 call comm_bcast( lat_org, dims(2), dims(3) )
1294 call comm_bcast( cz_org, dims(1)+2, dims(2), dims(3) )
1297 call comm_bcast( w_org , dims(1)+2, dims(2), dims(3) )
1298 call comm_bcast( u_org , dims(1)+2, dims(2), dims(3) )
1299 call comm_bcast( v_org , dims(1)+2, dims(2), dims(3) )
1300 call comm_bcast( pott_org, dims(1)+2, dims(2), dims(3) )
1301 call comm_bcast( pres_org, dims(1)+2, dims(2), dims(3) )
1302 call comm_bcast( dens_org, dims(1)+2, dims(2), dims(3) )
1303 call comm_bcast( qtrc_org, dims(1)+2, dims(2), dims(3),
qa )
1313 qtrc_org(k,i,j,iq) = max( qtrc_org(k,i,j,iq), 0.0_rp )
1322 if ( first .OR. update_coord )
then 1336 dims(1)+2, 1, dims(1)+2, &
1354 dims(1)+2, dims(2), dims(3), &
1364 if ( filter_niter > 0 )
then 1366 w(:,:,:), filter_order, filter_niter )
1367 call comm_vars8( w(:,:,:), 1 )
1368 call comm_wait ( w(:,:,:), 1 )
1373 dims(1)+2, dims(2), dims(3), &
1383 if ( filter_niter > 0 )
then 1385 u(:,:,:), filter_order, filter_niter )
1386 call comm_vars8( u(:,:,:), 1 )
1387 call comm_wait ( u(:,:,:), 1 )
1391 dims(1)+2, dims(2), dims(3), &
1401 if ( filter_niter > 0 )
then 1403 v(:,:,:), filter_order, filter_niter )
1404 call comm_vars8( v(:,:,:), 1 )
1405 call comm_wait ( v(:,:,:), 1 )
1408 if ( apply_rotate_uv )
then 1412 u_on_map = u(k,i,j) * rotc(i,j,1) + v(k,i,j) * rotc(i,j,2)
1413 v_on_map = -u(k,i,j) * rotc(i,j,2) + v(k,i,j) * rotc(i,j,1)
1426 velz(k,i,j) = 0.5_rp * ( w(k+1,i,j) + w(k,i,j) )
1434 velx(k,i,j) = 0.5_rp * ( u(k,i+1,j) + u(k,i,j) )
1442 velx(k,i,j) = u(k,i,j)
1449 vely(k,i,j) = 0.5_rp * ( v(k,i,j+1) + v(k,i,j) )
1457 vely(k,i,j) = v(k,i,j)
1463 velz( 1:
ks-1,i,j) = 0.0_rp
1464 velz(
ke :
ka ,i,j) = 0.0_rp
1465 velx( 1:
ks-1,i,j) = 0.0_rp
1466 velx(
ke+1:
ka ,i,j) = 0.0_rp
1467 vely( 1:
ks-1,i,j) = 0.0_rp
1468 vely(
ke+1:
ka ,i,j) = 0.0_rp
1472 call comm_vars8( velz(:,:,:), 1 )
1473 call comm_vars8( velx(:,:,:), 2 )
1474 call comm_vars8( vely(:,:,:), 3 )
1475 call comm_wait ( velz(:,:,:), 1, .false. )
1476 call comm_wait ( velx(:,:,:), 2, .false. )
1477 call comm_wait ( vely(:,:,:), 3, .false. )
1480 dims(1)+2, dims(2), dims(3), &
1490 if ( filter_niter > 0 )
then 1492 pott(:,:,:), filter_order, filter_niter )
1493 call comm_vars8( pott(:,:,:), 1 )
1494 call comm_wait ( pott(:,:,:), 1 )
1499 pott( 1:
ks-1,i,j) = 0.0_rp
1500 pott(
ke+1:
ka ,i,j) = 0.0_rp
1506 dims(1)+2, dims(2), dims(3), &
1514 qtrc_org(:,:,:,iq), &
1516 if ( filter_niter > 0 )
then 1519 qtrc(:,:,:,iq), filter_order, filter_niter, &
1520 limiter_sign = one(:,:,:) )
1521 call comm_vars8( qtrc(:,:,:,iq), 1 )
1522 call comm_wait ( qtrc(:,:,:,iq), 1 )
1527 qtrc( 1:
ks-1,i,j,iq) = 0.0_rp
1528 qtrc(
ke+1:
ka ,i,j,iq) = 0.0_rp
1533 if ( use_file_density )
then 1535 dims(1)+2, dims(2), dims(3), &
1546 if ( filter_niter > 0 )
then 1548 dens(:,:,:), filter_order, filter_niter, &
1549 limiter_sign = one(:,:,:) )
1550 call comm_vars8( dens(:,:,:), 1 )
1551 call comm_wait ( dens(:,:,:), 1 )
1555 dims(1)+2, dims(2), dims(3), &
1566 if ( filter_niter > 0 )
then 1568 pres(:,:,:), filter_order, filter_niter, &
1569 limiter_sign = one(:,:,:) )
1570 call comm_vars8( pres(:,:,:), 1 )
1571 call comm_wait ( pres(:,:,:), 1 )
1578 qv(:,:,:) = qtrc(:,:,:,
i_qv)
1580 qc(:,:,:) = qc(:,:,:) + qtrc(:,:,:,iq)
1585 call hydrostatic_buildrho_real(
ka,
ks,
ke,
ia, 1,
ia,
ja, 1,
ja, &
1586 pott(:,:,:), qv(:,:,:), qc(:,:,:), &
1589 dens(:,:,:), temp(:,:,:) )
1591 call comm_vars8( dens(:,:,:), 1 )
1592 call comm_wait ( dens(:,:,:), 1 )
1597 dens( 1:
ks-1,i,j) = 0.0_rp
1598 dens(
ke+1:
ka ,i,j) = 0.0_rp
1605 momz(k,i,j) = velz(k,i,j) * 0.5_rp * ( dens(k+1,i,j) + dens(k,i,j) )
1613 momx(k,i,j) = velx(k,i,j) * 0.5_rp * ( dens(k,i+1,j) + dens(k,i,j) )
1621 momx(k,i,j) = velx(k,i,j) * dens(k,i,j)
1628 momy(k,i,j) = vely(k,i,j) * 0.5_rp * ( dens(k,i,j+1) + dens(k,i,j) )
1636 momy(k,i,j) = vely(k,i,j) * dens(k,i,j)
1643 rhot(k,i,j) = pott(k,i,j) * dens(k,i,j)
1650 momz( 1:
ks-1,i,j) = 0.0_rp
1651 momz(
ke :
ka ,i,j) = 0.0_rp
1652 momx( 1:
ks-1,i,j) = 0.0_rp
1653 momx(
ke+1:
ka ,i,j) = 0.0_rp
1654 momy( 1:
ks-1,i,j) = 0.0_rp
1655 momy(
ke+1:
ka ,i,j) = 0.0_rp
1659 call comm_vars8( momz(:,:,:), 1 )
1660 call comm_vars8( momx(:,:,:), 2 )
1661 call comm_vars8( momy(:,:,:), 3 )
1662 call comm_wait ( momz(:,:,:), 1, .false. )
1663 call comm_wait ( momx(:,:,:), 2, .false. )
1664 call comm_wait ( momy(:,:,:), 3, .false. )
1669 end subroutine parentatmosinput
1673 subroutine boundaryatmossetup( &
1694 character(len=*),
intent(in) :: basename
1695 character(len=*),
intent(in) :: title
1696 character(len=*),
intent(in) :: datatype
1697 real(DP),
intent(in) :: timeintv
1698 integer,
intent(out) :: fid
1699 integer,
intent(out) :: vid(5+
qa)
1707 'DENS',
'Reference Density',
'kg/m3',
'ZXYT', datatype, &
1711 'VELZ',
'Reference VELZ',
'm/s',
'ZHXYT', datatype, &
1715 'VELX',
'Reference VELX',
'm/s',
'ZXHYT', datatype, &
1719 'VELY',
'Reference VELY',
'm/s',
'ZXYHT', datatype, &
1723 'POTT',
'Reference PT',
'K',
'ZXYT', datatype, &
1732 timeintv = timeintv )
1740 timeintv = timeintv )
1746 end subroutine boundaryatmossetup
1750 subroutine boundaryatmosoutput( &
1762 file_cartesc_write_var
1771 real(RP),
intent(in) :: DENS(
ka,
ia,
ja)
1772 real(RP),
intent(in) :: VELZ(
ka,
ia,
ja)
1773 real(RP),
intent(in) :: VELX(
ka,
ia,
ja)
1774 real(RP),
intent(in) :: VELY(
ka,
ia,
ja)
1775 real(RP),
intent(in) :: POTT(
ka,
ia,
ja)
1776 real(RP),
intent(in) :: QTRC(
ka,
ia,
ja,
qa)
1777 integer,
intent(in) :: fid
1778 integer,
intent(in) :: vid(5+
qa)
1779 real(DP),
intent(in) :: timeintv
1780 integer,
intent(in) :: istep
1782 real(RP) :: work(
ka,
ia,
ja,1)
1790 timeofs =
real(istep-1,kind=DP) * timeintv
1793 work(:,:,:,1) = dens(:,:,:)
1794 call file_cartesc_write_var( fid, vid(1), work(:,:,:,:),
'DENS',
'ZXYT', timeintv, timeofs=timeofs )
1796 work(:,:,:,1) = velz(:,:,:)
1797 call file_cartesc_write_var( fid, vid(2), work(:,:,:,:),
'VELZ',
'ZHXYT', timeintv, timeofs=timeofs )
1799 work(:,:,:,1) = velx(:,:,:)
1800 call file_cartesc_write_var( fid, vid(3), work(:,:,:,:),
'VELX',
'ZXHYT', timeintv, timeofs=timeofs )
1802 work(:,:,:,1) = vely(:,:,:)
1803 call file_cartesc_write_var( fid, vid(4), work(:,:,:,:),
'VELY',
'ZXYHT', timeintv, timeofs=timeofs )
1805 work(:,:,:,1) = pott(:,:,:)
1806 call file_cartesc_write_var( fid, vid(5), work(:,:,:,:),
'POTT',
'ZXYT', timeintv, timeofs=timeofs )
1809 call file_cartesc_write_var( fid, vid(5+iq),qtrc(:,:,:,iq:iq),
tracer_name(iq), &
1810 'ZXYT', timeintv, timeofs=timeofs )
1814 call file_cartesc_write_var( fid, vid(5+iq),qtrc(:,:,:,iq:iq),
tracer_name(iq), &
1815 'ZXYT', timeintv, timeofs=timeofs )
1821 end subroutine boundaryatmosoutput
1825 subroutine parentsurfacesetup( &
1833 use_file_landwater, &
1836 intrp_land_sfc_temp, &
1838 intrp_ocean_sfc_temp )
1853 integer,
intent(out) :: ldims(3)
1854 integer,
intent(out) :: odims(2)
1855 integer,
intent(out) :: lmdlid
1856 integer,
intent(out) :: omdlid
1857 integer,
intent(out) :: timelen
1858 character(len=*),
intent(in) :: basename_land
1859 character(len=*),
intent(in) :: basename_ocean
1860 character(len=*),
intent(in) :: filetype_land
1861 character(len=*),
intent(in) :: filetype_ocean
1862 logical,
intent(in) :: use_file_landwater
1863 character(len=*),
intent(in) :: intrp_land_temp
1864 character(len=*),
intent(in) :: intrp_land_water
1865 character(len=*),
intent(in) :: intrp_land_sfc_temp
1866 character(len=*),
intent(in) :: intrp_ocean_temp
1867 character(len=*),
intent(in) :: intrp_ocean_sfc_temp
1871 log_info(
"ParentSurfaceSetup",*)
'Setup' 1876 log_error(
"ParentSurfaceSetup",*)
'LKMAX less than 4: ',
lkmax 1877 log_error_cont(*)
'in Real Case, LKMAX should be set more than 4' 1881 if( serial_land )
then 1883 do_read_land = .true.
1885 do_read_land = .false.
1888 do_read_land = .true.
1891 select case(trim(filetype_land))
1895 serial_land = .false.
1896 do_read_land = .true.
1898 use_waterratio = .false.
1905 use_waterratio = .false.
1919 use_file_landwater, &
1924 log_error(
"ParentSurfaceSetup",*)
'Unsupported FILE TYPE:', trim(filetype_land)
1929 if( serial_land )
then 1930 call comm_bcast( ldims(:), 3 )
1931 call comm_bcast( use_waterratio )
1935 select case( intrp_land_temp )
1937 i_intrp_land_temp = i_intrp_off
1939 i_intrp_land_temp = i_intrp_mask
1941 i_intrp_land_temp = i_intrp_fill
1943 log_error(
"ParentSurfaceSetup",*)
'INTRP_LAND_TEMP is invalid. ', intrp_land_temp
1946 select case( intrp_land_sfc_temp )
1948 i_intrp_land_sfc_temp = i_intrp_off
1950 i_intrp_land_sfc_temp = i_intrp_mask
1952 i_intrp_land_sfc_temp = i_intrp_fill
1954 log_error(
"ParentSurfaceSetup",*)
'INTRP_LAND_SFC_TEMP is invalid. ', intrp_land_sfc_temp
1957 select case( intrp_land_water )
1959 i_intrp_land_water = i_intrp_off
1961 i_intrp_land_water = i_intrp_mask
1963 i_intrp_land_water = i_intrp_fill
1965 log_error(
"ParentSurfaceSetup",*)
'INTRP_LAND_WATER is invalid. ', intrp_land_water
1969 select case( lmdlid )
1972 i_intrp_land_temp = i_intrp_mask
1973 i_intrp_land_sfc_temp = i_intrp_mask
1974 i_intrp_land_water = i_intrp_mask
1980 if( serial_ocean )
then 1982 do_read_ocean = .true.
1984 do_read_ocean = .false.
1987 do_read_ocean = .true.
1990 select case(trim(filetype_ocean))
1995 serial_ocean = .false.
1996 do_read_ocean = .true.
1998 update_coord = .false.
2005 update_coord = .true.
2019 update_coord = .false.
2023 log_error(
"ParentSurfaceSetup",*)
'Unsupported FILE TYPE:', trim(filetype_ocean)
2028 if( serial_ocean )
then 2029 call comm_bcast( odims(:), 2 )
2030 call comm_bcast( timelen )
2034 select case( intrp_ocean_temp )
2036 i_intrp_ocean_temp = i_intrp_off
2038 i_intrp_ocean_temp = i_intrp_mask
2040 i_intrp_ocean_temp = i_intrp_fill
2042 log_error(
"ParentSurfaceSetup",*)
'INTRP_OCEAN_TEMP is invalid. ', intrp_ocean_temp
2045 select case( intrp_ocean_sfc_temp )
2047 i_intrp_ocean_sfc_temp = i_intrp_off
2049 i_intrp_ocean_sfc_temp = i_intrp_mask
2051 i_intrp_ocean_sfc_temp = i_intrp_fill
2053 log_error(
"ParentSurfaceSetup",*)
'INTRP_OCEAN_SFC_TEMP is invalid. ', intrp_ocean_sfc_temp
2057 select case( omdlid )
2060 i_intrp_ocean_temp = i_intrp_mask
2061 i_intrp_ocean_sfc_temp = i_intrp_mask
2065 allocate( tw_org(odims(1),odims(2)) )
2066 allocate( sst_org(odims(1),odims(2)) )
2068 allocate( olon_org(odims(1),odims(2)) )
2069 allocate( olat_org(odims(1),odims(2)) )
2070 allocate( omask_org(odims(1),odims(2)) )
2075 end subroutine parentsurfacesetup
2079 subroutine parentsurfaceinput( &
2080 tg, strg, lst, albg, &
2081 tc_urb, qc_urb, uc_urb, ust, albu, &
2082 tw, sst, albw, z0w, &
2083 basename_land, basename_ocean, &
2084 mdlid_land, mdlid_ocean, &
2086 use_file_landwater, &
2087 init_landwater_ratio, &
2088 init_ocean_alb_lw, &
2089 init_ocean_alb_sw, &
2092 soilwater_ds2vc_flag, &
2093 elevation_collection_land, &
2094 elevation_collection_ocean, &
2116 thermodyn_specific_heat => atmos_thermodyn_specific_heat, &
2117 thermodyn_rhot2temp_pres => atmos_thermodyn_rhot2temp_pres
2147 real(RP),
intent(out) :: tg (:,:,:,:)
2148 real(RP),
intent(out) :: strg(:,:,:,:)
2149 real(RP),
intent(out) :: lst (:,:,:)
2150 real(RP),
intent(out) :: albg(:,:,:,:,:)
2151 real(RP),
intent(inout) :: tc_urb(
ia,
ja)
2152 real(RP),
intent(inout) :: qc_urb(
ia,
ja)
2153 real(RP),
intent(inout) :: uc_urb(
ia,
ja)
2154 real(RP),
intent(inout) :: ust (
ia,
ja)
2156 real(RP),
intent(out) :: tw (:,:,:)
2157 real(RP),
intent(out) :: sst (:,:,:)
2158 real(RP),
intent(out) :: albw(:,:,:,:,:)
2159 real(RP),
intent(out) :: z0w (:,:,:)
2160 character(len=*),
intent(in) :: basename_land
2161 character(len=*),
intent(in) :: basename_ocean
2162 integer,
intent(in) :: mdlid_land
2163 integer,
intent(in) :: mdlid_ocean
2164 integer,
intent(in) :: ldims(3)
2165 integer,
intent(in) :: odims(2)
2166 logical,
intent(in) :: use_file_landwater
2167 real(RP),
intent(in) :: init_landwater_ratio
2169 real(RP),
intent(in) :: init_ocean_alb_lw
2170 real(RP),
intent(in) :: init_ocean_alb_sw
2171 real(RP),
intent(in) :: init_ocean_z0w
2172 integer,
intent(in) :: intrp_iter_max
2173 logical,
intent(in) :: soilwater_ds2vc_flag
2174 logical,
intent(in) :: elevation_collection_land
2175 logical,
intent(in) :: elevation_collection_ocean
2176 logical,
intent(in) :: boundary_flag
2177 integer,
intent(in) :: timelen
2178 integer,
intent(in) :: skiplen
2179 logical,
intent(in) :: URBAN_do
2182 real(RP) :: tg_org (ldims(1),ldims(2),ldims(3))
2183 real(RP) :: strg_org (ldims(1),ldims(2),ldims(3))
2184 real(RP) :: smds_org (ldims(1),ldims(2),ldims(3))
2186 real(RP) :: lst_org ( ldims(2),ldims(3))
2187 real(RP) :: ust_org ( ldims(2),ldims(3))
2189 real(RP) :: topo_org ( ldims(2),ldims(3))
2190 real(RP) :: lmask_org( ldims(2),ldims(3))
2191 real(RP) :: lz_org (ldims(1) )
2192 real(RP) :: llon_org ( ldims(2),ldims(3))
2193 real(RP) :: llat_org ( ldims(2),ldims(3))
2196 real(RP) :: z0w_org ( odims(1),odims(2))
2197 real(RP) :: omask ( odims(1),odims(2))
2198 real(RP) :: lst_ocean( odims(1),odims(2))
2200 logical :: ol_interp
2202 real(RP) :: hfact_o(odims(1),odims(2),itp_nh)
2203 integer :: igrd_o (odims(1),odims(2),itp_nh)
2204 integer :: jgrd_o (odims(1),odims(2),itp_nh)
2206 real(RP) :: Qdry, Rtot, CVtot, CPtot
2207 real(RP) :: temp, pres
2210 real(RP) :: work(ldims(2),ldims(3))
2213 real(RP) :: one(
ia,
ja)
2225 if ( urban_do )
then 2228 call thermodyn_specific_heat(
qa, &
2231 qdry, rtot, cvtot, cptot )
2232 call thermodyn_rhot2temp_pres(
dens(
ks,i,j),
rhot(
ks,i,j), rtot, cvtot, cptot, &
2237 qc_urb(i,j) = 0.0_rp
2246 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 &
2263 call comm_vars8( uc_urb, 1 )
2264 call comm_wait ( uc_urb, 1, .false. )
2271 if ( do_read_ocean )
then 2273 select case( mdlid_ocean )
2301 do n = skiplen+1, timelen
2306 if ( do_read_land )
then 2308 select case( mdlid_land )
2313 lst_org, ust_org, albg_org, &
2314 topo_org, lmask_org, &
2315 llon_org, llat_org, lz_org, &
2316 basename_land, ldims, &
2317 use_file_landwater, n )
2323 lst_org, ust_org, albg_org, &
2324 topo_org, lmask_org, &
2325 llon_org, llat_org, lz_org, &
2326 basename_land, ldims, &
2327 use_file_landwater, n )
2344 tg_org, strg_org, smds_org, &
2346 llon_org, llat_org, lz_org, &
2347 topo_org, lmask_org, &
2348 basename_land, ldims, &
2349 use_file_landwater, n )
2361 if ( serial_land )
then 2362 call comm_bcast( tg_org, ldims(1), ldims(2), ldims(3) )
2363 if ( use_waterratio )
then 2364 call comm_bcast( smds_org, ldims(1), ldims(2), ldims(3) )
2366 call comm_bcast( strg_org, ldims(1), ldims(2), ldims(3) )
2368 call comm_bcast( lst_org, ldims(2), ldims(3) )
2369 if ( urban_do )
call comm_bcast( ust_org, ldims(2), ldims(3) )
2376 call comm_bcast( topo_org, ldims(2), ldims(3) )
2377 call comm_bcast( lmask_org, ldims(2), ldims(3) )
2378 call comm_bcast( llon_org, ldims(2), ldims(3) )
2379 call comm_bcast( llat_org, ldims(2), ldims(3) )
2380 call comm_bcast( lz_org, ldims(1) )
2387 if ( do_read_ocean )
then 2389 select case( mdlid_ocean )
2394 albw_org, z0w_org, &
2396 basename_ocean, odims, &
2403 albw_org, z0w_org, &
2405 olon_org, olat_org, &
2406 basename_ocean, odims, &
2424 olon_org, olat_org, &
2425 basename_ocean, odims, &
2438 if ( serial_ocean )
then 2439 call comm_bcast( tw_org, odims(1), odims(2) )
2440 call comm_bcast( sst_org, odims(1), odims(2) )
2447 call comm_bcast( z0w_org, odims(1), odims(2) )
2448 call comm_bcast( omask_org, odims(1), odims(2) )
2449 if ( first .or. update_coord )
then 2450 call comm_bcast( olon_org, odims(1), odims(2) )
2451 call comm_bcast( olat_org, odims(1), odims(2) )
2459 if ( first .or. update_coord )
then 2461 if ( ldims(2) .ne. odims(1) &
2462 .or. ldims(3) .ne. odims(2) )
then 2468 if ( llon_org(i,j) .ne. olon_org(i,j) &
2469 .or. llat_org(i,j) .ne. olat_org(i,j) )
then 2477 if ( ol_interp )
then 2480 ldims(2), ldims(3), &
2483 odims(1), odims(2), &
2493 if ( i_intrp_ocean_temp .ne. i_intrp_off )
then 2494 select case( i_intrp_ocean_temp )
2495 case( i_intrp_mask )
2497 case( i_intrp_fill )
2498 call make_mask( omask, tw_org, odims(1), odims(2), landdata=.false.)
2500 call interp_oceanland_data(tw_org, omask, odims(1), odims(2), .false., intrp_iter_max)
2504 if ( i_intrp_ocean_sfc_temp .ne. i_intrp_off )
then 2505 select case( i_intrp_ocean_sfc_temp )
2506 case( i_intrp_mask )
2508 case( i_intrp_fill )
2509 call make_mask( omask, sst_org, odims(1), odims(2), landdata=.false.)
2511 call interp_oceanland_data(sst_org, omask, odims(1), odims(2), .false., intrp_iter_max)
2515 tg(:,:,:,nn), strg(:,:,:,nn), &
2516 lst(:,:,nn), albg(:,:,:,:,nn), &
2518 tg_org, strg_org, smds_org, &
2519 lst_org, albg_org, &
2525 lz_org, llon_org, llat_org, &
2528 maskval_tg, maskval_strg, &
2529 init_landwater_ratio, &
2530 use_file_landwater, &
2532 soilwater_ds2vc_flag, &
2533 elevation_collection_land, &
2540 if ( topo_org(i,j) > undef + eps )
then 2541 work(i,j) = lst_org(i,j) + topo_org(i,j) * laps
2546 if ( ol_interp )
then 2549 ldims(2), ldims(3), &
2550 odims(1), odims(2), &
2557 lst_ocean(:,:) = work(:,:)
2571 if ( z0w_org(i,j) == undef ) z0w_org(i,j) = init_ocean_z0w
2576 if ( first .or. update_coord )
then 2579 odims(1), odims(2), &
2591 odims(1), odims(2), &
2598 if ( filter_niter > 0 )
then 2600 tw(:,:,nn), filter_order, filter_niter )
2601 call comm_vars8( tw(:,:,nn), 1 )
2602 call comm_wait ( tw(:,:,nn), 1 )
2606 odims(1), odims(2), &
2613 if ( filter_niter > 0 )
then 2615 sst(:,:,nn), filter_order, filter_niter )
2616 call comm_vars8( sst(:,:,nn), 1 )
2617 call comm_wait ( sst(:,:,nn), 1 )
2621 if ( elevation_collection_ocean )
then 2626 sst(i,j,nn) = sst(i,j,nn) - tdiff
2627 tw(i,j,nn) = tw(i,j,nn) - tdiff
2634 odims(1), odims(2), &
2641 if ( filter_niter > 0 )
then 2645 limiter_sign = one(:,:) )
2651 odims(1), odims(2), &
2658 if ( filter_niter > 0 )
then 2661 limiter_sign = one(:,:) )
2667 odims(1), odims(2), &
2674 if ( filter_niter > 0 )
then 2677 limiter_sign = one(:,:) )
2683 odims(1), odims(2), &
2690 if ( filter_niter > 0 )
then 2693 limiter_sign = one(:,:) )
2699 odims(1), odims(2), &
2706 if ( filter_niter > 0 )
then 2709 limiter_sign = one(:,:) )
2715 odims(1), odims(2), &
2722 if ( filter_niter > 0 )
then 2725 limiter_sign = one(:,:) )
2731 odims(1), odims(2), &
2738 if ( filter_niter > 0 )
then 2740 z0w(:,:,nn), filter_order, filter_niter, &
2741 limiter_sign = one(:,:) )
2742 call comm_vars8( z0w(:,:,nn), 1 )
2743 call comm_wait ( z0w(:,:,nn), 1 )
2749 if( abs(lsmask_nest(i,j)-0.0_rp) < eps )
then 2750 lst(i,j,nn) = sst(i,j,nn)
2754 if ( urban_do .and. first )
then 2757 if( abs(lsmask_nest(i,j)-0.0_rp) < eps )
then 2758 ust(i,j) = sst(i,j,nn)
2769 if( .NOT. boundary_flag )
exit 2774 end subroutine parentsurfaceinput
2777 subroutine parentsurfaceboundary( &
2795 file_cartesc_write_var
2800 real(RP),
intent(in) :: tg(:,:,:,:)
2801 real(RP),
intent(in) :: strg(:,:,:,:)
2802 real(RP),
intent(in) :: lst(:,:,:)
2803 real(RP),
intent(in) :: tw(:,:,:,:)
2804 real(RP),
intent(in) :: sst(:,:,:)
2805 real(RP),
intent(in) :: z0(:,:,:)
2806 real(DP),
intent(in) :: update_dt
2807 character(len=*),
intent(in) :: basename
2808 character(len=*),
intent(in) :: title
2809 integer,
intent(in) :: numsteps
2811 character(len=H_SHORT) :: boundary_out_dtype =
'DEFAULT' 2812 integer :: nowdate(6)
2813 integer :: fid, vid(10)
2823 nowdate(1) = nowdate(1)
2828 'LAND_TEMP',
'Reference Land Temperature',
'K', &
2829 'LXYT', boundary_out_dtype, &
2831 timeintv=update_dt, nsteps=numsteps )
2833 'LAND_WATER',
'Reference Land Moisture',
'm3/m3', &
2834 'LXYT', boundary_out_dtype, &
2836 timeintv=update_dt, nsteps=numsteps )
2838 'LAND_SFC_TEMP',
'Reference Land Surface Temperature',
'K', &
2839 'XYT', boundary_out_dtype, &
2841 timeintv=update_dt, nsteps=numsteps )
2843 'OCEAN_TEMP',
'Reference Ocean Temperature',
'K', &
2844 'OXYT', boundary_out_dtype, &
2846 timeintv=update_dt, nsteps=numsteps )
2848 'OCEAN_SFC_TEMP',
'Reference Ocean Surface Temperature',
'K', &
2849 'XYT', boundary_out_dtype, &
2851 timeintv=update_dt, nsteps=numsteps )
2853 'OCEAN_SFC_Z0',
'Reference Ocean Surface Z0',
'm', &
2854 'XYT', boundary_out_dtype, &
2856 timeintv=update_dt, nsteps=numsteps )
2860 call file_cartesc_write_var( fid, vid(1), tg(:,:,:,ts:te),
'LAND_TEMP',
'LXYT', update_dt )
2861 call file_cartesc_write_var( fid, vid(2), strg(:,:,:,ts:te),
'LAND_WATER',
'LXYT', update_dt )
2862 call file_cartesc_write_var( fid, vid(3), lst( :,:,ts:te),
'LAND_SFC_TEMP',
'XYT', update_dt )
2863 call file_cartesc_write_var( fid, vid(6), tw(:,:,:,ts:te),
'OCEAN_TEMP',
'OXYT', update_dt )
2864 call file_cartesc_write_var( fid, vid(7), sst( :,:,ts:te),
'OCEAN_SFC_TEMP',
'XYT', update_dt )
2865 call file_cartesc_write_var( fid, vid(10), z0( :,:,ts:te),
'OCEAN_SFC_Z0',
'XYT', update_dt )
2870 end subroutine parentsurfaceboundary
2901 init_landwater_ratio, &
2902 use_file_landwater, &
2904 soilwater_ds2vc_flag, &
2905 elevation_collection, &
2932 real(RP),
intent(out) :: tg(
lkmax,
ia,
ja)
2933 real(RP),
intent(out) :: strg(
lkmax,
ia,
ja)
2934 real(RP),
intent(out) :: lst(
ia,
ja)
2936 real(RP),
intent(out) :: ust(
ia,
ja)
2938 real(RP),
intent(inout) :: tg_org(:,:,:)
2939 real(RP),
intent(inout) :: strg_org(:,:,:)
2940 real(RP),
intent(inout) :: smds_org(:,:,:)
2941 real(RP),
intent(inout) :: lst_org(:,:)
2942 real(RP),
intent(inout) :: albg_org(:,:,:,:)
2943 real(RP),
intent(inout) :: ust_org(:,:)
2944 real(RP),
intent(inout) :: sst_org(:,:)
2945 real(RP),
intent(in) :: lmask_org(:,:)
2946 real(RP),
intent(in) :: lsmask_nest(:,:)
2947 real(RP),
intent(in) :: topo_org(:,:)
2948 real(RP),
intent(in) :: lz_org(:)
2949 real(RP),
intent(in) :: llon_org(:,:)
2950 real(RP),
intent(in) :: llat_org(:,:)
2951 real(RP),
intent(in) :: LCZ(
lkmax)
2952 real(RP),
intent(in) :: LON(
ia,
ja)
2953 real(RP),
intent(in) :: LAT(
ia,
ja)
2954 integer,
intent(in) :: ldims(3)
2955 integer,
intent(in) :: odims(2)
2956 real(RP),
intent(in) :: maskval_tg
2957 real(RP),
intent(in) :: maskval_strg
2958 real(RP),
intent(in) :: init_landwater_ratio
2959 logical,
intent(in) :: use_file_landwater
2960 logical,
intent(in) :: use_waterratio
2961 logical,
intent(in) :: soilwater_ds2vc_flag
2962 logical,
intent(in) :: elevation_collection
2963 integer,
intent(in) :: intrp_iter_max
2964 logical,
intent(in) :: ol_interp
2965 logical,
intent(in) :: URBAN_do
2967 real(RP) :: lmask(ldims(2), ldims(3))
2971 real(RP) :: hfact_l(ldims(2), ldims(3), itp_nh)
2972 integer :: igrd_l (ldims(2), ldims(3), itp_nh)
2973 integer :: jgrd_l (ldims(2), ldims(3), itp_nh)
2974 real(RP) :: vfactl(
lkmax,
ia,
ja,itp_nh,itp_nv)
2975 integer :: kgrdl (
lkmax,
ia,
ja,itp_nh,itp_nv)
2977 real(RP) :: sst_land(ldims(2), ldims(3))
2978 real(RP) :: work(ldims(2), ldims(3))
2980 real(RP) :: lz3d_org(ldims(1),ldims(2),ldims(3))
2984 real(RP) :: topo(
ia,
ja)
2987 real(RP) :: one2d(
ia,
ja)
2988 real(RP) :: one3d(
ka,
ia,
ja)
2994 if ( i_intrp_land_sfc_temp .ne. i_intrp_off )
then 2995 select case( i_intrp_land_sfc_temp )
2996 case( i_intrp_mask )
2998 case( i_intrp_fill )
2999 call make_mask( lmask, lst_org, ldims(2), ldims(3), landdata=.true.)
3001 log_error(
"land_interporation",*)
'INTRP_LAND_SFC_TEMP is invalid.' 3004 call interp_oceanland_data(lst_org, lmask, ldims(2), ldims(3), .true., intrp_iter_max)
3021 if ( ol_interp )
then 3024 odims(1), odims(2), &
3027 ldims(2), ldims(3), &
3036 odims(1), odims(2), &
3037 ldims(2), ldims(3), &
3044 sst_land(:,:) = sst_org(:,:)
3049 if ( topo_org(i,j) > undef + eps )
then 3050 sst_land(i,j) = sst_land(i,j) - topo_org(i,j) * laps
3071 if ( urban_do )
then 3074 if ( ust_org(i,j) == undef ) ust_org(i,j) = lst_org(i,j)
3080 if ( i_intrp_land_temp .ne. i_intrp_off )
then 3082 work(:,:) = tg_org(k,:,:)
3083 select case( i_intrp_land_temp )
3084 case( i_intrp_mask )
3086 case( i_intrp_fill )
3087 call make_mask( lmask, work, ldims(2), ldims(3), landdata=.true.)
3089 call interp_oceanland_data( work, lmask, ldims(2), ldims(3), .true., intrp_iter_max )
3092 tg_org(k,:,:) = work(:,:)
3100 lz3d_org(:,i,j) = lz_org(:)
3106 lcz_3d(:,i,j) = lcz(:)
3111 ldims(1), 1, ldims(1), &
3112 ldims(2), ldims(3), &
3128 ldims(2), ldims(3), &
3135 if ( filter_niter > 0 )
then 3137 lst(:,:), filter_order, filter_niter )
3138 call comm_vars8( lst(:,:), 1 )
3139 call comm_wait ( lst(:,:), 1 )
3142 if ( urban_do )
then 3144 ldims(2), ldims(3), &
3151 if ( filter_niter > 0 )
then 3153 ust(:,:), filter_order, filter_niter )
3154 call comm_vars8( ust(:,:), 1 )
3155 call comm_wait ( ust(:,:), 1 )
3160 ldims(2), ldims(3), &
3167 if ( filter_niter > 0 )
then 3171 limiter_sign = one2d(:,:) )
3177 ldims(2), ldims(3), &
3184 if ( filter_niter > 0 )
then 3187 limiter_sign = one2d(:,:) )
3193 ldims(2), ldims(3), &
3200 if ( filter_niter > 0 )
then 3203 limiter_sign = one2d(:,:) )
3209 ldims(2), ldims(3), &
3216 if ( filter_niter > 0 )
then 3219 limiter_sign = one2d(:,:) )
3225 ldims(2), ldims(3), &
3232 if ( filter_niter > 0 )
then 3235 limiter_sign = one2d(:,:) )
3241 ldims(2), ldims(3), &
3248 if ( filter_niter > 0 )
then 3251 limiter_sign = one2d(:,:) )
3257 ldims(1), ldims(2), ldims(3), &
3264 vfactl(:,:,:,:,:), &
3278 if ( filter_niter > 0 )
then 3280 tg(:,:,:), filter_order, filter_niter )
3281 call comm_vars8( tg(:,:,:), 1 )
3282 call comm_wait ( tg(:,:,:), 1 )
3287 if ( elevation_collection )
then 3289 ldims(2), ldims(3), &
3296 if ( filter_niter > 0 )
then 3298 topo(:,:), filter_order, filter_niter )
3299 call comm_vars8( topo(:,:), 1 )
3300 call comm_wait ( topo(:,:), 1 )
3305 if ( topo(i,j) > undef + eps )
then 3306 tdiff = (
topo_zsfc(i,j) - topo(i,j) ) * laps
3307 lst(i,j) = lst(i,j) - tdiff
3309 tg(k,i,j) = tg(k,i,j) - tdiff
3315 if ( urban_do )
then 3318 if ( topo(i,j) > 0.0_rp )
then 3319 tdiff = (
topo_zsfc(i,j) - topo(i,j) ) * laps
3320 ust(i,j) = ust(i,j) - tdiff
3331 if( use_file_landwater )
then 3333 if ( use_waterratio )
then 3335 if ( i_intrp_land_water .ne. i_intrp_off )
then 3337 work(:,:) = smds_org(k,:,:)
3338 select case( i_intrp_land_water )
3339 case( i_intrp_mask )
3341 case( i_intrp_fill )
3342 call make_mask( lmask, work, ldims(2), ldims(3), landdata=.true.)
3344 call interp_oceanland_data(work, lmask, ldims(2), ldims(3), .true., intrp_iter_max)
3345 lmask(:,:) = init_landwater_ratio
3348 smds_org(k,:,:) = work(:,:)
3353 ldims(1), ldims(2), ldims(3), &
3360 vfactl(:,:,:,:,:), &
3365 strg(k,:,:) =
convert_ws2vwc( smds(k,:,:), critical=soilwater_ds2vc_flag )
3370 if ( i_intrp_land_water .ne. i_intrp_off )
then 3372 work(:,:) = strg_org(k,:,:)
3373 select case( i_intrp_land_water )
3374 case( i_intrp_mask )
3376 case( i_intrp_fill )
3377 call make_mask( lmask, work, ldims(2), ldims(3), landdata=.true.)
3379 call interp_oceanland_data(work, lmask, ldims(2), ldims(3), .true., intrp_iter_max)
3380 lmask(:,:) = maskval_strg
3383 strg_org(k,:,:) = work(:,:)
3388 ldims(1), ldims(2), ldims(3), &
3395 vfactl(:,:,:,:,:), &
3405 if ( filter_niter > 0 )
then 3406 one3d(:,:,:) = 1.0_rp
3408 strg(:,:,:), filter_order, filter_niter, &
3409 limiter_sign = one3d(:,:,:) )
3410 call comm_vars8( strg(:,:,:), 1 )
3411 call comm_wait ( strg(:,:,:), 1 )
3422 smds(:,:,:) = init_landwater_ratio
3431 if ( urban_do )
then 3435 albu(i,j,:,:) = albg(i,j,:,:)
3455 real(RP),
intent(out) :: gmask(:,:)
3456 real(RP),
intent(in) :: data(:,:)
3457 integer,
intent(in) :: nx
3458 integer,
intent(in) :: ny
3459 logical,
intent(in) :: landdata
3474 if( abs(
data(i,j) - undef) < sqrt(eps) )
then 3483 subroutine interp_oceanland_data( &
3494 integer,
intent(in) :: nx
3495 integer,
intent(in) :: ny
3496 real(RP),
intent(inout) :: data (nx,ny)
3497 real(RP),
intent(in) :: lsmask(nx,ny)
3498 logical,
intent(in) :: landdata
3499 integer,
intent(in) :: iter_max
3501 integer :: mask (nx,ny)
3502 integer :: mask_prev(nx,ny)
3503 real(RP) :: data_prev(nx,ny)
3504 real(RP) :: tmp, cnt, sw
3505 integer :: mask_target
3507 integer :: num_land, num_ocean, num_replaced
3508 integer :: istr, iend, jstr, jend
3509 integer :: i, j, ii, jj, ite
3513 log_info(
"interp_OceanLand_data",*)
'Interpolation' 3515 if ( landdata )
then 3516 log_info(
"interp_OceanLand_data",*)
'target mask : LAND' 3519 log_info(
"interp_OceanLand_data",*)
'target mask : OCEAN' 3528 mask(i,j) = int( 0.5_rp - sign(0.5_rp,abs(lsmask(i,j)-1.0_rp)-eps) )
3529 num_land = num_land + ( mask(i,j) )
3530 num_ocean = num_ocean + ( 1-mask(i,j) )
3534 log_progress(
'(1x,A,I3.3,A,3I8,A,I8)')
'ite=', 0, &
3535 ', (land,ocean,replaced) = ', num_land, num_ocean, 0,
' / ', nx*ny
3538 do ite = 1, iter_max
3540 mask_prev(:,:) = mask(:,:)
3541 data_prev(:,:) =
data(:,:)
3547 if( mask(i,j) == mask_target ) cycle
3559 sw = 0.5_rp - sign(0.5_rp,
real(abs(mask_prev(ii,jj)-mask_target),kind=
rp)-eps)
3561 tmp = tmp + sw * data_prev(ii,jj)
3566 if ( cnt >= 3.0_rp )
then 3567 data(i,j) = tmp / cnt
3568 mask(i,j) = mask_target
3570 num_replaced = num_replaced + 1
3576 if ( landdata )
then 3577 num_land = num_land + num_replaced
3578 num_ocean = num_ocean - num_replaced
3580 num_land = num_land - num_replaced
3581 num_ocean = num_ocean + num_replaced
3583 log_progress(
'(1x,A,I3.3,A,3I8,A,I8)')
'ite=', ite, &
3584 ', (land,ocean,replaced) = ', num_land, num_ocean, num_replaced,
' / ', nx*ny
3586 if( num_replaced == 0 )
exit 3592 end subroutine interp_oceanland_data
3599 real(RP),
intent(inout) :: data(:,:)
3600 real(RP),
intent(in) :: maskval
3601 real(RP),
intent(in) :: frac_land(:,:)
3606 if( abs(frac_land(i,j)-0.0_rp) < eps )
then 3621 real(RP),
intent(inout) :: data(:,:)
3622 real(RP),
intent(in) :: maskval(:,:)
3623 integer,
intent(in) :: nx, ny
3624 character(len=*),
intent(in) :: elem
3630 if( abs(
data(i,j) - undef) < sqrt(eps) )
then 3631 if( abs(maskval(i,j) - undef) < sqrt(eps) )
then 3632 log_error(
"replace_misval_map",*)
"data for mask of "//trim(elem)//
"(",i,
",",j,
") includes missing value." 3633 log_error_cont(*)
"Please check input data of SKINTEMP or SST. " 3636 data(i,j) = maskval(i,j)
real(rp), dimension(:,:,:), allocatable, target, public momz
real(rp), dimension(:), allocatable, public land_grid_cartesc_cz
center coordinate [m]: z, local=global
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
integer, public const_i_lw
long-wave radiation index
real(rp), dimension(:,:), allocatable, public urban_qc
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
module coupler / surface-atmospehre
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(qa_max), public tracer_r
integer, public ia
of whole cells: x, local, with HALO
real(rp) function, dimension(lia, lja), public convert_ws2vwc(WS, critical)
conversion from water saturation [fraction] to volumetric water content [m3/m3]
module Atmosphere / Physics Cloud Microphysics
integer, parameter, public i_r_vis
module land / grid / cartesianC / index
module Atmosphere Grid CartesianC metirc
module ATMOSPHERIC Variables
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
real(rp), dimension(:,:,:), allocatable, target, public momx
real(rp), dimension(:,:), allocatable, public ocean_sfc_temp
ocean surface skin temperature [K]
real(rp), dimension(:,:), allocatable, public ocean_ice_mass
sea ice mass [kg]
subroutine, public interp_factor3d(npoints, KA_ref, KS_ref, KE_ref, IA_ref, JA_ref, lon_ref, lat_ref, hgt_ref, KA, KS, KE, IA, JA, lon, lat, hgt, idx_i, idx_j, hfact, idx_k, vfact)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public urban_tb
integer, parameter, public n_rad_dir
real(rp), dimension(:,:,:), allocatable, target, public dens
integer, parameter, public n_rad_rgn
real(rp), public const_laps
lapse rate of ISA [K/m]
real(rp), dimension(:,:), allocatable, public urban_raing
subroutine, public interp_interp3d(npoints, KA_ref, IA_ref, JA_ref, KA, KS, KE, IA, JA, idx_i, idx_j, hfact, idx_k, vfact, val_ref, val, logwgt)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
character(len=h_short), dimension(qa_max), public tracer_name
real(rp), dimension(qa_max), public tracer_cv
module urban / grid / icosahedralA / index
real(rp), dimension(:,:), allocatable, public urban_uc
real(rp), public const_undef
real(rp), dimension(:,:,:,:), allocatable, public urban_sfc_albedo
character(len=h_short), public atmos_phy_ch_type
real(rp), dimension(:,:), allocatable, public land_sfc_temp
land surface skin temperature [K]
integer, public is
start point of inner domain: x, local
real(rp), dimension(qa_max), public tracer_cp
module ATMOSPHERIC Surface Variables
integer, public ie
end point of inner domain: x, local
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
real(rp), dimension(:,:), allocatable, public urban_tr
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
real(rp), dimension(:,:,:), allocatable, public urban_tgl
logical, public atmos_hydrometeor_dry
module atmosphere / hydrometeor
real(rp), dimension(:,:,:,:), allocatable, public land_sfc_albedo
land surface albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
subroutine, public atmos_phy_mp_driver_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, QV, QHYD, QTRC, QNUM)
real(rp), dimension(:,:,:), allocatable, public ocean_salt
ocean salinity [PSU]
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
subroutine, public time_gettimelabel(timelabel)
generate time label
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0h
ocean surface roughness length for heat [m]
integer, public comm_cartesc_nest_interp_level
horizontal interpolation level
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public ocean_temp
ocean temperature [K]
integer, public je
end point of inner domain: y, local
real(rp), dimension(:,:,:), allocatable, public land_temp
temperature of each soil layer [K]
module atmosphere / hydrostatic barance
real(rp), dimension(:,:), allocatable, public landuse_fact_ocean
ocean factor
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:), allocatable, public urban_roff
subroutine, public interp_domain_compatibility(lon_org, lat_org, topc_org, lon_loc, lat_loc, topc_loc, topf_loc, skip_x, skip_y, skip_z)
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_metric_rotc
rotation coefficient
subroutine, public interp_interp2d(npoints, IA_ref, JA_ref, IA, JA, idx_i, idx_j, hfact, val_ref, val)
subroutine, public prc_abort
Abort Process.
module Communication CartesianC nesting
integer, public js
start point of inner domain: y, local
integer, parameter, public i_r_direct
subroutine, public file_cartesc_def_var(fid, varname, desc, unit, dim_type, datatype, vid, standard_name, timeintv, nsteps, cell_measures)
Define a variable to file.
character(len=h_short), public atmos_phy_mp_type
real(rp), dimension(:,:), allocatable, public urban_tc
real(rp), dimension(:,:,:), allocatable, target, public momy
module Atmosphere / Physics Chemistry
real(rp), dimension(:,:), allocatable, public urban_rainr
module land / grid / cartesianC
real(rp), public ocean_phy_ice_freezetemp
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
real(rp), dimension(:,:,:), allocatable, public land_water
moisture of each soil layer [m3/m3]
module ocean / grid / cartesianC / index
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
logical, public prc_ismaster
master process in local communicator?
real(rp), public const_eps
small number
integer, parameter, public i_r_nir
module atmosphere / thermodyn
real(rp), dimension(:,:,:), allocatable, public ocean_vvel
ocean meridional velocity [m/s]
module Atmosphere GRID CartesC Real(real space)
module ocean / physics / ice / simple
integer, public const_i_sw
short-wave radiation index
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
integer, public ka
of whole cells: z, local, with HALO
real(rp), dimension(:,:), allocatable, public urban_tg
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public urban_sfc_temp
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
real(rp), dimension(:,:,:), allocatable, public urban_trl
integer, parameter, public i_r_ir
subroutine, public interp_factor2d(npoints, IA_ref, JA_ref, lon_ref, lat_ref, IA, JA, lon, lat, idx_i, idx_j, hfact, search_limit, latlon_structure, weight_order)
real(rp), dimension(:,:), allocatable, public ocean_ice_temp
sea ice temperature [K]
real(rp), dimension(:,:), allocatable, public ocean_ocn_z0m
surface roughness length for momentum, open ocean [m]
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
integer, parameter, public i_r_diffuse
integer, parameter, public n_hyd
real(rp), dimension(:,:,:,:), allocatable, public ocean_sfc_albedo
ocean surface albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
module atmosphere / physics / cloud microphysics
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
integer, parameter, public rp
real(rp), dimension(:,:,:), allocatable, public urban_tbl
real(rp), dimension(:,:), allocatable, public landuse_frac_land
land fraction
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0m
ocean surface roughness length for momentum [m]
real(rp), dimension(:,:,:), allocatable, public ocean_uvel
ocean zonal velocity [m/s]
real(rp), dimension(:,:), allocatable, public urban_rainb
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0e
ocean surface roughness length for vapor [m]
real(rp), dimension(qa_max), public tracer_mass
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc