Changeset 3450 for LMDZ6/trunk/libf
- Timestamp:
- Jan 25, 2019, 7:51:34 PM (6 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r3435 r3450 244 244 USE indice_sol_mod 245 245 USE phytrac_mod, ONLY : phytrac 246 USE carbon_cycle_mod, ONLY : infocfields_init 246 USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad 247 247 248 248 #ifdef CPP_RRTM … … 3967 3967 RCFC11 = RCFC11_act 3968 3968 RCFC12 = RCFC12_act 3969 ! 3970 !--interactive CO2 in ppm from carbon cycle 3971 IF (carbon_cycle_rad.AND..NOT.debut) THEN 3972 RCO2=RCO2_glo 3973 ENDIF 3969 3974 ! 3970 3975 IF (prt_level .GE.10) THEN 3971 3976 print *,' ->radlwsw, number 1 ' 3972 3977 ENDIF 3973 3974 3978 ! 3975 3979 CALL radlwsw & -
LMDZ6/trunk/libf/phylmd/phytrac_mod.F90
r3418 r3450 405 405 !Config Key = convscav 406 406 !Config Desc = Convective scavenging switch: 0=off, 1=on. 407 !Config Def = . false.407 !Config Def = .FALSE. 408 408 !Config Help = 409 409 ! 410 410 !$OMP MASTER 411 convscav_omp=. false.411 convscav_omp=.FALSE. 412 412 call getin('convscav', convscav_omp) 413 413 iflag_vdf_trac_omp=1 … … 479 479 CASE('co2i') 480 480 source(:,:)=0. 481 lessivage = .FALSE. 482 aerosol(:) = .FALSE. 483 pbl_flg(:) = 1 484 iflag_the_trac= 1 485 iflag_vdf_trac= 1 486 iflag_con_trac= 1 481 487 #ifdef CPP_StratAer 482 488 CASE('coag') … … 506 512 CASE('lmdz') 507 513 IF (convscav.and.aerosol(it)) THEN 508 flag_cvltr(it)=. true.514 flag_cvltr(it)=.TRUE. 509 515 ccntrAA(it) =ccntrAA_in !--a modifier par JYG a lire depuis fichier 510 516 ccntrENV(it)=ccntrENV_in 511 517 coefcoli(it)=coefcoli_in 512 518 ELSE 513 flag_cvltr(it)=. false.519 flag_cvltr(it)=.FALSE. 514 520 ENDIF 515 521 516 522 CASE('repr') 517 flag_cvltr(it)=. false.523 flag_cvltr(it)=.FALSE. 518 524 519 525 CASE('inca') 520 526 ! IF ((it.EQ.id_Rn222) .OR. ((it.GE.id_SO2) .AND. (it.LE.id_NH3)) ) THEN 521 527 ! !--gas-phase species 522 ! flag_cvltr(it)=. false.528 ! flag_cvltr(it)=.FALSE. 523 529 ! 524 530 ! ELSEIF ( (it.GE.id_CIDUSTM) .AND. (it.LE.id_AIN) ) THEN 525 531 ! !--insoluble aerosol species 526 ! flag_cvltr(it)=. true.532 ! flag_cvltr(it)=.TRUE. 527 533 ! ccntrAA(it)=0.7 528 534 ! ccntrENV(it)=0.7 … … 530 536 ! ELSEIF ( (it.EQ.id_Pb210) .OR. ((it.GE.id_CSSSM) .AND. (it.LE.id_SSN))) THEN 531 537 ! !--soluble aerosol species 532 ! flag_cvltr(it)=. true.538 ! flag_cvltr(it)=.TRUE. 533 539 ! ccntrAA(it)=0.9 534 540 ! ccntrENV(it)=0.9 … … 540 546 !--test OB 541 547 !--for now we do not scavenge in cvltr 542 flag_cvltr(it)=. false.548 flag_cvltr(it)=.FALSE. 543 549 544 550 CASE('co2i') 545 551 !--co2 tracers are not scavenged 546 flag_cvltr(it)=. false.552 flag_cvltr(it)=.FALSE. 547 553 548 554 #ifdef CPP_StratAer 549 555 CASE('coag') 550 556 IF (convscav.and.aerosol(it)) THEN 551 flag_cvltr(it)=. true.557 flag_cvltr(it)=.TRUE. 552 558 ccntrAA(it) =ccntrAA_in 553 559 ccntrENV(it)=ccntrENV_in 554 560 coefcoli(it)=coefcoli_in 555 561 ELSE 556 flag_cvltr(it)=. false.562 flag_cvltr(it)=.FALSE. 557 563 ENDIF 558 564 #endif … … 562 568 ! 563 569 ELSE ! iflag_con .ne. 3 564 flag_cvltr(:) = . false.570 flag_cvltr(:) = .FALSE. 565 571 ENDIF 566 572 ! … … 593 599 ENDIF 594 600 ! 595 END 601 ENDIF ! of IF (debutphy) 596 602 !############################################ END INITIALIZATION ####### 597 603 … … 637 643 ! -- CO2 interactif -- 638 644 ! -- source is updated with FF and BB emissions 639 ! -- OB => PC need to add net fluxfrom ocean and orchidee645 ! -- and net fluxes from ocean and orchidee 640 646 ! -- sign convention : positive into the atmosphere 647 641 648 CALL tracco2i(pdtphys, debutphy, & 642 649 xlat, xlon, pphis, pphi, & … … 754 761 #endif 755 762 756 END 763 ENDIF ! convection 757 764 758 765 !====================================================================== … … 792 799 END DO ! it 793 800 794 END 801 ENDIF ! Thermiques 795 802 796 803 !====================================================================== … … 878 885 CALL abort_physic('iflag_vdf_trac', 'cas non prevu',1) 879 886 ! 880 END 887 ENDIF ! couche limite 881 888 882 889 !====================================================================== … … 968 975 zdz(i,k)=(paprs(i,k)-paprs(i,k+1))/zrho(i,k)/RG 969 976 ! 970 END 971 END 977 ENDDO 978 ENDDO 972 979 973 980 DO k=klev-1, 1, -1 … … 1014 1021 ! (1.-1./(frac_impa(i,k)*frac_nucl(i,k))) 1015 1022 !-------------- 1016 END 1017 END 1018 END 1019 END 1023 ENDDO 1024 ENDDO 1025 ENDIF 1026 ENDDO 1020 1027 ! ********* end modified old version 1021 1028 … … 1053 1060 ! ---------------------------------------------------------------------- 1054 1061 tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) 1055 END 1056 END 1057 END 1058 END 1062 ENDDO 1063 ENDDO 1064 ENDIF 1065 ENDDO 1059 1066 1060 1067 ! ********* end old version 1061 1068 ENDIF ! iflag_lscav . EQ. 1, 2, 3 or 4 1062 1069 ! 1063 END 1070 ENDIF ! lessivage 1064 1071 1065 1072 -
LMDZ6/trunk/libf/phylmd/tracco2i_mod.F90
r3435 r3450 11 11 USE dimphy 12 12 USE infotrac_phy 13 USE geometry_mod, ONLY : cell_area 14 USE carbon_cycle_mod, ONLY : nbcf_in, fields_in, cfname_in, fco2_ocn_day, fco2_ff, fco2_bb 13 USE geometry_mod, ONLY: cell_area 14 USE carbon_cycle_mod, ONLY: id_CO2, nbcf_in, fields_in, cfname_in, fco2_ocn_day, fco2_ff, fco2_bb 15 USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_rad, RCO2_glo, RCO2_tot 15 16 USE mod_grid_phy_lmdz 16 USE mod_phys_lmdz_mpi_data, ONLY :is_mpi_root17 USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root 17 18 USE mod_phys_lmdz_para, ONLY: gather, bcast, scatter 18 19 USE phys_cal_mod 20 USE phys_state_var_mod, ONLY: pctsrf 21 USE indice_sol_mod, ONLY: nbsrf, is_ter, is_lic, is_oce, is_sic 19 22 20 23 IMPLICIT NONE … … 45 48 !---------------- 46 49 47 INTEGER, PARAMETER :: id_CO2=1 !--temporaire OB -- to be changed48 50 INTEGER :: it, k, i, nb 49 51 REAL, DIMENSION(klon,klev) :: m_air ! mass of air in every grid box [kg] … … 53 55 REAL, DIMENSION(klon_glo,klev) :: m_air_glo ! variable temporaire sur la grille global 54 56 55 56 INTEGER, SAVE :: mth_pre=0 57 !$OMP THREADPRIVATE(mth_pre) 58 REAL, SAVE :: RCO2_glo 59 !$OMP THREADPRIVATE(RCO2_glo) 57 INTEGER, SAVE :: mth_pre=0, day_pre=0 58 !$OMP THREADPRIVATE(mth_pre, day_pre) 60 59 61 60 IF (is_mpi_root) THEN … … 68 67 IF (debutphy) THEN 69 68 IF (MAXVAL(tr_seri(:,:,id_CO2)).LT.1.e-15) THEN 70 tr_seri(:,:,id_CO2)=280.e-6/RMD*RMCO2 69 !!tr_seri(:,:,id_CO2)=280.e-6/RMD*RMCO2 70 tr_seri(:,:,id_CO2)=400.e-6/RMD*RMCO2 !--initialised to 400 ppm for a test 71 71 ENDIF 72 72 ENDIF … … 85 85 86 86 !--retrieving land and ocean CO2 flux 87 !--fCO2_nep comes in unit of g CO2 m-2 dt_stomate-188 !--this needs to be changed in ORCHIDEE89 87 co2land(:)=0.0 90 88 co2ocean(:)=0.0 91 89 DO nb=1, nbcf_in 92 IF (cfname_in(nb) == "fCO2_nep" ) co2land(:)=fields_in(:,nb)*RMCO2/RMC/86400./1000. 93 !!IF (cfname_in(nb) == "fCO2_fgco2" ) co2ocean(:)=fco2_ocn_day(:) !--for now 90 !--fCO2_nep comes in unit of kg C m-2 s-1 91 !--converting to kg CO2 m-2 s-1 92 IF (cfname_in(nb) == "fCO2_nep" ) co2land(:)=fields_in(:,nb)*RMCO2/RMC*pctsrf(:,is_ter) 93 !--fCO2_fgco2 comes in unit of mol C02 m-2 s-1 94 !--converting to kg CO2 m-2 s-1 + change sign 95 IF (cfname_in(nb) == "fCO2_fgco2" ) co2ocean(:)=-1.*fco2_ocn_day(:)*RMCO2/1.e3*(pctsrf(:,is_oce)+pctsrf(:,is_sic)) 94 96 ENDDO 95 97 … … 99 101 100 102 !--computing global mean CO2 for radiation 101 !--every timestep for now but enough every month103 !--every timestep for now but enough every day 102 104 ! IF (debutphy.OR.mth_cur.NE.mth_pre) THEN 105 ! IF (debutphy.OR.day_cur.NE.day_pre) THEN 103 106 CALL gather(tr_seri(:,:,id_CO2),co2_glo) 104 107 CALL gather(m_air,m_air_glo) 105 108 !$OMP MASTER 106 !--co nversion from kg CO2/kg air intoppm109 !--compute a global mean CO2 value and print its value in ppm 107 110 IF (is_mpi_root) THEN 108 RCO2_glo=SUM(co2_glo*m_air_glo)/SUM(m_air_glo)*1.e6*RMD/RMCO2 111 RCO2_tot=SUM(co2_glo*m_air_glo) !--unit kg CO2 112 RCO2_glo=RCO2_tot/SUM(m_air_glo) !--unit kg CO2 / kg air 113 PRINT *,'tracco2i: global CO2 in ppm =', RCO2_glo*1.e6*RMD/RMCO2 114 PRINT *,'tracco2i: total CO2 in kg =', RCO2_tot 109 115 ENDIF 110 PRINT *,'toto in tracco2i: global CO2 in ppm =', RCO2_glo111 116 !$OMP END MASTER 112 117 CALL bcast(RCO2_glo) 113 118 mth_pre=mth_cur 119 day_pre=day_cur 120 !--if not carbon_cycle_tr, then we reinitialize the CO2 each day to its global mean value 121 IF (.NOT.carbon_cycle_tr) THEN 122 tr_seri(:,:,id_CO2)=RCO2_glo 123 ENDIF 114 124 ! ENDIF 115 125
Note: See TracChangeset
for help on using the changeset viewer.