44 private :: file_history_cartesc_set_dims
45 private :: file_history_cartesc_set_axes
46 private :: file_history_cartesc_set_axes_attributes
52 integer,
parameter :: nzs = 3
53 character(len=8),
parameter :: zs(nzs) = (/
"model ", &
57 integer :: file_history_cartesc_pres_nlayer = 0
58 real(RP),
allocatable :: file_history_cartesc_pres_val(:)
66 integer :: file_history_cartesc_startdate(6)
67 real(DP) :: file_history_cartesc_startms
69 logical :: file_history_cartesc_boundary = .false.
104 integer,
parameter :: nlayer_max = 300
105 real(RP) :: FILE_HISTORY_CARTESC_PRES(nlayer_max)
107 namelist / param_file_history_cartesc / &
108 file_history_cartesc_pres_nlayer, &
109 file_history_cartesc_pres, &
110 file_history_cartesc_boundary
112 character(len=H_MID) :: FILE_HISTORY_CARTESC_H_TITLE =
'SCALE-RM FILE_HISTORY_CARTESC OUTPUT' 113 character(len=H_MID) :: FILE_HISTORY_CARTESC_T_SINCE
115 character(len=FILE_HSHORT) :: calendar
116 real(DP) :: start_daysec
122 log_info(
"FILE_HISTORY_CARTESC_setup",*)
'Setup' 124 file_history_cartesc_pres(:) = 0.0_rp
128 read(
io_fid_conf,nml=param_file_history_cartesc,iostat=ierr)
130 log_info(
"FILE_HISTORY_CARTESC_setup",*)
'Not found namelist. Default used.' 131 elseif( ierr > 0 )
then 132 log_error(
"FILE_HISTORY_CARTESC_setup",*)
'Not appropriate names in namelist PARAM_FILE_HISTORY_CARTESC. Check!' 135 log_nml(param_file_history_cartesc)
139 if ( file_history_cartesc_pres_nlayer > 0 )
then 140 if ( file_history_cartesc_pres_nlayer > nlayer_max )
then 141 log_error(
"FILE_HISTORY_CARTESC_setup",
'(a,i3)')
'FILE_HISTORY_CARTESC_PRES_nlayer must be <= ', nlayer_max
144 allocate( file_history_cartesc_pres_val(file_history_cartesc_pres_nlayer) )
146 do k = 1, file_history_cartesc_pres_nlayer
147 if ( file_history_cartesc_pres(k) <= 0.0_rp )
then 148 log_error(
"FILE_HISTORY_CARTESC_setup",
'(a,i3,f7.1)')
'Invalid value found in pressure coordinate! (k,value)=', k, file_history_cartesc_pres(k)
150 elseif ( file_history_cartesc_pres(k+1) >= file_history_cartesc_pres(k) )
then 151 log_error(
"FILE_HISTORY_CARTESC_setup",
'(a,i3,2f7.1)')
'The value of pressure coordinate must be descending order! ', &
152 '(k,value[k],value[k+1])=', k, file_history_cartesc_pres(k), file_history_cartesc_pres(k+1)
155 file_history_cartesc_pres_val(k) = file_history_cartesc_pres(k) * 100.0_rp
160 log_info(
"FILE_HISTORY_CARTESC_setup",*)
'FILE_HISTORY_CARTESC_PRES_nlayer is not set.' 161 log_info(
"FILE_HISTORY_CARTESC_setup",*)
'Output with pressure coordinate is disabled' 171 write(file_history_cartesc_t_since,
'(I4.4,5(A1,I2.2))')
time_nowdate(1), &
179 file_history_cartesc_t_since =
'' 182 if ( file_history_cartesc_boundary )
then 224 time_since = file_history_cartesc_t_since, &
225 calendar = calendar, &
226 default_zcoord =
'model', &
231 call file_history_cartesc_set_dims
233 call file_history_cartesc_set_axes
235 call file_history_cartesc_set_axes_attributes
255 real(RP),
intent(in) :: PRES (:,:,:)
256 real(RP),
intent(in) :: PRESH (:,:,:)
257 real(RP),
intent(in) :: SFC_PRES( :,:)
260 if ( file_history_cartesc_pres_nlayer > 0 )
then 268 file_history_cartesc_pres_val(:) )
279 subroutine file_history_cartesc_set_dims
292 character(len=H_SHORT) :: mapping
294 character(len=H_SHORT) :: dims(3,3)
296 integer :: start(3,3), count(3,3)
297 integer :: xs, xc, ys, yc
301 if ( file_history_cartesc_boundary )
then 324 count(1,1) =
kmax + 1
331 count(1,1) =
okmax + 1
338 count(1,1) =
lkmax + 1
345 count(1,1) =
ukmax + 1
355 call file_history_set_dim(
"XY", 2, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", location=
"face" )
358 dims(3,:) = (/
"height ",
"z ",
"pressure " /)
359 count(3,:) = (/
kmax,
kmax, file_history_cartesc_pres_nlayer /)
360 call file_history_set_dim(
"ZXY", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, &
361 area=
"cell_area", area_x=
"cell_area_xyz_x", area_y=
"cell_area_xyz_y", volume=
"cell_volume", location=
"face" )
362 dims(3,:) = (/
"height_xyw",
"zh ",
"pressure " /)
363 count(3,:) = (/
kmax+1,
kmax+1, file_history_cartesc_pres_nlayer /)
364 call file_history_set_dim(
"ZHXY", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", volume=
"cell_volume_xyw", location=
"face" )
366 if (
okmax > 0 )
then 369 call file_history_set_dim(
"OXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", volume=
"cell_volume_xyo", location=
"face", grid=
"ocean" )
371 count(3,1) =
okmax + 1
372 call file_history_set_dim(
"OHXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", location=
"face", grid=
"ocean" )
375 if (
lkmax > 0 )
then 378 call file_history_set_dim(
"LXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", volume=
"cell_volume_xyl", location=
"face", grid=
"land" )
380 count(3,1) =
lkmax + 1
381 call file_history_set_dim(
"LHXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", location=
"face", grid=
"land" )
384 if (
ukmax > 0 )
then 387 call file_history_set_dim(
"UXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", volume=
"cell_volume_xyu", grid=
"urban" )
389 count(3,1) =
ukmax + 1
390 call file_history_set_dim(
"UHXY", 3, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area", location=
"face", grid=
"urban" )
403 call file_history_set_dim(
"XHY", 2, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_uy", location=
"edge1" )
405 dims(3,:) = (/
"height_uyz",
"z ",
"pressure " /)
406 count(3,:) = (/
kmax,
kmax, file_history_cartesc_pres_nlayer /)
407 call file_history_set_dim(
"ZXHY", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_uy", volume=
"cell_volume_uyz", location=
"edge1" )
408 dims(3,:) = (/
"height_uyw",
"zh ",
"pressure " /)
409 count(3,:) = (/
kmax+1,
kmax+1, file_history_cartesc_pres_nlayer /)
410 call file_history_set_dim(
"ZHXHY", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_uy", location=
"edge1" )
424 call file_history_set_dim(
"XYH", 2, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_xv", location=
"edge2" )
426 dims(3,:) = (/
"height_xvz",
"z ",
"pressure " /)
427 count(3,:) = (/
kmax,
kmax, file_history_cartesc_pres_nlayer /)
428 call file_history_set_dim(
"ZXYH", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_xv", volume=
"cell_volume_xvz", location=
"edge2" )
429 dims(3,:) = (/
"height_xvw",
"zh ",
"pressure " /)
430 count(3,:) = (/
kmax+1,
kmax+1, file_history_cartesc_pres_nlayer /)
431 call file_history_set_dim(
"ZHXYH", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, area=
"cell_area_xv", location=
"edge2" )
443 call file_history_set_dim(
"XHYH", 2, 1, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, location=
"face" )
445 dims(3,:) = (/
"height_uvz",
"z ",
"pressure " /)
446 count(3,:) = (/
kmax,
kmax, file_history_cartesc_pres_nlayer /)
447 call file_history_set_dim(
"ZXHYH", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, &
448 area=
"cell_area_uv", area_x=
"cell_area_uvz_x", area_y=
"cell_area_uvz_y", location=
"node" )
449 dims(3,:) = (/
"height_uvw",
"zh ",
"pressure " /)
450 count(3,:) = (/
kmax+1,
kmax+1, file_history_cartesc_pres_nlayer /)
451 call file_history_set_dim(
"ZHXHYH", 3, nzs, dims(:,:), zs(:), start(:,:), count(:,:), mapping=mapping, location=
"node" )
454 end subroutine file_history_cartesc_set_dims
460 dim_type, zcoord, fill_halo, &
464 real(RP),
intent(in) :: src(:)
465 character(len=*),
intent(in) :: dim_type
466 character(len=*),
intent(in) :: zcoord
467 logical,
intent(in) :: fill_halo
469 real(DP),
intent(out) :: dst(:)
477 select case ( dim_type )
503 log_error(
"FILE_HISTORY_CARTESC_truncate_1D",*)
'dim_type is invalid: ', trim(dim_type)
508 dst(k) = src(kstart+k-1)
516 subroutine file_history_cartesc_truncate_2d( &
518 dim_type, zcoord, fill_halo, &
524 real(RP),
intent(in) :: src(:,:)
525 character(len=*),
intent(in) :: dim_type
526 character(len=*),
intent(in) :: zcoord
527 logical,
intent(in) :: fill_halo
529 real(DP),
intent(out) :: dst(:)
531 integer :: isize, jsize
532 integer :: istart, jstart
537 select case( dim_type )
541 case (
'XHY',
'XHYH' )
545 log_error(
"FILE_HISTORY_CARTESC_truncate_2D",*)
'dim_type is invalid: ', trim(dim_type)
549 select case ( dim_type )
553 case (
'XYH',
'XHYH' )
557 log_error(
"FILE_HISTORY_CARTESC_truncate_2D",*)
'dim_type is invalid: ', trim(dim_type)
564 dst((j-1)*isize+i) = src(istart+i-1,jstart+j-1)
568 if ( fill_halo )
then 572 dst((j-1)*isize+i) = rmiss
577 do i =
ie-istart+2, ime-istart+1
578 dst((j-1)*isize+i) = rmiss
584 dst((j-1)*isize+i) = rmiss
588 do j =
je-jstart+2, jme-jstart+1
590 dst((j-1)*isize+i) = rmiss
597 end subroutine file_history_cartesc_truncate_2d
603 dim_type, zcoord, fill_halo, &
621 real(RP),
intent(in) :: src(:,:,:)
622 character(len=*),
intent(in) :: dim_type
623 character(len=*),
intent(in) :: zcoord
624 logical,
intent(in) :: fill_halo
625 real(DP),
intent(out) :: dst(:)
627 real(RP) :: src_Z(
ka,
ia,
ja)
628 real(RP) :: src_P(file_history_cartesc_pres_nlayer,
ia,
ja)
630 integer :: isize, jsize, ksize
631 integer :: istart, jstart, kstart
636 if ( index( dim_type,
'XH' ) == 0 )
then 644 if ( index( dim_type,
'YH' ) == 0 )
then 652 select case( dim_type(1:1) )
666 log_error(
"FILE_HISTORY_CARTESC_truncate_3D",*)
'dim_type is invalid: ', trim(dim_type)
669 if ( dim_type(2:2) ==
'H' )
then 689 dst((k-1)*jsize*isize+(j-1)*isize+i) = src_z(kstart+k-1,istart+i-1,jstart+j-1)
709 dst((k-1)*jsize*isize+(j-1)*isize+i) = src_z(kstart+k-1,istart+i-1,jstart+j-1)
714 elseif( ksize ==
kmax .and. zcoord ==
"pressure" )
then 715 ksize = file_history_cartesc_pres_nlayer
716 if ( ksize == 0 )
then 717 log_error(
"FILE_HISTORY_CARTESC_truncate_3D",*)
'FILE_HISTORY_CARTESC_PRES_nlayer must be set to output variable with the pressure coordinate' 734 dst((k-1)*jsize*isize+(j-1)*isize+i) = src_p(k,istart+i-1,jstart+j-1)
739 elseif( ksize ==
kmax+1 .and. zcoord ==
"pressure" )
then 740 ksize = file_history_cartesc_pres_nlayer
741 if ( ksize == 0 )
then 742 log_error(
"FILE_HISTORY_CARTESC_truncate_3D",*)
'FILE_HISTORY_CARTESC_PRES_nlayer must be set to output variable with the pressure coordinate' 758 dst((k-1)*jsize*isize+(j-1)*isize+i) = src_p(k,istart+i-1,jstart+j-1)
768 dst((k-1)*jsize*isize+(j-1)*isize+i) = src(kstart+k-1,istart+i-1,jstart+j-1)
775 if ( fill_halo )
then 780 dst((k-1)*jsize*isize+(j-1)*isize+i) = rmiss
787 do i =
ie-istart+2, ime-istart+1
788 dst((k-1)*jsize*isize+(j-1)*isize+i) = rmiss
796 dst((k-1)*jsize*isize+(j-1)*isize+i) = rmiss
802 do j =
je-jstart+2, jme-jstart+1
804 dst((k-1)*jsize*isize+(j-1)*isize+i) = rmiss
817 subroutine file_history_cartesc_set_axes
821 file_history_set_associatedcoordinate
916 real(RP) :: AXIS (imh,jmh,0:
kmax)
917 real(RP) :: AXISO(im, jm,
okmax)
918 real(RP) :: AXISL(im, jm,
lkmax)
919 real(RP) :: AXISU(im, jm,
ukmax)
920 character(len=2) :: AXIS_name(3)
922 integer :: rankidx(2)
923 integer :: start(3,4)
924 integer :: startX, startY, startZ
925 integer :: startXH, startYH
927 integer :: XAGH, YAGH
929 real(RP) :: z_bnds(2,
ka), zh_bnds(2,0:
ka)
930 real(RP) :: oz_bnds(2,
oka), ozh_bnds(2,0:
oka)
931 real(RP) :: lz_bnds(2,
lka), lzh_bnds(2,0:
lka)
932 real(RP) :: uz_bnds(2,
uka), uzh_bnds(2,0:
uka)
933 real(RP) :: x_bnds(2,
ia), xh_bnds(2,0:
ia)
934 real(RP) :: y_bnds(2,
ja), yh_bnds(2,0:
ja)
936 real(RP) :: FDXG(0:
iag), FDYG(0:
jag)
937 real(RP) :: FDX(0:
ia), FDY(0:
ja)
960 if ( file_history_cartesc_boundary )
then 994 if ( rankidx(2) > 0 )
then 998 if ( rankidx(1) > 0 )
then 1067 if ( imsh == 0 )
then 1076 if ( ime ==
ia )
then 1086 if ( jmsh == 0 )
then 1095 if ( jme ==
ja )
then 1121 bounds=z_bnds(:,
ks :
ke), gsize=
kmax , start=startz )
1123 bounds=zh_bnds(:,
ks-1:
ke), gsize=
kmax+1 , start=startz )
1125 if ( file_history_cartesc_pres_nlayer > 0 )
then 1126 call file_history_set_axis(
'pressure',
'Pressure',
'hPa',
'pressure', file_history_cartesc_pres_val(:)/100.0_rp, &
1127 gsize=file_history_cartesc_pres_nlayer, start=startz, down=.true. )
1132 bounds=oz_bnds(:,
oks :
oke), gsize=
okmax , start=startz, down=.true. )
1134 bounds=ozh_bnds(:,
oks-1:
oke), gsize=
okmax+1, start=startz, down=.true. )
1139 bounds=lz_bnds(:,
lks :
lke), gsize=
lkmax , start=startz, down=.true. )
1141 bounds=lzh_bnds(:,
lks-1:
lke), gsize=
lkmax+1, start=startz, down=.true. )
1146 bounds=uz_bnds(:,
uks :
uke), gsize=
ukmax , start=startz, down=.true. )
1148 bounds=uzh_bnds(:,
uks-1:
uke), gsize=
ukmax+1, start=startz, down=.true. )
1152 bounds=x_bnds(:,ims :ime), gsize=xag , start=startx )
1154 bounds=xh_bnds(:,imsh:ime), gsize=xagh, start=startxh )
1157 bounds=y_bnds(:,jms :jme), gsize=yag , start=starty )
1159 bounds=yh_bnds(:,jmsh:jme), gsize=yagh, start=startyh )
1169 if (
okmax > 0 )
then 1175 if (
lkmax > 0 )
then 1181 if (
ukmax > 0 )
then 1232 if ( file_history_cartesc_boundary )
then 1239 start(1,2) = start(1,2) + 1
1240 start(1,4) = start(1,4) + 1
1243 start(2,3) = start(2,3) + 1
1244 start(2,4) = start(2,4) + 1
1255 axis_name(1:3) = (/
'x ',
'y ',
'z '/)
1256 call file_history_set_associatedcoordinate(
'height',
'height above ground level', &
1257 'm', axis_name(1:3), axis(1:im,1:jm,1:
kmax), start=start(:,1) )
1262 axis_name(1:3) = (/
'x ',
'y ',
'zh'/)
1263 call file_history_set_associatedcoordinate(
'height_xyw',
'height above ground level (half level xyw)', &
1264 'm' , axis_name(1:3), axis(1:im,1:jm,0:
kmax), start=start(:,1) )
1268 do i = 1, min(imh,
ia-imsh)
1273 if ( imh ==
ia-imsh+1 )
then 1280 axis_name(1:3) = (/
'xh',
'y ',
'z '/)
1281 call file_history_set_associatedcoordinate(
'height_uyz',
'height above ground level (half level uyz)', &
1282 'm', axis_name(1:3), axis(1:imh,1:jm,1:
kmax), start=start(:,2) )
1285 do j = 1, min(jmh,
ja-jmsh)
1291 if ( jmh ==
ja-jmsh+1 )
then 1298 axis_name(1:3) = (/
'x ',
'yh',
'z '/)
1299 call file_history_set_associatedcoordinate(
'height_xvz',
'height above ground level (half level xvz)', &
1300 'm', axis_name(1:3), axis(1:im,1:jmh,1:
kmax), start=start(:,3) )
1303 do j = 1, min(jmh,
ja-jmsh)
1304 do i = 1, min(imh,
ia-imsh)
1310 if ( jmh ==
ja-jmsh+1 )
then 1312 do i = 1, min(imh,
ia-imsh)
1317 if ( imh ==
ia-imsh+1 )
then 1319 do j = 1, min(jmh,
ja-jmsh)
1324 if ( imh ==
ia-imsh+1 .AND. jmh ==
ja-jmsh+1 )
then 1329 axis_name(1:3) = (/
'xh',
'yh',
'z '/)
1330 call file_history_set_associatedcoordinate(
'height_uvz',
'height above ground level (half level uvz)', &
1331 'm', axis_name(1:3), axis(1:imh,1:jmh,1:
kmax), start=start(:,4) )
1335 do i = 1, min(imh,
ia-imsh)
1340 if ( imh ==
ia-imsh+1 )
then 1347 axis_name(1:3) = (/
'xh',
'y ',
'zh'/)
1348 call file_history_set_associatedcoordinate(
'height_uyw',
'height above ground level (half level uyw)', &
1349 'm', axis_name(1:3), axis(1:imh,1:jm,0:
kmax), start=start(:,2) )
1352 do j = 1, min(jmh,
ja-jmsh)
1358 if ( jmh ==
ja-jmsh+1 )
then 1365 axis_name(1:3) = (/
'x ',
'yh',
'zh'/)
1366 call file_history_set_associatedcoordinate(
'height_xvw',
'height above ground level (half level xvw)', &
1367 'm', axis_name(1:3), axis(1:im,1:jmh,0:
kmax), start=start(:,3) )
1370 do j = 1, min(jmh,
ja-jmsh)
1371 do i = 1, min(imh,
ia-imsh)
1377 if ( jmh ==
ja-jmsh+1 )
then 1379 do i = 1, min(imh,
ia-imsh)
1384 if ( imh ==
ia-imsh+1 )
then 1386 do j = 1, min(jmh,
ja-jmsh)
1391 if ( imh ==
ia-imsh+1 .AND. jm ==
ja-jmsh+1 )
then 1396 axis_name(1:3) = (/
'xh',
'yh',
'zh'/)
1397 call file_history_set_associatedcoordinate(
'height_uvw',
'height above ground level (half level uvw)',
'm', &
1398 axis_name(1:3), axis(1:imh,1:jmh,0:
kmax), start=start(:,4) )
1401 axis_name(1:2) = (/
'x ',
'y '/)
1402 call file_history_set_associatedcoordinate(
'lon',
'longitude',
'degrees_east', &
1403 axis_name(1:2), axis(1:im,1:jm,1), start=start(:,1) )
1406 axis_name(1:2) = (/
'xh',
'y '/)
1407 call file_history_set_associatedcoordinate(
'lon_uy',
'longitude (half level uy)',
'degrees_east', &
1408 axis_name(1:2), axis(1:imh,1:jm,1), start=start(:,2) )
1411 axis_name(1:2) = (/
'x ',
'yh'/)
1412 call file_history_set_associatedcoordinate(
'lon_xv',
'longitude (half level xv)',
'degrees_east', &
1413 axis_name(1:2), axis(1:im,1:jmh,1), start=start(:,3) )
1416 axis_name(1:2) = (/
'xh',
'yh'/)
1417 call file_history_set_associatedcoordinate(
'lon_uv',
'longitude (half level uv)',
'degrees_east', &
1418 axis_name(1:2), axis(1:imh,1:jmh,1), start=start(:,4) )
1421 axis_name(1:2) = (/
'x ',
'y '/)
1422 call file_history_set_associatedcoordinate(
'lat',
'latitude',
'degrees_north', &
1423 axis_name(1:2), axis(1:im,1:jm,1), start=start(:,1) )
1426 axis_name(1:2) = (/
'xh',
'y '/)
1427 call file_history_set_associatedcoordinate(
'lat_uy',
'latitude (half level uy)',
'degrees_north', &
1428 axis_name(1:2), axis(1:imh,1:jm,1), start=start(:,2) )
1431 axis_name(1:2) = (/
'x ',
'yh'/)
1432 call file_history_set_associatedcoordinate(
'lat_xv',
'latitude (half level xv)',
'degrees_north', &
1433 axis_name(1:2), axis(1:im,1:jmh,1), start=start(:,3) )
1436 axis_name(1:2) = (/
'xh',
'yh'/)
1437 call file_history_set_associatedcoordinate(
'lat_uv',
'latitude (half level uv)',
'degrees_north', &
1438 axis_name(1:2), axis(1:imh,1:jmh,1), start=start(:,4) )
1440 axis_name(1:2) = (/
'x ',
'y '/)
1441 call file_history_set_associatedcoordinate(
'topo',
'topography',
'm', axis_name(1:2), &
1442 topo_zsfc(ims:ime,jms:jme), start=start(:,1) )
1444 axis_name(1:2) = (/
'x ',
'y '/)
1445 call file_history_set_associatedcoordinate(
'lsmask',
'fraction for land-sea mask',
'1', axis_name(1:2), &
1448 axis_name(1:2) = (/
'x ',
'y '/)
1449 call file_history_set_associatedcoordinate(
'cell_area',
'area of grid cell',
'm2', axis_name(1:2), &
1450 area(ims:ime,jms:jme), start=start(:,1) )
1451 axis_name(1:2) = (/
'xh',
'y '/)
1452 call file_history_set_associatedcoordinate(
'cell_area_uy',
'area of grid cell (half level uy)',
'm2', axis_name(1:2), &
1453 areauy(imsh:ime,jms:jme), start=start(:,2) )
1454 axis_name(1:2) = (/
'x ',
'yh'/)
1455 call file_history_set_associatedcoordinate(
'cell_area_xv',
'area of grid cell (half level xv)',
'm2', axis_name(1:2), &
1456 areaxv(ims:ime,jmsh:jme), start=start(:,3) )
1461 axis(i,j,k) = areazuy_x(
ks+k-1,imsh+i-1,jms+j-1)
1465 axis_name = (/
'xh',
'y ',
'z '/)
1466 call file_history_set_associatedcoordinate(
'cell_area_uyz_x',
'area of grid cell face (half level uyz, normal x)',
'm2', &
1467 axis_name(1:3), axis(1:imh,1:jm,1:
kmax), start=start(:,2) )
1471 axis(i,j,k) = areazxv_y(
ks+k-1,ims+i-1,jmsh+j-1)
1475 axis_name = (/
'x ',
'yh',
'z '/)
1476 call file_history_set_associatedcoordinate(
'cell_area_xvz_y',
'area of grid cell face (half level xvz, normal y)',
'm2', &
1477 axis_name(1:3), axis(1:im,1:jmh,1:
kmax), start=start(:,3) )
1481 axis(i,j,k) = areawuy_x(
ks+k-1,imsh+i-1,jmsh+j-1)
1485 axis_name = (/
'xh',
'y ',
'zh'/)
1486 call file_history_set_associatedcoordinate(
'cell_area_uyw_x',
'area of grid cell face (half level uyw, normal x)',
'm2', &
1487 axis_name(1:3), axis(1:imh,1:jmh,0:
kmax), start=start(:,2) )
1491 axis(i,j,k) = areawxv_y(
ks+k-1,ims+i-1,jmsh+j-1)
1495 axis_name = (/
'x ',
'yh',
'zh'/)
1496 call file_history_set_associatedcoordinate(
'cell_area_xvw_y',
'area of grid cell face (half level xvw, normal y)',
'm2', &
1497 axis_name(1:3), axis(1:im,1:jmh,0:
kmax), start=start(:,3) )
1501 axis(i,j,k) = areazxy_x(
ks+k-1,ims+i-1,jms+j-1)
1505 axis_name = (/
'x ',
'y ',
'z '/)
1506 call file_history_set_associatedcoordinate(
'cell_area_xyz_x',
'area of grid cell face (half level xyz, normal x)',
'm2', &
1507 axis_name(1:3), axis(1:im,1:jm,1:
kmax), start=start(:,1) )
1511 axis(i,j,k) = areazuv_y(
ks+k-1,imsh+i-1,jmsh+j-1)
1515 axis_name = (/
'xh',
'yh',
'z '/)
1516 call file_history_set_associatedcoordinate(
'cell_area_uvz_y',
'area of grid cell face (half level uvz, normal y)',
'm2', &
1517 axis_name(1:3), axis(1:imh,1:jmh,1:
kmax), start=start(:,4) )
1521 axis(i,j,k) = areazuv_x(
ks+k-1,imsh+i-1,jmsh+j-1)
1525 axis_name = (/
'xh',
'yh',
'z '/)
1526 call file_history_set_associatedcoordinate(
'cell_area_uvz_x',
'area of grid cell face (half level uvz, normal x)',
'm2', &
1527 axis_name(1:3), axis(1:imh,1:jmh,1:
kmax), start=start(:,4) )
1531 axis(i,j,k) = areazxy_y(
ks+k-1,ims+i-1,jms+j-1)
1535 axis_name = (/
'x ',
'y ',
'z '/)
1536 call file_history_set_associatedcoordinate(
'cell_area_xyz_y',
'area of grid cell face (half level xyz, normal y)',
'm2', &
1537 axis_name(1:3), axis(1:im,1:jm,1:
kmax), start=start(:,1) )
1542 axis(i,j,k) = vol(
ks+k-1,ims+i-1,jms+j-1)
1546 axis_name = (/
'x ',
'y ',
'z '/)
1547 call file_history_set_associatedcoordinate(
'cell_volume',
'volume of grid cell',
'm3', &
1548 axis_name(1:3), axis(1:im,1:jm,1:
kmax), start=start(:,1) )
1552 axis(i,j,k) = volwxy(
ks+k-1,ims+i-1,jms+j-1)
1556 axis_name = (/
'x ',
'y ',
'zh'/)
1557 call file_history_set_associatedcoordinate(
'cell_volume_xyw',
'volume of grid cell (half level xyw)',
'm3', &
1558 axis_name(1:3), axis(1:im,1:jm,0:
kmax), start=start(:,1) )
1562 axis(i,j,k) = volzuy(
ks+k-1,imsh+i-1,jms+j-1)
1566 axis_name = (/
'xh',
'y ',
'z '/)
1567 call file_history_set_associatedcoordinate(
'cell_volume_uyz',
'volume of grid cell (half level uyz)',
'm3', &
1568 axis_name(1:3), axis(1:imh,1:jm,1:
kmax), start=start(:,2) )
1572 axis(i,j,k) = volzxv(
ks+k-1,ims+i-1,jmsh+j-1)
1576 axis_name = (/
'x ',
'yh',
'z '/)
1577 call file_history_set_associatedcoordinate(
'cell_volume_xvz',
'volume of grid cell (half level xvz)',
'm3', &
1578 axis_name(1:3), axis(1:im,1:jmh,1:
kmax), start=start(:,3) )
1580 if (
okmax > 0 )
then 1584 axiso(i,j,k) = volo(
oks+k-1,ims+i-1,jms+j-1)
1588 axis_name = (/
'x ',
'y ',
'oz'/)
1589 call file_history_set_associatedcoordinate(
'cell_volume_xyo',
'volume of grid cell',
'm3', &
1590 axis_name(1:3), axiso(:,:,:), start=start(:,1) )
1593 if (
lkmax > 0 )
then 1597 axisl(i,j,k) = voll(
lks+k-1,ims+i-1,jms+j-1)
1601 axis_name = (/
'x ',
'y ',
'lz'/)
1602 call file_history_set_associatedcoordinate(
'cell_volume_xyl',
'volume of grid cell',
'm3', &
1603 axis_name(1:3), axisl(:,:,:), start=start(:,1) )
1606 if (
ukmax > 0 )
then 1610 axisu(i,j,k) = volu(
uks+k-1,ims+i-1,jms+j-1)
1614 axis_name = (/
'x ',
'y ',
'uz'/)
1615 call file_history_set_associatedcoordinate(
'cell_volume_xyu',
'volume of grid cell',
'm3', &
1616 axis_name(1:3), axisu(:,:,:), start=start(:,1) )
1620 end subroutine file_history_cartesc_set_axes
1623 subroutine file_history_cartesc_set_axes_attributes
1630 file_history_set_attribute
1654 character(len=34) :: tunits
1655 character(len=H_SHORT) :: calendar
1661 call file_history_set_attribute(
"global",
"Conventions",
"CF-1.6" )
1666 call file_history_set_attribute(
"global",
"scale_cartesC_prc_rank_x", (/0/) )
1667 call file_history_set_attribute(
"global",
"scale_cartesC_prc_rank_y", (/0/) )
1669 call file_history_set_attribute(
"global",
"scale_cartesC_prc_num_x", (/1/) )
1670 call file_history_set_attribute(
"global",
"scale_cartesC_prc_num_y", (/1/) )
1672 call file_history_set_attribute(
"global",
"scale_cartesC_prc_rank_x", (/
prc_2drank(
prc_myrank,1)/) )
1673 call file_history_set_attribute(
"global",
"scale_cartesC_prc_rank_y", (/
prc_2drank(
prc_myrank,2)/) )
1675 call file_history_set_attribute(
"global",
"scale_cartesC_prc_num_x", (/
prc_num_x/) )
1676 call file_history_set_attribute(
"global",
"scale_cartesC_prc_num_y", (/
prc_num_y/) )
1679 call file_history_set_attribute(
"global",
"scale_cartesC_prc_periodic_z", .false. )
1680 call file_history_set_attribute(
"global",
"scale_cartesC_prc_periodic_x",
prc_periodic_x )
1681 call file_history_set_attribute(
"global",
"scale_cartesC_prc_periodic_y",
prc_periodic_y )
1683 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_imaxg", (/
imaxg/) )
1684 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_jmaxg", (/
jmaxg/) )
1686 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_kmax", (/
kmax/) )
1687 if (
okmax > 0 )
call file_history_set_attribute(
"global",
"scale_ocean_grid_cartesC_index_kmax", (/
okmax/) )
1688 if (
lkmax > 0 )
call file_history_set_attribute(
"global",
"scale_land_grid_cartesC_index_kmax", (/
lkmax/) )
1689 if (
ukmax > 0 )
call file_history_set_attribute(
"global",
"scale_urban_grid_cartesC_index_kmax", (/
ukmax/) )
1691 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_khalo", (/
khalo/) )
1692 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_ihalo", (/
ihalo/) )
1693 call file_history_set_attribute(
"global",
"scale_atmos_grid_cartesC_index_jhalo", (/
jhalo/) )
1696 if ( calendar /=
"" )
call file_history_set_attribute(
"global",
"calendar", calendar )
1698 call file_history_set_attribute(
"global",
"time_units", tunits )
1699 call file_history_set_attribute(
"global",
"time_start", (/file_history_cartesc_startms/) )
1702 ainfo(1)%periodic = .true.
1703 ainfo(2)%periodic = .true.
1705 ainfo(1)%periodic = .false.
1706 ainfo(2)%periodic = .false.
1710 ainfo(3)%periodic = .true.
1711 ainfo(4)%periodic = .true.
1713 ainfo(3)%periodic = .false.
1714 ainfo(4)%periodic = .false.
1718 if (
prc_periodic_x .OR. .NOT. file_history_cartesc_boundary )
then 1721 ainfo(1)%halo_global (1) = 0
1722 ainfo(1)%halo_global (2) = 0
1723 ainfo(1)%halo_local (1) = 0
1724 ainfo(1)%halo_local (2) = 0
1726 ainfo(1)%size_global (1) =
iag 1727 ainfo(1)%start_global(1) =
isga 1728 ainfo(1)%halo_global (1) =
ihalo 1729 ainfo(1)%halo_global (2) =
ihalo 1730 ainfo(1)%halo_local (1) =
ihalo 1731 ainfo(1)%halo_local (2) =
ihalo 1733 if(
prc_has_w ) ainfo(1)%halo_local(1) = 0
1734 if(
prc_has_e ) ainfo(1)%halo_local(2) = 0
1740 if ( .NOT.
prc_periodic_x .AND. .NOT. file_history_cartesc_boundary )
then 1741 ainfo(2)%size_global (1) = ainfo(2)%size_global (1) + 1
1742 ainfo(2)%halo_global (1) = ainfo(2)%halo_global (1) + 1
1744 ainfo(2)%start_global(1) = ainfo(2)%start_global(1) + 1
1746 ainfo(2)%halo_local (1) = ainfo(2)%halo_local (1) + 1
1751 if (
prc_periodic_y .OR. .NOT. file_history_cartesc_boundary )
then 1754 ainfo(3)%halo_global (1) = 0
1755 ainfo(3)%halo_global (2) = 0
1756 ainfo(3)%halo_local (1) = 0
1757 ainfo(3)%halo_local (2) = 0
1759 ainfo(3)%size_global (1) =
jag 1760 ainfo(3)%start_global(1) =
jsga 1761 ainfo(3)%halo_global (1) =
jhalo 1762 ainfo(3)%halo_global (2) =
jhalo 1763 ainfo(3)%halo_local (1) =
jhalo 1764 ainfo(3)%halo_local (2) =
jhalo 1766 if(
prc_has_s ) ainfo(3)%halo_local(1) = 0
1767 if(
prc_has_n ) ainfo(3)%halo_local(2) = 0
1773 if ( .NOT.
prc_periodic_y .AND. .NOT. file_history_cartesc_boundary )
then 1774 ainfo(4)%size_global (1) = ainfo(4)%size_global (1) + 1
1775 ainfo(4)%halo_global (1) = ainfo(4)%halo_global (1) + 1
1777 ainfo(4)%start_global(1) = ainfo(4)%start_global(1) + 1
1779 ainfo(4)%halo_local (1) = ainfo(4)%halo_local (1) + 1
1784 ainfo(1)%start_global(1) = 1
1785 ainfo(2)%start_global(1) = 1
1786 ainfo(3)%start_global(1) = 1
1787 ainfo(4)%start_global(1) = 1
1790 call file_history_set_attribute(
"x" ,
"size_global" , ainfo(1)%size_global (:) )
1791 call file_history_set_attribute(
"x" ,
"start_global", ainfo(1)%start_global(:) )
1792 call file_history_set_attribute(
"x" ,
"halo_global" , ainfo(1)%halo_global (:) )
1793 call file_history_set_attribute(
"x" ,
"halo_local" , ainfo(1)%halo_local (:) )
1794 call file_history_set_attribute(
"x" ,
"periodic" , ainfo(1)%periodic )
1796 call file_history_set_attribute(
"xh",
"size_global" , ainfo(2)%size_global (:) )
1797 call file_history_set_attribute(
"xh",
"start_global", ainfo(2)%start_global(:) )
1798 call file_history_set_attribute(
"xh",
"halo_global" , ainfo(2)%halo_global (:) )
1799 call file_history_set_attribute(
"xh",
"halo_local" , ainfo(2)%halo_local (:) )
1800 call file_history_set_attribute(
"xh",
"periodic" , ainfo(2)%periodic )
1802 call file_history_set_attribute(
"y" ,
"size_global" , ainfo(3)%size_global (:) )
1803 call file_history_set_attribute(
"y" ,
"start_global", ainfo(3)%start_global(:) )
1804 call file_history_set_attribute(
"y" ,
"halo_global" , ainfo(3)%halo_global (:) )
1805 call file_history_set_attribute(
"y" ,
"halo_local" , ainfo(3)%halo_local (:) )
1806 call file_history_set_attribute(
"y" ,
"periodic" , ainfo(3)%periodic )
1808 call file_history_set_attribute(
"yh",
"size_global" , ainfo(4)%size_global (:) )
1809 call file_history_set_attribute(
"yh",
"start_global", ainfo(4)%start_global(:) )
1810 call file_history_set_attribute(
"yh",
"halo_global" , ainfo(4)%halo_global (:) )
1811 call file_history_set_attribute(
"yh",
"halo_local" , ainfo(4)%halo_local (:) )
1812 call file_history_set_attribute(
"yh",
"periodic" , ainfo(4)%periodic )
1816 minfo%false_easting (1), &
1817 minfo%false_northing (1), &
1818 minfo%longitude_of_central_meridian (1), &
1819 minfo%longitude_of_projection_origin (1), &
1820 minfo%latitude_of_projection_origin (1), &
1821 minfo%straight_vertical_longitude_from_pole(1), &
1822 minfo%standard_parallel (:) )
1824 if ( minfo%mapping_name /=
"" )
then 1825 call file_history_set_attribute(
"x" ,
"standard_name",
"projection_x_coordinate" )
1826 call file_history_set_attribute(
"xh",
"standard_name",
"projection_x_coordinate" )
1827 call file_history_set_attribute(
"y" ,
"standard_name",
"projection_y_coordinate" )
1828 call file_history_set_attribute(
"yh",
"standard_name",
"projection_y_coordinate" )
1830 call file_history_set_attribute( minfo%mapping_name,
"grid_mapping_name", minfo%mapping_name, add_variable=.true. )
1832 if ( minfo%false_easting(1) /= undef )
then 1833 call file_history_set_attribute( minfo%mapping_name, &
1835 minfo%false_easting(:) )
1838 if ( minfo%false_northing(1) /= undef )
then 1839 call file_history_set_attribute( minfo%mapping_name, &
1841 minfo%false_northing(:) )
1844 if ( minfo%longitude_of_central_meridian(1) /= undef )
then 1845 call file_history_set_attribute( minfo%mapping_name, &
1846 "longitude_of_central_meridian", &
1847 minfo%longitude_of_central_meridian(:) )
1850 if ( minfo%longitude_of_projection_origin(1) /= undef )
then 1851 call file_history_set_attribute( minfo%mapping_name, &
1852 "longitude_of_projection_origin", &
1853 minfo%longitude_of_projection_origin(:) )
1856 if ( minfo%latitude_of_projection_origin(1) /= undef )
then 1857 call file_history_set_attribute( minfo%mapping_name, &
1858 "latitude_of_projection_origin", &
1859 minfo%latitude_of_projection_origin(:) )
1862 if ( minfo%straight_vertical_longitude_from_pole(1) /= undef )
then 1863 call file_history_set_attribute( minfo%mapping_name, &
1864 "straight_vertical_longitude_from_pole", &
1865 minfo%straight_vertical_longitude_from_pole(:) )
1868 if ( minfo%standard_parallel(1) /= undef )
then 1869 if ( minfo%standard_parallel(2) /= undef )
then 1870 call file_history_set_attribute( minfo%mapping_name, &
1871 "standard_parallel", &
1872 minfo%standard_parallel(1:2) )
1874 call file_history_set_attribute( minfo%mapping_name, &
1875 "standard_parallel", &
1876 minfo%standard_parallel(1:1) )
1882 call file_history_set_attribute(
"cell_area",
"standard_name",
"area" )
1883 call file_history_set_attribute(
"cell_area_uy",
"standard_name",
"area" )
1884 call file_history_set_attribute(
"cell_area_xv",
"standard_name",
"area" )
1886 call file_history_set_attribute(
"cell_area_uyz_x",
"standard_name",
"area" )
1887 call file_history_set_attribute(
"cell_area_xvz_y",
"standard_name",
"area" )
1888 call file_history_set_attribute(
"cell_area_uyw_x",
"standard_name",
"area" )
1889 call file_history_set_attribute(
"cell_area_xvw_y",
"standard_name",
"area" )
1890 call file_history_set_attribute(
"cell_area_xyz_x",
"standard_name",
"area" )
1891 call file_history_set_attribute(
"cell_area_uvz_y",
"standard_name",
"area" )
1892 call file_history_set_attribute(
"cell_area_uvz_x",
"standard_name",
"area" )
1893 call file_history_set_attribute(
"cell_area_xyz_y",
"standard_name",
"area" )
1895 call file_history_set_attribute(
"cell_volume",
"standard_name",
"volume" )
1896 call file_history_set_attribute(
"cell_volume_xyw",
"standard_name",
"volume" )
1897 call file_history_set_attribute(
"cell_volume_uyz",
"standard_name",
"volume" )
1898 call file_history_set_attribute(
"cell_volume_xvz",
"standard_name",
"volume" )
1900 if (
okmax > 0 )
then 1901 call file_history_set_attribute(
"cell_volume_xyo",
"standard_name",
"volume" )
1903 if (
lkmax > 0 )
then 1904 call file_history_set_attribute(
"cell_volume_xyl",
"standard_name",
"volume" )
1906 if (
ukmax > 0 )
then 1907 call file_history_set_attribute(
"cell_volume_xyu",
"standard_name",
"volume" )
1911 call file_history_set_attribute(
"grid",
"cf_role",
"grid_topology", add_variable=.true. )
1912 call file_history_set_attribute(
"grid",
"topology_dimension", (/ 2 /) )
1913 call file_history_set_attribute(
"grid",
"node_dimensions",
"xh yh" )
1914 call file_history_set_attribute(
"grid",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1915 call file_history_set_attribute(
"grid",
"node_coordinates",
"lon_uv lat_uv" )
1916 call file_history_set_attribute(
"grid",
"face_coordinates",
"lon lat" )
1917 call file_history_set_attribute(
"grid",
"edge1_coordinates",
"lon_uy lat_uy" )
1918 call file_history_set_attribute(
"grid",
"edge2_coordinates",
"lon_xv lat_xv" )
1919 call file_history_set_attribute(
"grid",
"vertical_dimensions",
"z: zh (padding: none)" )
1921 call file_history_set_attribute(
"grid_ocean",
"cf_role",
"grid_topology", add_variable=.true. )
1922 call file_history_set_attribute(
"grid_ocean",
"topology_dimension", (/ 2 /) )
1923 call file_history_set_attribute(
"grid_ocean",
"node_dimensions",
"xh yh" )
1924 call file_history_set_attribute(
"grid_ocean",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1925 call file_history_set_attribute(
"grid_ocean",
"node_coordinates",
"lon_uv lat_uv" )
1926 call file_history_set_attribute(
"grid_ocean",
"face_coordinates",
"lon lat" )
1927 call file_history_set_attribute(
"grid_ocean",
"edge1_coordinates",
"lon_uy lat_uy" )
1928 call file_history_set_attribute(
"grid_ocean",
"edge2_coordinates",
"lon_xv lat_xv" )
1929 call file_history_set_attribute(
"grid_ocean",
"vertical_dimensions",
"oz: ozh (padding: none)" )
1931 call file_history_set_attribute(
"grid_land",
"cf_role",
"grid_topology", add_variable=.true. )
1932 call file_history_set_attribute(
"grid_land",
"topology_dimension", (/ 2 /) )
1933 call file_history_set_attribute(
"grid_land",
"node_dimensions",
"xh yh" )
1934 call file_history_set_attribute(
"grid_land",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1935 call file_history_set_attribute(
"grid_land",
"node_coordinates",
"lon_uv lat_uv" )
1936 call file_history_set_attribute(
"grid_land",
"face_coordinates",
"lon lat" )
1937 call file_history_set_attribute(
"grid_land",
"edge1_coordinates",
"lon_uy lat_uy" )
1938 call file_history_set_attribute(
"grid_land",
"edge2_coordinates",
"lon_xv lat_xv" )
1939 call file_history_set_attribute(
"grid_land",
"vertical_dimensions",
"lz: lzh (padding: none)" )
1941 call file_history_set_attribute(
"grid_urban",
"cf_role",
"grid_topology", add_variable=.true. )
1942 call file_history_set_attribute(
"grid_urban",
"topology_dimension", (/ 2 /) )
1943 call file_history_set_attribute(
"grid_urban",
"node_dimensions",
"xh yh" )
1944 call file_history_set_attribute(
"grid_urban",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1945 call file_history_set_attribute(
"grid_urban",
"node_coordinates",
"lon_uv lat_uv" )
1946 call file_history_set_attribute(
"grid_urban",
"face_coordinates",
"lon lat" )
1947 call file_history_set_attribute(
"grid_urban",
"edge1_coordinates",
"lon_uy lat_uy" )
1948 call file_history_set_attribute(
"grid_urban",
"edge2_coordinates",
"lon_xv lat_xv" )
1949 call file_history_set_attribute(
"grid_urban",
"vertical_dimensions",
"uz: uzh (padding: none)" )
1951 call file_history_set_attribute(
"grid_pressure",
"cf_role",
"grid_topology", add_variable=.true. )
1952 call file_history_set_attribute(
"grid_pressure",
"topology_dimension", (/ 2 /) )
1953 call file_history_set_attribute(
"grid_pressure",
"node_dimensions",
"xh yh" )
1954 call file_history_set_attribute(
"grid_pressure",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1955 call file_history_set_attribute(
"grid_pressure",
"node_coordinates",
"lon_uv lat_uv" )
1956 call file_history_set_attribute(
"grid_pressure",
"face_coordinates",
"lon lat" )
1957 call file_history_set_attribute(
"grid_pressure",
"edge1_coordinates",
"lon_uy lat_uy" )
1958 call file_history_set_attribute(
"grid_pressure",
"edge2_coordinates",
"lon_xv lat_xv" )
1959 call file_history_set_attribute(
"grid_pressure",
"vertical_dimensions",
"pressure" )
1961 call file_history_set_attribute(
"grid_z",
"cf_role",
"grid_topology", add_variable=.true. )
1962 call file_history_set_attribute(
"grid_z",
"topology_dimension", (/ 2 /) )
1963 call file_history_set_attribute(
"grid_z",
"node_dimensions",
"xh yh" )
1964 call file_history_set_attribute(
"grid_z",
"face_dimensions",
"x: xh (padding: none) y: yh (padding: none)" )
1965 call file_history_set_attribute(
"grid_z",
"node_coordinates",
"lon_uv lat_uv" )
1966 call file_history_set_attribute(
"grid_z",
"face_coordinates",
"lon lat" )
1967 call file_history_set_attribute(
"grid_z",
"edge1_coordinates",
"lon_uy lat_uy" )
1968 call file_history_set_attribute(
"grid_z",
"edge2_coordinates",
"lon_xv lat_xv" )
1969 call file_history_set_attribute(
"grid_z",
"vertical_dimensions",
"height_xyw: height (padding: none)" )
1971 call file_history_set_attribute(
"grid_model",
"cf_role",
"grid_topology", add_variable=.true. )
1972 call file_history_set_attribute(
"grid_model",
"topology_dimension", (/ 2 /) )
1973 call file_history_set_attribute(
"grid_model",
"node_dimensions",
"FX FY" )
1974 call file_history_set_attribute(
"grid_model",
"face_dimensions",
"CX: FY (padding: none) CY: FY (padding: none)" )
1975 call file_history_set_attribute(
"grid_model",
"vertical_dimensions",
"CZ: FZ (padding: none)" )
1977 call file_history_set_attribute(
"grid_model_global",
"cf_role",
"grid_topology", add_variable=.true. )
1978 call file_history_set_attribute(
"grid_model_global",
"topology_dimension", (/ 2 /) )
1979 call file_history_set_attribute(
"grid_model_global",
"node_dimensions",
"FXG FYG" )
1980 call file_history_set_attribute(
"grid_model_global",
"face_dimensions",
"CXG: FYG (padding: none) CYG: FYG (padding: none)" )
1981 call file_history_set_attribute(
"grid_model_global",
"vertical_dimensions",
"CZ: FZ (padding: none)" )
1984 end subroutine file_history_cartesc_set_axes_attributes
subroutine, public mapprojection_get_attributes(mapping, false_easting, false_northing, longitude_of_central_meridian, longitude_of_projection_origin, latitude_of_projection_origin, straight_vertical_longitude_from_pole, standard_parallel)
Get mapping attributes.
integer, public iagb
of computational grids
integer, public time_nowstep
current step [number]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdy
y-length of control volume [m]
subroutine, public interp_vert_xi2p(Kpres, KA, IA, IS, IE, JA, JS, JE, var, var_P)
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawuy_x
virtical area (wuy, normal x) [m2]
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cz
center coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cxg
center coordinate [m]: x, global
integer, public jmax
of computational cells: y, local
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cdz
z-length of control volume [m]
real(rp), dimension(:), allocatable, public urban_grid_cartesc_fz
face coordinate [m]: z, local=global
subroutine, public file_history_setup(title, source, institution, time_start, time_interval, time_units, time_since, calendar, default_basename, default_postfix_timelabel, default_zcoord, default_tinterval, default_tunit, default_taverage, default_datatype, myrank)
Setup.
real(rp), dimension(:), allocatable, public land_grid_cartesc_cz
center coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdx
x-length of control volume [m]
integer, parameter, public khalo
of halo cells: z
integer, public jsgb
start point of the inner domain: y, global
integer, public ihalo
of halo cells: x
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuv
longitude at staggered point (uv) [rad,0-2pi]
real(dp), public time_nowms
subsecond part of current time [millisec]
subroutine, public file_history_set_dim(name, ndims, nzcoords, dims, zcoords, start, count, mapping, area, area_x, area_y, volume, location, grid)
set dimension information
real(rp), dimension(:,:,:), allocatable, public ocean_grid_cartesc_real_vol
volume of grid cell
integer, public imax
of computational cells: x, local
integer, public jhalo
of halo cells: y
integer, public ia
of whole cells: x, local, with HALO
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cyg
center coordinate [m]: y, global
module land / grid / cartesianC / real
module land / grid / cartesianC / index
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areaxv
horizontal area ( xv, normal z) [m2]
integer, public iag
of computational grids
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_areauy
horizontal area ( uy, normal z) [m2]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cbfxg
center buffer factor (0-1): x, global
subroutine file_history_cartesc_truncate_1d(src, dim_type, zcoord, fill_halo, dst)
truncate 1D data to history buffer
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cbfz
center buffer factor (0-1): z
logical, public interp_available
topography exists & vertical interpolation has meaning?
real(dp), public time_startdaysec
second of start time [sec]
module INTERPOLATION vertical
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fxg
face coordinate [m]: x, global
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areawxv_y
virtical area (wxv, normal y) [m2]
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), public const_d2r
degree to radian
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzxv
control volume (zxv) [m3]
subroutine, public interp_vert_xi2z(KA, KS, KE, IA, IS, IE, JA, JS, JE, Xi, Z, var, var_Z)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdz
z-length of grid(i+1) to grid(i) [m]
logical, public prc_has_s
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fz
face coordinate [m]: z, local
integer, public je_ing
end point of the inner domain: cy, global
integer, public jsga
start point of the full domain: cy, global
integer, public isgb
start point of the inner domain: x, global
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuy_x
virtical area (zuy, normal x) [m2]
subroutine, public file_history_cartesc_set_pres(PRES, PRESH, SFC_PRES)
set hydrostatic pressure for pressure coordinate
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fbfyg
face buffer factor (0-1): y, global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdy
y-length of grid(j+1) to grid(j) [m]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
logical, public prc_has_n
logical, public prc_has_e
logical, public prc_periodic_y
periodic condition or not (Y)?
module urban / grid / icosahedralA / index
subroutine, public file_history_set_axis(name, desc, units, dim, var, bounds, down, gsize, start)
set axis information
integer, public jmaxg
of computational cells: y, global
real(rp), public const_undef
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cy
center coordinate [m]: y, local
logical, public prc_periodic_x
periodic condition or not (X)?
integer, public is
start point of inner domain: x, local
real(rp), dimension(:,:,:), allocatable, public urban_grid_cartesc_real_vol
volume of grid cell
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdyg
center coordinate [m]: y, global
integer, public ie
end point of inner domain: x, local
integer, public js_ing
start point of the inner domain: cy, global
real(rp), dimension(:), allocatable, public land_grid_cartesc_fz
face coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fbfxg
face buffer factor (0-1): x, global
subroutine, public calendar_get_name(name)
real(dp), public time_dtsec
time interval of model [sec]
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuy
latitude at staggered point (uy) [rad,-pi,pi]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdx
x-length of grid(i+1) to grid(i) [m]
module atmosphere / grid / cartesC index
integer, public ke
end point of inner domain: z, local
module ocean / grid / cartesianC / real
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volwxy
control volume (wxy) [m3]
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cdz
z-length of control volume [m]
integer, public ie_ing
end point of the inner domain: cx, global
character(len=h_mid), public h_source
for file header
integer, public je
end point of inner domain: y, local
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdz
z-length of control volume [m]
integer, parameter, public file_hshort
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cx
center coordinate [m]: x, local
character(len=h_mid), public h_institute
for file header
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fdxg
center coordinate [m]: x, global
module atmosphere / grid / cartesC
integer, parameter, public prc_masterrank
master process in each communicator
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonxv
longitude at staggered point (xv) [rad,0-2pi]
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lonuy
longitude at staggered point (uy) [rad,0-2pi]
subroutine, public interp_vert_alloc_pres(Kpres, IA, JA)
Setup.
module urban / grid / cartesianC
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cbfx
center buffer factor (0-1): x
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_cz
center coordinate [m]: z, local=global
integer, public prc_myrank
process num in local communicator
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdyg
center coordinate [m]: y, global
integer, dimension(:,:), allocatable, public prc_2drank
node index in 2D topology
logical, public file_history_aggregate
integer, public kmax
of computational cells: z, local
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_y
virtical area (zxy, normal y) [m2]
subroutine, public interp_vert_xih2zh(KA, KS, KE, IA, IS, IE, JA, JS, JE, Xih, Zh, var, var_Z)
subroutine, public interp_vert_setcoef_pres(Kpres, KA, KS, KE, IA, IS, IE, JA, JS, JE, PRES, PRESh, SFC_PRES, Paxis)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cdxg
center coordinate [m]: x, global
subroutine, public prc_abort
Abort Process.
subroutine file_history_cartesc_truncate_3d(src, dim_type, zcoord, fill_halo, dst)
truncate 3D data to history buffer
integer, public jag
of computational grids
procedure(truncate_2d), pointer, public file_history_truncate_2d
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fy
face coordinate [m]: y, local
real(dp), parameter, public file_rmiss
integer, public js
start point of inner domain: y, local
subroutine, public file_history_cartesc_setup
Setup.
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fbfx
face buffer factor (0-1): x
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cbfy
center buffer factor (0-1): y
integer, public is_ing
start point of the inner domain: cx, global
integer, public prc_num_y
y length of 2D processor topology
module land / grid / cartesianC
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
integer, public jagb
of computational grids
module ocean / grid / cartesianC / index
integer, public imaxg
of computational cells: x, global
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxy_x
virtical area (zxy, normal x) [m2]
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cbfyg
center buffer factor (0-1): y, global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fbfz
face buffer factor (0-1): z
character(len=7), parameter, public atmos_grid_cartesc_name
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fbfy
face buffer factor (0-1): y
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
subroutine, public interp_vert_xih2p(Kpres, KA, IA, IS, IE, JA, JS, JE, var, var_P)
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
real(rp), dimension(:), allocatable, public ocean_grid_cartesc_fz
face coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fx
face coordinate [m]: x, local
integer, public ka
of whole cells: z, local, with HALO
module urban / grid / cartesianC / real
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fyg
face coordinate [m]: y, global
procedure(truncate_1d), pointer, public file_history_truncate_1d
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latuv
latitude at staggered point (uv) [rad,-pi,pi]
module file / history_cartesC
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_latxv
latitude at staggered point (xv) [rad,-pi,pi]
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_x
virtical area (zuv, normal x) [m2]
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazuv_y
virtical area (zuv, normal y) [m2]
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cz
center coordinate [m]: z, local
integer, public isga
start point of the full domain: cx, global
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_volzuy
control volume (zuy) [m3]
real(rp), dimension(:,:), allocatable, public landuse_frac_land
land fraction
real(rp), dimension(:,:,:), allocatable, public land_grid_cartesc_real_vol
volume of grid cell
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_areazxv_y
virtical area (zxv, normal y) [m2]
module ocean / grid / cartesianC
procedure(truncate_3d), pointer, public file_history_truncate_3d
logical, public prc_has_w
subroutine, public file_history_set_nowdate(NOWDATE, NOWMS, NOWSTEP)
set now step
subroutine, public file_get_cftunits(date, tunits)
get unit of time
integer, public prc_num_x
x length of 2D processor topology
real(rp), dimension(:), allocatable, public land_grid_cartesc_cdz
z-length of control volume [m]