Changeset 4013 for LMDZ6/branches/Ocean_skin/libf/phylmd/physiq_mod.F90
- Timestamp:
- Nov 19, 2021, 4:58:59 PM (3 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
- Property svn:mergeinfo changed
-
LMDZ6/branches/Ocean_skin/libf/phylmd/physiq_mod.F90
r3798 r4013 39 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 40 USE indice_sol_mod 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac, nqCO2 42 42 USE iophy 43 43 USE limit_read_mod, ONLY : init_limit_read … … 59 59 USE phys_output_mod 60 60 USE phys_output_ctrlout_mod 61 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 61 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level, & 62 alert_first_call, call_alert, prt_alerte 62 63 USE readaerosol_mod, ONLY : init_aero_fromfile 63 64 USE readaerosolstrato_m, ONLY : init_readaerosolstrato … … 73 74 USE VERTICAL_LAYERS_MOD, ONLY: aps,bps, ap, bp 74 75 USE write_field_phy 76 USE lscp_mod, ONLY : lscp 75 77 76 78 !USE cmp_seri_mod … … 197 199 cdragm, cdragh, & 198 200 zustar, zu10m, zv10m, rh2m, qsat2m, & 199 zq2m, zt2m, weak_inversion, & 200 zq2m_cor,zt2m_cor,zu10m_cor,zv10m_cor, & ! pour corriger d'un bug 201 zrh2m_cor,zqsat2m_cor, & 201 zq2m, zt2m, zn2mout, weak_inversion, & 202 202 zt2m_min_mon, zt2m_max_mon, & ! pour calcul_divers.h 203 203 t2m_min_mon, t2m_max_mon, & ! pour calcul_divers.h … … 212 212 zxrunofflic, & 213 213 zxtsol, snow_lsc, zxfqfonte, zxqsurf, & 214 delta_qsurf, & 214 215 rain_lsc, rain_num, & 215 216 ! … … 219 220 d_t_vdf_x, d_t_vdf_w, & 220 221 d_q_vdf_x, d_q_vdf_w, & 221 pbl_tke_input, &222 pbl_tke_input, tke_dissip, l_mix, wprime,& 222 223 t_therm, q_therm, u_therm, v_therm, & 223 224 cdragh_x, cdragh_w, & … … 246 247 alp_bl_stat, n2, s2, & 247 248 proba_notrig, random_notrig, & 248 cv_gen, & 249 !! cv_gen, & !moved to phys_state_var_mod 249 250 ! 250 251 dnwd0, & … … 355 356 LOGICAL, SAVE :: ok_volcan ! pour activer les diagnostics volcaniques 356 357 !$OMP THREADPRIVATE(ok_volcan) 358 INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf ou dans la strato 359 !$OMP THREADPRIVATE(flag_volc_surfstrat) 357 360 LOGICAL ok_cvl ! pour activer le nouveau driver pour convection KE 358 361 PARAMETER (ok_cvl=.TRUE.) … … 617 620 !$OMP THREADPRIVATE(iflag_alp_wk_cond) 618 621 619 INTEGER, SAVE :: iflag_bug_t2m_ipslcm61=1 !620 !$OMP THREADPRIVATE(iflag_bug_t2m_ipslcm61)621 INTEGER, SAVE :: iflag_bug_t2m_stab_ipslcm61=-1 !622 !$OMP THREADPRIVATE(iflag_bug_t2m_stab_ipslcm61)623 624 622 REAL t_w(klon,klev),q_w(klon,klev) ! temperature and moisture profiles in the wake region 625 623 REAL t_x(klon,klev),q_x(klon,klev) ! temperature and moisture profiles in the off-wake region … … 963 961 !IM cf. AM 081204 BEG 964 962 LOGICAL ptconvth(klon,klev) 963 964 REAL picefra(klon,klev) 965 965 !IM cf. AM 081204 END 966 966 ! … … 1034 1034 !JLD REAL zstophy, zout 1035 1035 1036 CHARACTER *20 modname1037 CHARACTER*80 abort_message1036 CHARACTER (LEN=20) :: modname='physiq_mod' 1037 CHARACTER*80 message, abort_message 1038 1038 LOGICAL, SAVE :: ok_sync, ok_sync_omp 1039 1039 !$OMP THREADPRIVATE(ok_sync) … … 1186 1186 integer iostat 1187 1187 1188 REAL, dimension(klon,klev+1) :: tke_dissip_ave, l_mix_ave, wprime_ave 1188 1189 REAL zzz 1189 1190 !albedo SB >>> … … 1200 1201 pi = 4. * ATAN(1.) 1201 1202 1203 ! set-up call to alerte function 1204 call_alert = (alert_first_call .AND. is_master) 1205 1202 1206 ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter" 1203 1207 jjmp1=nbp_lat … … 1261 1265 fact_cldcon, facttemps,ok_newmicro,iflag_radia, & 1262 1266 iflag_cld_th,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, & 1263 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, & 1264 chemistry_couple, & 1265 flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 1267 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, & 1268 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 1266 1269 flag_bc_internal_mixture, bl95_b0, bl95_b1, & 1267 1270 ! nv flags pour la convection et les … … 1317 1320 forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg 1318 1321 1319 modname = 'physiq'1320 1322 1321 1323 IF (debut) THEN … … 1328 1330 tau_gl=86400.*tau_gl 1329 1331 WRITE(lunout,*) 'debut physiq_mod tau_gl=',tau_gl 1330 1331 iflag_bug_t2m_ipslcm61 = 11332 CALL getin_p('iflag_bug_t2m_ipslcm61', iflag_bug_t2m_ipslcm61)1333 iflag_bug_t2m_stab_ipslcm61 = -11334 CALL getin_p('iflag_bug_t2m_stab_ipslcm61', iflag_bug_t2m_stab_ipslcm61)1335 1332 1336 1333 CALL getin_p('iflag_alp_wk_cond', iflag_alp_wk_cond) … … 1424 1421 tau_overturning_th(:)=0. 1425 1422 1426 IF (type_trac == 'inca' ) THEN1423 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN 1427 1424 ! jg : initialisation jusqu'au ces variables sont dans restart 1428 1425 ccm(:,:,:) = 0. … … 1535 1532 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1536 1533 CALL init_iophy_new(latitude_deg,longitude_deg) 1537 CALL create_etat0_limit_unstruct1538 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0)1539 1534 1540 1535 !=================================================================== … … 1703 1698 1704 1699 CALL iniradia(klon,klev,paprs(1,1:klev+1)) 1705 1706 ! Initialisation des champs dans phytrac* qui sont utilisés par phys_output_write* 1700 ! 1701 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1702 ! Initialisation des champs dans phytrac* qui sont utilises par phys_output_write* 1703 ! 1704 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1705 1707 1706 #ifdef CPP_Dust 1708 1707 ! Quand on utilise SPLA, on force iflag_phytrac=1 … … 1733 1732 #endif 1734 1733 IF(read_climoz>=1 .AND. create_etat0_limit) CALL regr_horiz_time_climoz(read_climoz,ok_daily_climoz) 1734 CALL create_etat0_limit_unstruct 1735 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) 1735 1736 1736 1737 !jyg< … … 1747 1748 ENDDO 1748 1749 ENDDO 1749 1750 ELSE 1750 1751 pbl_tke(:,:,is_ave) = 0. !ym missing init : maybe must be initialized in the same way that for klon_glo==1 ?? 1751 1752 !>jyg … … 1791 1792 CALL abort_physic(modname,abort_message,1) 1792 1793 ENDIF 1794 1795 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1796 ! Initialisation pour la convection de K.E. et pour les poches froides 1797 ! 1798 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1799 1793 1800 WRITE(lunout,*)"Clef pour la convection, iflag_con=", iflag_con 1794 WRITE(lunout,*)"Clef pour le driver de la convection, ok_cvl=", & 1795 ok_cvl 1801 WRITE(lunout,*)"Clef pour le driver de la convection, ok_cvl=", ok_cvl 1796 1802 ! 1797 1803 !KE43 … … 1840 1846 d_s_wk(:) = 0. 1841 1847 d_dens_wk(:) = 0. 1842 ENDIF 1848 ENDIF ! (iflag_wake>=1) 1843 1849 1844 1850 ! do i = 1,klon … … 1851 1857 ! ALLOCATE(lonGCM(0), latGCM(0)) 1852 1858 ! ALLOCATE(iGCM(0), jGCM(0)) 1853 ENDIF 1854 1859 ENDIF ! (iflag_con.GE.3) 1860 ! 1855 1861 DO i=1,klon 1856 1862 rugoro(i) = f_rugoro * MAX(1.0e-05, zstd(i)*zsig(i)/2.0) … … 1921 1927 !$OMP BARRIER 1922 1928 missing_val=missing_val_omp 1929 ! 1930 ! Now we activate some double radiation call flags only if some 1931 ! diagnostics are requested, otherwise there is no point in doing this 1932 IF (is_master) THEN 1933 !--setting up swaero_diag to TRUE in XIOS case 1934 IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. & 1935 xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. & 1936 xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR. & 1937 (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. & 1938 xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0")))) & 1939 !!!--for now these fields are not in the XML files so they are omitted 1940 !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 1941 swaero_diag=.TRUE. 1942 1943 !--setting up swaerofree_diag to TRUE in XIOS case 1944 IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. & 1945 xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR. & 1946 xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. & 1947 xios_field_is_active("LWupTOAcleanclr")) & 1948 swaerofree_diag=.TRUE. 1949 1950 !--setting up dryaod_diag to TRUE in XIOS case 1951 DO naero = 1, naero_tot-1 1952 IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 1953 ENDDO 1954 ! 1955 !--setting up ok_4xCO2atm to TRUE in XIOS case 1956 IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. & 1957 xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. & 1958 xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. & 1959 xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. & 1960 xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. & 1961 xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) & 1962 ok_4xCO2atm=.TRUE. 1963 ENDIF 1964 !$OMP BARRIER 1965 CALL bcast(swaero_diag) 1966 CALL bcast(swaerofree_diag) 1967 CALL bcast(dryaod_diag) 1968 CALL bcast(ok_4xCO2atm) 1923 1969 #endif 1924 1925 1970 ! 1926 1971 CALL printflag( tabcntr0,radpas,ok_journe, & 1927 1972 ok_instan, ok_region ) 1928 1973 ! 1929 1974 ! 1930 !1931 1975 ! Prescrire l'ozone dans l'atmosphere 1932 !1933 1976 ! 1934 1977 !c DO i = 1, klon … … 1938 1981 !c ENDDO 1939 1982 ! 1940 IF (type_trac == 'inca' ) THEN1983 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN ! ModThL 1941 1984 #ifdef INCA 1942 1985 CALL VTe(VTphysiq) … … 1955 1998 klon, & 1956 1999 nqtot, & 1957 nqo , &2000 nqo+nqCO2, & 1958 2001 pdtphys, & 1959 2002 annee_ref, & … … 1986 2029 #endif 1987 2030 ENDIF 2031 ! 1988 2032 IF (type_trac == 'repr') THEN 1989 2033 #ifdef REPROBUS … … 2034 2078 SFRWL(6)=3.02191470E-02 2035 2079 END SELECT 2036 2037 2038 2080 !albedo SB <<< 2039 2081 … … 2158 2200 ! RomP <<< 2159 2201 ENDIF 2160 2161 2202 ! 2162 2203 ! Ne pas affecter les valeurs entrees de u, v, h, et q … … 2497 2538 ! s_therm, s_trmb1, s_trmb2, s_trmb3, 2498 2539 ! zu10m, zv10m, fder, 2499 ! zxqsurf, rh2m, zxfluxu, zxfluxv, 2540 ! zxqsurf, delta_qsurf, 2541 ! rh2m, zxfluxu, zxfluxv, 2500 2542 ! frugs, agesno, fsollw, fsolsw, 2501 2543 ! d_ts, fevap, fluxlat, t2m, … … 2547 2589 debut, lafin, & 2548 2590 longitude_deg, latitude_deg, rugoro, zrmu0, & 2549 zsig, sollwdown, pphi, cldt, &2591 sollwdown, cldt, & 2550 2592 rain_fall, snow_fall, solsw, solswfdiff, sollw, & 2551 2593 gustiness, & … … 2558 2600 !albedo SB <<< 2559 2601 cdragh, cdragm, u1, v1, & 2602 beta_aridity, & 2560 2603 !albedo SB >>> 2561 2604 ! albsol1, albsol2, sens, evap, & … … 2563 2606 !albedo SB <<< 2564 2607 albsol3_lic,runoff, snowhgt, qsnow, to_ice, sissnow, & 2565 zxtsol, zxfluxlat, zt2m, qsat2m, &2608 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & 2566 2609 d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_t_diss, & 2567 2610 !nrlmd< … … 2584 2627 s_therm, s_trmb1, s_trmb2, s_trmb3, & 2585 2628 zustar, zu10m, zv10m, fder, & 2586 zxqsurf, rh2m, zxfluxu, zxfluxv, &2629 zxqsurf, delta_qsurf, rh2m, zxfluxu, zxfluxv, & 2587 2630 z0m, z0h, agesno, fsollw, fsolsw, & 2588 2631 d_ts, fevap, fluxlat, t2m, & … … 2610 2653 !>jyg 2611 2654 ENDIF 2612 2613 !add limitation for t,q at and wind at 10m2614 if ( iflag_bug_t2m_ipslcm61 == 0 ) THEN2615 CALL borne_var_surf( klon,klev,nbsrf, &2616 iflag_bug_t2m_stab_ipslcm61, &2617 t_seri(:,1),q_seri(:,1),u_seri(:,1),v_seri(:,1), &2618 ftsol,zxqsurf,pctsrf,paprs, &2619 t2m, q2m, u10m, v10m, &2620 zt2m_cor, zq2m_cor, zu10m_cor, zv10m_cor, &2621 zrh2m_cor, zqsat2m_cor)2622 ELSE2623 zt2m_cor(:)=zt2m(:)2624 zq2m_cor(:)=zq2m(:)2625 zu10m_cor(:)=zu10m(:)2626 zv10m_cor(:)=zv10m(:)2627 zqsat2m_cor=999.9992628 ENDIF2629 2655 2630 2656 !--------------------------------------------------------------------- … … 3473 3499 ! Computation of ratqs, the width (normalized) of the subrid scale 3474 3500 ! water distribution 3501 3502 tke_dissip_ave(:,:)=0. 3503 l_mix_ave(:,:)=0. 3504 wprime_ave(:,:)=0. 3505 3506 3507 DO nsrf = 1, nbsrf 3508 DO i = 1, klon 3509 tke_dissip_ave(i,:) = tke_dissip_ave(i,:) + tke_dissip(i,:,nsrf)*pctsrf(i,nsrf) 3510 l_mix_ave(i,:) = l_mix_ave(i,:) + l_mix(i,:,nsrf)*pctsrf(i,nsrf) 3511 wprime_ave(i,:) = wprime_ave(i,:) + wprime(i,:,nsrf)*pctsrf(i,nsrf) 3512 ENDDO 3513 ENDDO 3514 3515 3475 3516 CALL calcratqs(klon,klev,prt_level,lunout, & 3476 3517 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 3477 3518 ratqsbas,ratqshaut,ratqsp0, ratqsdp, & 3478 tau_ratqs,fact_cldcon, &3519 tau_ratqs,fact_cldcon,wake_s, wake_deltaq, & 3479 3520 ptconv,ptconvth,clwcon0th, rnebcon0th, & 3480 paprs,pplay, q_seri,zqsat,fm_therm, &3481 ratqs,ratqsc)3482 3521 paprs,pplay,t_seri,q_seri, qtc_cv, sigt_cv, zqsat, & 3522 pbl_tke(:,:,is_ave),tke_dissip_ave,l_mix_ave,wprime_ave,t2m,q2m,fm_therm, & 3523 ratqs,ratqsc,ratqs_inter) 3483 3524 3484 3525 ! … … 3489 3530 print *,'itap, ->fisrtilp ',itap 3490 3531 ENDIF 3491 ! 3532 3533 picefra(:,:)=0. 3534 3535 IF (ok_new_lscp) THEN 3536 3537 CALL lscp(phys_tstep,paprs,pplay, & 3538 t_seri, q_seri,ptconv,ratqs, & 3539 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, cldliq, picefra, & 3540 rain_lsc, snow_lsc, & 3541 pfrac_impa, pfrac_nucl, pfrac_1nucl, & 3542 frac_impa, frac_nucl, beta_prec_fisrt, & 3543 prfl, psfl, rhcl, & 3544 zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & 3545 iflag_ice_thermo) 3546 3547 ELSE 3492 3548 CALL fisrtilp(phys_tstep,paprs,pplay, & 3493 3549 t_seri, q_seri,ptconv,ratqs, & … … 3499 3555 zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & 3500 3556 iflag_ice_thermo) 3501 !3557 ENDIF 3502 3558 WHERE (rain_lsc < 0) rain_lsc = 0. 3503 3559 WHERE (snow_lsc < 0) snow_lsc = 0. … … 3768 3824 ENDDO 3769 3825 3770 IF (type_trac == 'inca' ) THEN3826 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN ! ModThL 3771 3827 #ifdef INCA 3772 3828 CALL VTe(VTphysiq) … … 3811 3867 nbp_lon, & 3812 3868 nbp_lat-1, & 3813 tr_seri , &3869 tr_seri(:,:,1+nqCO2:nbtr), & 3814 3870 ftsol, & 3815 3871 paprs, & … … 3822 3878 CALL VTe(VTinca) 3823 3879 CALL VTb(VTphysiq) 3824 #endif 3825 ENDIF !type_trac = inca 3880 #endif 3881 ENDIF !type_trac = inca or inco 3826 3882 IF (type_trac == 'repr') THEN 3827 3883 #ifdef REPROBUS … … 3994 4050 3995 4051 IF (ok_newmicro) then 3996 IF (iflag_rrtm.NE.0) THEN 4052 ! AI IF (iflag_rrtm.NE.0) THEN 4053 IF (iflag_rrtm.EQ.1) THEN 3997 4054 #ifdef CPP_RRTM 3998 4055 IF (ok_cdnc.AND.NRADLP.NE.3) THEN … … 4008 4065 ENDIF 4009 4066 CALL newmicro (flag_aerosol, ok_cdnc, bl95_b0, bl95_b1, & 4010 paprs, pplay, t_seri, cldliq, cldfra, &4067 paprs, pplay, t_seri, cldliq, picefra, cldfra, & 4011 4068 cldtau, cldemi, cldh, cldl, cldm, cldt, cldq, & 4012 4069 flwp, fiwp, flwc, fiwc, & … … 4016 4073 ELSE 4017 4074 CALL nuage (paprs, pplay, & 4018 t_seri, cldliq, cldfra, cldtau, cldemi, &4075 t_seri, cldliq, picefra, cldfra, cldtau, cldemi, & 4019 4076 cldh, cldl, cldm, cldt, cldq, & 4020 4077 ok_aie, & … … 4168 4225 t_seri,q_seri,wo, & 4169 4226 cldfrarad, cldemirad, cldtaurad, & 4170 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, & 4171 flag_aerosol, & 4172 flag_aerosol_strat, flag_aer_feedback, & 4227 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, flag_volc_surfstrat, & 4228 flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 4173 4229 tau_aero, piz_aero, cg_aero, & 4174 4230 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & … … 4211 4267 4212 4268 #ifndef CPP_XIOS 4213 !--OB 30/05/2016 modified 21/10/2016 4214 !--here we return swaero_diag and dryaod_diag to FALSE 4215 !--and histdef will switch it back to TRUE if necessary 4216 !--this is necessary to get the right swaero at first step 4217 !--but only in the case of no XIOS as XIOS is covered elsewhere 4218 IF (debut) swaerofree_diag = .FALSE. 4219 IF (debut) swaero_diag = .FALSE. 4220 IF (debut) dryaod_diag = .FALSE. 4221 !--IM 15/09/2017 here we return ok_4xCO2atm to FALSE 4222 !--as for swaero_diag, see above 4223 IF (debut) ok_4xCO2atm = .FALSE. 4224 4225 ! 4269 4226 4270 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un 4227 4271 !IM des taux doit etre different du taux actuel … … 4255 4299 t_seri,q_seri,wo, & 4256 4300 cldfrarad, cldemirad, cldtaurad, & 4257 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, & 4258 flag_aerosol, & 4259 flag_aerosol_strat, flag_aer_feedback, & 4301 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, flag_volc_surfstrat, & 4302 flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 4260 4303 tau_aero, piz_aero, cg_aero, & 4261 4304 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & … … 4286 4329 ZLWFT0_i, ZFLDN0, ZFLUP0, & 4287 4330 ZSWFT0_i, ZFSDN0, ZFSUP0) 4288 endif!ok_4xCO2atm4331 ENDIF !ok_4xCO2atm 4289 4332 ENDIF ! aerosol_couple 4290 4333 itaprad = 0 … … 4667 4710 4668 4711 CALL tend_to_tke(pdtphys,paprs,exner,t_seri,u_seri,v_seri,dtadd,duadd,dvadd,pctsrf,pbl_tke) 4669 4712 ! 4713 ! Prevent pbl_tke_w from becoming negative 4714 wake_delta_pbl_tke(:,:,:) = max(wake_delta_pbl_tke(:,:,:), -pbl_tke(:,:,:)) 4715 ! 4670 4716 4671 4717 ENDIF … … 4810 4856 ELSE 4811 4857 sh_in(:,:) = qx(:,:,ivap) 4812 ch_in(:,:) = qx(:,:,iliq) 4858 IF (nqo .EQ. 3) THEN 4859 ch_in(:,:) = qx(:,:,iliq) + qx(:,:,isol) 4860 ELSE 4861 ch_in(:,:) = qx(:,:,iliq) 4862 ENDIF 4813 4863 ENDIF 4814 4864 … … 4949 4999 ENDDO 4950 5000 ! 4951 IF (type_trac == 'inca' ) THEN5001 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN 4952 5002 #ifdef INCA 4953 5003 CALL VTe(VTphysiq) … … 4958 5008 pplay, & 4959 5009 t_seri, & 4960 tr_seri , &5010 tr_seri(:,:,1+nqCO2:nbtr), & 4961 5011 nbtr, & 4962 5012 paprs, & … … 5191 5241 #endif 5192 5242 5193 ! Pour XIOS : On remet des variables a .false. apres un premier appel5194 IF (debut) THEN5195 #ifdef CPP_XIOS5196 swaero_diag=.FALSE.5197 swaerofree_diag=.FALSE.5198 dryaod_diag=.FALSE.5199 ok_4xCO2atm= .FALSE.5200 ! write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm5201 5202 IF (is_master) THEN5203 !--setting up swaero_diag to TRUE in XIOS case5204 IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &5205 xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &5206 xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR. &5207 (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &5208 xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0")))) &5209 !!!--for now these fields are not in the XML files so they are omitted5210 !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &5211 swaero_diag=.TRUE.5212 5213 !--setting up swaerofree_diag to TRUE in XIOS case5214 IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &5215 xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR. &5216 xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &5217 xios_field_is_active("LWupTOAcleanclr")) &5218 swaerofree_diag=.TRUE.5219 5220 !--setting up dryaod_diag to TRUE in XIOS case5221 DO naero = 1, naero_tot-15222 IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.5223 ENDDO5224 !5225 !--setting up ok_4xCO2atm to TRUE in XIOS case5226 IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &5227 xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &5228 xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &5229 xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &5230 xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &5231 xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &5232 ok_4xCO2atm=.TRUE.5233 ENDIF5234 !$OMP BARRIER5235 CALL bcast(swaero_diag)5236 CALL bcast(swaerofree_diag)5237 CALL bcast(dryaod_diag)5238 CALL bcast(ok_4xCO2atm)5239 ! write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm5240 #endif5241 ENDIF5242 5243 5243 !==================================================================== 5244 5244 ! Arret du modele apres hgardfou en cas de detection d'un … … 5258 5258 ! 5259 5259 5260 ! Disabling calls to the prt_alerte function 5261 alert_first_call = .FALSE. 5262 5260 5263 IF (lafin) THEN 5261 5264 itau_phy = itau_phy + itap
Note: See TracChangeset
for help on using the changeset viewer.