SCALE-RM
scale_atmos_grid_cartesC_real.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
20  !-----------------------------------------------------------------------------
21  implicit none
22  private
23  !-----------------------------------------------------------------------------
24  !
25  !++ Public procedure
26  !
31 
32  !-----------------------------------------------------------------------------
33  !
34  !++ Public parameters & variables
35  !
38 
39  real(rp), public, allocatable :: atmos_grid_cartesc_real_cz (:,:,:)
40  real(rp), public, allocatable :: atmos_grid_cartesc_real_czuy(:,:,:)
41  real(rp), public, allocatable :: atmos_grid_cartesc_real_czxv(:,:,:)
42  real(rp), public, allocatable :: atmos_grid_cartesc_real_czuv(:,:,:)
43  real(rp), public, allocatable :: atmos_grid_cartesc_real_fz (:,:,:)
44  real(rp), public, allocatable :: atmos_grid_cartesc_real_fzuy(:,:,:)
45  real(rp), public, allocatable :: atmos_grid_cartesc_real_fzxv(:,:,:)
46  real(rp), public, allocatable :: atmos_grid_cartesc_real_fzuv(:,:,:)
47  real(rp), public, allocatable :: atmos_grid_cartesc_real_f2h (:,:,:,:)
48 
49  real(rp), public, allocatable :: atmos_grid_cartesc_real_lon (:,:)
50  real(rp), public, allocatable :: atmos_grid_cartesc_real_lonuy(:,:)
51  real(rp), public, allocatable :: atmos_grid_cartesc_real_lonxv(:,:)
52  real(rp), public, allocatable :: atmos_grid_cartesc_real_lonuv(:,:)
53  real(rp), public, allocatable :: atmos_grid_cartesc_real_lat (:,:)
54  real(rp), public, allocatable :: atmos_grid_cartesc_real_latuy(:,:)
55  real(rp), public, allocatable :: atmos_grid_cartesc_real_latxv(:,:)
56  real(rp), public, allocatable :: atmos_grid_cartesc_real_latuv(:,:)
57  real(rp), public, allocatable :: atmos_grid_cartesc_real_dlon (:,:)
58  real(rp), public, allocatable :: atmos_grid_cartesc_real_dlat (:,:)
59 
60  real(rp), public, allocatable :: atmos_grid_cartesc_real_z1 (:,:)
63 
64  real(rp), public, allocatable :: atmos_grid_cartesc_real_phi (:,:,:)
65 
66  real(rp), public, allocatable :: atmos_grid_cartesc_real_area (:,:)
67  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazuy_x(:,:,:)
68  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazxv_y(:,:,:)
69  real(rp), public, allocatable :: atmos_grid_cartesc_real_areawuy_x(:,:,:)
70  real(rp), public, allocatable :: atmos_grid_cartesc_real_areawxv_y(:,:,:)
71  real(rp), public, allocatable :: atmos_grid_cartesc_real_areauy (:,:)
72  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazxy_x(:,:,:)
73  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazuv_y(:,:,:)
74  real(rp), public, allocatable :: atmos_grid_cartesc_real_areaxv (:,:)
75  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazuv_x(:,:,:)
76  real(rp), public, allocatable :: atmos_grid_cartesc_real_areazxy_y(:,:,:)
77 
81  real(rp), public, allocatable :: atmos_grid_cartesc_real_totareazuy_x(:)
82  real(rp), public, allocatable :: atmos_grid_cartesc_real_totareazxv_y(:)
83 
84  real(rp), public, allocatable :: atmos_grid_cartesc_real_vol (:,:,:)
85  real(rp), public, allocatable :: atmos_grid_cartesc_real_volwxy(:,:,:)
86  real(rp), public, allocatable :: atmos_grid_cartesc_real_volzuy(:,:,:)
87  real(rp), public, allocatable :: atmos_grid_cartesc_real_volzxv(:,:,:)
92 
93  real(rp), public, allocatable :: atmos_grid_cartesc_real_domain_catalogue(:,:,:)
94 
95  !-----------------------------------------------------------------------------
96  !
97  !++ Private procedure
98  !
99  private :: atmos_grid_cartesc_real_calc_latlon
100 
101  !-----------------------------------------------------------------------------
102  !
103  !++ Private parameters & variables
104  !
105  !-----------------------------------------------------------------------------
106 contains
107  !-----------------------------------------------------------------------------
110  use scale_prc, only: &
111  prc_nprocs, &
112  prc_abort
113  use scale_atmos_grid_cartesc, only: &
118  use scale_topography, only: &
120  use scale_mapprojection, only: &
122  use scale_interp_vert, only: &
124  implicit none
125 
126  character(len=H_LONG) :: domain_catalogue_fname = 'latlon_domain_catalogue.txt'
127  logical :: domain_catalogue_output = .false.
128 
129  namelist / param_domain_catalogue / &
130  domain_catalogue_fname, &
131  domain_catalogue_output
132 
133  integer :: ierr
134  !---------------------------------------------------------------------------
135 
136  log_newline
137  log_info("ATMOS_GRID_CARTESC_REAL_setup",*) 'Setup'
138 
139  !--- read namelist
140  rewind(io_fid_conf)
141  read(io_fid_conf,nml=param_domain_catalogue,iostat=ierr)
142  if( ierr < 0 ) then !--- missing
143  log_info("ATMOS_GRID_CARTESC_REAL_setup",*) 'Not found namelist. Default used.'
144  elseif( ierr > 0 ) then !--- fatal error
145  log_error("ATMOS_GRID_CARTESC_REAL_setup",*) 'Not appropriate names in namelist PARAM_DOMAIN_CATALOGUE. Check!'
146  call prc_abort
147  endif
148  log_nml(param_domain_catalogue)
149 
150  allocate( atmos_grid_cartesc_real_lon( ia, ja) )
151  allocate( atmos_grid_cartesc_real_lat( ia, ja) )
152  allocate( atmos_grid_cartesc_real_lonuy(0:ia, ja) )
153  allocate( atmos_grid_cartesc_real_lonxv( ia,0:ja) )
154  allocate( atmos_grid_cartesc_real_lonuv(0:ia,0:ja) )
155  allocate( atmos_grid_cartesc_real_latuy(0:ia, ja) )
156  allocate( atmos_grid_cartesc_real_latxv( ia,0:ja) )
157  allocate( atmos_grid_cartesc_real_latuv(0:ia,0:ja) )
158  allocate( atmos_grid_cartesc_real_dlon( ia, ja) )
159  allocate( atmos_grid_cartesc_real_dlat( ia, ja) )
160  !$acc enter data create(ATMOS_GRID_CARTESC_REAL_LON, ATMOS_GRID_CARTESC_REAL_LAT, ATMOS_GRID_CARTESC_REAL_LONUY, ATMOS_GRID_CARTESC_REAL_LONXV, ATMOS_GRID_CARTESC_REAL_LONUV, ATMOS_GRID_CARTESC_REAL_LATUY, ATMOS_GRID_CARTESC_REAL_LATXV, ATMOS_GRID_CARTESC_REAL_LATUV, ATMOS_GRID_CARTESC_REAL_DLON, ATMOS_GRID_CARTESC_REAL_DLAT)
161 
162  allocate( atmos_grid_cartesc_real_cz( ka,ia,ja) )
163  allocate( atmos_grid_cartesc_real_czuy( ka,ia,ja) )
164  allocate( atmos_grid_cartesc_real_czxv( ka,ia,ja) )
165  allocate( atmos_grid_cartesc_real_czuv( ka,ia,ja) )
166  allocate( atmos_grid_cartesc_real_fz(0:ka,ia,ja) )
167  allocate( atmos_grid_cartesc_real_fzuy(0:ka,ia,ja) )
168  allocate( atmos_grid_cartesc_real_fzxv(0:ka,ia,ja) )
169  allocate( atmos_grid_cartesc_real_fzuv(0:ka,ia,ja) )
170  allocate( atmos_grid_cartesc_real_f2h(ka,2,ia,ja) )
171  allocate( atmos_grid_cartesc_real_z1( ia,ja) )
172  allocate( atmos_grid_cartesc_real_phi( ka,ia,ja) )
173  !$acc enter data create(ATMOS_GRID_CARTESC_REAL_CZ, ATMOS_GRID_CARTESC_REAL_CZUY, ATMOS_GRID_CARTESC_REAL_CZXV, ATMOS_GRID_CARTESC_REAL_CZUV, ATMOS_GRID_CARTESC_REAL_FZ, ATMOS_GRID_CARTESC_REAL_FZUY, ATMOS_GRID_CARTESC_REAL_FZXV, ATMOS_GRID_CARTESC_REAL_FZUV, ATMOS_GRID_CARTESC_REAL_F2H, ATMOS_GRID_CARTESC_REAL_Z1, ATMOS_GRID_CARTESC_REAL_PHI)
174 
175  allocate( atmos_grid_cartesc_real_area( ia,ja) )
180  allocate( atmos_grid_cartesc_real_areauy( ia,ja) )
183  allocate( atmos_grid_cartesc_real_areaxv( ia,ja) )
186  !$acc enter data create(ATMOS_GRID_CARTESC_REAL_AREA, ATMOS_GRID_CARTESC_REAL_AREAZUY_X, ATMOS_GRID_CARTESC_REAL_AREAZXV_Y, ATMOS_GRID_CARTESC_REAL_AREAWUY_X, ATMOS_GRID_CARTESC_REAL_AREAWXV_Y, ATMOS_GRID_CARTESC_REAL_AREAUY, ATMOS_GRID_CARTESC_REAL_AREAZXY_X, ATMOS_GRID_CARTESC_REAL_AREAZUV_Y, ATMOS_GRID_CARTESC_REAL_AREAXV, ATMOS_GRID_CARTESC_REAL_AREAZUV_X, ATMOS_GRID_CARTESC_REAL_AREAZXY_Y)
187 
190  !$acc enter data create(ATMOS_GRID_CARTESC_REAL_TOTAREAZUY_X, ATMOS_GRID_CARTESC_REAL_TOTAREAZXV_Y)
191 
192  allocate( atmos_grid_cartesc_real_vol( ka,ia,ja) )
193  allocate( atmos_grid_cartesc_real_volwxy(0:ka,ia,ja) )
194  allocate( atmos_grid_cartesc_real_volzuy( ka,ia,ja) )
195  allocate( atmos_grid_cartesc_real_volzxv( ka,ia,ja) )
196  !$acc enter data create(ATMOS_GRID_CARTESC_REAL_VOL, ATMOS_GRID_CARTESC_REAL_VOLWXY, ATMOS_GRID_CARTESC_REAL_VOLZUY, ATMOS_GRID_CARTESC_REAL_VOLZXV)
197 
199 
200  ! setup map projection
202 
203  ! calc longitude & latitude
204  call atmos_grid_cartesc_real_calc_latlon( domain_catalogue_fname, domain_catalogue_output )
205 
206  ! calc real height
208 
209  call interp_vert_setcoef( ka, ks, ke, ia, 1, ia, ja, 1, ja, & ! [IN]
210  topography_exist, & ! [IN]
211  atmos_grid_cartesc_cz(:), & ! [IN]
212  atmos_grid_cartesc_fz(:), & ! [IN]
213  atmos_grid_cartesc_real_cz(:,:,:), & ! [IN]
214  atmos_grid_cartesc_real_fz(:,:,:) ) ! [IN]
215 
216  return
217  end subroutine atmos_grid_cartesc_real_setup
218 
219  !-----------------------------------------------------------------------------
221  subroutine atmos_grid_cartesc_real_calc_latlon( &
222  catalogue_fname, &
223  catalogue_output )
224  use scale_prc, only: &
225  prc_abort, &
226  prc_nprocs, &
228  use scale_const, only: &
229  pi => const_pi, &
230  d2r => const_d2r
231  use scale_atmos_grid_cartesc, only: &
236  use scale_comm_cartesc, only: &
237  comm_gather, &
238  comm_bcast
239  use scale_mapprojection, only: &
242  mapprojection_xy2lonlat
243  implicit none
244 
245  character(len=*), intent(in) :: catalogue_fname
246  logical, intent(in) :: catalogue_output
247 
248  integer, parameter :: i_min = 1
249  integer, parameter :: i_max = 2
250  integer, parameter :: i_lon = 1
251  integer, parameter :: i_lat = 2
252 
253  real(rp) :: mine (2,2)
254  real(rp) :: whole(2,2,prc_nprocs)
255 
256  character(len=H_LONG) :: fname
257 
258  integer :: i, j
259  integer :: fid, ierr
260  !---------------------------------------------------------------------------
261 
264 
265  log_newline
266  log_info("ATMOS_GRID_CARTESC_REAL_calc_latlon",*) 'Base position in the global domain (lat,lon)'
268 
269  !$omp parallel do collapse(2)
270  do j = 1, ja
271  do i = 1, ia
273  enddo
274  enddo
275  !$acc update device(ATMOS_GRID_CARTESC_REAL_LON, ATMOS_GRID_CARTESC_REAL_LAT) async
276 
277  !$omp parallel do collapse(2)
278  do j = 1, ja
279  do i = 0, ia
281  enddo
282  enddo
283  !$acc update device(ATMOS_GRID_CARTESC_REAL_LONUY, ATMOS_GRID_CARTESC_REAL_LATUY) async
284 
285  !$omp parallel do collapse(2)
286  do j = 0, ja
287  do i = 1, ia
289  enddo
290  enddo
291  !$acc update device(ATMOS_GRID_CARTESC_REAL_LONXV, ATMOS_GRID_CARTESC_REAL_LATXV) async
292 
293  !$omp parallel do collapse(2)
294  do j = 0, ja
295  do i = 0, ia
297  enddo
298  enddo
299  !$acc update device(ATMOS_GRID_CARTESC_REAL_LONUV, ATMOS_GRID_CARTESC_REAL_LATUV) async
300 
301  !$omp workshare
302 !OCL ZFILL
303  atmos_grid_cartesc_real_dlon(:,:) = 0.0_rp
304 !OCL ZFILL
305  atmos_grid_cartesc_real_dlat(:,:) = 0.0_rp
306  !$omp end workshare
307 
308  !$omp parallel do
309  do j = js, je
310  do i = is, ie
314 
315  if ( atmos_grid_cartesc_real_dlon(i,j) == 0.0_rp &
316  .OR. atmos_grid_cartesc_real_dlat(i,j) == 0.0_rp ) then
317  log_error("ATMOS_GRID_CARTESC_REAL_calc_latlon",*) 'Invalid grid distance in lat-lon! i,j=', i,j
318  log_error_cont(*) 'Lon(i-1),Lon(i),dlon=', atmos_grid_cartesc_real_lonuy(i-1,j)/d2r,atmos_grid_cartesc_real_lonuy(i,j)/d2r,atmos_grid_cartesc_real_dlon(i,j)/d2r
319  log_error_cont(*) 'Lat(j-1),Lat(j),dlat=', atmos_grid_cartesc_real_latxv(i,j-1)/d2r,atmos_grid_cartesc_real_latxv(i,j)/d2r,atmos_grid_cartesc_real_dlat(i,j)/d2r
320  call prc_abort
321  endif
322  enddo
323  enddo
324  !$acc update device(ATMOS_GRID_CARTESC_REAL_DLON, ATMOS_GRID_CARTESC_REAL_DLAT) async
325 
326  log_newline
327  log_info("ATMOS_GRID_CARTESC_REAL_calc_latlon",*) 'Position on the earth (Local)'
328  log_info_cont('(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
331 
332  log_info_cont('(1x,A)') ' | |'
333  log_info_cont('(1x,A,F10.5,A,F9.5,A,A,F10.5,A,F9.5,A)') &
336 
337  mine(i_min,i_lon) = minval(atmos_grid_cartesc_real_lonuv(is-1:ie,js-1:je)) / d2r
338  mine(i_max,i_lon) = maxval(atmos_grid_cartesc_real_lonuv(is-1:ie,js-1:je)) / d2r
339  mine(i_min,i_lat) = minval(atmos_grid_cartesc_real_latuv(is-1:ie,js-1:je)) / d2r
340  mine(i_max,i_lat) = maxval(atmos_grid_cartesc_real_latuv(is-1:ie,js-1:je)) / d2r
341 
342  call comm_gather( 2, 2, mine(:,:), whole(:,:,:) ) ! everytime do for online nesting
343 
344  if ( prc_ismaster ) then
345  if ( catalogue_output ) then
346 
347  fid = io_get_available_fid()
348  call io_get_fname(fname, catalogue_fname)
349  open( fid, &
350  file = fname, &
351  form = 'formatted', &
352  status = 'replace', &
353  iostat = ierr )
354 
355  if ( ierr /= 0 ) then
356  log_error("ATMOS_GRID_CARTESC_REAL_calc_latlon",*) 'cannot create latlon-catalogue file!'
357  call prc_abort
358  endif
359 
360  do i = 1, prc_nprocs ! for offline nesting
361  write(fid,'(I8,8F32.24)',iostat=ierr) i, whole(i_min,i_lon,i), whole(i_max,i_lon,i), & ! LON: MIN, MAX
362  whole(i_min,i_lat,i), whole(i_max,i_lat,i) ! LAT: MIN, MAX
363  if ( ierr /= 0 ) exit
364  enddo
365 
366  close(fid)
367 
368  endif
369 
370  do i = 1, prc_nprocs ! for online nesting
371  atmos_grid_cartesc_real_domain_catalogue(i,i_min,i_lon) = whole(i_min,i_lon,i)
372  atmos_grid_cartesc_real_domain_catalogue(i,i_max,i_lon) = whole(i_max,i_lon,i)
373  atmos_grid_cartesc_real_domain_catalogue(i,i_min,i_lat) = whole(i_min,i_lat,i)
374  atmos_grid_cartesc_real_domain_catalogue(i,i_max,i_lat) = whole(i_max,i_lat,i)
375  enddo
376  endif
377 
378  call comm_bcast( prc_nprocs, 2, 2, atmos_grid_cartesc_real_domain_catalogue(:,:,:) )
379 
380  !$acc wait
381 
382  return
383  end subroutine atmos_grid_cartesc_real_calc_latlon
384 
385  !-----------------------------------------------------------------------------
388  use scale_const, only: &
389  grav => const_grav
390  use scale_atmos_grid_cartesc, only: &
395  use scale_file_cartesc, only: &
397  use scale_topography, only: &
398  zsfc => topography_zsfc
399  use scale_landuse, only: &
401  implicit none
402 
403  real(dp) :: htop
404  real(rp) :: zs
405  real(rp) :: dfz
406 
407  real(rp) :: dz1, dz2
408 
409  integer :: k, i, j
410  !---------------------------------------------------------------------------
411 
413 
414  !$omp parallel do private(zs) collapse(2)
415  do j = 1, ja
416  do i = 1, ia
417  zs = zsfc(i,j)
418  do k = 1, ka
419  atmos_grid_cartesc_real_cz(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
420  enddo
421  enddo
422  enddo
423  !$acc update device(ATMOS_GRID_CARTESC_REAL_CZ) async
424 
425  !$omp parallel do private(zs) collapse(2)
426  do j = 1, ja
427  do i = 1, ia-1
428  zs = ( zsfc(i,j) + zsfc(i+1,j) ) * 0.5_rp
429  do k = 1, ka
430  atmos_grid_cartesc_real_czuy(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
431  enddo
432  enddo
433  enddo
434  !$omp parallel do private(zs)
435  do j = 1, ja
436  zs = zsfc(ia,j)
437  do k = 1, ka
438  atmos_grid_cartesc_real_czuy(k,ia,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
439  enddo
440  enddo
441  !$acc update device(ATMOS_GRID_CARTESC_REAL_CZUY) async
442 
443  !$omp parallel do private(zs) collapse(2)
444  do j = 1, ja-1
445  do i = 1, ia
446  zs = ( zsfc(i,j) + zsfc(i,j+1) ) * 0.5_rp
447  do k = 1, ka
448  atmos_grid_cartesc_real_czxv(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
449  enddo
450  enddo
451  enddo
452  do i = 1, ia
453  zs = zsfc(i,ja)
454  do k = 1, ka
455  atmos_grid_cartesc_real_czxv(k,i,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
456  enddo
457  enddo
458  !$acc update device(ATMOS_GRID_CARTESC_REAL_CZXV) async
459 
460  !$omp parallel do private(zs) collapse(2)
461  do j = 1, ja-1
462  do i = 1, ia-1
463  zs = ( zsfc(i,j) + zsfc(i+1,j) + zsfc(i,j+1) + zsfc(i+1,j+1) ) * 0.25_rp
464  do k = 1, ka
465  atmos_grid_cartesc_real_czuv(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
466  enddo
467  enddo
468  enddo
469  !$omp parallel do private(zs)
470  do j = 1, ja-1
471  zs = ( zsfc(ia,j) + zsfc(ia,j+1) ) * 0.5_rp
472  do k = 1, ka
473  atmos_grid_cartesc_real_czuv(k,ia,j) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
474  enddo
475  enddo
476  do i = 1, ia-1
477  zs = ( zsfc(i,ja) + zsfc(i+1,ja) ) * 0.5_rp
478  do k = 1, ka
479  atmos_grid_cartesc_real_czuv(k,i,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
480  enddo
481  enddo
482  zs = zsfc(ia,ja)
483  do k = 1, ka
484  atmos_grid_cartesc_real_czuv(k,ia,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_cz(k) + zs
485  enddo
486  !$acc update device(ATMOS_GRID_CARTESC_REAL_CZUV) async
487 
488  !$omp parallel do private(zs) collapse(2)
489  do j = 1, ja
490  do i = 1, ia
491  zs = zsfc(i,j)
492  do k = 0, ka
493  atmos_grid_cartesc_real_fz(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
494  end do
495  end do
496  end do
497  !$acc update device(ATMOS_GRID_CARTESC_REAL_FZ) async
498 
499  !$omp parallel do private(zs) collapse(2)
500  do j = 1, ja
501  do i = 1, ia-1
502  zs = ( zsfc(i,j) + zsfc(i+1,j) ) * 0.5_rp
503  do k = 0, ka
504  atmos_grid_cartesc_real_fzuy(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
505  end do
506  end do
507  end do
508  !$omp parallel do private(zs)
509  do j = 1, ja
510  zs = zsfc(ia,j)
511  do k = 0, ka
512  atmos_grid_cartesc_real_fzuy(k,ia,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
513  end do
514  end do
515  !$acc update device(ATMOS_GRID_CARTESC_REAL_FZUY) async
516 
517  !$omp parallel do private(zs) collapse(2)
518  do j = 1, ja-1
519  do i = 1, ia
520  zs = ( zsfc(i,j) + zsfc(i,j+1) ) * 0.5_rp
521  do k = 0, ka
522  atmos_grid_cartesc_real_fzxv(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
523  enddo
524  enddo
525  enddo
526  !$omp parallel do private(zs)
527  do i = 1, ia
528  zs = zsfc(i,ja)
529  do k = 0, ka
530  atmos_grid_cartesc_real_fzxv(k,i,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
531  enddo
532  enddo
533  !$acc update device(ATMOS_GRID_CARTESC_REAL_FZXV) async
534 
535  !$omp parallel do private(zs) collapse(2)
536  do j = 1, ja-1
537  do i = 1, ia-1
538  zs = ( zsfc(i,j) + zsfc(i+1,j) + zsfc(i,j+1) + zsfc(i+1,j+1) ) * 0.25_rp
539  do k = 0, ka
540  atmos_grid_cartesc_real_fzuv(k,i,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
541  enddo
542  enddo
543  enddo
544  !$omp parallel do private(zs)
545  do j = 1, ja-1
546  zs = ( zsfc(ia,j) + zsfc(ia,j+1) ) * 0.5_rp
547  do k = 0, ka
548  atmos_grid_cartesc_real_fzuv(k,ia,j) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
549  enddo
550  enddo
551  !$omp parallel do private(zs)
552  do i = 1, ia-1
553  zs = ( zsfc(i,ja) + zsfc(i+1,ja) ) * 0.5_rp
554  do k = 0, ka
555  atmos_grid_cartesc_real_fzuv(k,i,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
556  enddo
557  enddo
558  zs = zsfc(ia,ja)
559  do k = 0, ka
560  atmos_grid_cartesc_real_fzuv(k,ia,ja) = ( htop - zs ) / htop * atmos_grid_cartesc_fz(k) + zs
561  enddo
562  !$acc update device(ATMOS_GRID_CARTESC_REAL_FZUV) async
563 
564  !$omp parallel do private(dz1,dz2) collapse(2)
565  do j = 1, ja
566  do i = 1, ia
567  do k = ks, ke-1
570  atmos_grid_cartesc_real_f2h(k,1,i,j) = dz2 / ( dz1 + dz2 )
571  atmos_grid_cartesc_real_f2h(k,2,i,j) = dz1 / ( dz1 + dz2 )
572  end do
573  atmos_grid_cartesc_real_f2h(1:ks-1,1,i,j) = 0.5_rp
574  atmos_grid_cartesc_real_f2h(1:ks-1,2,i,j) = 0.5_rp
575  atmos_grid_cartesc_real_f2h(ke:ka ,1,i,j) = 0.5_rp
576  atmos_grid_cartesc_real_f2h(ke:ka ,2,i,j) = 0.5_rp
577  end do
578  end do
579  !$acc update device(ATMOS_GRID_CARTESC_REAL_F2H) async
580 
581  !$omp workshare
582 !OCL ZFILL
584  !$acc update device(ATMOS_GRID_CARTESC_REAL_Z1) async
585 
586 !OCL ZFILL
588  !$omp end workshare
589  !$acc update device(ATMOS_GRID_CARTESC_REAL_Z1, ATMOS_GRID_CARTESC_REAL_PHI) async
590 
593 
594  !$omp parallel do private(dfz) collapse(2) &
595  !$omp reduction(max:ATMOS_GRID_CARTESC_REAL_ASPECT_MAX) &
596  !$omp reduction(min:ATMOS_GRID_CARTESC_REAL_ASPECT_MIN)
597  do j = js, je
598  do i = is, ie
599  do k = ks, ke
603  enddo
604  enddo
605  enddo
606 
607  log_newline
608  log_info("ATMOS_GRID_CARTESC_REAL_calc_Z",*) 'Minimum & maximum lowermost CZ'
609  log_info_cont(*) '-> (',minval( atmos_grid_cartesc_real_cz(ks,:,:) ),',',maxval( atmos_grid_cartesc_real_cz(ks,:,:) ),')'
610  log_info("ATMOS_GRID_CARTESC_REAL_calc_Z",*) 'Minimum & maximum aspect ratio'
612 
613  ! set latlon and z to fileio module
617  zsfc, landuse_frac_land ) ! [IN]
618 
619  !$acc wait
620 
621  return
622  end subroutine atmos_grid_cartesc_real_calc_z
623 
624  !-----------------------------------------------------------------------------
627  MAPF )
628  use scale_prc_cartesc, only: &
629  prc_twod
630  use scale_const, &
631  undef => const_undef
632  use scale_atmos_grid_cartesc, only: &
637  use scale_comm_cartesc, only: &
638  comm_vars8, &
639  comm_wait
640  use scale_file_cartesc, only: &
642  use scale_topography, only: &
644  use scale_landuse, only: &
646  implicit none
647 
648  real(rp), intent(in) :: mapf(ia,ja,2,4)
649 
650  real(rp) :: areauv(ia,ja)
651 
652  integer :: k, i, j
653  !---------------------------------------------------------------------------
654 
655  atmos_grid_cartesc_real_area(:,:) = 0.0_rp
656  atmos_grid_cartesc_real_areazuy_x(:,:,:) = 0.0_rp
657  atmos_grid_cartesc_real_areazxv_y(:,:,:) = 0.0_rp
658  atmos_grid_cartesc_real_areawuy_x(:,:,:) = 0.0_rp
659  atmos_grid_cartesc_real_areawxv_y(:,:,:) = 0.0_rp
660  atmos_grid_cartesc_real_areauy(:,:) = 0.0_rp
661  atmos_grid_cartesc_real_areazxy_x(:,:,:) = 0.0_rp
662  atmos_grid_cartesc_real_areazuv_y(:,:,:) = 0.0_rp
663  atmos_grid_cartesc_real_areaxv(:,:) = 0.0_rp
664  atmos_grid_cartesc_real_areazuv_y(:,:,:) = 0.0_rp
665  atmos_grid_cartesc_real_areazxy_y(:,:,:) = 0.0_rp
666 
672 
673  atmos_grid_cartesc_real_vol(:,:,:) = 0.0_rp
674  atmos_grid_cartesc_real_volwxy(:,:,:) = 0.0_rp
675  atmos_grid_cartesc_real_volzuy(:,:,:) = 0.0_rp
676  atmos_grid_cartesc_real_volzxv(:,:,:) = 0.0_rp
681 
682  !$omp parallel do
683  do j = js, je
684  do i = is, ie
685  atmos_grid_cartesc_real_area(i,j) = atmos_grid_cartesc_cdx(i) * atmos_grid_cartesc_cdy(j) / ( mapf(i,j,1,i_xy) * mapf(i,j,2,i_xy) )
686  atmos_grid_cartesc_real_areaxv(i,j) = atmos_grid_cartesc_cdx(i) * atmos_grid_cartesc_fdy(j) / ( mapf(i,j,1,i_xv) * mapf(i,j,2,i_xv) )
687  end do
688  end do
689  if ( prc_twod ) then
690  !$omp parallel do
691  do j = js, je
692  do i = is, ie
694  areauv(i,j) = atmos_grid_cartesc_real_areaxv(i,j)
695 
696  end do
697  end do
698  else
699  !$omp parallel do
700  do j = js, je
701  do i = is, ie
702  atmos_grid_cartesc_real_areauy(i,j) = atmos_grid_cartesc_fdx(i) * atmos_grid_cartesc_cdy(j) / ( mapf(i,j,1,i_uy) * mapf(i,j,2,i_uy) )
703  areauv(i,j) = atmos_grid_cartesc_fdx(i) * atmos_grid_cartesc_fdy(j) / ( mapf(i,j,1,i_uv) * mapf(i,j,2,i_uv) )
704 
705  end do
706  end do
707  end if
708 
709 #ifdef QUICKDEBUG
710  atmos_grid_cartesc_real_area(1:is-1,:) = undef
711  atmos_grid_cartesc_real_area(ie+1:ia,:) = undef
712  atmos_grid_cartesc_real_area(:,1:js-1) = undef
713  atmos_grid_cartesc_real_area(:,je+1:ja) = undef
714  atmos_grid_cartesc_real_areaxv(1:is-1,:) = undef
716  atmos_grid_cartesc_real_areaxv(:,1:js-1) = undef
718  atmos_grid_cartesc_real_areauy(1:is-1,:) = undef
720  atmos_grid_cartesc_real_areauy(:,1:js-1) = undef
722  areauv(1:is-1,:) = undef
723  areauv(ie+1:ia,:) = undef
724  areauv(:,1:js-1) = undef
725  areauv(:,je+1:ja) = undef
726 #endif
727  call comm_vars8( atmos_grid_cartesc_real_area(:,:), 1 )
728  call comm_vars8( atmos_grid_cartesc_real_areaxv(:,:), 2 )
729  call comm_vars8( atmos_grid_cartesc_real_areauy(:,:), 3 )
730  call comm_vars8( areauv(:,:), 4 )
731 
732  !$omp parallel do &
733  !$omp reduction(+:ATMOS_GRID_CARTESC_REAL_TOTAREA,ATMOS_GRID_CARTESC_REAL_TOTAREAXV,ATMOS_GRID_CARTESC_REAL_TOTAREAUY)
734  do j = js, je
735  do i = is, ie
739  end do
740  end do
741 
742  !$omp parallel do collapse(2)
743  do j = 1, ja
744  do i = 1, ia
745  do k = ks, ke
747  end do
748  do k = ks-1, ke
750  end do
751  do k = ks, ke
754  end do
755  end do
756  end do
757  !$acc update device(ATMOS_GRID_CARTESC_REAL_AREAZXV_Y, ATMOS_GRID_CARTESC_REAL_AREAWXV_Y, ATMOS_GRID_CARTESC_REAL_AREAZXY_X, ATMOS_GRID_CARTESC_REAL_AREAZXY_Y) async
758 
759  !$omp parallel do collapse(2)
760  do j = 1, ja
761  do i = 1, ia
762  do k = ks, ke
764  end do
765  do k = ks-1, ke
767  end do
768  do k = ks, ke
771  end do
772  end do
773  end do
774  !$acc update device(ATMOS_GRID_CARTESC_REAL_AREAZUY_X, ATMOS_GRID_CARTESC_REAL_AREAWUY_X, ATMOS_GRID_CARTESC_REAL_AREAZUV_Y, ATMOS_GRID_CARTESC_REAL_AREAZUV_X) async
775 
776  call comm_wait( atmos_grid_cartesc_real_area(:,:), 1 )
777  call comm_wait( atmos_grid_cartesc_real_areaxv(:,:), 2 )
778  call comm_wait( atmos_grid_cartesc_real_areauy(:,:), 3 )
779  call comm_wait( areauv(:,:), 4 )
780  !$acc update device(ATMOS_GRID_CARTESC_REAL_AREA, ATMOS_GRID_CARTESC_REAL_AREAXV, ATMOS_GRID_CARTESC_REAL_AREAUY) async
781 
782 
783  !$omp parallel do collapse(2)
784  do j = 1, ja
785  do i = is, ie
786  do k = ks, ke
788  end do
789  end do
790  end do
791  !$omp parallel do collapse(2)
792  do j = js, je
793  do i = 1, ia
794  do k = ks, ke
796  end do
797  end do
798  end do
799  !$acc update device(ATMOS_GRID_CARTESC_REAL_TOTAREAZXV_Y, ATMOS_GRID_CARTESC_REAL_TOTAREAZUY_X) async
800 
801 
802  !$omp parallel do collapse(2)
803  do j = 1, ja
804  do i = 1, ia
805  do k = ks, ke
808  end do
809  do k = ks-1, ke
811  end do
812  end do
813  end do
814  if ( prc_twod ) then
815  !$omp parallel do collapse(2)
816  do j = 1, ja
817  do i = 1, ia
818  do k = ks, ke
820  end do
821  end do
822  end do
823  else
824  !$omp parallel do collapse(2)
825  do j = 1, ja
826  do i = 1, ia
827  do k = ks, ke
829  end do
830  end do
831  end do
832  end if
833  !$acc update device(ATMOS_GRID_CARTESC_REAL_VOL, ATMOS_GRID_CARTESC_REAL_VOLZXV, ATMOS_GRID_CARTESC_REAL_VOLWXY, ATMOS_GRID_CARTESC_REAL_VOLZUY) async
834 
835  !$omp parallel do &
836  !$omp reduction(+:ATMOS_GRID_CARTESC_REAL_TOTVOL,ATMOS_GRID_CARTESC_REAL_TOTVOLZXV,ATMOS_GRID_CARTESC_REAL_TOTVOLWXY,ATMOS_GRID_CARTESC_REAL_TOTVOLZUY)
837  do j = js, je
838  do i = is, ie
839  do k = ks, ke
844  enddo
845  enddo
846  enddo
847 
848  ! set latlon and z to fileio module
854 
855  !$acc wait
856 
857  return
859 
860  !-----------------------------------------------------------------------------
863  use scale_interp_vert, only: &
865  implicit none
866  !---------------------------------------------------------------------------
867 
868  !$acc exit data delete(ATMOS_GRID_CARTESC_REAL_LON, ATMOS_GRID_CARTESC_REAL_LAT, ATMOS_GRID_CARTESC_REAL_LONUY, ATMOS_GRID_CARTESC_REAL_LONXV, ATMOS_GRID_CARTESC_REAL_LONUV, ATMOS_GRID_CARTESC_REAL_LATUY, ATMOS_GRID_CARTESC_REAL_LATXV, ATMOS_GRID_CARTESC_REAL_LATUV, ATMOS_GRID_CARTESC_REAL_DLON, ATMOS_GRID_CARTESC_REAL_DLAT)
869  deallocate( atmos_grid_cartesc_real_lon )
870  deallocate( atmos_grid_cartesc_real_lat )
871  deallocate( atmos_grid_cartesc_real_lonuy )
872  deallocate( atmos_grid_cartesc_real_lonxv )
873  deallocate( atmos_grid_cartesc_real_lonuv )
874  deallocate( atmos_grid_cartesc_real_latuy )
875  deallocate( atmos_grid_cartesc_real_latxv )
876  deallocate( atmos_grid_cartesc_real_latuv )
877  deallocate( atmos_grid_cartesc_real_dlon )
878  deallocate( atmos_grid_cartesc_real_dlat )
879 
880  !$acc exit data delete(ATMOS_GRID_CARTESC_REAL_CZ, ATMOS_GRID_CARTESC_REAL_CZUY, ATMOS_GRID_CARTESC_REAL_CZXV, ATMOS_GRID_CARTESC_REAL_CZUV, ATMOS_GRID_CARTESC_REAL_FZ, ATMOS_GRID_CARTESC_REAL_FZUY, ATMOS_GRID_CARTESC_REAL_FZXV, ATMOS_GRID_CARTESC_REAL_FZUV, ATMOS_GRID_CARTESC_REAL_F2H, ATMOS_GRID_CARTESC_REAL_Z1, ATMOS_GRID_CARTESC_REAL_PHI)
881  deallocate( atmos_grid_cartesc_real_cz )
882  deallocate( atmos_grid_cartesc_real_czuy )
883  deallocate( atmos_grid_cartesc_real_czxv )
884  deallocate( atmos_grid_cartesc_real_czuv )
885  deallocate( atmos_grid_cartesc_real_fz )
886  deallocate( atmos_grid_cartesc_real_fzuy )
887  deallocate( atmos_grid_cartesc_real_fzxv )
888  deallocate( atmos_grid_cartesc_real_fzuv )
889  deallocate( atmos_grid_cartesc_real_f2h )
890  deallocate( atmos_grid_cartesc_real_z1 )
891  deallocate( atmos_grid_cartesc_real_phi )
892 
893  !acc exit data delete(ATMOS_GRID_CARTESC_REAL_AREA, ATMOS_GRID_CARTESC_REAL_AREAZUY_X, ATMOS_GRID_CARTESC_REAL_AREAZXV_Y, ATMOS_GRID_CARTESC_REAL_AREAWUY_X, ATMOS_GRID_CARTESC_REAL_AREAWXV_Y, ATMOS_GRID_CARTESC_REAL_AREAUY, ATMOS_GRID_CARTESC_REAL_AREAZXY_X, ATMOS_GRID_CARTESC_REAL_AREAZUV_Y, ATMOS_GRID_CARTESC_REAL_AREAXV, ATMOS_GRID_CARTESC_REAL_AREAZUV_X, ATMOS_GRID_CARTESC_REAL_ZXY_Y)
894  deallocate( atmos_grid_cartesc_real_area )
899  deallocate( atmos_grid_cartesc_real_areauy )
902  deallocate( atmos_grid_cartesc_real_areaxv )
905 
906  !$acc exit data delete(ATMOS_GRID_CARTESC_REAL_TOTAREAZUY_X, ATMOS_GRID_CARTESC_REAL_TOTAREAZXV_Y)
909 
910  !$acc exit data delete(ATMOS_GRID_CARTESC_REAL_VOL, ATMOS_GRID_CARTESC_REAL_VOLWXY, ATMOS_GRID_CARTESC_REAL_VOLZUY, ATMOS_GRID_CARTESC_REAL_VOLZXV)
911  deallocate( atmos_grid_cartesc_real_vol )
912  deallocate( atmos_grid_cartesc_real_volwxy )
913  deallocate( atmos_grid_cartesc_real_volzuy )
914  deallocate( atmos_grid_cartesc_real_volzxv )
915 
917 
919 
920  return
921  end subroutine atmos_grid_cartesc_real_finalize
922 
scale_const::const_grav
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:49
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazxy_y
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_y
virtical area (zxy, normal y) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:76
scale_atmos_grid_cartesc_index::i_uy
integer, public i_uy
Definition: scale_atmos_grid_cartesC_index.F90:100
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzuy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzuy
geopotential height [m] (wuy)
Definition: scale_atmos_grid_cartesC_real.F90:44
scale_atmos_grid_cartesc_index::i_xv
integer, public i_xv
Definition: scale_atmos_grid_cartesC_index.F90:101
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_interp_vert::interp_vert_finalize
subroutine, public interp_vert_finalize
Finalize.
Definition: scale_interp_vert.F90:686
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzxv
real(rp), public atmos_grid_cartesc_real_totvolzxv
total volume (zxv, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:91
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
Definition: scale_atmos_grid_cartesC_real.F90:39
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volwxy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:85
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_z1
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_z1
Height of the lowermost grid from surface (cell center) [m].
Definition: scale_atmos_grid_cartesC_real.F90:60
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_aspect_min
real(rp), public atmos_grid_cartesc_real_aspect_min
minimum aspect ratio of the grid cell
Definition: scale_atmos_grid_cartesC_real.F90:62
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lonxv
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonxv
longitude at staggered point (xv) [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:51
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areawuy_x
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawuy_x
virtical area (wuy, normal x) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:69
scale_atmos_grid_cartesc_index::i_uv
integer, public i_uv
Definition: scale_atmos_grid_cartesC_index.F90:102
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totarea
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:78
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolwxy
real(rp), public atmos_grid_cartesc_real_totvolwxy
total volume (wxy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:89
scale_atmos_grid_cartesc::atmos_grid_cartesc_cdy
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdy
y-length of control volume [m]
Definition: scale_atmos_grid_cartesC.F90:62
scale_atmos_grid_cartesc::atmos_grid_cartesc_fx
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fx
face coordinate [m]: x, local
Definition: scale_atmos_grid_cartesC.F90:58
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_dlon
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_dlon
delta longitude
Definition: scale_atmos_grid_cartesC_real.F90:57
scale_atmos_grid_cartesc::atmos_grid_cartesc_fdy
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdy
y-length of grid(j+1) to grid(j) [m]
Definition: scale_atmos_grid_cartesC.F90:64
scale_topography
module TOPOGRAPHY
Definition: scale_topography.F90:11
scale_io::io_get_available_fid
integer function, public io_get_available_fid()
search & get available file ID
Definition: scale_io.F90:373
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_calc_areavol
subroutine, public atmos_grid_cartesc_real_calc_areavol(MAPF)
Calc control area/volume.
Definition: scale_atmos_grid_cartesC_real.F90:628
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_basepoint_lat
real(rp), public atmos_grid_cartesc_real_basepoint_lat
position of base point in real world [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:37
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czxv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czxv
geopotential height [m] (zxv)
Definition: scale_atmos_grid_cartesC_real.F90:41
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_atmos_grid_cartesc_real::atmos_grid_cartesc_real_basepoint_lon
real(rp), public atmos_grid_cartesc_real_basepoint_lon
position of base point in real world [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:36
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzuy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:86
scale_atmos_grid_cartesc::atmos_grid_cartesc_domain_center_y
real(rp), public atmos_grid_cartesc_domain_center_y
center position of global domain [m]: y
Definition: scale_atmos_grid_cartesC.F90:92
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_domain_catalogue
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_domain_catalogue
domain latlon catalogue [rad]
Definition: scale_atmos_grid_cartesC_real.F90:93
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_atmos_grid_cartesc_index::i_xy
integer, public i_xy
Definition: scale_atmos_grid_cartesC_index.F90:99
scale_mapprojection::mapprojection_basepoint_lat
real(rp), public mapprojection_basepoint_lat
Definition: scale_mapprojection.F90:91
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_aspect_max
real(rp), public atmos_grid_cartesc_real_aspect_max
maximum aspect ratio of the grid cell
Definition: scale_atmos_grid_cartesC_real.F90:61
scale_mapprojection
module Map projection
Definition: scale_mapprojection.F90:12
scale_atmos_grid_cartesc_index::ie
integer, public ie
end point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:54
scale_io::io_get_fname
subroutine, public io_get_fname(outstr, instr, rank, ext, len)
generate process specific filename
Definition: scale_io.F90:421
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzxv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzxv
geopotential height [m] (wxv)
Definition: scale_atmos_grid_cartesC_real.F90:45
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:45
scale_atmos_grid_cartesc::atmos_grid_cartesc_domain_center_x
real(rp), public atmos_grid_cartesc_domain_center_x
center position of global domain [m]: x
Definition: scale_atmos_grid_cartesC.F90:91
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_volzxv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:87
scale_atmos_grid_cartesc_index
module atmosphere / grid / cartesC index
Definition: scale_atmos_grid_cartesC_index.F90:12
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
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_vol
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:84
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czuv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czuv
geopotential height [m] (zuv)
Definition: scale_atmos_grid_cartesC_real.F90:42
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latuv
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuv
latitude at staggered point (uv) [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:56
scale_landuse::landuse_frac_land
real(rp), dimension(:,:), allocatable, public landuse_frac_land
land fraction
Definition: scale_landuse.F90:55
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areawxv_y
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawxv_y
virtical area (wxv, normal y) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:70
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazuy_x
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuy_x
virtical area (zuy, normal x) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:67
scale_atmos_grid_cartesc::atmos_grid_cartesc_fy
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fy
face coordinate [m]: y, local
Definition: scale_atmos_grid_cartesC.F90:59
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latuy
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuy
latitude at staggered point (uy) [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:54
scale_prc_cartesc
module process / cartesC
Definition: scale_prc_cartesC.F90:11
scale_mapprojection::mapprojection_setup
subroutine, public mapprojection_setup(DOMAIN_CENTER_X, DOMAIN_CENTER_Y)
Setup.
Definition: scale_mapprojection.F90:194
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_setup
subroutine, public atmos_grid_cartesc_real_setup
Setup.
Definition: scale_atmos_grid_cartesC_real.F90:110
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_area
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:66
scale_topography::topography_exist
logical, public topography_exist
topography exists?
Definition: scale_topography.F90:37
scale_atmos_grid_cartesc_index::is
integer, public is
start point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:53
scale_precision::dp
integer, parameter, public dp
Definition: scale_precision.F90:32
scale_mapprojection::mapprojection_basepoint_lon
real(rp), public mapprojection_basepoint_lon
Definition: scale_mapprojection.F90:90
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totareauy
real(rp), public atmos_grid_cartesc_real_totareauy
total area (uy, local) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:79
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvolzuy
real(rp), public atmos_grid_cartesc_real_totvolzuy
total volume (zuy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:90
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_atmos_grid_cartesc::atmos_grid_cartesc_fdx
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdx
x-length of grid(i+1) to grid(i) [m]
Definition: scale_atmos_grid_cartesC.F90:63
scale_const::const_pi
real(rp), parameter, public const_pi
pi
Definition: scale_const.F90:32
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areauy
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areauy
horizontal area ( uy, normal z) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:71
scale_file_cartesc::file_cartesc_set_coordinates_atmos
subroutine, public file_cartesc_set_coordinates_atmos(CZ, FZ, LON, LONUY, LONXV, LONUV, LAT, LATUY, LATXV, LATUV, TOPO, LSMASK)
set latlon and z for atmosphere
Definition: scale_file_cartesC.F90:467
scale_file_cartesc::file_cartesc_set_areavol_atmos
subroutine, public file_cartesc_set_areavol_atmos(AREA, AREAZUY_X, AREAZXV_Y, AREAWUY_X, AREAWXV_Y, AREAUY, AREAZXY_X, AREAZUV_Y, AREAXV, AREAZUV_X, AREAZXY_Y, VOL, VOLWXY, VOLZUY, VOLZXV)
set area and volume
Definition: scale_file_cartesC.F90:513
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazuv_x
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_x
virtical area (zuv, normal x) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:75
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_dlat
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_dlat
delta latitude
Definition: scale_atmos_grid_cartesC_real.F90:58
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latxv
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latxv
latitude at staggered point (xv) [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:55
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_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazuv_y
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_y
virtical area (zuv, normal y) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:73
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_f2h
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_real_f2h
coefficient for interpolation from full to half levels
Definition: scale_atmos_grid_cartesC_real.F90:47
scale_topography::topography_zsfc
real(rp), dimension(:,:), allocatable, public topography_zsfc
absolute ground height [m]
Definition: scale_topography.F90:39
scale_prc::prc_nprocs
integer, public prc_nprocs
myrank in local communicator
Definition: scale_prc.F90:90
scale_interp_vert::interp_vert_setcoef
subroutine, public interp_vert_setcoef(KA, KS, KE, IA, IS, IE, JA, JS, JE, TOPO_exist, Xi, Xih, Z, Zh)
Setup.
Definition: scale_interp_vert.F90:88
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_calc_z
subroutine, public atmos_grid_cartesc_real_calc_z
Convert Xi to Z coordinate.
Definition: scale_atmos_grid_cartesC_real.F90:388
scale_atmos_grid_cartesc::atmos_grid_cartesc_fz
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fz
face coordinate [m]: z, local
Definition: scale_atmos_grid_cartesC.F90:42
scale_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lonuv
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuv
longitude at staggered point (uv) [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:52
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazxy_x
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_x
virtical area (zxy, normal x) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:72
scale_atmos_grid_cartesc_index::js
integer, public js
start point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:55
scale_atmos_grid_cartesc::atmos_grid_cartesc_cy
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cy
center coordinate [m]: y, local
Definition: scale_atmos_grid_cartesC.F90:57
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totareazuy_x
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_real_totareazuy_x
total area (zuy, normal x) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:81
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_finalize
subroutine, public atmos_grid_cartesc_real_finalize
Finalize.
Definition: scale_atmos_grid_cartesC_real.F90:863
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totareaxv
real(rp), public atmos_grid_cartesc_real_totareaxv
total area (xv, local) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:80
scale_const::const_d2r
real(rp), public const_d2r
degree to radian
Definition: scale_const.F90:33
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_phi
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_phi
geopotential [m2/s2] (cell center)
Definition: scale_atmos_grid_cartesC_real.F90:64
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areaxv
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areaxv
horizontal area ( xv, normal z) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:74
scale_atmos_grid_cartesc::atmos_grid_cartesc_cdx
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdx
x-length of control volume [m]
Definition: scale_atmos_grid_cartesC.F90:61
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
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
Definition: scale_atmos_grid_cartesC_real.F90:43
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvol
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:88
scale_atmos_grid_cartesc
module atmosphere / grid / cartesC
Definition: scale_atmos_grid_cartesC.F90:12
scale_landuse
module LANDUSE
Definition: scale_landuse.F90:19
scale_atmos_grid_cartesc::atmos_grid_cartesc_cz
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cz
center coordinate [m]: z, local
Definition: scale_atmos_grid_cartesC.F90:41
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_areazxv_y
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxv_y
virtical area (zxv, normal y) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:68
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzuv
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fzuv
geopotential height [m] (wuv)
Definition: scale_atmos_grid_cartesC_real.F90:46
scale_interp_vert
module INTERPOLATION vertical
Definition: scale_interp_vert.F90:11
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
scale_atmos_grid_cartesc_index::je
integer, public je
end point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:56
scale_prc_cartesc::prc_twod
logical, public prc_twod
2D experiment
Definition: scale_prc_cartesC.F90:56
scale_file_cartesc
module file / cartesianC
Definition: scale_file_cartesC.F90:11
scale_atmos_grid_cartesc::atmos_grid_cartesc_cx
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cx
center coordinate [m]: x, local
Definition: scale_atmos_grid_cartesC.F90:56
scale_prc::prc_ismaster
logical, public prc_ismaster
master process in local communicator?
Definition: scale_prc.F90:92
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lonuy
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuy
longitude at staggered point (uy) [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:50
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czuy
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_czuy
geopotential height [m] (zuy)
Definition: scale_atmos_grid_cartesC_real.F90:40
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totareazxv_y
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_real_totareazxv_y
total area (zxv, normal y) [m2]
Definition: scale_atmos_grid_cartesC_real.F90:82