Changeset 5252 for LMDZ6/trunk/libf/phylmdiso
- Timestamp:
- Oct 22, 2024, 2:09:45 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.