Changeset 3661
- Timestamp:
- Feb 27, 2025, 2:53:11 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/comm_wrf.F90
r2291 r3661 18 18 REAL,SAVE,ALLOCATABLE :: comm_FLUXSURF_LW(:) 19 19 REAL,SAVE,ALLOCATABLE :: comm_FLXGRD(:) 20 REAL,SAVE,ALLOCATABLE :: comm_zqfi_omp(:,:,:) 21 REAL,SAVE,ALLOCATABLE :: comm_zdtlc(:,:) 20 22 21 23 contains 22 24 23 subroutine allocate_comm_wrf(ngrid,nlayer )25 subroutine allocate_comm_wrf(ngrid,nlayer,nq) 24 26 implicit none 25 integer,intent(in) :: ngrid ! number of atmospheric columns27 integer,intent(in) :: ngrid ! number of atmospheric columns 26 28 integer,intent(in) :: nlayer ! number of atmospheric layers 29 integer,intent(in) :: nq ! number of tracers 27 30 allocate(comm_HR_SW(ngrid,nlayer)) 28 31 allocate(comm_HR_LW(ngrid,nlayer)) … … 38 41 allocate(comm_FLUXSURF_LW(ngrid)) 39 42 allocate(comm_FLXGRD(ngrid)) 43 allocate(comm_zqfi_omp(ngrid,nlayer,nq)) 44 allocate(comm_zdtlc(ngrid,nlayer)) 40 45 41 46 end subroutine allocate_comm_wrf … … 56 61 deallocate(comm_FLUXSURF_LW) 57 62 deallocate(comm_FLXGRD) 63 deallocate(comm_zqfi_omp) 64 deallocate(comm_zdtlc) 58 65 59 66 end subroutine deallocate_comm_wrf -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r3497 r3661 46 46 #else 47 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 48 comm_FLUXTOP_DN, comm_FLUXABS_SW,& 49 comm_FLUXTOP_LW, comm_FLUXSURF_SW,& 50 comm_FLUXSURF_LW, comm_FLXGRD,& 51 comm_zqfi_omp, comm_zdtlc 51 52 #endif 52 53 #ifdef CPP_XIOS … … 138 139 ! pdv(ngrid,nlayer) \ Temporal derivative of the corresponding 139 140 ! pdt(ngrid,nlayer) / variables due to physical processes. 140 ! pdq(ngrid,nlayer )/141 ! pdq(ngrid,nlayer,nq) / 141 142 ! pdpsrf(ngrid) / 142 143 ! … … 331 332 character*2 :: str2 332 333 333 #ifndef MESOSCALE334 !#ifndef MESOSCALE 334 335 335 336 ! Local variables for Titan chemistry and microphysics … … 363 364 #endif 364 365 365 logical file_ok 366 #ifdef MESOSCALE 367 LOGICAL, SAVE :: moyzon_ch ! used for zonal averages in Titan 368 REAL, ALLOCATABLE :: zplevbar(:,:) 369 REAL, ALLOCATABLE :: zplaybar(:,:) 370 REAL, ALLOCATABLE :: ztfibar(:,:) 371 REAL, ALLOCATABLE :: zqfibar(:,:,:) 372 REAL, ALLOCATABLE :: zphibar(:,:) 373 REAL, ALLOCATABLE :: zphisbar(:) 374 REAL, ALLOCATABLE :: zzlevbar(:,:) 375 REAL, ALLOCATABLE :: zzlaybar(:,:) 376 ! REAL, DIMENSION(:,:) :: zplevbar(:,:) 377 ! REAL, DIMENSION(:,:) :: zplaybar(:,:) 378 ! REAL, DIMENSION(:,:) :: ztfibar(:,:) 379 ! REAL, DIMENSION(:,:,:) :: zqfibar(:,:,:) 380 ! REAL, DIMENSION(:,:) :: zphibar(:,:) 381 ! REAL, DIMENSION(:) :: zphisbar(:) 382 ! REAL, DIMENSION(:,:) :: zzlevbar(:,:) 383 ! REAL, DIMENSION(:,:) :: zzlaybar(:,:) 384 #endif 366 385 367 386 !----------------------------------------------------------------------------- … … 385 404 END INTERFACE 386 405 387 #endif 388 406 !#endif 407 408 logical file_ok 409 389 410 !================================================================================================== 390 411 … … 447 468 int_dtauv(:,:,:) = 0.D0 448 469 449 #ifndef MESOSCALE470 !#ifndef MESOSCALE 450 471 IF (callmufi .AND. (.NOT. uncoupl_optic_haze)) THEN 451 472 haze_opt_file=trim(datadir)//'/optical_tables/HAZE_OPTIC_'//trim(adjustl(tmp1))//'x'//trim(adjustl(tmp2))//'.DAT' … … 459 480 endif 460 481 ENDIF 461 #endif482 !#endif 462 483 463 484 endif 485 486 #ifdef MESOSCALE 487 moyzon_ch = .false. !no zonal mean for mesoscale 488 #endif 464 489 465 490 #ifndef MESOSCALE 466 491 ! Initialize names and timestep for chemistry 467 492 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 468 469 493 if (callchim) then 470 494 … … 479 503 480 504 endif 505 #endif 481 506 482 507 ! Initialize microphysics. … … 491 516 492 517 ENDIF 493 #endif494 518 495 519 #ifdef CPP_XIOS … … 717 741 ! JVO 19 : We shall always have correct altitudes in chemistry no matter what's in physics 718 742 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 719 #ifndef MESOSCALE743 !#ifndef MESOSCALE 720 744 if (moyzon_ch) then ! Zonal averages 721 745 … … 748 772 749 773 else ! if not moyzon 750 #endif774 !#endif 751 775 752 776 DO ig=1,ngrid … … 763 787 ENDDO 764 788 765 #ifndef MESOSCALE789 !#ifndef MESOSCALE 766 790 endif ! moyzon 767 #endif791 !#endif 768 792 769 793 ! ------------------------------------------------------------------------------------- … … 1065 1089 if (tracer) then 1066 1090 1067 #ifndef MESOSCALE1068 1091 ! ------------------- 1069 1092 ! V.1 Microphysics … … 1072 1095 ! We must call microphysics before chemistry, for condensation ! 1073 1096 if (callmufi) then 1074 1075 1097 zzlev(:,nlayer+1)=zzlay(:,nlayer)+(zzlay(:,nlayer)-zzlev(:,nlayer)) ! JVO 19 : We assume zzlev isn't reused later on (could be done cleaner) 1076 1098 … … 1148 1170 endif ! callmufi 1149 1171 1172 #ifndef MESOSCALE 1150 1173 ! ----------------- 1151 1174 ! V.2. Chemistry … … 1292 1315 endif ! end of 'callchim' 1293 1316 1294 ! ENDMESOSCALE1317 !! END ifndef MESOSCALE 1295 1318 #endif 1296 1319 … … 2010 2033 comm_FLXGRD(1:ngrid)=fluxgrd(1:ngrid) 2011 2034 sensibFlux(1:ngrid) = zflubid(1:ngrid) - capcal(1:ngrid)*zdtsdif(1:ngrid) 2035 comm_zqfi_omp(1:ngrid,1:nlayer,1:nq) = zq(1:ngrid,1:nlayer,1:nq) 2036 comm_zdtlc(1:ngrid,1:nlayer) = zdtlc(1:ngrid,1:nlayer) 2012 2037 #endif 2013 2038 -
trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F
r2874 r3661 48 48 HFMAX,ZMAX,& 49 49 USTM,HFX,& 50 SLPX,SLPY,RESTART) 50 SLPX,SLPY,RESTART,& 51 DT_COND) 51 52 ! NB: module_lmd_driver_output1.inc : output arguments generated from Registry 52 53 … … 114 115 RTHPLATEN,RUPLATEN,RVPLATEN, & 115 116 HR_SW,HR_LW,HR_DYN,DT_RAD,& 116 CLOUDFRAC,RH,DQICE,DQVAP,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF 117 CLOUDFRAC,RH,DQICE,DQVAP,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF,& 118 DT_COND 117 119 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 118 120 P_Q2 … … 445 447 q_prof(:,2) = moist(i,kps:kpe,j,P_QC) / (1.d0 + moist(i,kps:kpe,j,P_QV)) 446 448 ! conversion from mass mixing ratio in WRF to specific concentration in Physiq 449 ELSE IF (TRACER_MODE == 61) THEN 450 ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc. 451 q_prof(:,1) = SCALAR(i,kps:kpe,j,P_mu_m0as) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 452 q_prof(:,2) = SCALAR(i,kps:kpe,j,P_mu_m3as) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 453 q_prof(:,3) = SCALAR(i,kps:kpe,j,P_mu_m0af) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 454 q_prof(:,4) = SCALAR(i,kps:kpe,j,P_mu_m3af) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 455 q_prof(:,5) = SCALAR(i,kps:kpe,j,P_mu_m0n) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 456 q_prof(:,6) = SCALAR(i,kps:kpe,j,P_mu_m3n) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 457 q_prof(:,7) = SCALAR(i,kps:kpe,j,P_mu_m3CH4) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 458 q_prof(:,8) = SCALAR(i,kps:kpe,j,P_CH4) / (1.d0 + SCALAR(i,kps:kpe,j,P_CH4)) 447 459 ELSE 448 460 q_prof(:,1:nq) = SCALAR(i,kps:kpe,j,2:nq+1) !! the names were set above !! one dummy tracer in WRF … … 651 663 DQICE,DQVAP,REEVAP,SURFRAIN,& 652 664 ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,& 653 FLUXSURF_LW,FLXGRD,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF,LATENT_HF) 665 FLUXSURF_LW,FLXGRD,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF,LATENT_HF,& 666 DT_COND) 654 667 !!! 655 668 !print *, '** ',planet_type,'** OUTPUT PHYSICS DONE' … … 739 752 SCALAR(i,kps:kpe,j,P_MARKER) = SCALAR(i,kps:kpe,j,P_MARKER)*exp(-dt/tau_decay) 740 753 SCALAR(i,1,j,P_MARKER) = 1. !! this tracer is emitted in the surface layer 754 CASE(61) !emoisan tobechecked 755 scalar(i,kps:kpe,j,P_mu_m0as)=scalar(i,kps:kpe,j,P_mu_m0as) & 756 +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 757 scalar(i,kps:kpe,j,P_mu_m3as)=scalar(i,kps:kpe,j,P_mu_m3as) & 758 +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 759 scalar(i,kps:kpe,j,P_mu_m0af)=scalar(i,kps:kpe,j,P_mu_m0af) & 760 +zdqfi_omp(subs,kps:kpe,3)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 761 scalar(i,kps:kpe,j,P_mu_m3af)=scalar(i,kps:kpe,j,P_mu_m3af) & 762 +zdqfi_omp(subs,kps:kpe,4)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 763 scalar(i,kps:kpe,j,P_mu_m0n)=scalar(i,kps:kpe,j,P_mu_m0n) & 764 +zdqfi_omp(subs,kps:kpe,5)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 765 scalar(i,kps:kpe,j,P_mu_m3n)=scalar(i,kps:kpe,j,P_mu_m3n) & 766 +zdqfi_omp(subs,kps:kpe,6)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 767 scalar(i,kps:kpe,j,P_mu_m3CH4)=scalar(i,kps:kpe,j,P_mu_m3CH4) & 768 +zdqfi_omp(subs,kps:kpe,7)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 769 scalar(i,kps:kpe,j,P_CH4)=scalar(i,kps:kpe,j,P_CH4) & 770 +zdqfi_omp(subs,kps:kpe,8)*dt * (1.d0+scalar(i,kps:kpe,j,P_CH4)) 741 771 CASE DEFAULT 742 772 !SCALAR(i,kps:kpe,j,2:nq+1)=SCALAR(i,kps:kpe,j,2:nq+1)+zdqfi_omp(subs,kps:kpe,1:nq)*dt !!! here dt is needed -
trunk/WRF.COMMON/INTERFACES_V4/module_model_constants.F
r2872 r3661 26 26 REAL :: cp ! = 7.*r_d/2. ! 27 27 28 REAL , PARAMETER :: r_v= 461.6 ! gas constant for water vapor (J deg^-1 kg^-1)28 REAL :: r_v ! = 461.6 ! gas constant for water vapor (J deg^-1 kg^-1) 29 29 REAL :: cv ! = cp-r_d ! Specific heat of air at contant volume (J deg^-1 kg^-1) 30 30 REAL :: cpv ! = 4.*r_v 31 31 REAL :: cvv ! = cpv-r_v ! 32 32 REAL :: cvpm ! = -cv/cp 33 REAL , PARAMETER :: cliq= 4190. ! specific heat of liquid water at 0^oC34 REAL , PARAMETER :: cice= 2106. ! specific heat of ice at 0^oC35 REAL , PARAMETER :: psat= 610.7833 REAL :: cliq ! = 4190. ! specific heat of liquid water at 0^oC 34 REAL :: cice ! = 2106. ! specific heat of ice at 0^oC 35 REAL :: psat ! = 610.78 36 36 REAL :: rcv ! = r_d/cv ! 37 37 REAL :: rcp ! = r_d/cp … … 49 49 REAL :: reradius ! = 1./6370.0e03 ! reciprocal of earth radius (m^-1) 50 50 51 REAL , PARAMETER :: asselin = .025 51 REAL , PARAMETER :: asselin = .025 ! for asselin filter? 52 52 ! REAL , PARAMETER :: asselin = .0 53 REAL , PARAMETER :: cb= 25.53 REAL :: cb ! = 25. 54 54 55 55 REAL , PARAMETER :: XLV0 = 3.15E6 ! constant defined for calculation of latent heating … … 266 266 g = 1.35 267 267 r_d = 298.734319568 268 r_v = 518. ! gas constant for methane vapor at Titan (J.K-1.kg-1) 268 269 cp = 1038.72627727 269 270 t0 = 94. ! earth : 300
Note: See TracChangeset
for help on using the changeset viewer.