Changeset 5252 for LMDZ6/trunk
- Timestamp:
- Oct 22, 2024, 2:09:45 PM (2 months ago)
- Location:
- LMDZ6/trunk
- Files:
-
- 2 added
- 22 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d/dynetat0.F90
r5251 r5252 25 25 #endif 26 26 USE iso_params_mod ! tnat_* and alpha_ideal_* 27 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 27 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS 28 USE strings_mod, ONLY: strIdx 28 29 29 30 IMPLICIT NONE … … 47 48 CHARACTER(LEN=maxlen) :: mesg, var, modname, oldVar 48 49 INTEGER, PARAMETER :: length=100 49 INTEGER :: iq, fID, vID, idecal, iqParent, iName, iZone, iPhase 50 INTEGER :: iq, fID, vID, idecal, iqParent, iName, iZone, iPhase, ix 50 51 REAL :: time, tnat, alpha_ideal, tab_cntrl(length) !--- RUN PARAMS TABLE 51 52 LOGICAL :: lSkip, ll, ltnat1 … … 136 137 !--- Tracers 137 138 ll=.FALSE. 138 #ifdef REPROBUS 139 IF (CPPKEY_REPROBUS) THEN 139 140 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE 140 #endif 141 END IF 141 142 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 142 143 DO iq=1,nqtot … … 144 145 oldVar = new2oldH2O(var) 145 146 lSkip = ll .AND. var == 'HNO3' !--- FORCE "HNO3_g" READING FOR "HNO3" 146 #ifdef REPROBUS 147 IF (CPPKEY_REPROBUS) THEN 147 148 ix = strIdx(newHNO3, var); IF(ix /= 0) oldVar = oldHNO3(ix) !--- REPROBUS HNO3 exceptions 148 #endif 149 END IF 149 150 IF (CPPKEY_INCA) THEN 150 151 IF(var == 'O3') oldVar = 'OX' !--- DEAL WITH INCA OZONE EXCEPTION -
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r5251 r5252 118 118 SUBROUTINE init_infotrac 119 119 USE control_mod, ONLY: planet_type 120 #ifdef REPROBUS 121 USE CHEM_REP, ONLY: Init_chem_rep_trac 122 #endif 123 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 120 USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac 121 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER 124 122 IMPLICIT NONE 125 123 !============================================================================================================================== … … 202 200 END IF 203 201 CASE('repr') 204 #ifndef REPROBUS 202 IF (.NOT. CPPKEY_REPROBUS) THEN 205 203 CALL abort_gcm(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1) 206 #endif 204 END IF 207 205 CASE('coag') 208 #ifndef CPP_StratAer 206 IF (.NOT. CPPKEY_STRATAER) THEN 209 207 CALL abort_gcm(modname, 'You must add cpp key StratAer and compile with StratAer code', 1) 210 #endif 208 END IF 211 209 END SELECT 212 210 … … 279 277 !--------------------------------------------------------------------------------------------------------------------------- 280 278 281 #ifdef REPROBUS 279 IF (CPPKEY_REPROBUS) THEN 282 280 CALL Init_chem_rep_trac(nbtr, nqo, tracers(:)%name) 283 #endif 281 END IF 284 282 285 283 !============================================================================================================================== -
LMDZ6/trunk/libf/dyn3dmem/dynetat0_loc.F90
r5251 r5252 26 26 #endif 27 27 USE iso_params_mod ! tnat_* and alpha_ideal_* 28 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 28 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS 29 29 30 30 IMPLICIT NONE … … 161 161 ALLOCATE(q_glo(ip1jmp1,llm)) 162 162 ll = .FALSE. 163 #ifdef REPROBUS 163 IF (CPPKEY_REPROBUS) THEN 164 164 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE 165 #endif 165 END IF 166 166 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 167 167 DO iq=1,nqtot … … 169 169 oldVar = new2oldH2O(var) 170 170 lSkip = ll .AND. var == 'HNO3' !--- FORCE "HNO3_g" READING FOR "HNO3" 171 #ifdef REPROBUS 171 IF (CPPKEY_REPROBUS) THEN 172 172 ix = strIdx(newHNO3, var); IF(ix /= 0) oldVar = oldHNO3(ix) !--- REPROBUS HNO3 exceptions 173 #endif 173 END IF 174 174 IF (CPPKEY_INCA) THEN 175 175 IF(var == 'O3') oldVar = 'OX' !--- DEAL WITH INCA OZONE EXCEPTION -
LMDZ6/trunk/libf/dyn3dmem/leapfrog_loc.F90
r5251 r5252 46 46 xios_set_current_context, & 47 47 using_xios 48 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 48 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS 49 49 50 50 IMPLICIT NONE … … 1531 1531 ENDIF 1532 1532 END IF 1533 #ifdef REPROBUS 1533 IF (CPPKEY_REPROBUS) THEN 1534 1534 if (type_trac == 'repr') CALL finalize_reprobus 1535 #endif 1535 END IF 1536 1536 1537 1537 !$OMP MASTER … … 1588 1588 ENDIF 1589 1589 END IF 1590 #ifdef REPROBUS 1590 IF (CPPKEY_REPROBUS) THEN 1591 1591 if (type_trac == 'repr') CALL finalize_reprobus 1592 #endif 1592 END IF 1593 1593 1594 1594 !$OMP MASTER … … 1762 1762 1763 1763 END IF 1764 #ifdef REPROBUS 1764 IF (CPPKEY_REPROBUS) THEN 1765 1765 if (type_trac == 'repr') CALL finalize_reprobus 1766 #endif 1766 END IF 1767 1767 1768 1768 !$OMP MASTER … … 1876 1876 1877 1877 END IF 1878 #ifdef REPROBUS 1878 IF (CPPKEY_REPROBUS) THEN 1879 1879 if (type_trac == 'repr') CALL finalize_reprobus 1880 #endif 1880 END IF 1881 1881 1882 1882 !$OMP MASTER -
LMDZ6/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
r5251 r5252 17 17 USE vertical_layers_mod, ONLY : init_vertical_layers 18 18 USE infotrac, ONLY: nbtr, type_trac 19 #ifdef CPP_StratAer20 19 USE infotrac_phy, ONLY: nbtr_bin, nbtr_sulgas, id_OCS_strat, & 21 20 id_SO2_strat, id_H2SO4_strat, id_BIN01_strat 22 23 #endif 24 #ifdef REPROBUS 25 USE CHEM_REP, ONLY : Init_chem_rep_phys 21 USE lmdz_reprobus_wrappers, ONLY : Init_chem_rep_phys 26 22 #ifdef CPP_PARA 27 23 USE parallel_lmdz, ONLY : mpi_size, mpi_rank … … 29 25 #endif 30 26 USE mod_phys_lmdz_omp_data, ONLY: klon_omp 31 #endif32 27 USE control_mod, ONLY: dayref,anneeref,day_step,nday,offline, iphysiq 33 28 USE inifis_mod, ONLY: inifis … … 46 41 USE ioipsl_getin_p_mod, ONLY: getin_p 47 42 USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom 48 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 43 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS 49 44 IMPLICIT NONE 50 45 … … 140 135 ! Initializations for Reprobus 141 136 IF (type_trac == 'repr') THEN 142 #ifdef REPROBUS 137 IF (CPPKEY_REPROBUS) THEN 143 138 call Init_chem_rep_phys(klon_omp,nlayer) 144 139 call init_reprobus_para( & 145 140 nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, & 146 141 distrib_phys,communicator) 147 #endif 142 END IF 148 143 ENDIF 149 144 !$OMP END PARALLEL … … 151 146 152 147 IF (type_trac == 'repr') THEN 153 #ifdef REPROBUS 148 IF (CPPKEY_REPROBUS) THEN 154 149 call init_reprobus_para( & 155 150 nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, & 156 151 distrib_phys,communicator) 157 #endif 152 END IF 158 153 ENDIF 159 154 -
LMDZ6/trunk/libf/misc/lmdz_reprobus_wrappers.F90
r5230 r5252 8 8 9 9 ! TODO ugly temp solution until we properly wrap the REPROBUS code 10 USE lmdz_dimensions, ONLY: iim, jjm10 INCLUDE "dimensions.h" 11 11 INTEGER :: itroprep(iim), iter, ndimozon 12 12 REAL :: rsuntime(2), pdt_rep, daynum, solaireTIME, ptrop(iim), ttrop(iim), ztrop(iim), gravit, Z1, & -
LMDZ6/trunk/libf/phy_common/physics_distribution_mod.F90
r5251 r5252 14 14 USE dimphy, ONLY : Init_dimphy 15 15 USE infotrac_phy, ONLY : type_trac 16 #ifdef REPROBUS 17 USE CHEM_REP, ONLY : Init_chem_rep_phys 18 #endif 19 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 16 USE lmdz_reprobus_wrappers, ONLY : Init_chem_rep_phys 17 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS 20 18 21 19 IMPLICIT NONE … … 38 36 END IF 39 37 40 #ifdef REPROBUS 38 IF (CPPKEY_REPROBUS) THEN 41 39 ! Initialization of Reprobus 42 40 IF (type_trac == 'repr') CALL Init_chem_rep_phys(klon_omp,nbp_lev) 43 #endif 41 END IF 44 42 45 43 !$OMP END PARALLEL … … 53 51 ! USE infotrac_phy, ONLY : type_trac 54 52 !#ifdef REPROBUS 55 ! USE CHEM_REP, ONLY : Init_chem_rep_phys53 ! USE lmdz_reprobus_wrappers, ONLY : Init_chem_rep_phys 56 54 !#endif 57 55 -
LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
r5204 r5252 35 35 USE phys_state_var_mod, ONLY: phys_tstep 36 36 USE infotrac_phy, ONLY: type_trac 37 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 37 38 38 39 INCLUDE "conema3.h" … … 2598 2599 ! CALL abort_physic('conf_phys','ok_suntime_rrtm=y and solaire is provided',1) 2599 2600 ! ENDIF 2600 #ifdef CPP_StratAer 2601 IF (iflag_rrtm .NE. 1) THEN 2601 IF (CPPKEY_STRATAER) THEN 2602 IF (iflag_rrtm .NE. 1) THEN 2602 2603 WRITE(lunout,*) ' ERROR iflag_rrtm<>1 but StratAer activated' 2603 2604 CALL abort_physic('conf_phys','iflag_rrtm not valid for StratAer',1) 2604 2605 ENDIF 2605 IF (NSW .NE. 6) THEN 2606 IF (NSW .NE. 6) THEN 2606 2607 WRITE(lunout,*) ' ERROR NSW<>6 but StratAer activated' 2607 2608 CALL abort_physic('conf_phys','NSW not valid for StratAer',1) 2608 2609 ENDIF 2609 #endif 2610 END IF 2610 2611 2611 2612 !--test on ocean surface albedo -
LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
r5251 r5252 19 19 PUBLIC :: new2oldH2O !--- For backwards compatibility in phyetat0 20 20 PUBLIC :: addPhase, delPhase !--- Add/remove the phase from the name of a tracer 21 #if defined CPP_StratAer || defined REPROBUS22 21 PUBLIC :: nbtr_bin, nbtr_sulgas !--- Number of aerosols bins and sulfur gases for StratAer model 23 22 PUBLIC :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 24 #endif25 23 26 24 !=== FOR ISOTOPES: General … … 123 121 !$OMP THREADPRIVATE(conv_flg, pbl_flg) 124 122 125 #if defined CPP_StratAer || defined REPROBUS126 123 !=== SPECIFIC TO STRATOSPHERIC AEROSOLS (CK/OB) 127 124 INTEGER, SAVE :: nbtr_bin, nbtr_sulgas !--- number of aerosols bins and sulfur gases for StratAer model … … 129 126 INTEGER, SAVE :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 130 127 !$OMP THREADPRIVATE(id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat) 131 #endif132 128 133 129 CONTAINS … … 135 131 SUBROUTINE init_infotrac_phy 136 132 USE ioipsl_getin_p_mod, ONLY: getin_p 137 #ifdef REPROBUS 138 USE CHEM_REP, ONLY: Init_chem_rep_trac 139 #endif 140 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 133 USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac 134 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER 141 135 IMPLICIT NONE 142 136 !============================================================================================================================== … … 169 163 CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 170 164 INTEGER :: nqINCA 171 #ifdef CPP_StratAer172 165 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnames(:) 173 #endif174 166 CHARACTER(LEN=2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 175 167 CHARACTER(LEN=3) :: descrq(30) !--- Advection scheme description tags … … 227 219 END IF 228 220 CASE('repr') 229 #ifndef REPROBUS 221 IF (.NOT. CPPKEY_REPROBUS) THEN 230 222 CALL abort_physic(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1) 231 #endif 223 END IF 232 224 CASE('coag') 233 #ifndef CPP_StratAer 225 IF (.NOT. CPPKEY_STRATAER) THEN 234 226 CALL abort_physic(modname, 'You must add cpp key StratAer and compile with StratAer code', 1) 235 #endif 227 END IF 236 228 END SELECT 237 229 !############################################################################################################################## … … 314 306 !--------------------------------------------------------------------------------------------------------------------------- 315 307 316 #ifdef REPROBUS 308 IF (CPPKEY_REPROBUS) THEN 317 309 CALL Init_chem_rep_trac(nbtr, nqo, tracers(:)%name) !--- Transfert the number of tracers to Reprobus 318 #endif 310 END IF 319 311 320 312 !############################################################################################################################## … … 443 435 CALL msg('iso_iName = '//strStack(int2str(PACK(tracers(:)%iso_iName, MASK=tracers(:)%iso_iGroup==iH2O))), modname) 444 436 #endif 445 #ifdef CPP_StratAer 437 IF (CPPKEY_STRATAER) THEN 446 438 IF (type_trac == 'coag') THEN 447 439 nbtr_bin = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)]) … … 461 453 CALL msg('id_TEST_strat ='//TRIM(int2str(id_TEST_strat )), modname) 462 454 END IF 463 #endif 455 END IF 464 456 CALL msg('end', modname) 465 457 -
LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
r5215 r5252 3 3 ! 4 4 MODULE phys_local_var_mod 5 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 5 6 ! Variables locales pour effectuer les appels en serie 6 7 !====================================================================== … … 701 702 !$OMP THREADPRIVATE(dqsfreez) 702 703 703 704 705 706 707 #ifdef CPP_StratAer708 !709 704 ! variables for stratospheric aerosol 710 705 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: d_q_emiss … … 717 712 !$OMP THREADPRIVATE(DENSO4) 718 713 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: DENSO4B 719 !$OMP THREADPRIVATE(DENSO4B) 714 !$OMP THREADPRIVATE(DENSO4B) 720 715 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet 721 716 !$OMP THREADPRIVATE(f_r_wet) … … 802 797 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part 803 798 !$OMP THREADPRIVATE(budg_sed_part) 804 #endif805 #ifdef REPROBUS806 REAL,SAVE,ALLOCATABLE :: d_q_emiss(:,:)807 !$OMP THREADPRIVATE(d_q_emiss)808 #endif809 799 810 800 CONTAINS … … 821 811 USE phys_output_var_mod 822 812 USE phys_state_var_mod 823 #ifdef CPP_StratAer824 813 USE infotrac_phy, ONLY : nbtr_bin 825 #endif826 814 827 815 IMPLICIT NONE … … 1229 1217 ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev)) 1230 1218 1231 #ifdef CPP_StratAer 1219 IF (CPPKEY_STRATAER) THEN 1232 1220 ALLOCATE (d_q_emiss(klon,klev)) 1233 1221 ALLOCATE (R2SO4(klon,klev)) … … 1278 1266 ALLOCATE (sulfmmr_mode(klon,klev,nbtr_bin)) 1279 1267 ALLOCATE (nd_mode(klon,klev,nbtr_bin)) 1280 #endif 1268 END IF 1281 1269 1282 1270 END SUBROUTINE phys_local_var_init … … 1634 1622 DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 1635 1623 1636 #ifdef CPP_StratAer 1624 IF (CPPKEY_STRATAER) THEN 1637 1625 ! variables for strat. aerosol CK 1638 1626 DEALLOCATE (d_q_emiss) … … 1681 1669 DEALLOCATE (budg_h2so4_to_part) 1682 1670 DEALLOCATE (budg_sed_part) 1683 #endif 1671 END IF 1684 1672 1685 1673 END SUBROUTINE phys_local_var_end -
LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r5204 r5252 1438 1438 'flx_co2_land_cor', 'correction of the CO2 flux from the land', 'kg CO2 m-2 s-1', (/ ('', i=1, 10) /)) 1439 1439 1440 #ifdef CPP_StratAer1441 1440 !--extinction coefficient 1442 1441 TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & … … 1517 1516 TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & 1518 1517 'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 10) /)) 1519 #endif1520 1518 1521 1519 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
r5056 r5252 49 49 ! ug Pour les sorties XIOS 50 50 USE wxios 51 #ifdef CPP_StratAer52 51 USE infotrac_phy, ONLY: nbtr_bin 53 #endif54 52 #ifdef ISO 55 53 USE isotopes_mod, ONLY: isoName,iso_HTO … … 58 56 #endif 59 57 #endif 58 59 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 60 60 61 61 IMPLICIT NONE … … 171 171 ALLOCATE(o_dtr_sscav(nqtot),o_dtr_sat(nqtot),o_dtr_uscav(nqtot)) 172 172 ALLOCATE(o_dtr_dry(nqtot),o_dtr_vdf(nqtot)) 173 #ifdef CPP_StratAer 173 IF (CPPKEY_STRATAER) THEN 174 174 ALLOCATE(o_nd_mode(nbtr_bin),o_sulfmmr_mode(nbtr_bin)) 175 #endif 175 END IF 176 176 #ifdef ISO 177 177 ALLOCATE(o_xtprecip(ntraciso)) … … 233 233 clef_files(8) = ok_histNMC(2) 234 234 clef_files(9) = ok_histNMC(3) 235 #ifdef CPP_StratAer 236 clef_files(10)= .TRUE.237 #else 238 clef_files(10)= .FALSE.239 #endif 235 IF (CPPKEY_STRATAER) THEN 236 clef_files(10)= .TRUE. 237 ELSE 238 clef_files(10)= .FALSE. 239 END IF 240 240 241 241 !sortir des fichiers "stations" si clef_stations(:)=.TRUE. … … 545 545 tnam = 'cum'//TRIM(tracers(iq)%name); o_trac_cum(itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 546 546 547 #ifdef CPP_StratAer 547 IF (CPPKEY_STRATAER) THEN 548 548 if(tracers(iq)%name(1:3)=='BIN') then 549 549 itrb = itrb + 1 … … 554 554 tnam = TRIM(tracers(iq)%name)//'_sulfmmr_mode';o_sulfmmr_mode (itrb) = ctrl_out(flag, tnam, lnam, "kg(H2SO4)/kg(air)", [('',i=1,nfiles)]) 555 555 endif 556 #endif 556 END IF 557 557 ENDDO 558 558 -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r5204 r5252 249 249 #endif 250 250 251 #ifdef CPP_StratAer252 251 USE infotrac_phy, ONLY: nbtr_bin 253 USE phys_output_ctrlout_mod, ONLY: & 252 USE phys_output_ctrlout_mod, ONLY: & 254 253 o_budg_3D_nucl, o_budg_3D_cond_evap, o_budg_3D_ocs_to_so2, o_budg_3D_so2_to_h2so4, & 255 254 o_budg_sed_part, o_R2SO4, o_OCS_lifetime, o_SO2_lifetime, & 256 o_budg_3D_backgr_ocs, o_budg_3D_backgr_so2, & 255 o_budg_3D_backgr_ocs, o_budg_3D_backgr_so2, & 257 256 o_budg_dep_dry_ocs, o_budg_dep_wet_ocs, & 258 257 o_budg_dep_dry_so2, o_budg_dep_wet_so2, & 259 258 o_budg_dep_dry_h2so4, o_budg_dep_wet_h2so4, & 260 o_budg_dep_dry_part, o_budg_dep_wet_part, & 261 o_budg_emi_ocs, o_budg_emi_so2, o_budg_emi_h2so4, o_budg_emi_part, & 259 o_budg_dep_dry_part, o_budg_dep_wet_part, & 260 o_budg_emi_ocs, o_budg_emi_so2, o_budg_emi_h2so4, o_budg_emi_part, & 262 261 o_budg_ocs_to_so2, o_budg_so2_to_h2so4, o_budg_h2so4_to_part, & 263 262 o_surf_PM25_sulf, o_ext_strat_550, o_tau_strat_550, & 264 263 o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet, & 265 264 o_SAD_sulfate, o_reff_sulfate, o_sulfmmr, o_nd_mode, o_sulfmmr_mode 266 #endif267 265 268 266 USE lmdz_lscp_ini, ONLY: ok_poprecip … … 411 409 reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra 412 410 413 #ifdef CPP_StratAer414 411 USE phys_local_var_mod, ONLY: & 415 412 budg_3D_nucl, budg_3D_cond_evap, budg_3D_ocs_to_so2, budg_3D_so2_to_h2so4, & … … 425 422 vsed_aer, tau_strat_1020, f_r_wet, & 426 423 SAD_sulfate, reff_sulfate, sulfmmr, nd_mode, sulfmmr_mode 427 #endif428 424 429 425 USE carbon_cycle_mod, ONLY: fco2_ff, fco2_bb, fco2_land, fco2_ocean … … 478 474 479 475 USE vertical_layers_mod, ONLY: presnivs 476 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 480 477 481 478 IMPLICIT NONE … … 534 531 REAL, DIMENSION(klon,klev) :: coefh_stok 535 532 536 #ifdef CPP_StratAer537 533 LOGICAL, PARAMETER :: debug_strataer=.FALSE. 538 534 CHARACTER(LEN=maxlen) :: unt 539 #endif540 535 541 536 #ifdef ISO … … 1831 1826 ! end add ThL 1832 1827 1833 #ifdef CPP_StratAer 1828 IF (CPPKEY_STRATAER) THEN 1834 1829 IF (type_trac=='coag') THEN 1835 1830 CALL histwrite_phy(o_R2SO4, R2SO4) … … 1874 1869 ENDDO !--itr 1875 1870 ENDIF 1876 #endif 1871 END IF 1877 1872 !NL 1878 1873 IF (ok_volcan .AND. ok_ade) THEN -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r5251 r5252 112 112 USE time_phylmdz_mod, ONLY: ndays 113 113 USE infotrac_phy, ONLY: nqCO2 114 #ifdef REPROBUS 115 USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 114 USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 116 115 ptrop, ttrop, ztrop, gravit, itroprep, Z1, Z2, fac, B 117 116 USE strataer_local_var_mod 118 117 USE strataer_emiss_mod, ONLY: strataer_emiss_init 119 #endif120 118 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 121 119 USE vertical_layers_mod, ONLY: aps, bps, ap, bp 122 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 120 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER 123 121 124 122 #ifdef CPP_RRTM … … 127 125 #endif 128 126 129 130 #ifdef CPP_StratAer131 127 USE phys_local_var_mod, ONLY: d_q_emiss 132 128 USE strataer_local_var_mod 133 129 USE strataer_nuc_mod, ONLY: strataer_nuc_init 134 130 USE strataer_emiss_mod, ONLY: strataer_emiss_init 135 #endif136 131 137 132 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize … … 1882 1877 ! 1883 1878 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1884 #ifdef REPROBUS 1879 IF (CPPKEY_REPROBUS) THEN 1885 1880 CALL strataer_init 1886 1881 CALL strataer_emiss_init 1887 #endif 1888 1889 #ifdef CPP_StratAer 1882 END IF 1883 1884 IF (CPPKEY_STRATAER) THEN 1890 1885 CALL strataer_init 1891 1886 CALL strataer_nuc_init 1892 1887 CALL strataer_emiss_init 1893 #endif 1888 END IF 1894 1889 1895 1890 #ifdef CPP_Dust … … 2254 2249 ! 2255 2250 IF (type_trac == 'repr') THEN 2256 #ifdef REPROBUS 2251 IF (CPPKEY_REPROBUS) THEN 2257 2252 CALL chemini_rep( & 2258 2253 presnivs, & … … 2265 2260 io_lon, & 2266 2261 io_lat) 2267 #endif 2262 END IF 2268 2263 ENDIF 2269 2264 … … 2369 2364 ! Update time and other variables in Reprobus 2370 2365 IF (type_trac == 'repr') THEN 2371 #ifdef REPROBUS 2366 IF (CPPKEY_REPROBUS) THEN 2372 2367 CALL Init_chem_rep_xjour(jD_cur-jD_ref+day_ref) 2373 2368 print*,'xjour equivalent rjourvrai',jD_cur-jD_ref+day_ref 2374 2369 CALL Rtime(debut) 2375 #endif 2370 END IF 2376 2371 ENDIF 2377 2372 … … 2625 2620 2626 2621 wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz) 2627 #ifdef REPROBUS 2622 IF (CPPKEY_REPROBUS) THEN 2628 2623 ptrop=dyn_tropopause(t_seri, ztsol, paprs, pplay, rot)/100. 2629 2624 DO i = 1, klon … … 2633 2628 B=Z2-fac*alog(pplay(i,itroprep(i))) 2634 2629 ttrop(i)= fac*alog(ptrop(i))+B 2635 ! 2630 ! 2636 2631 Z1= 1.e-3 * ( pphi(i,itroprep(i)+1)+pphis(i) ) / gravit 2637 2632 Z2= 1.e-3 * ( pphi(i,itroprep(i)) +pphis(i) ) / gravit … … 2640 2635 ztrop(i)=fac*alog(ptrop(i))+B 2641 2636 ENDDO 2642 #endif 2637 END IF 2643 2638 ELSE 2644 2639 !--- ro3i = elapsed days number since current year 1st january, 0h … … 4231 4226 ENDIF !type_trac = inca or inco 4232 4227 IF (type_trac == 'repr') THEN 4233 #ifdef REPROBUS 4228 IF (CPPKEY_REPROBUS) THEN 4234 4229 !CALL chemtime_rep(itap+itau_phy-1, date0, dtime, itap) 4235 CALL chemtime_rep(itap+itau_phy-1, date0, phys_tstep, itap) 4236 #endif 4230 CALL chemtime_rep(itap+itau_phy-1, date0, phys_tstep, itap) 4231 END IF 4237 4232 ENDIF 4238 4233 … … 4370 4365 ELSE 4371 4366 #ifdef CPP_RRTM 4372 #ifndef CPP_StratAer 4373 !--prescribed strat aerosols 4367 IF (.NOT. CPPKEY_STRATAER) THEN 4368 !--prescribed strat aerosols 4374 4369 !--only in the case of non-interactive strat aerosols 4375 4370 IF (flag_aerosol_strat.EQ.1) THEN … … 4381 4376 CALL abort_physic(modname,abort_message,1) 4382 4377 ENDIF 4383 #endif 4378 END IF 4384 4379 #else 4385 4380 abort_message='You should compile with -rrtm if running ' & … … 4393 4388 ! 4394 4389 #ifdef CPP_RRTM 4395 #ifdef CPP_StratAer 4390 IF (CPPKEY_STRATAER) THEN 4396 4391 !--compute stratospheric mask 4397 4392 CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg) 4398 4393 !--interactive strat aerosols 4399 4394 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) 4400 #endif 4395 END IF 4401 4396 #endif 4402 4397 !--fin STRAT AEROSOL … … 5011 5006 IF (ok_qch4) THEN 5012 5007 ! d_q_ch4: H2O source from CH4 in MMR/s (mass mixing ratio/s or kg H2O/kg air/s) 5013 #ifdef CPP_StratAer 5008 IF (CPPKEY_STRATAER) THEN 5009 5014 5010 CALL stratH2O_methox(debut,paprs,d_q_ch4) 5015 #else 5011 ELSE 5016 5012 ! ECMWF routine METHOX 5017 5013 CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) 5018 #endif 5014 END IF 5019 5015 ! add humidity tendency due to methane 5020 5016 d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*phys_tstep … … 5025 5021 ! 5026 5022 ! 5027 #ifdef CPP_StratAer 5023 IF (CPPKEY_STRATAER) THEN 5028 5024 IF (ok_qemiss) THEN 5029 5025 flh2o=1 … … 5033 5029 print *,'IN physiq_mod: nAerErupt=',nAerErupt 5034 5030 ENDIF 5035 5031 5036 5032 SELECT CASE(flag_emit) 5037 5033 CASE(1) ! emission volc H2O in LMDZ … … 5041 5037 day_cur>=day_emit_vol(ieru).AND.& 5042 5038 day_cur<(day_emit_vol(ieru)+injdur)) THEN 5043 5039 5044 5040 IF(flag_verbose_strataer) print *,'IN physiq_mod: date=',year_cur,mth_cur,day_cur 5045 5041 ! initialisation of q tendency emission … … 5056 5052 altemiss_vol(ieru),sigma_alt_vol(ieru),1,1.,& 5057 5053 nAerErupt+1,0) 5058 5054 5059 5055 IF(flag_verbose_strataer) print *,'IN physiq_mod: min max d_q_emiss=',& 5060 5056 minval(d_q_emiss),maxval(d_q_emiss) 5061 5057 5062 5058 CALL add_phys_tend(du0, dv0, dt0, d_q_emiss, dql0, dqi0, dqbs0, paprs, & 5063 5059 'q_emiss',abortphy,flag_inhib_tend,itap,0) … … 5068 5064 END SELECT ! emission scenario (flag_emit) 5069 5065 ENDIF 5070 #endif 5066 END IF 5071 5067 5072 5068 !=============================================================== … … 5305 5301 !MM dans Reprobus 5306 5302 sh_in(:,:) = q_seri(:,:) 5307 #ifdef REPROBUS 5303 IF (CPPKEY_REPROBUS) THEN 5308 5304 d_q_rep(:,:) = 0. 5309 5305 d_ql_rep(:,:) = 0. 5310 5306 d_qi_rep(:,:) = 0. 5311 #endif 5307 END IF 5312 5308 ELSE 5313 5309 sh_in(:,:) = qx(:,:,ivap) … … 5362 5358 d_tr_dyn, & !<<RomP 5363 5359 tr_seri, init_source) 5364 #ifdef REPROBUS 5360 IF (CPPKEY_REPROBUS) THEN 5365 5361 5366 5362 … … 5374 5370 print*,'apr add phys rep',abortphy 5375 5371 5376 #endif 5372 END IF 5377 5373 ENDIF ! (iflag_phytrac=1) 5378 5374 … … 5443 5439 ENDDO 5444 5440 5445 #ifdef CPP_StratAer 5441 IF (CPPKEY_STRATAER) THEN 5446 5442 IF (ok_qemiss) THEN 5447 5443 DO k = 1, klev … … 5449 5445 ENDDO 5450 5446 ENDIF 5451 #endif 5447 END IF 5452 5448 IF (ok_qch4) THEN 5453 5449 DO k = 1, klev … … 5548 5544 5549 5545 IF (type_trac == 'repr') THEN 5550 #ifdef REPROBUS 5546 IF (CPPKEY_REPROBUS) THEN 5551 5547 CALL coord_hyb_rep(paprs, pplay, aps, bps, ap, bp, cell_area) 5552 #endif 5548 END IF 5553 5549 ENDIF 5554 5550 -
LMDZ6/trunk/libf/phylmd/phytrac_mod.F90
r5246 r5252 139 139 USE tracco2i_mod 140 140 141 #ifdef CPP_StratAer142 141 USE traccoag_mod 143 142 USE phys_local_var_mod, ONLY: mdw … … 149 148 USE strataer_nuc_mod, ONLY : tracstrataer_init 150 149 USE aerophys 151 #endif 150 151 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 152 152 153 153 IMPLICIT NONE … … 284 284 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol (nature du sol) 285 285 286 #ifdef CPP_StratAer287 286 REAL,DIMENSION(klon) :: v_dep_dry !dry deposition velocity of stratospheric sulfate in m/s 288 #endif289 287 ! Output argument 290 288 !---------------- … … 513 511 iflag_vdf_trac = 1 ! From CO2i 514 512 iflag_con_trac = 1 ! From CO2i 515 #ifdef CPP_StratAer 513 IF (CPPKEY_STRATAER) THEN 516 514 ELSE IF (type_trac == 'coag') THEN 517 515 source(:,:)=0. 518 516 CALL tracstrataer_init(aerosol,lessivage) ! init aerosols and lessivage param 519 #endif 517 END IF 520 518 ELSE IF (type_trac == 'lmdz') THEN 521 519 CALL traclmdz_init(pctsrf,xlat,xlon,ftsol,tr_seri,t_seri,pplay,sh,pdtphys,aerosol,lessivage) … … 564 562 ELSE IF (type_trac == 'inco') THEN ! Add ThL 565 563 flag_cvltr(it)=.FALSE. 566 #ifdef CPP_StratAer 564 IF (CPPKEY_STRATAER) THEN 567 565 ELSE IF (type_trac == 'coag') THEN 568 566 IF (convscav.and.aerosol(it)) THEN 569 567 flag_cvltr(it)=.TRUE. 570 ccntrAA(it) =ccntrAA_in 568 ccntrAA(it) =ccntrAA_in 571 569 ccntrENV(it)=ccntrENV_in 572 570 coefcoli(it)=coefcoli_in … … 574 572 flag_cvltr(it)=.FALSE. 575 573 ENDIF 576 #endif 574 END IF 577 575 ELSE IF (type_trac == 'lmdz') THEN 578 576 IF (convscav.and.aerosol(it)) THEN … … 658 656 t_seri, pplay, paprs, tr_seri, source) 659 657 660 #ifdef CPP_StratAer 658 IF (CPPKEY_STRATAER) THEN 661 659 ELSE IF (type_trac == 'coag') THEN 662 660 ! --STRATOSPHERIC AER IN THE STRAT -- … … 665 663 t_seri, pplay, paprs, sh, rh , & 666 664 tr_seri) 667 #endif 665 END IF 668 666 ELSE IF (type_trac == 'lmdz') THEN 669 667 ! -- Traitement des traceurs avec traclmdz … … 739 737 ENDDO ! nbtr 740 738 741 #ifdef CPP_StratAer 739 IF (CPPKEY_STRATAER) THEN 742 740 IF (type_trac=='coag') THEN 743 741 ! initialize wet deposition flux of sulfur … … 770 768 ENDDO 771 769 ENDIF 772 #endif 770 END IF 773 771 774 772 ENDIF ! convection … … 820 818 ! Injection during BL mixing 821 819 ! 822 #ifdef CPP_StratAer 820 IF (CPPKEY_STRATAER) THEN 823 821 IF (type_trac=='coag') THEN 824 822 … … 844 842 845 843 ENDIF 846 #endif 844 END IF 847 845 848 846 DO it=1, nbtr … … 857 855 tr_seri(:,:,it)=tr_seri(:,:,it)+d_tr_cl(:,:,it) 858 856 ! 859 #ifdef CPP_StratAer 857 IF (CPPKEY_STRATAER) THEN 860 858 IF (type_trac=='coag') THEN 861 859 ! compute dry deposition flux of sulfur (sum over gases and particles) … … 871 869 ENDIF 872 870 ENDIF 873 #endif 871 END IF 874 872 ! 875 873 ENDIF … … 938 936 ENDDO !tr 939 937 940 #ifdef CPP_StratAer 938 IF (CPPKEY_STRATAER) THEN 941 939 IF (type_trac=='coag') THEN 942 940 ! compute wet deposition flux of sulfur (sum over gases and … … 964 962 ENDDO 965 963 ENDIF 966 #endif 964 END IF 967 965 968 966 ELSE IF (iflag_lscav .EQ. 2) THEN ! frac_impa, frac_nucl -
LMDZ6/trunk/libf/phylmd/radiation_AR4.F90
r4389 r5252 480 480 USE radiation_ar4_param, ONLY: rsun, rray 481 481 USE infotrac_phy, ONLY: type_trac 482 #ifdef REPROBUS 483 USE chem_rep, ONLY: rsuntime, ok_suntime 482 USE lmdz_reprobus_wrappers, ONLY: rsuntime, ok_suntime 484 483 USE print_control_mod, ONLY: lunout 485 #endif 484 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 486 485 487 486 IMPLICIT NONE … … 572 571 ! Otherwise keep default values from radiation_AR4_param module. 573 572 IF (type_trac=='repr') THEN 574 #ifdef REPROBUS 573 IF (CPPKEY_REPROBUS) THEN 575 574 IF (ok_suntime) THEN 576 575 rsun(1) = rsuntime(1) … … 578 577 END IF 579 578 WRITE (lunout, *) 'RSUN(1): ', rsun(1) 580 #endif 579 END IF 581 580 END IF 582 581 … … 702 701 USE radiation_ar4_param, ONLY: rsun, rray 703 702 USE infotrac_phy, ONLY: type_trac 704 #ifdef REPROBUS 705 USE chem_rep, ONLY: rsuntime, ok_suntime 706 #endif 703 USE lmdz_reprobus_wrappers, ONLY: rsuntime, ok_suntime 704 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 707 705 708 706 IMPLICIT NONE … … 826 824 ! Otherwise keep default values from radiation_AR4_param module. 827 825 IF (type_trac=='repr') THEN 828 #ifdef REPROBUS 826 IF (CPPKEY_REPROBUS) THEN 829 827 IF (ok_suntime) THEN 830 828 rsun(1) = rsuntime(1) 831 829 rsun(2) = rsuntime(2) 832 830 END IF 833 #endif 831 END IF 834 832 END IF 835 833 … … 2314 2312 USE radiation_ar4_param, ONLY: tref, rt1, raer, at, bt, oct 2315 2313 USE infotrac_phy, ONLY: type_trac 2316 #ifdef REPROBUS 2317 USE chem_rep, ONLY: rch42d, rn2o2d, rcfc112d, rcfc122d, ok_rtime2d 2318 #endif 2314 USE lmdz_reprobus_wrappers, ONLY: rch42d, rn2o2d, rcfc112d, rcfc122d, ok_rtime2d 2315 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 2319 2316 2320 2317 IMPLICIT NONE … … 2622 2619 2623 2620 IF (type_trac=='repr') THEN 2624 #ifdef REPROBUS 2621 IF (CPPKEY_REPROBUS) THEN 2625 2622 IF (ok_rtime2d) THEN 2626 2623 pabcu(jl, 19, jc) = pabcu(jl, 19, jcp1) + & … … 2653 2650 zably(jl, 8, jc)*rcfc12/rco2*zdiff 2654 2651 END IF 2655 #endif 2652 END IF 2656 2653 ELSE 2657 2654 pabcu(jl, 19, jc) = pabcu(jl, 19, jcp1) + & -
LMDZ6/trunk/libf/phylmd/radlwsw_m.F90
r4976 r5252 53 53 USE write_field_phy 54 54 55 #ifdef REPROBUS 56 USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon 57 #endif 55 USE lmdz_reprobus_wrappers, ONLY : solaireTIME, ok_SUNTIME, ndimozon 56 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 58 57 59 58 #ifdef CPP_RRTM … … 561 560 562 561 IF (type_trac == 'repr') THEN 563 #ifdef REPROBUS 562 IF (CPPKEY_REPROBUS) THEN 564 563 IF (iflag_rrtm==0) THEN 565 564 IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist 566 565 print*,'Constante solaire: ',PSCT*zdist*zdist 567 566 ENDIF 568 #endif 567 END IF 569 568 ENDIF 570 569 … … 645 644 646 645 IF (type_trac == 'repr') THEN 647 #ifdef REPROBUS 646 IF (CPPKEY_REPROBUS) THEN 648 647 ndimozon = size(wo, 3) 649 648 CALL RAD_INTERACTIF(POZON,iof) 650 #endif 649 END IF 651 650 ENDIF 652 651 ! -
LMDZ6/trunk/libf/phylmd/rrtm/lwu.F90
r4389 r5252 6 6 & PAER , PCCO2, PDP , PPMB, PQOF , PTAVE, PVIEW, PWV,& 7 7 & PABCU & 8 & ) 8 & ) 9 9 10 10 !**** *LWU* - LONGWAVE EFFECTIVE ABSORBER AMOUNTS … … 71 71 USE YOELW , ONLY : NSIL ,NUA ,NG1 ,NG1P1 ,& 72 72 & ALWT ,BLWT ,RO3T ,RT1 ,TREF ,& 73 & RVGCO2 ,RVGH2O ,RVGO3 73 & RVGCO2 ,RVGH2O ,RVGO3 74 74 !USE YOERDI , ONLY : RCH4 ,RN2O ,RCFC11 ,RCFC12 75 75 USE YOERDU , ONLY : R10E ,REPSCO ,REPSCQ 76 #ifdef REPROBUS 77 USE chem_rep, ONLY: rch42d, rn2o2d, rcfc112d, rcfc122d, ok_rtime2d 76 USE lmdz_reprobus_wrappers, ONLY: rch42d, rn2o2d, rcfc112d, rcfc122d, ok_rtime2d 78 77 USE infotrac_phy, ONLY : type_trac 79 #endif 80 78 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 81 79 82 80 IMPLICIT NONE 83 81 84 INTEGER(KIND=JPIM),INTENT(IN) :: KLON 85 INTEGER(KIND=JPIM),INTENT(IN) :: KLEV 86 INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA 87 INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA 88 REAL(KIND=JPRB) ,INTENT(IN) :: PAER(KLON,6,KLEV) 89 REAL(KIND=JPRB) ,INTENT(IN) :: PCCO2 90 REAL(KIND=JPRB) ,INTENT(IN) :: PDP(KLON,KLEV) 91 REAL(KIND=JPRB) ,INTENT(IN) :: PPMB(KLON,KLEV+1) 92 REAL(KIND=JPRB) ,INTENT(IN) :: PQOF(KLON,KLEV) 93 REAL(KIND=JPRB) ,INTENT(IN) :: PTAVE(KLON,KLEV) 94 REAL(KIND=JPRB) ,INTENT(IN) :: PVIEW(KLON) 95 REAL(KIND=JPRB) ,INTENT(IN) :: PWV(KLON,KLEV) 96 REAL(KIND=JPRB) ,INTENT(OUT) :: PABCU(KLON,NUA,3*KLEV+1) 82 INTEGER(KIND=JPIM),INTENT(IN) :: KLON 83 INTEGER(KIND=JPIM),INTENT(IN) :: KLEV 84 INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA 85 INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA 86 REAL(KIND=JPRB) ,INTENT(IN) :: PAER(KLON,6,KLEV) 87 REAL(KIND=JPRB) ,INTENT(IN) :: PCCO2 88 REAL(KIND=JPRB) ,INTENT(IN) :: PDP(KLON,KLEV) 89 REAL(KIND=JPRB) ,INTENT(IN) :: PPMB(KLON,KLEV+1) 90 REAL(KIND=JPRB) ,INTENT(IN) :: PQOF(KLON,KLEV) 91 REAL(KIND=JPRB) ,INTENT(IN) :: PTAVE(KLON,KLEV) 92 REAL(KIND=JPRB) ,INTENT(IN) :: PVIEW(KLON) 93 REAL(KIND=JPRB) ,INTENT(IN) :: PWV(KLON,KLEV) 94 REAL(KIND=JPRB) ,INTENT(OUT) :: PABCU(KLON,NUA,3*KLEV+1) 97 95 98 96 #include "clesphys.h" … … 107 105 REAL(KIND=JPRB) :: ZABLY(KLON,7,3*KLEV+1) , ZDPM(KLON,3*KLEV)& 108 106 & , ZDUC(KLON, 3*KLEV+1) , ZFACT(KLON)& 109 & , ZUPM(KLON,3*KLEV) 107 & , ZUPM(KLON,3*KLEV) 110 108 REAL(KIND=JPRB) :: ZPHIO(KLON),ZPSC2(KLON) , ZPSC3(KLON), ZPSH1(KLON)& 111 109 & , ZPSH2(KLON),ZPSH3(KLON) , ZPSH4(KLON), ZPSH5(KLON)& 112 110 & , ZPSH6(KLON),ZPSIO(KLON) , ZTCON(KLON)& 113 & , ZPHM6(KLON),ZPSM6(KLON) , ZPHN6(KLON), ZPSN6(KLON) 111 & , ZPHM6(KLON),ZPSM6(KLON) , ZPHN6(KLON), ZPSN6(KLON) 114 112 REAL(KIND=JPRB) :: ZSSIG(KLON,3*KLEV+1) , ZTAVI(KLON)& 115 & , ZUAER(KLON,NSIL) , ZXOZ(KLON) , ZXWV(KLON) 113 & , ZUAER(KLON,NSIL) , ZXOZ(KLON) , ZXWV(KLON) 116 114 117 115 INTEGER(KIND=JPIM) :: IAE1, IAE2, IAE3, IC, ICP1, IG1, IJ, IJPN,& 118 116 & IKIP1, IKJ, IKJP, IKJPN, IKJR, IKL, JA, JAE, & 119 & JK, JKI, JKK, JL 117 & JK, JKI, JKK, JL 120 118 121 119 REAL(KIND=JPRB) :: ZALUP, ZCAC8, ZCAH1, ZCAH2, ZCAH3, ZCAH4,& … … 123 121 & ZCBH4, ZCBH5, ZCBH6, ZDIFF, ZDPMG, ZDPMP0, & 124 122 & ZFPPW, ZTX, ZTX2, ZU6, ZUP, ZUPMCO2, ZUPMG, & 125 & ZUPMH2O, ZUPMO3, ZZABLY 123 & ZUPMH2O, ZUPMO3, ZZABLY 126 124 REAL(KIND=JPRB) :: ZHOOK_HANDLE 127 125 … … 153 151 DO JL = KIDIA,KFDIA 154 152 ZSSIG(JL,IKJ)= (ZSSIG(JL,IKJR) + ZSSIG(JL,IKJP)) * 0.5_JPRB & 155 & + RT1(IG1) * (ZSSIG(JL,IKJP) - ZSSIG(JL,IKJR)) * 0.5_JPRB 153 & + RT1(IG1) * (ZSSIG(JL,IKJP) - ZSSIG(JL,IKJR)) * 0.5_JPRB 156 154 ENDDO 157 155 ENDDO … … 237 235 & +RAER(JAE,3)*PAER(JL,3,JK)+RAER(JAE,4)*PAER(JL,4,JK)& 238 236 & +RAER(JAE,5)*PAER(JL,5,JK)+RAER(JAE,6)*PAER(JL,6,JK))& 239 & /(ZDUC(JL,IAE1)+ZDUC(JL,IAE2)+ZDUC(JL,IAE3)) 237 & /(ZDUC(JL,IAE1)+ZDUC(JL,IAE2)+ZDUC(JL,IAE3)) 240 238 ENDDO 241 239 ENDDO … … 297 295 DO JL = KIDIA,KFDIA 298 296 ZDIFF = PVIEW(JL) 299 !- H2O continuum 297 !- H2O continuum 300 298 PABCU(JL,10,IC)=PABCU(JL,10,ICP1)+ ZABLY(JL,4,IC) *ZDIFF 301 299 PABCU(JL,11,IC)=PABCU(JL,11,ICP1)+ ZABLY(JL,5,IC)*ZTCON(JL)*ZDIFF 302 !- O3 300 !- O3 303 301 PABCU(JL,12,IC)=PABCU(JL,12,ICP1)+ ZABLY(JL,6,IC)*ZPHIO(JL)*ZDIFF 304 302 PABCU(JL,13,IC)=PABCU(JL,13,ICP1)+ ZABLY(JL,7,IC)*ZPSIO(JL)*ZDIFF … … 320 318 PABCU(JL,17,IC)=PABCU(JL,17,ICP1)+ ZUAER(JL,4) *ZDUC(JL,IC)*ZDIFF 321 319 PABCU(JL,18,IC)=PABCU(JL,18,ICP1)+ ZUAER(JL,5) *ZDUC(JL,IC)*ZDIFF 322 #ifdef REPROBUS 323 IF (type_trac=='repr'.and. ok_rtime2d) THEN 320 IF (CPPKEY_REPROBUS .AND. type_trac=='repr'.AND. ok_rtime2d) THEN 324 321 !- CH4 325 322 PABCU(JL,19,IC)=PABCU(JL,19,ICP1)& … … 340 337 341 338 ELSE 342 #endif343 339 !- CH4 344 340 PABCU(JL,19,IC)=PABCU(JL,19,ICP1)& 345 & + ZABLY(JL,2,IC)*RCH4/PCCO2*ZPHM6(JL)*ZDIFF 341 & + ZABLY(JL,2,IC)*RCH4/PCCO2*ZPHM6(JL)*ZDIFF 346 342 PABCU(JL,20,IC)=PABCU(JL,20,ICP1)& 347 & + ZABLY(JL,3,IC)*RCH4/PCCO2*ZPSM6(JL)*ZDIFF 343 & + ZABLY(JL,3,IC)*RCH4/PCCO2*ZPSM6(JL)*ZDIFF 348 344 !- N2O 349 345 PABCU(JL,21,IC)=PABCU(JL,21,ICP1)& 350 & + ZABLY(JL,2,IC)*RN2O/PCCO2*ZPHN6(JL)*ZDIFF 346 & + ZABLY(JL,2,IC)*RN2O/PCCO2*ZPHN6(JL)*ZDIFF 351 347 PABCU(JL,22,IC)=PABCU(JL,22,ICP1)& 352 & + ZABLY(JL,3,IC)*RN2O/PCCO2*ZPSN6(JL)*ZDIFF 348 & + ZABLY(JL,3,IC)*RN2O/PCCO2*ZPSN6(JL)*ZDIFF 353 349 !- CFC11 354 350 PABCU(JL,23,IC)=PABCU(JL,23,ICP1)& 355 & + ZABLY(JL,2,IC)*RCFC11/PCCO2 *ZDIFF 351 & + ZABLY(JL,2,IC)*RCFC11/PCCO2 *ZDIFF 356 352 !- CFC12 357 353 PABCU(JL,24,IC)=PABCU(JL,24,ICP1)& 358 & + ZABLY(JL,2,IC)*RCFC12/PCCO2 *ZDIFF 359 #ifdef REPROBUS 354 & + ZABLY(JL,2,IC)*RCFC12/PCCO2 *ZDIFF 360 355 END IF 361 #endif362 356 ENDDO 363 357 ENDDO -
LMDZ6/trunk/libf/phylmd/tracreprobus_mod.F90
r4636 r5252 13 13 USE dimphy 14 14 USE infotrac_phy, ONLY: nbtr 15 #ifdef REPROBUS 16 USE CHEM_REP, ONLY : pdt_rep, & ! pas de temps reprobus 15 USE lmdz_reprobus_wrappers, ONLY : pdt_rep, & ! pas de temps reprobus 17 16 daynum, iter, & ! jourjulien, iteration chimie 18 17 pdel,& 19 18 d_q_rep,d_ql_rep,d_qi_rep 20 #endif 19 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 21 20 IMPLICIT NONE 22 21 … … 49 48 INTEGER :: it, k, niter 50 49 51 #ifdef REPROBUS 50 IF (CPPKEY_REPROBUS) THEN 52 51 ! -- CHIMIE REPROBUS -- 53 52 ! pdt_rep=pdtphys/2. … … 87 86 ! ENDDO 88 87 89 #ifdef REPROBUS 88 IF (CPPKEY_REPROBUS) THEN 90 89 CALL chemmain_rlong_1401( & 91 90 tr_seri, & !argument phytrac (change de nom apres: vmr) … … 117 116 ! ENDDO 118 117 119 #endif 118 END IF 120 119 121 120 END DO 122 #endif 121 END IF 123 122 END SUBROUTINE tracreprobus 124 123 -
LMDZ6/trunk/libf/phylmd/tropopause_m.F90
r3666 r5252 17 17 USE geometry_mod, ONLY: latitude_deg, longitude_deg 18 18 USE vertical_layers_mod, ONLY: aps, bps, preff 19 #ifdef REPROBUS 20 USE chem_rep, ONLY: itroprep 21 #endif 19 USE lmdz_reprobus_wrappers, ONLY: itroprep 20 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_REPROBUS 22 21 23 22 !------------------------------------------------------------------------------- … … 111 110 DO kt=1,klev-1; IF(pplay(i,kt+1)>dyn_tropopause(i)) EXIT; END DO; kp=kt 112 111 END IF 113 #ifdef REPROBUS 112 IF (CPPKEY_REPROBUS) THEN 114 113 itroprep(i)=MAX(kt,kp) 115 #endif 114 END IF 116 115 !--- LAST TROPOSPHERIC LAYER INDEX NEEDED 117 116 IF(PRESENT(itrop)) itrop(i)=MAX(kt,kp) -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r5251 r5252 112 112 USE time_phylmdz_mod, ONLY: ndays 113 113 USE infotrac_phy, ONLY: nqCO2 114 #ifdef REPROBUS 115 USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 114 USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 116 115 ptrop, ttrop, ztrop, gravit, itroprep, Z1, Z2, fac, B 117 116 USE strataer_local_var_mod 118 117 USE strataer_emiss_mod, ONLY: strataer_emiss_init 119 #endif120 118 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 121 119 USE vertical_layers_mod, ONLY: aps, bps, ap, bp … … 128 126 129 127 130 #ifdef CPP_StratAer131 128 USE phys_local_var_mod, ONLY: d_q_emiss 132 129 USE strataer_local_var_mod 133 130 USE strataer_nuc_mod, ONLY: strataer_nuc_init 134 131 USE strataer_emiss_mod, ONLY: strataer_emiss_init 135 #endif136 132 137 133 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize … … 437 433 reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra 438 434 USE output_physiqex_mod, ONLY: output_physiqex 439 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 435 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER 440 436 441 437 … … 1515 1511 CALL regr_horiz_time_climoz(read_climoz,ok_daily_climoz) 1516 1512 1517 #ifdef REPROBUS 1518 CALL strataer_init 1519 CALL strataer_emiss_init 1520 #endif 1521 1522 #ifdef CPP_StratAer 1523 CALL strataer_init 1524 CALL strataer_nuc_init 1525 CALL strataer_emiss_init 1526 #endif 1513 IF (CPPKEY_STRATAER .OR. CPPKEY_REPROBUS) THEN 1514 #ifdef ISO 1515 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 1516 #else 1517 CALL strataer_init 1518 CALL strataer_emiss_init 1519 IF (CPPKEY_STRATAER) THEN 1520 CALL strataer_nuc_init 1521 END IF 1522 #endif 1523 END IF 1527 1524 1528 1525 print*, '=================================================' … … 2417 2414 ! 2418 2415 IF (type_trac == 'repr') THEN 2419 #ifdef REPROBUS 2416 IF (CPPKEY_REPROBUS) THEN 2420 2417 CALL chemini_rep( & 2421 2418 presnivs, & … … 2428 2425 io_lon, & 2429 2426 io_lat) 2430 #endif 2427 END IF 2431 2428 ENDIF 2432 2429 … … 2536 2533 ! Update time and other variables in Reprobus 2537 2534 IF (type_trac == 'repr') THEN 2538 #ifdef REPROBUS 2535 IF (CPPKEY_REPROBUS) THEN 2539 2536 CALL Init_chem_rep_xjour(jD_cur-jD_ref+day_ref) 2540 2537 print*,'xjour equivalent rjourvrai',jD_cur-jD_ref+day_ref 2541 2538 CALL Rtime(debut) 2542 #endif 2539 END IF 2543 2540 ENDIF 2544 2541 … … 2985 2982 2986 2983 wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz) 2987 #ifdef REPROBUS 2984 IF (CPPKEY_REPROBUS) THEN 2988 2985 ptrop=dyn_tropopause(t_seri, ztsol, paprs, pplay, rot)/100. 2989 2986 DO i = 1, klon … … 2993 2990 B=Z2-fac*alog(pplay(i,itroprep(i))) 2994 2991 ttrop(i)= fac*alog(ptrop(i))+B 2995 ! 2992 ! 2996 2993 Z1= 1.e-3 * ( pphi(i,itroprep(i)+1)+pphis(i) ) / gravit 2997 2994 Z2= 1.e-3 * ( pphi(i,itroprep(i)) +pphis(i) ) / gravit … … 3000 2997 ztrop(i)=fac*alog(ptrop(i))+B 3001 2998 ENDDO 3002 #endif 2999 END IF 3003 3000 ELSE 3004 3001 !--- ro3i = elapsed days number since current year 1st january, 0h … … 5686 5683 ENDIF !type_trac = inca or inco 5687 5684 IF (type_trac == 'repr') THEN 5688 #ifdef REPROBUS 5685 IF (CPPKEY_REPROBUS) THEN 5689 5686 !CALL chemtime_rep(itap+itau_phy-1, date0, dtime, itap) 5690 CALL chemtime_rep(itap+itau_phy-1, date0, phys_tstep, itap) 5691 #endif 5687 CALL chemtime_rep(itap+itau_phy-1, date0, phys_tstep, itap) 5688 END IF 5692 5689 ENDIF 5693 5690 … … 5824 5821 ELSE 5825 5822 #ifdef CPP_RRTM 5826 #ifndef CPP_StratAer 5827 !--prescribed strat aerosols 5823 IF (.NOT. CPPKEY_STRATAER) THEN 5824 !--prescribed strat aerosols 5828 5825 !--only in the case of non-interactive strat aerosols 5829 5826 IF (flag_aerosol_strat.EQ.1) THEN … … 5835 5832 CALL abort_physic(modname,abort_message,1) 5836 5833 ENDIF 5837 #endif 5834 END IF 5838 5835 #else 5839 5836 abort_message='You should compile with -rrtm if running ' & … … 5847 5844 ! 5848 5845 #ifdef CPP_RRTM 5849 #ifdef CPP_StratAer 5846 IF (CPPKEY_STRATAER) THEN 5847 #ifdef ISO 5848 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 5849 #else 5850 5850 !--compute stratospheric mask 5851 5851 CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg) … … 5853 5853 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) 5854 5854 #endif 5855 END IF 5855 5856 #endif 5856 5857 !--fin STRAT AEROSOL … … 6494 6495 IF (ok_qch4) THEN 6495 6496 ! d_q_ch4: H2O source from CH4 in MMR/s (mass mixing ratio/s or kg H2O/kg air/s) 6496 #ifdef CPP_StratAer 6497 IF (CPPKEY_STRATAER) THEN 6498 #ifdef ISO 6499 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 6500 #else 6497 6501 CALL stratH2O_methox(debut,paprs,d_q_ch4) 6498 #else 6502 #endif 6503 ELSE 6499 6504 ! ECMWF routine METHOX 6500 6505 CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) 6501 #endif 6506 END IF 6502 6507 ! add humidity tendency due to methane 6503 6508 d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*phys_tstep … … 6518 6523 ! 6519 6524 ! 6520 #ifdef CPP_StratAer 6525 IF (CPPKEY_STRATAER) THEN 6526 #ifdef ISO 6527 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 6528 #else 6521 6529 IF (ok_qemiss) THEN 6522 6530 flh2o=1 … … 6526 6534 print *,'IN physiq_mod: nAerErupt=',nAerErupt 6527 6535 ENDIF 6528 6536 6529 6537 SELECT CASE(flag_emit) 6530 6538 CASE(1) ! emission volc H2O in LMDZ … … 6534 6542 day_cur>=day_emit_vol(ieru).AND.& 6535 6543 day_cur<(day_emit_vol(ieru)+injdur)) THEN 6536 6544 6537 6545 IF(flag_verbose_strataer) print *,'IN physiq_mod: date=',year_cur,mth_cur,day_cur 6538 6546 ! initialisation of q tendency emission … … 6549 6557 altemiss_vol(ieru),sigma_alt_vol(ieru),1,1.,& 6550 6558 nAerErupt+1,0) 6551 6559 6552 6560 IF(flag_verbose_strataer) print *,'IN physiq_mod: min max d_q_emiss=',& 6553 6561 minval(d_q_emiss),maxval(d_q_emiss) 6554 6562 6555 6563 CALL add_phys_tend(du0, dv0, dt0, d_q_emiss, dql0, dqi0, dqbs0, paprs, & 6556 6564 'q_emiss',abortphy,flag_inhib_tend,itap,0) … … 6562 6570 ENDIF 6563 6571 #endif 6572 END IF 6564 6573 6565 6574 !=============================================================== … … 6879 6888 !MM dans Reprobus 6880 6889 sh_in(:,:) = q_seri(:,:) 6881 #ifdef REPROBUS 6890 IF (CPPKEY_REPROBUS) THEN 6882 6891 d_q_rep(:,:) = 0. 6883 6892 d_ql_rep(:,:) = 0. 6884 6893 d_qi_rep(:,:) = 0. 6885 #endif 6894 END IF 6886 6895 ELSE 6887 6896 sh_in(:,:) = qx(:,:,ivap) … … 6936 6945 d_tr_dyn, & !<<RomP 6937 6946 tr_seri, init_source) 6938 #ifdef REPROBUS 6939 6947 IF (CPPKEY_REPROBUS) THEN 6948 #ifdef ISO 6949 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 6950 #else 6940 6951 6941 6952 print*,'avt add phys rep',abortphy … … 6947 6958 6948 6959 print*,'apr add phys rep',abortphy 6949 6950 #endif 6960 #endif 6961 END IF 6951 6962 ENDIF ! (iflag_phytrac=1) 6952 6963 … … 7021 7032 ENDDO 7022 7033 7023 #ifdef CPP_StratAer 7034 IF (CPPKEY_STRATAER) THEN 7035 #ifdef ISO 7036 CALL abort_gcm("physiq_mod", "StratAer isn't ISO-compatible for now, 07/24",1) 7037 #else 7024 7038 IF (ok_qemiss) THEN 7025 7039 DO k = 1, klev … … 7028 7042 ENDIF 7029 7043 #endif 7044 END IF 7030 7045 IF (ok_qch4) THEN 7031 7046 DO k = 1, klev … … 7128 7143 7129 7144 IF (type_trac == 'repr') THEN 7130 #ifdef REPROBUS 7145 IF (CPPKEY_REPROBUS) THEN 7131 7146 CALL coord_hyb_rep(paprs, pplay, aps, bps, ap, bp, cell_area) 7132 #endif 7147 END IF 7133 7148 ENDIF 7134 7149 -
LMDZ6/trunk/makelmdz
r5048 r5252 506 506 fi 507 507 508 if [[ "$strataer" == "true" ]] 509 then508 src_dirs="$src_dirs phy${physique}/StratAer" 509 if [[ "$strataer" == "true" ]]; then 510 510 CPP_KEY="$CPP_KEY CPP_StratAer" 511 src_dirs="$src_dirs phy${physique}/StratAer"512 511 fi 513 512 -
LMDZ6/trunk/makelmdz_fcm
r5048 r5252 494 494 fi 495 495 496 if [[ "$strataer" == "true" ]] 497 then496 STRATAER_PATH="$LIBFGCM/phy${physique}/StratAer" 497 if [[ "$strataer" == "true" ]]; then 498 498 CPP_KEY="$CPP_KEY CPP_StratAer" 499 STRATAER_PATH="$LIBFGCM/phy${physique}/StratAer"500 499 fi 501 500
Note: See TracChangeset
for help on using the changeset viewer.