56 integer,
parameter :: mdlid =
iwrfarw 58 real(RP),
parameter :: t0 = 300.0_rp
59 real(RP),
parameter :: p0 = 1000.0e+2_rp
60 real(RP),
parameter :: Rd = 287.04_rp
61 real(RP),
parameter :: Cp = 7.0_rp * rd / 2.0_rp
62 real(RP),
parameter :: RCP = rd / cp
64 integer,
parameter :: cosin = 1
65 integer,
parameter :: sine = 2
67 real(SP),
allocatable :: read_xy (:,:,:)
68 real(SP),
allocatable :: read_uy (:,:,:)
69 real(SP),
allocatable :: read_xv (:,:,:)
70 real(SP),
allocatable :: read_zxy(:,:,:,:)
71 real(SP),
allocatable :: read_wxy(:,:,:,:)
72 real(SP),
allocatable :: read_zuy(:,:,:,:)
73 real(SP),
allocatable :: read_zxv(:,:,:,:)
74 real(SP),
allocatable :: read_lzxy(:,:,:,:)
75 real(SP),
allocatable :: read_lz(:,:)
77 real(RP),
allocatable :: p_org (:,:,:)
78 real(RP),
allocatable :: pb_org (:,:,:)
79 real(RP),
allocatable :: ph_org (:,:,:)
80 real(RP),
allocatable :: phb_org (:,:,:)
82 logical,
private :: wrfout = .false.
97 integer,
intent(out) :: dims(6)
98 integer,
intent(out) :: timelen
99 character(len=*),
intent(in) :: basename_org
101 logical :: wrf_file_type = .false.
103 namelist / param_mkinit_real_wrfarw / &
106 integer :: dims_wrf(7)
110 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Atom Input File Type: WRF-ARW' 114 read(
io_fid_conf,nml=param_mkinit_real_wrfarw,iostat=ierr)
116 write(*,*)
'xxx Not appropriate names in namelist PARAM_MKINIT_REAL_WRFARW. Check!' 122 dims(1:6) = dims_wrf(1:6)
124 if ( wrf_file_type )
then 126 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF History Output' 129 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF Restart' 133 allocate( read_xy( dims(2),dims(3),1) )
134 allocate( read_uy( dims(5),dims(3),1) )
135 allocate( read_xv( dims(2),dims(6),1) )
136 allocate( read_zxy(dims(1),dims(2),dims(3),1) )
137 allocate( read_wxy(dims(4),dims(2),dims(3),1) )
138 allocate( read_zuy(dims(1),dims(5),dims(3),1) )
139 allocate( read_zxv(dims(1),dims(2),dims(6),1) )
141 allocate( p_org(dims(1),dims(2),dims(3)) )
142 allocate( pb_org(dims(1),dims(2),dims(3)) )
143 allocate( ph_org(dims(4),dims(2),dims(3)) )
144 allocate( phb_org(dims(4),dims(2),dims(3)) )
153 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[AtomOpenWRFARW]' 180 thermodyn_pott => atmos_thermodyn_pott
195 real(RP),
intent(out) :: velz_org(:,:,:)
196 real(RP),
intent(out) :: llvelx_org(:,:,:)
197 real(RP),
intent(out) :: llvely_org(:,:,:)
198 real(RP),
intent(out) :: pres_org(:,:,:)
199 real(RP),
intent(out) :: temp_org(:,:,:)
200 real(RP),
intent(out) :: qtrc_org(:,:,:,:)
201 real(RP),
intent(out) :: lon_org(:,:)
202 real(RP),
intent(out) :: lat_org(:,:)
203 real(RP),
intent(out) :: cz_org(:,:,:)
204 character(len=*),
intent(in) :: basename
205 integer,
intent(in) :: mptype_parent
206 integer,
intent(in) :: dims(6)
207 integer,
intent(in) :: it
210 real(RP) :: velx_org(dims(1)+2,dims(2),dims(3))
211 real(RP) :: vely_org(dims(1)+2,dims(2),dims(3))
212 real(RP) :: pott_org(dims(1)+2,dims(2),dims(3))
213 real(RP) :: topo_org( dims(2),dims(3))
216 real(RP) :: velzs_org(dims(4),dims(2),dims(3))
217 real(RP) :: velxs_org(dims(1),dims(5),dims(3))
218 real(RP) :: velys_org(dims(1),dims(2),dims(6))
219 real(RP) :: geof_org (dims(4),dims(2),dims(3))
224 integer :: k, i, j, iq
226 character(len=H_MID) :: varname_t
227 character(len=H_MID) :: varname_w
228 character(len=H_MID) :: varname_u
229 character(len=H_MID) :: varname_v
234 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[InputWRF]' 249 call externalfileread( read_xy(:,:,:), basename,
"XLAT", it, it, myrank, mdlid, single=.true. )
250 lat_org(:,:) =
real( read_xy(:,:,1), kind=RP ) * d2r
252 call externalfileread( read_xy(:,:,:), basename,
"XLONG", it, it, myrank, mdlid, single=.true. )
253 lon_org(:,:) =
real( read_xy(:,:,1), kind=RP ) * d2r
255 call externalfileread( read_xy(:,:,:), basename,
"HGT", it, it, myrank, mdlid, single=.true. )
256 topo_org(:,:) =
real( read_xy(:,:,1), kind=
rp )
258 call externalfileread( read_wxy(:,:,:,:), basename,
"PH", it, it, myrank, mdlid, single=.true., zstag=.true. )
259 ph_org(:,:,:) =
real( read_wxy(:,:,:,1), kind=
rp )
261 call externalfileread( read_wxy(:,:,:,:), basename,
"PHB", it, it, myrank, mdlid, single=.true., zstag=.true. )
262 phb_org(:,:,:) =
real( read_wxy(:,:,:,1), kind=
rp )
264 call externalfileread( read_zxy(:,:,:,:), basename,
"P", it, it, myrank, mdlid, single=.true. )
265 p_org(:,:,:) =
real( read_zxy(:,:,:,1), kind=
rp )
267 call externalfileread( read_zxy(:,:,:,:), basename,
"PB", it, it, myrank, mdlid, single=.true. )
268 pb_org(:,:,:) =
real( read_zxy(:,:,:,1), kind=
rp )
270 call externalfileread( read_wxy(:,:,:,:), basename, varname_w, it, it, myrank, mdlid, single=.true., zstag=.true. )
271 velzs_org(:,:,:) =
real( read_wxy(:,:,:,1), kind=
rp )
273 call externalfileread( read_zuy(:,:,:,:), basename, varname_u, it, it, myrank, mdlid, single=.true., xstag=.true. )
275 velxs_org(:,:,:) =
real( read_zuy(:,:,:,1), kind=
rp )
277 call externalfileread( read_zxv(:,:,:,:), basename, varname_v, it, it, myrank, mdlid, single=.true., ystag=.true. )
278 velys_org(:,:,:) =
real( read_zxv(:,:,:,1), kind=
rp )
284 velz_org(k+2,i,j) = ( velzs_org(k,i,j) + velzs_org(k+1,i,j) ) * 0.5_rp
285 velx_org(k+2,i,j) = ( velxs_org(k,i,j) + velxs_org(k,i+1,j) ) * 0.5_rp
286 vely_org(k+2,i,j) = ( velys_org(k,i,j) + velys_org(k,i,j+1) ) * 0.5_rp
288 velz_org(1:2,i,j) = 0.0_rp
289 velx_org(1:2,i,j) = 0.0_rp
290 vely_org(1:2,i,j) = 0.0_rp
295 velx_org, vely_org, &
298 dims(1)+2, dims(2), dims(3) )
300 qtrc_org(:,:,:,:) = 0.0_rp
301 call externalfileread( read_xy(:,:,:), basename,
"Q2", it, it, myrank, mdlid, single=.true. )
302 qtrc_org(2,:,:,
i_qv) =
real(read_xy(:,:,1),kind=
rp)
303 qtrc_org(1,:,:,
i_qv) = qtrc_org(2,:,:,
i_qv)
305 call externalfileread( read_zxy(:,:,:,:), basename,
"QVAPOR", it, it, myrank, mdlid, single=.true. )
306 qtrc_org(3:,:,:,
i_qv) =
real(read_zxy(:,:,:,1),kind=
rp)
309 if( mptype_parent > 0 )
then 310 call externalfileread( read_zxy(:,:,:,:), basename,
"QCLOUD", it, it, myrank, mdlid, single=.true. )
311 qtrc_org(3:,:,:,
i_qc) =
real( read_zxy(:,:,:,1), kind=
rp)
313 call externalfileread( read_zxy(:,:,:,:), basename,
"QRAIN", it, it, myrank, mdlid, single=.true. )
314 qtrc_org(3:,:,:,
i_qr) =
real( read_zxy(:,:,:,1), kind=
rp)
317 if( mptype_parent > 3 )
then 318 call externalfileread( read_zxy(:,:,:,:), basename,
"QICE", it, it, myrank, mdlid, single=.true. )
319 qtrc_org(3:,:,:,
i_qi) =
real( read_zxy(:,:,:,1), kind=
rp)
321 call externalfileread( read_zxy(:,:,:,:), basename,
"QSNOW", it, it, myrank, mdlid, single=.true. )
322 qtrc_org(3:,:,:,
i_qs) =
real( read_zxy(:,:,:,1), kind=
rp)
325 if( mptype_parent > 5 )
then 326 call externalfileread( read_zxy(:,:,:,:), basename,
"QGRAUP", it, it, myrank, mdlid, single=.true. )
327 qtrc_org(3:,:,:,
i_qg) =
real( read_zxy(:,:,:,1), kind=
rp)
335 do iq = 1, min( mptype_parent, 6)
336 qhyd = qhyd + qtrc_org(k,i,j,iq)
338 do iq = 1, min( mptype_parent, 6)
339 qtrc_org(k,i,j,iq) = qtrc_org(k,i,j,iq) / ( 1.0_rp + qhyd )
345 if( mptype_parent > 6 )
then 346 call externalfileread( read_zxy(:,:,:,:), basename,
"NC", it, it, myrank, mdlid, single=.true. )
347 qtrc_org(3:,:,:,
i_nc) =
real( read_zxy(:,:,:,1), kind=
rp )
349 call externalfileread( read_zxy(:,:,:,:), basename,
"NR", it, it, myrank, mdlid, single=.true. )
350 qtrc_org(3:,:,:,
i_nr) =
real( read_zxy(:,:,:,1), kind=
rp )
352 call externalfileread( read_zxy(:,:,:,:), basename,
"NI", it, it, myrank, mdlid, single=.true. )
353 qtrc_org(3:,:,:,
i_ni) =
real( read_zxy(:,:,:,1), kind=
rp )
355 call externalfileread( read_zxy(:,:,:,:), basename,
"NS", it, it, myrank, mdlid, single=.true. )
356 qtrc_org(3:,:,:,
i_ns) =
real( read_zxy(:,:,:,1), kind=
rp )
358 call externalfileread( read_zxy(:,:,:,:), basename,
"NG", it, it, myrank, mdlid, single=.true. )
359 qtrc_org(3:,:,:,
i_ng) =
real( read_zxy(:,:,:,1), kind=
rp )
367 qtrc_org(k,i,j,iq) = max( qtrc_org(k,i,j,iq), 0.0_rp )
374 call externalfileread( read_zxy(:,:,:,:), basename, varname_t, it, it, myrank, mdlid, single=.true. )
375 pott_org(3:,:,:) =
real( read_zxy(:,:,:,1), kind=RP ) + t0
376 call externalfileread( read_xy(:,:,:), basename,
"T2", it, it, myrank, mdlid, single=.true. )
377 temp_org(2,:,:) =
real( read_xy(:,:,1), kind=
rp )
379 call externalfileread( read_xy(:,:,:), basename,
"PSFC", it, it, myrank, mdlid, single=.true. )
380 pres_org(2,:,:) =
real( read_xy(:,:,1), kind=
rp )
385 pres_org(k,i,j) = p_org(k-2,i,j) + pb_org(k-2,i,j)
386 temp_org(k,i,j) = pott_org(k,i,j) * ( pres_org(k,i,j) / p0 )**rcp
388 pott_org(2,i,j) = temp_org(2,i,j) * ( p0/pres_org(2,i,j) )**rcp
389 temp_org(1,i,j) = temp_org(2,i,j) + laps * topo_org(i,j)
390 dens = pres_org(2,i,j) / ( rdry * temp_org(2,i,j) )
391 pres_org(1,i,j) = ( pres_org(2,i,j) + grav * dens * cz_org(2,i,j) * 0.5_rp ) &
392 / ( rdry * temp_org(1,i,j) - grav * cz_org(2,i,j) * 0.5_rp ) &
393 * rdry * temp_org(1,i,j)
401 geof_org(k,i,j) = ( ph_org(k,i,j) + phb_org(k,i,j) ) / grav
405 cz_org(k+2,i,j) = ( geof_org(k,i,j) + geof_org(k+1,i,j) ) * 0.5_rp
407 cz_org(2,i,j) = topo_org(i,j)
408 cz_org(1,i,j) = 0.0_rp
415 k=2 ; i=3 ; j=3 ; iq = 1
416 write(*,*)
"read 3D wrf data",i,j,k
417 write(*,*)
"lon_org ",lon_org(i,j)/d2r
418 write(*,*)
"lat_org ",lat_org(i,j)/d2r
419 write(*,*)
"cz_org ",cz_org(k,i,j)
420 write(*,*)
"pres_org ",pres_org(k,i,j)
421 write(*,*)
"velx_org ",llvelx_org(k,i,j)
422 write(*,*)
"vely_org ",llvely_org(k,i,j)
423 write(*,*)
"velz_org ",velz_org(k,i,j)
424 write(*,*)
"temp_org ",temp_org(k,i,j)
425 write(*,*)
"qtrc_org ",qtrc_org(k,i,j,iq)
426 k=3 ; i=3 ; j=3 ; iq = 1
427 write(*,*)
"read 3D wrf data",i,j,k
428 write(*,*)
"lon_org ",lon_org(i,j)/d2r
429 write(*,*)
"lat_org ",lat_org(i,j)/d2r
430 write(*,*)
"cz_org ",cz_org(k,i,j)
431 write(*,*)
"pres_org ",pres_org(k,i,j)
432 write(*,*)
"velx_org ",llvelx_org(k,i,j)
433 write(*,*)
"vely_org ",llvely_org(k,i,j)
434 write(*,*)
"velz_org ",velz_org(k,i,j)
435 write(*,*)
"temp_org ",temp_org(k,i,j)
436 write(*,*)
"qtrc_org ",qtrc_org(k,i,j,iq)
452 integer,
intent(out) :: ldims(3)
453 character(len=*),
intent(in) :: basename_land
455 logical :: wrf_file_type = .false.
457 namelist / param_mkinit_real_wrfarw / &
460 integer :: dims_wrf(7)
465 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Atom Input File Type: WRF-ARW' 469 read(
io_fid_conf,nml=param_mkinit_real_wrfarw,iostat=ierr)
471 write(*,*)
'xxx Not appropriate names in namelist PARAM_MKINIT_REAL_WRFARW. Check!' 478 ldims(1) = dims_wrf(7)
479 ldims(2) = dims_wrf(2)
480 ldims(3) = dims_wrf(3)
482 if ( wrf_file_type )
then 484 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF History Output' 487 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF Restart' 491 if ( .not.
allocated(read_xy) )
then 492 allocate( read_xy( ldims(2),ldims(3),1) )
495 allocate( read_lzxy(ldims(1),ldims(2),ldims(3),1) )
496 allocate( read_lz(ldims(1),1) )
515 use_file_landwater, &
526 real(RP),
intent(out) :: tg_org(:,:,:)
527 real(RP),
intent(out) :: sh2o_org(:,:,:)
528 real(RP),
intent(out) :: lst_org(:,:)
529 real(RP),
intent(out) :: ust_org(:,:)
530 real(RP),
intent(out) :: albg_org(:,:,:)
531 real(RP),
intent(out) :: topo_org(:,:)
532 real(RP),
intent(out) :: lmask_org(:,:)
533 real(RP),
intent(out) :: llon_org(:,:)
534 real(RP),
intent(out) :: llat_org(:,:)
535 real(RP),
intent(out) :: lz_org(:)
536 character(len=*),
intent( in) :: basename
537 integer,
intent( in) :: ldims(3)
538 logical,
intent( in) :: use_file_landwater
539 integer,
intent( in) :: it
548 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[LandInputWRF]' 550 call externalfileread( read_xy(:,:,:), basename,
"XLAT", it, it, myrank, mdlid, single=.true. )
551 llat_org(:,:) = read_xy(:,:,1) * d2r
553 call externalfileread( read_xy(:,:,:), basename,
"XLONG", it, it, myrank, mdlid, single=.true. )
554 llon_org(:,:) = read_xy(:,:,1) * d2r
556 call externalfileread( read_xy(:,:,:), basename,
"HGT", it, it, myrank, mdlid, single=.true. )
557 topo_org(:,:) = read_xy(:,:,1)
560 call externalfileread( read_lz(:,:), &
561 basename,
"ZS", it, 1, myrank, mdlid, ldims(1), single=.true. )
562 lz_org(:) = read_lz(:,1)
565 call externalfileread( read_xy(:,:,:), &
566 basename,
"LANDMASK", it, 1, myrank, mdlid, single=.true. )
567 lmask_org(:,:) = read_xy(:,:,1)
570 call externalfileread( read_lzxy(:,:,:,:), &
571 basename,
"TSLB", it, 1, myrank, mdlid, single=.true., landgrid=.true. )
572 tg_org(:,:,:) = read_lzxy(:,:,:,1)
575 if( use_file_landwater )
then 577 if ( existence )
then 578 call externalfileread( read_lzxy(:,:,:,:), &
579 basename,
"SH2O", it, 1, myrank, mdlid, single=.true., landgrid=.true. )
580 sh2o_org(:,:,:) = read_lzxy(:,:,:,1)
582 sh2o_org(:,:,:) = undef
597 call externalfileread( read_xy(:,:,:), &
598 basename,
"TSK", it, 1, myrank, mdlid, single=.true. )
599 lst_org(:,:) = read_xy(:,:,1)
601 ust_org(:,:) = lst_org(:,:)
604 call externalfileread( read_xy(:,:,:), &
605 basename,
"ALBEDO", it, 1, myrank, mdlid, single=.true. )
606 albg_org(:,:,i_sw) = read_xy(:,:,1)
609 call externalfileread( read_xy(:,:,:), &
610 basename,
"EMISS", it, 1, myrank, mdlid, single=.true. )
613 albg_org(i,j,i_lw) = 1.0_dp - read_xy(i,j,1)
656 integer,
intent(out) :: odims(2)
657 integer,
intent(out) :: timelen
658 character(len=*),
intent(in) :: basename_org
660 logical :: wrf_file_type = .false.
662 namelist / param_mkinit_real_wrfarw / &
665 integer :: dims_wrf(7)
669 if(
io_l )
write(
io_fid_log,*)
'+++ Real Case/Ocean Input File Type: WRF-ARW' 673 read(
io_fid_conf,nml=param_mkinit_real_wrfarw,iostat=ierr)
675 write(*,*)
'xxx Not appropriate names in namelist PARAM_MKINIT_REAL_WRFARW. Check!' 682 odims(1) = dims_wrf(2)
683 odims(2) = dims_wrf(3)
685 if ( wrf_file_type )
then 687 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF History Output' 690 if(
io_l )
write(
io_fid_log,*)
'+++ WRF-ARW FILE-TYPE: WRF Restart' 694 if ( .not.
allocated(read_xy) )
then 695 allocate( read_xy( odims(1),odims(2),1) )
705 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[OceanOpenWRFARW]' 730 real(RP),
intent(out) :: tw_org(:,:)
731 real(RP),
intent(out) :: sst_org(:,:)
732 real(RP),
intent(out) :: albw_org(:,:,:)
733 real(RP),
intent(out) :: z0w_org(:,:)
734 real(RP),
intent(out) :: omask_org(:,:)
735 real(RP),
intent(out) :: olon_org(:,:)
736 real(RP),
intent(out) :: olat_org(:,:)
737 character(len=*),
intent( in) :: basename
738 integer,
intent( in) :: odims(2)
739 integer,
intent( in) :: it
748 if(
io_l )
write(
io_fid_log,*)
'+++ ScaleLib/IO[realinput]/Categ[OceanInputWRF]' 750 call externalfileread( read_xy(:,:,:), basename,
"XLAT", it, it, myrank, mdlid, single=.true. )
751 olat_org(:,:) = read_xy(:,:,1) * d2r
753 call externalfileread( read_xy(:,:,:), basename,
"XLONG", it, it, myrank, mdlid, single=.true. )
754 olon_org(:,:) = read_xy(:,:,1) * d2r
757 call externalfileread( read_xy(:,:,:), &
758 basename,
"LANDMASK", it, 1, myrank, mdlid, single=.true. )
759 omask_org(:,:) = read_xy(:,:,1)
762 call externalfileread( read_xy(:,:,:), &
763 basename,
"SST", it, 1, myrank, mdlid, single=.true. )
764 sst_org(:,:) = read_xy(:,:,1)
766 tw_org(:,:) = sst_org(:,:)
769 call externalfileread( read_xy(:,:,:), &
770 basename,
"ALBEDO", it, 1, myrank, mdlid, single=.true. )
771 albw_org(:,:,i_sw) = read_xy(:,:,1)
774 call externalfileread( read_xy(:,:,:), &
775 basename,
"EMISS", it, 1, myrank, mdlid, single=.true. )
778 albw_org(i,j,i_lw) = 1.0_dp - read_xy(i,j,1)
784 if ( existence )
then 785 call externalfileread( read_xy(:,:,:), &
786 basename,
"ZNT", it, 1, myrank, mdlid, single=.true. )
787 z0w_org(:,:) = read_xy(:,:,1)
811 externalfilegetglobalattv
813 real(RP),
intent(out) :: u_latlon(:,:,:)
814 real(RP),
intent(out) :: v_latlon(:,:,:)
815 real(RP),
intent(in ) :: u_on_map(:,:,:)
816 real(RP),
intent(in ) :: v_on_map(:,:,:)
817 real(RP),
intent(in ) :: xlon(:,:)
818 real(RP),
intent(in ) :: xlat(:,:)
819 integer ,
intent(in ) :: K1, I1, J1
821 character(len=*),
intent( in) :: basename
823 real(RP) :: truelat1, truelat2
824 real(RP) :: stand_lon
827 real(RP) :: sine(I1,J1)
828 real(RP) :: cose(I1,J1)
839 call externalfilegetglobalattv( dum_i, iwrfarw, basename,
"MAP_PROJ", myrank, single=.true. )
841 call externalfilegetglobalattv( dum_r, iwrfarw, basename,
"TRUELAT1", myrank, single=.true. )
842 truelat1 = dum_r(1) * d2r
843 call externalfilegetglobalattv( dum_r, iwrfarw, basename,
"TRUELAT2", myrank, single=.true. )
844 truelat2 = dum_r(1) * d2r
845 call externalfilegetglobalattv( dum_r, iwrfarw, basename,
"STAND_LON", myrank, single=.true. )
846 stand_lon = dum_r(1) * d2r
849 if ( map_proj .ge. 3 )
then 850 u_latlon(:,:,:) = u_on_map(:,:,:)
851 v_latlon(:,:,:) = v_on_map(:,:,:)
858 if ( map_proj .eq. 1 )
then 859 if ( abs(truelat1-truelat2) .gt. 0.1_rp*d2r )
then 860 cone = ( log(cos(truelat1)) - &
861 log(cos(truelat2)) ) / &
862 ( log(tan((pi*0.5_rp-abs(truelat1))*0.5_rp )) - &
863 log(tan((pi*0.5_rp-abs(truelat2))*0.5_rp )) )
865 cone = sin( abs(truelat1) )
871 diff = xlon(i,j) - stand_lon
872 if ( diff .gt. pi )
then 873 diff = diff - pi*2.0_rp
875 if ( diff .lt. -pi )
then 876 diff = diff + pi*2.0_rp
878 alpha = diff * cone * sign(1.0_rp, xlat(i,j))
879 sine(i,j) = sin( alpha )
880 cose(i,j) = cos( alpha )
887 u_latlon(k,i,j) = v_on_map(k,i,j)*sine(i,j) + u_on_map(k,i,j)*cose(i,j)
888 v_latlon(k,i,j) = v_on_map(k,i,j)*cose(i,j) - u_on_map(k,i,j)*sine(i,j)
integer, public const_i_lw
long-wave radiation index
subroutine, public externalfilevarexistence(existence, basename, varname, myrank, mdlid, single)
Check Existence of a Variable.
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
real(rp), public const_d2r
degree to radian
real(rp), public const_laps
lapse rate of ISA [K/m]
integer, parameter, public iwrfarw
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
real(rp), public const_undef
logical, public io_nml
output log or not? (for namelist, this process)
subroutine, public externalfilegetshape(dims, timelen, mdlid, basename, myrank, single)
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, public prc_myrank
process num in local communicator
module ATMOSPHERE / Thermodynamics
integer, public const_i_sw
short-wave radiation index
real(rp), public const_pi
pi
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
integer, parameter, public rp
integer, public io_fid_nml
Log file ID (only for output namelist)