Changeset 3585 for trunk/LMDZ.PLUTO/libf/phypluto/initracer.F90
- Timestamp:
- Jan 20, 2025, 10:17:54 AM (9 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/initracer.F90
r3572 r3585 123 123 ALLOCATE(is_recomb_qotf(nqtot)) 124 124 ENDIF 125 IF (.NOT. allocated(is_condensable)) allocate(is_condensable(nq)) !LT126 IF (.NOT. allocated(is_rgcs)) allocate(is_rgcs(nq)) !LT127 IF (.NOT. allocated(constants_mass)) allocate(constants_mass(nq))128 IF (.NOT. allocated(constants_delta_gasH)) allocate(constants_delta_gasH(nq))129 IF (.NOT. allocated(constants_Tref)) allocate(constants_Tref(nq))130 IF (.NOT. allocated(constants_Pref)) allocate(constants_Pref(nq))131 IF (.NOT. allocated(constants_RLVTT_generic)) allocate(constants_RLVTT_generic(nq))132 IF (.NOT. allocated(constants_RCPV_generic)) allocate(constants_RCPV_generic(nq))133 125 134 126 !! initialization … … 148 140 radius(:)=0. 149 141 qext(:)=0. 150 151 ! For condensable tracers, by Lucas Teinturier and Noé Clément (2022)152 153 is_condensable(:)= 0154 is_rgcs(:) = 0155 constants_mass(:)=0156 constants_delta_gasH(:)=0157 constants_Tref(:)=0158 constants_Pref(:)=0159 constants_RLVTT_generic(:)=0160 constants_RCPV_generic(:)=0161 142 162 143 rho_q(:) = 0. !need to be init here if we want to read it from modern traceur with get_tracdat … … 403 384 if (is_master) close(407) 404 385 405 ! Get specific data of condensable tracers406 do iq=1,nq407 if((is_condensable(iq)==1)) then408 write(*,*) "There is a specie which is condensable, for generic condensation : ", noms(iq)409 write(*,*) 'looking specie parameters for : ',noms(iq)(1:len(trim(noms(iq)))-4)410 ! call specie_parameters_table(noms(iq)(1:len(trim(noms(iq)))-4))411 ! constants_mass(iq)=m412 ! constants_delta_gasH(iq)=delta_gasH413 ! constants_Tref(iq)=Tref414 ! constants_Pref(iq)=Pref415 ! constants_RLVTT_generic(iq)=RLVTT_generic416 ! constants_RCPV_generic(iq)=RCPV_generic417 else418 write(*,*) "This tracer is not condensable, for generic condensation : : ", noms(iq)419 write(*,*) "We keep condensable constants at zero"420 endif !(is_condensable(iq)==1) .and. (index(noms(iq),"vap") .ne. 0))421 enddo ! iq=1,nq422 423 386 ! Calculate number of species in the chemistry 424 387 nesp = sum(is_chim) 425 388 write(*,*) 'Number of species in the chemistry nesp = ',nesp 426 427 ! Calculate number of generic tracers428 ngt = sum(is_condensable)429 write(*,*) 'Number of generic tracer is ngt = ',ngt430 431 ! Calculate number of radiative generic condensable species432 n_rgcs = sum(is_rgcs)433 write(*,*)'Number of Radiative Generic Condensable Species is n_rgcs = ',n_rgcs434 if (n_rgcs> ngt/2) then435 write(*,*) 'You have more Radiative Generic Condensable Species than Generic Condensable Species'436 write(*,*)'This is not possible: check your Modern traceur.def'437 call abort_physic("initracer, issue with # of RGCS and GCS")438 endif439 389 440 390 ! Calculate number of microphysical tracer … … 461 411 write(*,*) "lw_n2 = ", lw_n2 462 412 463 if (haze) then 413 if (callmufi) then 414 if (optichaze) then 415 iaero_haze = 2 416 write(*,*) 'Microphysical moment model' 417 write(*,*) '--- number of haze aerosol = ', iaero_haze 418 endif ! end optichaze 419 420 elseif (haze) then 464 421 ! the sedimentation radius remains radius(igcm_haze) 465 422 if (fractal) then 466 423 nmono=nb_monomer 467 424 else 468 425 nmono=1 469 426 endif ! end fractal 470 471 ia =0427 428 ia = 0 472 429 if (optichaze) then 473 ia =ia+1474 iaero_haze =ia430 ia = ia + 1 431 iaero_haze = ia 475 432 write(*,*) '--- number of haze aerosol = ', iaero_haze 476 477 block=0 ! Only one type of haze is active : the first one set in traceur.def 433 block = 0 ! Only one type of haze is active : the first one set in traceur.def 478 434 do iq=1,nq 479 435 tracername=noms(iq) … … 484 440 write(*,*) "i_haze=",i_haze 485 441 write(*,*) "Careful: if you set many haze traceurs in & 486 487 442 traceur.def,only ",tracername," will be radiatively active & 443 (first one in traceur.def)" 488 444 endif 489 enddo445 enddo 490 446 endif ! end optichaze 491 447 endif ! end callmufi or haze … … 602 558 is_recomb_qotf(iq) 603 559 end if 604 !option is_condensable (LT)605 if (index(tracline,'is_condensable=') /=0) then606 read(tracline(index(tracline,'is_condensable=') &607 +len('is_condensable='):),*) is_condensable(iq)608 write(*,*) ' Parameter value (traceur.def) :'// &609 ' is_condensable=', is_condensable(iq)610 else611 write(*,*) ' Parameter value (default) :'// &612 ' is_condensable=', is_condensable(iq)613 endif614 560 !option radius 615 561 if (index(tracline,'radius=') .ne. 0) then … … 632 578 ' rho=', rho_q(iq) 633 579 endif 634 !option is_rgcs635 if (index(tracline,'is_rgcs') .ne. 0) then636 read(tracline(index(tracline,'is_rgcs=') &637 +len('is_rgcs='):),*) is_rgcs(iq)638 write(*,*)'Parameter value (traceur.def) :'// &639 'is_rgcs=',is_rgcs(iq)640 else641 write(*,*)'Parameter value (default) : '// &642 'is_rgcs = ',is_rgcs(iq)643 endif644 580 end subroutine get_tracdat 645 581
Note: See TracChangeset
for help on using the changeset viewer.