Changeset 5151 for LMDZ6/branches/Amaury_dev
- Timestamp:
- Jul 31, 2024, 5:24:31 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf
- Files:
-
- 3 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90
r5104 r5151 12 12 ! CPP_INLANDSIS -> CPPKEY_INLANDSIS 13 13 ! OUTPUT_PHYS_SCM-> CPPKEY_OUTPUTPHYSSCM 14 ! CPP_COSP -> CPPKEY_COSP 15 ! CPP_COSP2 -> CPPKEY_COSP2 16 ! CPP_COSPV2 -> CPPKEY_COSPV2 14 17 ! --------------------------------------------- 15 18 … … 19 22 IMPLICIT NONE; PRIVATE 20 23 PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_DUST, & 21 CPPKEY_DEBUGIO, CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM 24 CPPKEY_DEBUGIO, CPPKEY_INLANDSIS, CPPKEY_OUTPUTPHYSSCM, CPPKEY_COSP, CPPKEY_COSP2, & 25 CPPKEY_COSPV2 22 26 23 27 #ifdef NC_DOUBLE … … 69 73 #endif 70 74 75 #ifdef CPP_COSP 76 LOGICAL, PARAMETER :: CPPKEY_COSP = .TRUE. 77 #else 78 LOGICAL, PARAMETER :: CPPKEY_COSP = .FALSE. 79 #endif 80 81 #ifdef CPP_COSP2 82 LOGICAL, PARAMETER :: CPPKEY_COSP2 = .TRUE. 83 #else 84 LOGICAL, PARAMETER :: CPPKEY_COSP2 = .FALSE. 85 #endif 86 87 #ifdef CPP_COSPV2 88 LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .TRUE. 89 #else 90 LOGICAL, PARAMETER :: CPPKEY_COSPV2 = .FALSE. 91 #endif 92 71 93 END MODULE lmdz_cppkeys_wrapper -
LMDZ6/branches/Amaury_dev/libf/phylmd/dimphy.F90
r5142 r5151 2 2 3 3 MODULE dimphy 4 5 IMPLICIT NONE; PRIVATE 6 PUBLIC klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev, & 7 init_dimphy, init_dimphy1D, zmasq 4 8 5 INTEGER, SAVE :: klon 6 INTEGER, SAVE :: kdlon 7 INTEGER, SAVE :: kfdia 8 INTEGER, SAVE :: kidia 9 INTEGER, SAVE :: klev 10 INTEGER, SAVE :: klevp1 11 INTEGER, SAVE :: klevm1 12 INTEGER, SAVE :: kflev 9 INTEGER :: klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev 13 10 14 11 !$OMP THREADPRIVATE(klon,kfdia,kidia,kdlon) 15 REAL, SAVE,ALLOCATABLE, DIMENSION(:) :: zmasq12 REAL, ALLOCATABLE, DIMENSION(:) :: zmasq 16 13 !$OMP THREADPRIVATE(zmasq) 17 14 18 15 CONTAINS 19 16 20 SUBROUTINE Init_dimphy(klon0, klev0)17 SUBROUTINE init_dimphy(klon0, klev0) 21 18 IMPLICIT NONE 22 19 23 INTEGER, INTENT(IN) :: klon0 24 INTEGER, INTENT(IN) :: klev0 20 INTEGER, INTENT(IN) :: klon0, klev0 25 21 26 22 klon = klon0 … … 37 33 zmasq = 0. 38 34 39 END SUBROUTINE Init_dimphy35 END SUBROUTINE init_dimphy 40 36 41 SUBROUTINE Init_dimphy1D(klon0, klev0)37 SUBROUTINE init_dimphy1D(klon0, klev0) 42 38 ! 1D special version of dimphy without ALLOCATE(zmasq) 43 39 ! which will be allocated in iniphysiq … … 56 52 kflev = klev 57 53 58 END SUBROUTINE Init_dimphy1D54 END SUBROUTINE init_dimphy1D 59 55 60 56 -
LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_calcul_divers.f90
r5150 r5151 1 MODULE lmdz_calcul_divers 2 IMPLICIT NONE; PRIVATE 3 PUBLIC calcul_divers 1 4 2 ! $Id$ 5 CONTAINS 3 6 4 ! itap : nombre de pas de temps de la physique 5 ! itapm1 : somme du nombre de pas de temps du/des mois precedent/s. 6 ! (itap - itapm1) : nombre de pas de temps du mois courant 7 SUBROUTINE calcul_divers(itap, itapm1, un_jour) 8 ! IM, 26.05.2023 9 ! Ne pas modifier les IFs ci-dessous impliquant itapm1, 10 ! autrement les resultats seront faux !! 11 ! 12 ! On utilise MOD(itap - itapm1,NINT(mth_len*un_jour/phys_tstep)).EQ.1) 13 ! pour detecter le debut de chaque mois lorsque l'on tourne par an. 7 14 8 ! Ne pas modifier les IFs ci-dessous impliquant itapm1, 9 ! autrement les resultats seront faux !! 15 ! itap : nombre de pas de temps de la physique 16 ! itapm1 : somme du nombre de pas de temps du/des mois precedent/s. 17 ! (itap - itapm1) : nombre de pas de temps du mois courant 18 USE dimphy, ONLY: klon 19 USE phys_state_var_mod, ONLY: phys_tstep, ndayrain_mth, nday_rain, total_rain, rain_fall, snow_fall 20 USE phys_local_var_mod, ONLY: t2m_min_mon, t2m_max_mon, zt2m_min_mon, zt2m_max_mon, zt2m 21 USE phys_cal_mod, ONLY: mth_len 10 22 11 ! Ici on utilise MOD(itap - itapm1,NINT(mth_len*un_jour/phys_tstep)).EQ.1) 12 ! pour detecter le debut de chaque mois lorsque l on tourne par an. 23 IMPLICIT NONE 13 24 14 ! IM, 26.05.2023 25 INTEGER, INTENT(IN) :: itap 26 INTEGER, INTENT(INOUT) :: itapm1 27 REAL, INTENT(IN) :: un_jour 15 28 29 INTEGER :: i 16 30 17 ! Initialisations itapm1 du premier mois18 IF(itap.EQ.1) THEN19 itapm1=020 ! PRINT*,'initialisation itap=1 itapm1 ',itapm121 31 ! Initialisations itapm1 du premier mois 32 IF(itap==1) THEN 33 itapm1 = 0 34 ! PRINT*,'initialisation itap=1 itapm1 ',itapm1 35 ENDIF 22 36 23 ! Initialisation debut de mois24 IF(itap.EQ.itapm1+1) THEN25 ndayrain_mth(:)=0.26 ! PRINT*,'Initialisation ndayrain_mth ',itap27 37 ! Initialisation debut de mois 38 IF(itap==itapm1 + 1) THEN 39 ndayrain_mth(:) = 0. 40 ! PRINT*,'Initialisation ndayrain_mth ',itap 41 ENDIF 28 42 29 ! Initialisation debut de chaque jour30 IF(MOD(itap,NINT(un_jour/phys_tstep)).EQ.1) THEN31 nday_rain(:)=0.32 ! PRINT*,'initialisation mois suivants day_rain itap',itap33 43 ! Initialisation debut de chaque jour 44 IF(MOD(itap, NINT(un_jour / phys_tstep))==1) THEN 45 nday_rain(:) = 0. 46 ! PRINT*,'initialisation mois suivants day_rain itap',itap 47 ENDIF 34 48 35 ! Calcul a chaque pas de temps de la physique36 37 total_rain(i)=rain_fall(i)+snow_fall(i)38 IF(total_rain(i).GT.0.) nday_rain(i)=1.39 49 ! Calcul a chaque pas de temps de la physique 50 DO i = 1, klon 51 total_rain(i) = rain_fall(i) + snow_fall(i) 52 IF(total_rain(i)>0.) nday_rain(i) = 1. 53 ENDDO 40 54 41 ! Cumul en fin de journee42 IF(MOD(itap,NINT(un_jour/phys_tstep)).EQ.0) THEN43 44 ndayrain_mth(i)=ndayrain_mth(i)+nday_rain(i)45 46 55 ! Cumul en fin de journee 56 IF(MOD(itap, NINT(un_jour / phys_tstep))==0) THEN 57 DO i = 1, klon 58 ndayrain_mth(i) = ndayrain_mth(i) + nday_rain(i) 59 ENDDO 60 ENDIF 47 61 48 ! Initialisation fin de mois49 ! Ne pas changer le IF ci-dessous, car le compteur itapm1 est augmente50 ! apres, dans la boucle !!!51 ! IM, 26052352 IF(MOD(itap-itapm1,NINT(mth_len*un_jour/phys_tstep)).EQ.0) THEN53 itapm1=itapm1+NINT(mth_len*un_jour/phys_tstep)54 ! PRINT*,'fmois i i1 mjt',itap,itapm1,mth_len,un_jour,phys_tstep55 62 ! Initialisation fin de mois 63 ! Ne pas changer le IF ci-dessous, car le compteur itapm1 est augmente 64 ! apres, dans la boucle !!! 65 ! IM, 260523 66 IF(MOD(itap - itapm1, NINT(mth_len * un_jour / phys_tstep))==0) THEN 67 itapm1 = itapm1 + NINT(mth_len * un_jour / phys_tstep) 68 ! PRINT*,'fmois i i1 mjt',itap,itapm1,mth_len,un_jour,phys_tstep 69 ENDIF 56 70 57 ! calcul temperatures minimale et maximale moyennees sur le mois 71 ! calcul temperatures minimale et maximale moyennees sur le mois 58 72 59 !initialisation debut de mois pour les fichiers mensuels annuels60 IF(itap.EQ.itapm1+1) THEN61 t2m_min_mon=0.62 t2m_max_mon=0.63 ENDIF73 !initialisation debut de mois pour les fichiers mensuels annuels 74 IF(itap==itapm1 + 1) THEN 75 t2m_min_mon = 0. 76 t2m_max_mon = 0. 77 ENDIF 64 78 65 !initialisation debut de journee pour les fichiers mensuels annuels66 IF(MOD(itap,NINT(un_jour/phys_tstep)).EQ.1) THEN67 zt2m_min_mon=zt2m68 zt2m_max_mon=zt2m69 ENDIF79 !initialisation debut de journee pour les fichiers mensuels annuels 80 IF(MOD(itap, NINT(un_jour / phys_tstep))==1) THEN 81 zt2m_min_mon = zt2m 82 zt2m_max_mon = zt2m 83 ENDIF 70 84 71 !calcul sur tous les pas de temps pour les fichiers mensuels annuels72 73 zt2m_min_mon(i)=MIN(zt2m(i),zt2m_min_mon(i))74 zt2m_max_mon(i)=MAX(zt2m(i),zt2m_max_mon(i))75 85 !calcul sur tous les pas de temps pour les fichiers mensuels annuels 86 DO i = 1, klon 87 zt2m_min_mon(i) = MIN(zt2m(i), zt2m_min_mon(i)) 88 zt2m_max_mon(i) = MAX(zt2m(i), zt2m_max_mon(i)) 89 ENDDO 76 90 77 !fin journee78 IF(MOD(itap,NINT(un_jour/phys_tstep)).EQ.0) THEN79 t2m_min_mon=t2m_min_mon+zt2m_min_mon80 t2m_max_mon=t2m_max_mon+zt2m_max_mon81 ENDIF91 !fin journee 92 IF(MOD(itap, NINT(un_jour / phys_tstep))==0) THEN 93 t2m_min_mon = t2m_min_mon + zt2m_min_mon 94 t2m_max_mon = t2m_max_mon + zt2m_max_mon 95 ENDIF 82 96 83 !fin mois 84 IF(itap==itapm1) THEN 85 t2m_min_mon=t2m_min_mon/mth_len 86 t2m_max_mon=t2m_max_mon/mth_len 87 ENDIF 97 !fin mois 98 IF(itap==itapm1) THEN 99 t2m_min_mon = t2m_min_mon / mth_len 100 t2m_max_mon = t2m_max_mon / mth_len 101 ENDIF 102 103 END SUBROUTINE calcul_divers 104 105 END MODULE lmdz_calcul_divers -
LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
r5144 r5151 3 3 !#define IO_DEBUG 4 4 MODULE physiq_mod 5 USE lmdz_abort_physic, ONLY: abort_physic6 5 IMPLICIT NONE 7 6 … … 54 53 USE phyetat0_mod, ONLY: phyetat0 55 54 USE phystokenc_mod, ONLY: offline, phystokenc 56 USE phys_cal_mod, ONLY: year_len, mth_len,days_elapsed, jh_1jan, &55 USE phys_cal_mod, ONLY: year_len, days_elapsed, jh_1jan, & 57 56 year_cur, mth_cur, jD_cur, jH_cur, jD_ref, day_cur, hour, calend 58 57 !! USE phys_local_var_mod, ONLY: a long list of variables … … 109 108 USE phytrac_mod, ONLY: phytrac_init, phytrac 110 109 USE phys_output_write_mod 111 112 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DUST 110 USE lmdz_abort_physic, ONLY: abort_physic 111 USE lmdz_calcul_divers, ONLY: calcul_divers 112 113 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DUST, CPPKEY_COSP, CPPKEY_COSP2, CPPKEY_COSPV2 113 114 114 115 !!!!!!!!!!!!!!!!!! "USE" section for CPP keys !!!!!!!!!!!!!!!!!!!!!!!! … … 246 247 zustar, zu10m, zv10m, rh2m, qsat2m, & 247 248 zq2m, zt2m, zn2mout, weak_inversion, & 248 zt2m_min_mon, zt2m_max_mon, & ! pour calcul_divers.h249 t2m_min_mon, t2m_max_mon, & ! pour calcul_divers.h250 249 251 250 s_pblh_x, s_pblh_w, & … … 1160 1159 !============================================================ 1161 1160 ! AI 10-22 1162 #ifdef CPP_COSP 1163 include "ini_COSP.h" 1164 #endif 1165 #ifdef CPP_COSPV2 1166 include "ini_COSP.h" 1167 #endif 1161 INCLUDE "ini_COSP.h" 1162 1168 1163 REAL :: mr_ozone(klon, klev), phicosp(klon, klev) 1169 1164 … … 1743 1738 1744 1739 IF (ok_cosp) THEN 1745 #ifdef CPP_COSP 1746 ! A.I : Initialisations pour le 1er passage a Cosp1747 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &1748 zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, &1749 fiwc_cosp0,prfl_cosp0,psfl_cosp0,pmflxr_cosp0,pmflxs_cosp0, &1750 mr_ozone_cosp0,cldtau_cosp0,cldemi_cosp0,JrNt_cosp0)1751 1752 CALL phys_cosp(itap,phys_tstep,freq_cosp, &1753 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &1754 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &1755 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &1756 JrNt_cosp0,ref_liq_cosp0,ref_ice_cosp0, &1757 pctsrf_cosp0, &1758 zu10m_cosp0,zv10m_cosp0,pphis, &1759 pphi,paprs(:,1:klev),pplay,zxtsol_cosp0,t, &1760 qx(:,:,ivap),zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0,fiwc_cosp0, &1761 prfl_cosp0(:,1:klev),psfl_cosp0(:,1:klev), &1762 pmflxr_cosp0(:,1:klev),pmflxs_cosp0(:,1:klev), &1763 mr_ozone_cosp0,cldtau_cosp0, cldemi_cosp0)1764 #endif 1765 1766 #ifdef CPP_COSP2 1767 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &1768 zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, &1769 fiwc_cosp0,prfl_cosp0,psfl_cosp0,pmflxr_cosp0,pmflxs_cosp0, &1770 mr_ozone_cosp0,cldtau_cosp0,cldemi_cosp0,JrNt_cosp0)1771 1772 CALL phys_cosp2(itap,phys_tstep,freq_cosp, &1773 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &1774 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &1775 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &1776 JrNt,ref_liq,ref_ice, &1777 pctsrf(:,is_ter)+pctsrf(:,is_lic), &1778 zu10m,zv10m,pphis, &1779 zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, &1780 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, &1781 prfl(:,1:klev),psfl(:,1:klev), &1782 pmflxr(:,1:klev),pmflxs(:,1:klev), &1783 mr_ozone,cldtau, cldemi)1784 #endif 1785 1786 #ifdef CPP_COSPV2 1787 CALL lmdz_cosp_interface(itap, phys_tstep,freq_cosp, &1788 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &1789 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &1790 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &1791 JrNt,ref_liq,ref_ice, &1792 pctsrf(:,is_ter)+pctsrf(:,is_lic), &1793 zu10m,zv10m,pphis, &1794 phicosp,paprs(:,1:klev),pplay,zxtsol,t_seri, &1795 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, &1796 prfl(:,1:klev),psfl(:,1:klev), &1797 pmflxr(:,1:klev),pmflxs(:,1:klev), &1798 mr_ozone,cldtau, cldemi)1799 #endif 1800 END IF1740 IF (CPPKEY_COSP) THEN 1741 ! A.I : Initialisations pour le 1er passage a Cosp 1742 CALL ini_COSP(ref_liq_cosp0, ref_ice_cosp0, pctsrf_cosp0, zu10m_cosp0, zv10m_cosp0, & 1743 zxtsol_cosp0, zx_rh_cosp0, cldfra_cosp0, rnebcon_cosp0, flwc_cosp0, & 1744 fiwc_cosp0, prfl_cosp0, psfl_cosp0, pmflxr_cosp0, pmflxs_cosp0, & 1745 mr_ozone_cosp0, cldtau_cosp0, cldemi_cosp0, JrNt_cosp0) 1746 1747 CALL phys_cosp(itap, phys_tstep, freq_cosp, & 1748 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 1749 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 1750 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 1751 JrNt_cosp0, ref_liq_cosp0, ref_ice_cosp0, & 1752 pctsrf_cosp0, & 1753 zu10m_cosp0, zv10m_cosp0, pphis, & 1754 pphi, paprs(:, 1:klev), pplay, zxtsol_cosp0, t, & 1755 qx(:, :, ivap), zx_rh_cosp0, cldfra_cosp0, rnebcon_cosp0, flwc_cosp0, fiwc_cosp0, & 1756 prfl_cosp0(:, 1:klev), psfl_cosp0(:, 1:klev), & 1757 pmflxr_cosp0(:, 1:klev), pmflxs_cosp0(:, 1:klev), & 1758 mr_ozone_cosp0, cldtau_cosp0, cldemi_cosp0) 1759 END IF 1760 1761 IF (CPPKEY_COSP2) THEN 1762 CALL ini_COSP(ref_liq_cosp0, ref_ice_cosp0, pctsrf_cosp0, zu10m_cosp0, zv10m_cosp0, & 1763 zxtsol_cosp0, zx_rh_cosp0, cldfra_cosp0, rnebcon_cosp0, flwc_cosp0, & 1764 fiwc_cosp0, prfl_cosp0, psfl_cosp0, pmflxr_cosp0, pmflxs_cosp0, & 1765 mr_ozone_cosp0, cldtau_cosp0, cldemi_cosp0, JrNt_cosp0) 1766 1767 CALL phys_cosp2(itap, phys_tstep, freq_cosp, & 1768 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 1769 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 1770 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 1771 JrNt, ref_liq, ref_ice, & 1772 pctsrf(:, is_ter) + pctsrf(:, is_lic), & 1773 zu10m, zv10m, pphis, & 1774 zphi, paprs(:, 1:klev), pplay, zxtsol, t_seri, & 1775 qx(:, :, ivap), zx_rh, cldfra, rnebcon, flwc, fiwc, & 1776 prfl(:, 1:klev), psfl(:, 1:klev), & 1777 pmflxr(:, 1:klev), pmflxs(:, 1:klev), & 1778 mr_ozone, cldtau, cldemi) 1779 END IF 1780 1781 IF (CPPKEY_COSPV2) THEN 1782 CALL lmdz_cosp_interface(itap, phys_tstep, freq_cosp, & 1783 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 1784 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 1785 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 1786 JrNt, ref_liq, ref_ice, & 1787 pctsrf(:, is_ter) + pctsrf(:, is_lic), & 1788 zu10m, zv10m, pphis, & 1789 phicosp, paprs(:, 1:klev), pplay, zxtsol, t_seri, & 1790 qx(:, :, ivap), zx_rh, cldfra, rnebcon, flwc, fiwc, & 1791 prfl(:, 1:klev), psfl(:, 1:klev), & 1792 pmflxr(:, 1:klev), pmflxs(:, 1:klev), & 1793 mr_ozone, cldtau, cldemi) 1794 END IF 1795 END IF 1801 1796 1802 1797 … … 5065 5060 5066 5061 IF (ok_cosp) THEN 5067 ! adeclarer 5068 #ifdef CPP_COSP 5069 IF (itap.EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN 5070 5071 IF (prt_level .GE.10) THEN 5072 PRINT*,'freq_cosp',freq_cosp 5062 IF (CPPKEY_COSP) THEN 5063 IF (itap==1.OR.MOD(itap, NINT(freq_cosp / phys_tstep))==0) THEN 5064 5065 IF (prt_level >=10) THEN 5066 PRINT*, 'freq_cosp', freq_cosp 5073 5067 ENDIF 5074 mr_ozone =wo(:, :, 1) * dobson_u * 1e3 / zmasse5068 mr_ozone = wo(:, :, 1) * dobson_u * 1e3 / zmasse 5075 5069 ! PRINT*,'Dans physiq.F avant appel cosp ref_liq,ref_ice=', 5076 5070 ! s ref_liq,ref_ice 5077 CALL phys_cosp(itap, phys_tstep,freq_cosp, &5078 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &5079 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &5080 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &5081 JrNt,ref_liq,ref_ice, &5082 pctsrf(:,is_ter)+pctsrf(:,is_lic), &5083 zu10m,zv10m,pphis, &5084 zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, &5085 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, &5086 prfl(:,1:klev),psfl(:,1:klev), &5087 pmflxr(:,1:klev),pmflxs(:,1:klev), &5088 mr_ozone,cldtau, cldemi)5071 CALL phys_cosp(itap, phys_tstep, freq_cosp, & 5072 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 5073 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 5074 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 5075 JrNt, ref_liq, ref_ice, & 5076 pctsrf(:, is_ter) + pctsrf(:, is_lic), & 5077 zu10m, zv10m, pphis, & 5078 zphi, paprs(:, 1:klev), pplay, zxtsol, t_seri, & 5079 qx(:, :, ivap), zx_rh, cldfra, rnebcon, flwc, fiwc, & 5080 prfl(:, 1:klev), psfl(:, 1:klev), & 5081 pmflxr(:, 1:klev), pmflxs(:, 1:klev), & 5082 mr_ozone, cldtau, cldemi) 5089 5083 5090 5084 ! L calipso2D,calipso3D,cfadlidar,parasolrefl,atb,betamol, … … 5094 5088 ! I tauisccp,albisccp,meantbisccp,meantbclrisccp) 5095 5089 5096 ENDIF5097 #endif 5098 5099 #ifdef CPP_COSP2 5100 IF (itap.EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN5101 5102 IF (prt_level .GE.10) THEN5103 PRINT*,'freq_cosp',freq_cosp5090 END IF 5091 END IF 5092 5093 IF (CPPKEY_COSP2) THEN 5094 IF (itap==1.OR.MOD(itap, NINT(freq_cosp / phys_tstep))==0) THEN 5095 5096 IF (prt_level >=10) THEN 5097 PRINT*, 'freq_cosp', freq_cosp 5104 5098 ENDIF 5105 mr_ozone =wo(:, :, 1) * dobson_u * 1e3 / zmasse5106 PRINT*,'Dans physiq.F avant appel '5099 mr_ozone = wo(:, :, 1) * dobson_u * 1e3 / zmasse 5100 PRINT*, 'Dans physiq.F avant appel ' 5107 5101 ! s ref_liq,ref_ice 5108 CALL phys_cosp2(itap, phys_tstep,freq_cosp, &5109 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &5110 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &5111 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &5112 JrNt,ref_liq,ref_ice, &5113 pctsrf(:,is_ter)+pctsrf(:,is_lic), &5114 zu10m,zv10m,pphis, &5115 zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, &5116 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, &5117 prfl(:,1:klev),psfl(:,1:klev), &5118 pmflxr(:,1:klev),pmflxs(:,1:klev), &5119 mr_ozone,cldtau, cldemi)5120 ENDIF5121 #endif 5122 5123 #ifdef CPP_COSPV2 5124 IF (itap.EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN5125 ! IF (MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN5126 5127 IF (prt_level .GE.10) THEN5128 PRINT*,'freq_cosp',freq_cosp5102 CALL phys_cosp2(itap, phys_tstep, freq_cosp, & 5103 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 5104 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 5105 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 5106 JrNt, ref_liq, ref_ice, & 5107 pctsrf(:, is_ter) + pctsrf(:, is_lic), & 5108 zu10m, zv10m, pphis, & 5109 zphi, paprs(:, 1:klev), pplay, zxtsol, t_seri, & 5110 qx(:, :, ivap), zx_rh, cldfra, rnebcon, flwc, fiwc, & 5111 prfl(:, 1:klev), psfl(:, 1:klev), & 5112 pmflxr(:, 1:klev), pmflxs(:, 1:klev), & 5113 mr_ozone, cldtau, cldemi) 5114 END IF 5115 END IF 5116 5117 IF (CPPKEY_COSPV2) THEN 5118 IF (itap==1.OR.MOD(itap, NINT(freq_cosp / phys_tstep))==0) THEN 5119 ! IF (MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN 5120 5121 IF (prt_level >=10) THEN 5122 PRINT*, 'freq_cosp', freq_cosp 5129 5123 ENDIF 5130 5131 5132 phicosp(i,k) = pphi(i,k) + pphis(i)5133 5134 5135 mr_ozone =wo(:, :, 1) * dobson_u * 1e3 / zmasse5136 PRINT*,'Dans physiq.F avant appel '5124 DO k = 1, klev 5125 DO i = 1, klon 5126 phicosp(i, k) = pphi(i, k) + pphis(i) 5127 ENDDO 5128 ENDDO 5129 mr_ozone = wo(:, :, 1) * dobson_u * 1e3 / zmasse 5130 PRINT*, 'Dans physiq.F avant appel ' 5137 5131 ! s ref_liq,ref_ice 5138 CALL lmdz_cosp_interface(itap, phys_tstep,freq_cosp, &5139 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &5140 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &5141 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, &5142 JrNt,ref_liq,ref_ice, &5143 pctsrf(:,is_ter)+pctsrf(:,is_lic), &5144 zu10m,zv10m,pphis, &5145 zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, &5146 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, &5147 prfl(:,1:klev),psfl(:,1:klev), &5148 pmflxr(:,1:klev),pmflxs(:,1:klev), &5149 mr_ozone,cldtau, cldemi)5150 ENDIF5151 #endif 5152 5153 END IF !ok_cosp5132 CALL lmdz_cosp_interface(itap, phys_tstep, freq_cosp, & 5133 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, & 5134 ecrit_mth, ecrit_day, ecrit_hf, ok_all_xml, missing_val, & 5135 klon, klev, longitude_deg, latitude_deg, presnivs, overlap, & 5136 JrNt, ref_liq, ref_ice, & 5137 pctsrf(:, is_ter) + pctsrf(:, is_lic), & 5138 zu10m, zv10m, pphis, & 5139 zphi, paprs(:, 1:klev), pplay, zxtsol, t_seri, & 5140 qx(:, :, ivap), zx_rh, cldfra, rnebcon, flwc, fiwc, & 5141 prfl(:, 1:klev), psfl(:, 1:klev), & 5142 pmflxr(:, 1:klev), pmflxs(:, 1:klev), & 5143 mr_ozone, cldtau, cldemi) 5144 ENDIF 5145 END IF 5146 5147 END IF !ok_cosp 5154 5148 5155 5149 … … 5389 5383 5390 5384 !IM initialisation + calculs divers diag AMIP2 5391 5392 include "calcul_divers.h" 5385 CALL calcul_divers(itap, itapm1, un_jour) 5393 5386 5394 5387 !IM Interpolation sur les niveaux de pression du NMC -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90
r5144 r5151 110 110 USE phytrac_mod, ONLY: phytrac_init, phytrac 111 111 USE phys_output_write_mod 112 113 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DUST, CPPKEY_STRATAER 112 USE lmdz_calcul_divers, ONLY: calcul_divers 113 114 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DUST, CPPKEY_STRATAER, CPPKEY_COSP, CPPKEY_COSP2, CPPKEY_COSPV2 114 115 115 116 !!!!!!!!!!!!!!!!!! "USE" section for CPP keys !!!!!!!!!!!!!!!!!!!!!!!! … … 1274 1275 !============================================================ 1275 1276 ! AI 10-22 1276 #ifdef CPP_COSP 1277 include "ini_COSP.h" 1278 #endif 1279 #ifdef CPP_COSPV2 1280 include "ini_COSP.h" 1281 #endif 1277 INCLUDE "ini_COSP.h" 1278 1282 1279 REAL :: mr_ozone(klon,klev), phicosp(klon,klev) 1283 1280 … … 1922 1919 1923 1920 IF (ok_cosp) THEN 1924 #ifdef CPP_COSP 1921 IF (CPPKEY_COSP) THEN 1925 1922 ! A.I : Initialisations pour le 1er passage a Cosp 1926 1923 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, & … … 1941 1938 pmflxr_cosp0(:,1:klev),pmflxs_cosp0(:,1:klev), & 1942 1939 mr_ozone_cosp0,cldtau_cosp0, cldemi_cosp0) 1943 #endif 1944 1945 #ifdef CPP_COSP2 1940 END IF 1941 1942 IF (CPPKEY_COSP2) THEN 1946 1943 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, & 1947 1944 zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, & … … 1961 1958 pmflxr(:,1:klev),pmflxs(:,1:klev), & 1962 1959 mr_ozone,cldtau, cldemi) 1963 #endif 1964 1965 #ifdef CPP_COSPV2 1960 END IF 1961 1962 IF (CPPKEY_COSPV2) THEN 1966 1963 CALL lmdz_cosp_interface(itap,phys_tstep,freq_cosp, & 1967 1964 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & … … 1976 1973 pmflxr(:,1:klev),pmflxs(:,1:klev), & 1977 1974 mr_ozone,cldtau, cldemi) 1978 #endif 1975 END IF 1979 1976 ENDIF 1980 1977 … … 6645 6642 IF (ok_cosp) THEN 6646 6643 ! adeclarer 6647 #ifdef CPP_COSP 6648 IF (itap .EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN6649 6650 IF (prt_level .GE.10) THEN6644 IF (CPPKEY_COSP) THEN 6645 IF (itap==1.OR.MOD(itap,NINT(freq_cosp/phys_tstep))==0) THEN 6646 6647 IF (prt_level >=10) THEN 6651 6648 PRINT*,'freq_cosp',freq_cosp 6652 6649 ENDIF … … 6674 6671 6675 6672 ENDIF 6676 #endif 6677 6678 #ifdef CPP_COSP2 6679 IF (itap .EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN6680 6681 IF (prt_level .GE.10) THEN6673 END IF 6674 6675 IF (CPPKEY_COSP2) THEN 6676 IF (itap==1.OR.MOD(itap,NINT(freq_cosp/phys_tstep))==0) THEN 6677 6678 IF (prt_level >=10) THEN 6682 6679 PRINT*,'freq_cosp',freq_cosp 6683 6680 ENDIF … … 6698 6695 mr_ozone,cldtau, cldemi) 6699 6696 ENDIF 6700 #endif 6701 6702 #ifdef CPP_COSPV2 6703 IF (itap .EQ.1.OR.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN6697 END IF 6698 6699 IF (CPPKEY_COSPV2) THEN 6700 IF (itap==1.OR.MOD(itap,NINT(freq_cosp/phys_tstep))==0) THEN 6704 6701 ! IF (MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN 6705 6702 6706 IF (prt_level .GE.10) THEN6703 IF (prt_level >=10) THEN 6707 6704 PRINT*,'freq_cosp',freq_cosp 6708 6705 ENDIF … … 6728 6725 mr_ozone,cldtau, cldemi) 6729 6726 ENDIF 6730 #endif 6727 END IF 6731 6728 6732 6729 ENDIF !ok_cosp … … 7017 7014 7018 7015 !IM initialisation + calculs divers diag AMIP2 7019 7020 include "calcul_divers.h" 7016 CALL calcul_divers(itap, itapm1, un_jour) 7021 7017 7022 7018 !IM Interpolation sur les niveaux de pression du NMC
Note: See TracChangeset
for help on using the changeset viewer.