Changeset 2291 for trunk/LMDZ.TITAN/libf/phytitan
- Timestamp:
- Apr 17, 2020, 4:58:05 PM (5 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/phytitan
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r2242 r2291 38 38 zzlevbar, zzlaybar, ztfibar, zqfibar 39 39 use callkeys_mod 40 use phys_state_var_mod 41 use turb_mod, only : q2,sensibFlux,turb_resolved 42 #ifndef MESOSCALE 40 43 use vertical_layers_mod, only: presnivs, pseudoalt 41 44 use ioipsl_getin_p_mod, only: getin_p 42 45 use mod_phys_lmdz_omp_data, ONLY: is_omp_master 46 #else 47 use comm_wrf, only : comm_HR_SW, comm_HR_LW, & 48 comm_FLUXTOP_DN,comm_FLUXABS_SW,& 49 comm_FLUXTOP_LW,comm_FLUXSURF_SW,& 50 comm_FLUXSURF_LW,comm_FLXGRD 51 #endif 43 52 #ifdef CPP_XIOS 44 53 use xios_output_mod, only: initialize_xios_output, & … … 207 216 !$OMP THREADPRIVATE(day_ini,icount) 208 217 209 real, dimension(:),allocatable,save :: tsurf ! Surface temperature (K).210 real, dimension(:,:),allocatable,save :: tsoil ! Sub-surface temperatures (K).211 real, dimension(:,:),allocatable,save :: albedo ! Surface Spectral albedo. By MT2015.212 real, dimension(:),allocatable,save :: albedo_equivalent ! Spectral Mean albedo.213 214 218 !$OMP THREADPRIVATE(tsurf,tsoil,albedo,albedo_equivalent) 215 219 216 real,dimension(:),allocatable,save :: albedo_bareground ! Bare Ground Albedo. By MT 2015.217 218 220 !$OMP THREADPRIVATE(albedo_bareground) 219 221 220 real,dimension(:),allocatable,save :: emis ! Thermal IR surface emissivity.221 real,dimension(:,:),allocatable,save :: dtrad ! Net atmospheric radiative heating rate (K.s-1).222 real,dimension(:),allocatable,save :: fluxrad_sky ! Radiative flux from sky absorbed by surface (W.m-2).223 real,dimension(:),allocatable,save :: fluxrad ! Net radiative surface flux (W.m-2).224 real,dimension(:),allocatable,save :: capcal ! Surface heat capacity (J m-2 K-1).225 real,dimension(:),allocatable,save :: fluxgrd ! Surface conduction flux (W.m-2).226 real,dimension(:,:),allocatable,save :: qsurf ! Tracer on surface (e.g. kg.m-2).227 real,dimension(:,:),allocatable,save :: q2 ! Turbulent Kinetic Energy.228 229 222 !$OMP THREADPRIVATE(emis,dtrad,fluxrad_sky,fluxrad,capcal,fluxgrd,qsurf,q2) 230 223 … … 240 233 ! FOR DIAGNOSTIC : 241 234 242 real,dimension(:),allocatable,save :: fluxsurf_lw ! Incident Long Wave (IR) surface flux (W.m-2).243 real,dimension(:),allocatable,save :: fluxsurf_sw ! Incident Short Wave (stellar) surface flux (W.m-2).244 real,dimension(:),allocatable,save :: fluxsurfabs_sw ! Absorbed Short Wave (stellar) flux by the surface (W.m-2).245 real,dimension(:),allocatable,save :: fluxtop_lw ! Outgoing LW (IR) flux to space (W.m-2).246 real,dimension(:),allocatable,save :: fluxabs_sw ! Absorbed SW (stellar) flux (W.m-2).247 real,dimension(:),allocatable,save :: fluxtop_dn ! Incoming SW (stellar) radiation at the top of the atmosphere (W.m-2).248 real,dimension(:),allocatable,save :: fluxdyn ! Horizontal heat transport by dynamics (W.m-2).249 real,dimension(:,:),allocatable,save :: OLR_nu ! Outgoing LW radiation in each band (Normalized to the band width (W/m2/cm-1)).250 real,dimension(:,:),allocatable,save :: OSR_nu ! Outgoing SW radiation in each band (Normalized to the band width (W/m2/cm-1)).251 real,dimension(:,:),allocatable,save :: zdtlw ! LW heating tendencies (K/s).252 real,dimension(:,:),allocatable,save :: zdtsw ! SW heating tendencies (K/s).253 real,dimension(:),allocatable,save :: sensibFlux ! Turbulent flux given by the atmosphere to the surface (W.m-2).254 real,dimension(:,:,:),allocatable,save :: int_dtauv ! VI optical thickness of layers within narrowbands for diags ().255 real,dimension(:,:,:),allocatable,save :: int_dtaui ! IR optical thickness of layers within narrowbands for diags ().256 257 235 !$OMP THREADPRIVATE(fluxsurf_lw,fluxsurf_sw,fluxsurfabs_sw,fluxtop_lw,fluxabs_sw,fluxtop_dn,fluxdyn,OLR_nu,OSR_nu,& 258 236 !$OMP zdtlw,zdtsw,sensibFlux,int_dtauv,int_dtaui)) … … 331 309 real zdtdyn(ngrid,nlayer) ! Dynamical Heating (K/s). 332 310 real zdudyn(ngrid,nlayer) ! Dynamical Zonal Wind tendency (m.s-2). 333 real,allocatable,dimension(:,:),save :: ztprevious ! Previous loop Atmospheric Temperature (K) ! Useful for Dynamical Heating calculation.334 real,allocatable,dimension(:,:),save :: zuprevious ! Previous loop Zonal Wind (m.s-1) ! Useful for Zonal Wind tendency calculation.335 311 !$OMP THREADPRIVATE(ztprevious,zuprevious) 336 312 … … 363 339 real tf, ntf 364 340 365 real,allocatable,dimension(:,:),save :: qsurf_hist366 341 !$OMP THREADPRIVATE(qsurf_hist) 367 342 … … 393 368 394 369 ! Surface methane 395 real, dimension(:), allocatable, save :: tankCH4 ! Depth of surface methane tank (m)396 370 !$OMP THREADPRIVATE(tankCH4) 397 371 … … 434 408 ! -------------------------------- 435 409 if (firstcall) then 410 #ifndef MESOSCALE 436 411 allocate(tpq(ngrid,nlayer,nq)) 437 412 tpq(:,:,:) = pq(:,:,:) … … 442 417 endif 443 418 444 ! Allocate saved arrays. 445 ALLOCATE(tsurf(ngrid)) 446 ALLOCATE(tsoil(ngrid,nsoilmx)) 447 ALLOCATE(albedo(ngrid,L_NSPECTV)) 448 ALLOCATE(albedo_equivalent(ngrid)) 449 ALLOCATE(albedo_bareground(ngrid)) 450 ALLOCATE(emis(ngrid)) 451 ALLOCATE(dtrad(ngrid,nlayer)) 452 ALLOCATE(fluxrad_sky(ngrid)) 453 ALLOCATE(fluxrad(ngrid)) 454 ALLOCATE(capcal(ngrid)) 455 ALLOCATE(fluxgrd(ngrid)) 456 ALLOCATE(qsurf(ngrid,nq)) 457 ALLOCATE(q2(ngrid,nlayer+1)) 458 ALLOCATE(tankCH4(ngrid)) 459 ALLOCATE(ztprevious(ngrid,nlayer)) 460 ALLOCATE(zuprevious(ngrid,nlayer)) 461 ALLOCATE(qsurf_hist(ngrid,nq)) 462 ALLOCATE(fluxsurf_lw(ngrid)) 463 ALLOCATE(fluxsurf_sw(ngrid)) 464 ALLOCATE(fluxsurfabs_sw(ngrid)) 465 ALLOCATE(fluxtop_lw(ngrid)) 466 ALLOCATE(fluxabs_sw(ngrid)) 467 ALLOCATE(fluxtop_dn(ngrid)) 468 ALLOCATE(fluxdyn(ngrid)) 469 ALLOCATE(OLR_nu(ngrid,L_NSPECTI)) 470 ALLOCATE(OSR_nu(ngrid,L_NSPECTV)) 471 ALLOCATE(sensibFlux(ngrid)) 472 ALLOCATE(zdtlw(ngrid,nlayer)) 473 ALLOCATE(zdtsw(ngrid,nlayer)) 474 ALLOCATE(int_dtaui(ngrid,nlayer,L_NSPECTI)) 475 ALLOCATE(int_dtauv(ngrid,nlayer,L_NSPECTV)) 476 477 ! This is defined in comsaison_h 478 ALLOCATE(mu0(ngrid)) 479 ALLOCATE(fract(ngrid)) 480 ! This is defined in radcommon_h 481 ALLOCATE(gzlat(ngrid,nlayer)) 482 ALLOCATE(gzlat_ig(nlayer)) 483 ALLOCATE(Cmk(nlayer)) 419 call phys_state_var_init(nq) 420 421 #endif 484 422 485 423 ! Variables set to 0 … … 565 503 ! Read 'startfi.nc' file. 566 504 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 505 #ifndef MESOSCALE 567 506 call phyetat0(startphy_file,ngrid,nlayer,"startfi.nc",0,0,nsoilmx,nq, & 568 507 day_ini,time_phys,tsurf,tsoil,emis,q2,qsurf,tankCH4) 508 #else 509 emis(:)=0.0 510 q2(:,:)=0.0 511 qsurf(:,:)=0.0 512 day_ini = pday 513 #endif 514 515 #ifndef MESOSCALE 569 516 if (.not.startphy_file) then 570 517 ! additionnal "academic" initialization of physics … … 578 525 day_ini=pday 579 526 endif 527 #endif 580 528 581 529 if (pday.ne.day_ini) then … … 639 587 endif 640 588 589 #ifndef MESOSCALE 641 590 if (ngrid.ne.1) then 642 591 ! Note : no need to create a restart file in 1d. … … 645 594 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 646 595 endif 596 #endif 647 597 648 598 ! XIOS outputs … … 991 941 end if !end of 'UseTurbDiff' 992 942 993 994 pdv(:,:)=pdv(:,:)+zdvdif(:,:) 995 pdu(:,:)=pdu(:,:)+zdudif(:,:) 996 pdt(:,:)=pdt(:,:)+zdtdif(:,:) 997 zdtsurf(:)=zdtsurf(:)+zdtsdif(:) 943 if (.not. turb_resolved) then 944 pdv(:,:)=pdv(:,:)+zdvdif(:,:) 945 pdu(:,:)=pdu(:,:)+zdudif(:,:) 946 pdt(:,:)=pdt(:,:)+zdtdif(:,:) 947 endif 948 zdtsurf(:)=zdtsurf(:)+zdtsdif(:) 998 949 999 950 if (tracer) then … … 1466 1417 ztime_fin = ptime + ptimestep/(float(iphysiq)*daysec) 1467 1418 1419 #ifndef MESOSCALE 1468 1420 if (ngrid.ne.1) then 1469 1421 write(*,*)'PHYSIQ: for physdem ztime_fin =',ztime_fin … … 1473 1425 tsurf,tsoil,emis,q2,qsurf_hist,tankCH4) 1474 1426 endif 1427 #endif 1428 1475 1429 endif ! end of 'lastcall' 1476 1430 1477 1431 #ifndef MESOSCALE 1478 1432 !----------------------------------------------------------------------------------------------------- 1479 1433 ! OUTPUT in netcdf file "DIAGFI.NC", containing any variable for diagnostic … … 1733 1687 endif 1734 1688 #endif 1689 #else 1690 !MESOSCALE outputs 1691 comm_HR_SW(1:ngrid,1:nlayer) = zdtsw(1:ngrid,1:nlayer) 1692 comm_HR_LW(1:ngrid,1:nlayer) = zdtlw(1:ngrid,1:nlayer) 1693 comm_FLUXTOP_DN(1:ngrid)=fluxtop_dn(1:ngrid) 1694 comm_FLUXABS_SW(1:ngrid)=fluxabs_sw(1:ngrid) 1695 comm_FLUXTOP_LW(1:ngrid)=fluxtop_lw(1:ngrid) 1696 comm_FLUXSURF_SW(1:ngrid)=fluxsurf_sw(1:ngrid) 1697 comm_FLUXSURF_LW(1:ngrid)=fluxsurf_lw(1:ngrid) 1698 comm_FLXGRD(1:ngrid)=fluxgrd(1:ngrid) 1699 #endif 1735 1700 1736 1701 icount=icount+1 -
trunk/LMDZ.TITAN/libf/phytitan/turbdiff.F90
r1947 r2291 10 10 use comcstfi_mod, only: rcp, g, r, cpp 11 11 use callkeys_mod, only: tracer,nosurf 12 use turb_mod, only : ustar 12 13 13 14 implicit none … … 327 328 zcdh(ig) = zcdh_true(ig)*sqrt(zu2) 328 329 zkh(ig,1)= zcdh(ig) 330 ustar(ig)= sqrt(zcdv_true(ig))*sqrt(zu2) 329 331 ENDDO 330 332
Note: See TracChangeset
for help on using the changeset viewer.