Changeset 2408 for LMDZ5/branches/testing/libf/phylmd/physiq.F90
- Timestamp:
- Dec 14, 2015, 11:43:09 AM (9 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2293-2295,2297,2299-2302,2305-2313,2315,2317-2380,2382-2396
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/physiq.F90
r2298 r2408 3 3 4 4 SUBROUTINE physiq (nlon,nlev, & 5 debut,lafin,jD_cur , jH_cur,pdtphys, &5 debut,lafin,jD_cur_,jH_cur_,pdtphys_, & 6 6 paprs,pplay,pphi,pphis,presnivs, & 7 u,v, t,qx, &7 u,v,rot,t,qx, & 8 8 flxmass_w, & 9 9 d_u, d_v, d_t, d_qx, d_ps & … … 12 12 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & 13 13 histwrite, ju2ymds, ymds2ju, getin 14 USE comgeomphy14 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 15 15 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 16 mth_cur, phys_cal_update16 mth_cur,jD_cur, jH_cur, jD_ref, phys_cal_update 17 17 USE write_field_phy 18 18 USE dimphy 19 USE infotrac 20 USE mod_grid_phy_lmdz 19 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac 20 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo 21 21 USE mod_phys_lmdz_para 22 22 USE iophy 23 USE misc_mod, mydebug=>debug 23 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 24 USE phystokenc_mod, ONLY: offline, phystokenc 25 USE time_phylmdz_mod, only: raz_date, day_step_phy 24 26 USE vampir 25 27 USE pbl_surface_mod, ONLY : pbl_surface … … 46 48 use radlwsw_m, only: radlwsw 47 49 use phyaqua_mod, only: zenang_an 48 USE control_mod 50 USE time_phylmdz_mod, only: day_step_phy, annee_ref, day_ref, itau_phy, & 51 start_time, pdtphys, day_ini 52 USE tracinca_mod, ONLY: config_inca 49 53 #ifdef CPP_XIOS 50 54 USE wxios, ONLY: missing_val, missing_val_omp … … 60 64 USE YOERAD , ONLY : NRADLP 61 65 #endif 66 USE ioipsl_getin_p_mod, ONLY : getin_p 67 62 68 63 69 !IM stations CFMIP 64 70 USE CFMIP_point_locations 65 71 use FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 72 use ACAMA_GWD_rando_m, only: ACAMA_GWD_rando 66 73 67 74 IMPLICIT none … … 109 116 !! d_ps----output-R-tendance physique de la pression au sol 110 117 !!====================================================================== 111 include "dimensions.h"112 118 integer jjmp1 113 parameter (jjmp1=jjm+1-1/jjm)114 integer iip1115 parameter (iip1=iim+1)119 ! parameter (jjmp1=jjm+1-1/jjm) ! => (jjmp1=nbp_lat-1/(nbp_lat-1)) 120 ! integer iip1 121 ! parameter (iip1=iim+1) 116 122 117 123 include "regdim.h" 118 124 include "dimsoil.h" 119 125 include "clesphys.h" 120 include "temps.h"121 include "iniprint.h"122 126 include "thermcell.h" 123 127 !====================================================================== … … 139 143 !====================================================================== 140 144 ! Clef controlant l'activation du cycle diurne: 141 !cc LOGICAL cycle_diurne 142 !cc PARAMETER (cycle_diurne=.FALSE.) 145 ! en attente du codage des cles par Fred 146 INTEGER iflag_cycle_diurne 147 PARAMETER (iflag_cycle_diurne=1) 143 148 !====================================================================== 144 149 ! Modele thermique du sol, a activer pour le cycle diurne: … … 215 220 INTEGER nlon 216 221 INTEGER nlev 217 REAL, intent(in):: jD_cur, jH_cur 218 219 REAL pdtphys 222 REAL, intent(in):: jD_cur_, jH_cur_ 223 ! JD_cur and JH_cur to be used in physics are in phys_cal_mod 224 REAL,INTENT(IN) :: pdtphys_ 225 ! NB: pdtphys to be used in physics is in time_phylmdz_mod 220 226 LOGICAL debut, lafin 221 227 REAL paprs(klon,klev+1) … … 229 235 REAL u(klon,klev) 230 236 REAL v(klon,klev) 237 238 REAL, intent(in):: rot(klon, klev) 239 ! relative vorticity, in s-1, needed for frontal waves 240 231 241 REAL t(klon,klev),thetal(klon,klev) 232 242 ! thetal: ligne suivante a decommenter si vous avez les fichiers MPL 20130625 … … 404 414 REAL dt_a(klon,klev) 405 415 REAL dq_a(klon,klev) 416 REAL d_t_adjwk(klon,klev) !jyg 417 REAL d_q_adjwk(klon,klev) !jyg 418 LOGICAL,SAVE :: ok_adjwk=.FALSE. 419 !$OMP THREADPRIVATE(ok_adjwk) 406 420 REAL, dimension(klon) :: www 407 421 REAL, SAVE :: alp_offset … … 440 454 integer :: tau_trig(klon) 441 455 456 REAL,SAVE :: random_notrig_max=1. 457 !$OMP THREADPRIVATE(random_notrig_max) 458 442 459 !--------Statistical Boundary Layer Closure: ALP_BL-------- 443 460 !---Profils de TKE dans et hors du thermique … … 494 511 SAVE lmt_pas ! frequence de mise a jour 495 512 !$OMP THREADPRIVATE(lmt_pas) 496 real zmasse(klon, llm),exner(klon, llm)513 real zmasse(klon, nbp_lev),exner(klon, nbp_lev) 497 514 ! (column-density of mass of air in a cell, in kg m-2) 498 515 real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 … … 528 545 EXTERNAL suphel ! initialiser certaines constantes 529 546 EXTERNAL transp ! transport total de l'eau et de l'energie 530 EXTERNAL ecribina ! ecrire le fichier binaire global531 EXTERNAL ecribins ! ecrire le fichier binaire global532 EXTERNAL ecrirega ! ecrire le fichier binaire regional533 EXTERNAL ecriregs ! ecrire le fichier binaire regional534 547 !IM 535 548 EXTERNAL haut2bas !variables de haut en bas … … 574 587 ! REAL zxsnow(klon) 575 588 REAL zxsnow_dummy(klon) 589 REAL zsav_tsol(klon) 576 590 ! 577 591 REAL dist, rmu0(klon), fract(klon) 578 REAL zdtime, zlongi 592 REAL zrmu0(klon), zfract(klon) 593 REAL zdtime, zdtime1, zdtime2, zlongi 579 594 ! 580 595 REAL qcheck … … 682 697 REAL tabcntr0( length ) 683 698 ! 684 INTEGER ndex2d( iim*jjmp1)699 INTEGER ndex2d(nbp_lon*nbp_lat) 685 700 !IM 686 701 ! … … 691 706 REAL zustrli(klon), zvstrli(klon) 692 707 REAL zustrph(klon), zvstrph(klon) 693 REAL zustrhi(klon), zvstrhi(klon)694 708 REAL aam, torsfc 695 709 !IM 141004 END 696 710 !IM 190504 BEG 697 INTEGER ij, imp1jmp1 698 PARAMETER(imp1jmp1=(iim+1)*jjmp1) 711 INTEGER ij 712 ! INTEGER imp1jmp1 713 ! PARAMETER(imp1jmp1=(iim+1)*jjmp1) 699 714 !ym A voir plus tard 700 REAL zx_tmp(imp1jmp1), airedyn(iim+1,jjmp1) 701 REAL padyn(iim+1,jjmp1,klev+1) 702 REAL dudyn(iim+1,jjmp1,klev) 703 REAL rlatdyn(iim+1,jjmp1) 715 REAL zx_tmp((nbp_lon+1)*nbp_lat) 716 REAL airedyn(nbp_lon+1,nbp_lat) 717 REAL padyn(nbp_lon+1,nbp_lat,klev+1) 718 REAL dudyn(nbp_lon+1,nbp_lat,klev) 719 REAL rlatdyn(nbp_lon+1,nbp_lat) 704 720 !IM 190504 END 705 721 LOGICAL ok_msk … … 713 729 REAL zx_tmp_fi2d(klon) ! variable temporaire grille physique 714 730 REAL zx_tmp_fi3d(klon,klev) ! variable temporaire pour champs 3D 715 REAL zx_tmp_2d(iim,jjmp1) 716 REAL zx_lon(iim,jjmp1), zx_lat(iim,jjmp1) 731 REAL zx_tmp_2d(nbp_lon,nbp_lat) 732 REAL zx_lon(nbp_lon,nbp_lat) 733 REAL zx_lat(nbp_lon,nbp_lat) 717 734 ! 718 735 INTEGER nid_day_seri, nid_ctesGCM … … 889 906 !albedo SB <<< 890 907 908 ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter" 909 jjmp1=nbp_lat 910 891 911 !====================================================================== 892 912 ! Gestion calendrier : mise a jour du module phys_cal_mod 893 913 ! 914 JD_cur=JD_cur_ 915 JH_cur=JH_cur_ 916 pdtphys=pdtphys_ 894 917 CALL phys_cal_update(jD_cur,jH_cur) 895 918 … … 902 925 igout=klon/2+1/klon 903 926 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 904 write(lunout,*) 'igout, rlat, rlon ',igout, rlatd(igout)*180./3.141593, rlond(igout)*180./3.141593927 write(lunout,*) 'igout, rlat, rlon ',igout, latitude_deg(igout), longitude_deg(igout) 905 928 write(lunout,*) & 906 929 'nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys' … … 975 998 pde_u(:,:) = 0. 976 999 aam=0. 1000 d_t_adjwk(:,:)=0 1001 d_q_adjwk(:,:)=0 977 1002 978 1003 alp_bl_conv(:)=0. 979 1004 980 1005 torsfc=0. 981 forall (k=1: llm) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg1006 forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg 982 1007 983 1008 … … 993 1018 IF (debut) THEN 994 1019 CALL suphel ! initialiser constantes et parametres phys. 1020 CALL getin_p('random_notrig_max',random_notrig_max) 1021 CALL getin_p('ok_adjwk',ok_adjwk) 995 1022 ENDIF 996 1023 … … 1033 1060 piz_aero(:,:,:,:) = 0. 1034 1061 cg_aero(:,:,:,:) = 0. 1062 1063 config_inca='none' ! default 1064 CALL getin_p('config_inca',config_inca) 1065 1035 1066 END IF 1036 1067 … … 1045 1076 print*,'iflag_coupl,iflag_clos,iflag_wake', & 1046 1077 iflag_coupl,iflag_clos,iflag_wake 1047 print*,' CYCLE_DIURNE',cycle_diurne1078 print*,'iflag_CYCLE_DIURNE', iflag_cycle_diurne 1048 1079 ! 1049 1080 IF (iflag_con.EQ.2.AND.iflag_cld_th.GT.-1) THEN 1050 1081 abort_message = 'Tiedtke needs iflag_cld_th=-2 or -1' 1051 CALL abort_ gcm(modname,abort_message,1)1082 CALL abort_physic (modname,abort_message,1) 1052 1083 ENDIF 1053 1084 ! … … 1073 1104 ! pour obtenir le meme resultat. 1074 1105 dtime=pdtphys 1075 radpas = NINT( 86400./dtime/nbapp_rad) 1106 IF (MOD(INT(86400./dtime),nbapp_rad).EQ.0) THEN 1107 radpas = NINT( 86400./dtime/nbapp_rad) 1108 ELSE 1109 WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un multiple de nbapp_rad' 1110 WRITE(lunout,*) 'changer nbapp_rad ou alors commenter ce test mais 1+1<>2' 1111 abort_message='nbre de pas de temps physique n est pas multiple de nbapp_rad' 1112 call abort_physic(modname,abort_message,1) 1113 ENDIF 1076 1114 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1077 1115 … … 1097 1135 ENDIF 1098 1136 1099 !IM cf. AM 081204 BEG1100 PRINT*,'cycle_diurne3 =',cycle_diurne1101 !IM cf. AM 081204 END1102 !1103 1137 CALL printflag( tabcntr0,radpas,ok_journe, & 1104 1138 ok_instan, ok_region ) … … 1108 1142 pdtphys 1109 1143 abort_message='Pas physique n est pas correct ' 1110 ! call abort_ gcm(modname,abort_message,1)1144 ! call abort_physic(modname,abort_message,1) 1111 1145 dtime=pdtphys 1112 1146 ENDIF … … 1115 1149 klon 1116 1150 abort_message='nlon et klon ne sont pas coherents' 1117 call abort_ gcm(modname,abort_message,1)1151 call abort_physic(modname,abort_message,1) 1118 1152 ENDIF 1119 1153 IF (nlev .NE. klev) THEN … … 1121 1155 klev 1122 1156 abort_message='nlev et klev ne sont pas coherents' 1123 call abort_ gcm(modname,abort_message,1)1157 call abort_physic(modname,abort_message,1) 1124 1158 ENDIF 1125 1159 ! 1126 IF (dtime*REAL(radpas).GT.21600..AND. cycle_diurne) THEN1160 IF (dtime*REAL(radpas).GT.21600..AND.iflag_cycle_diurne.GE.1) THEN 1127 1161 WRITE(lunout,*)'Nbre d appels au rayonnement insuffisant' 1128 1162 WRITE(lunout,*)"Au minimum 4 appels par jour si cycle diurne" 1129 1163 abort_message='Nbre d appels au rayonnement insuffisant' 1130 call abort_ gcm(modname,abort_message,1)1164 call abort_physic(modname,abort_message,1) 1131 1165 ENDIF 1132 1166 WRITE(lunout,*)"Clef pour la convection, iflag_con=", iflag_con … … 1183 1217 IF(nCFMIP.GT.npCFMIP) THEN 1184 1218 print*,'nCFMIP > npCFMIP : augmenter npCFMIP et recompiler' 1185 call abort_ gcm("physiq", "", 1)1219 call abort_physic("physiq", "", 1) 1186 1220 else 1187 1221 print*,'physiq npCFMIP=',npCFMIP,'nCFMIP=',nCFMIP … … 1331 1365 rg, & 1332 1366 ra, & 1333 airephy, &1367 cell_area, & 1334 1368 rlat, & 1335 1369 rlon, & … … 1538 1572 IF (ip_ebil_phy.ge.1) THEN 1539 1573 ztit='after dynamic' 1540 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &1574 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 1541 1575 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1542 1576 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 1545 1579 ! est egale a la variation de la physique au pas de temps precedent. 1546 1580 ! Donc la somme de ces 2 variations devrait etre nulle. 1547 call diagphy( airephy,ztit,ip_ebil_phy &1581 call diagphy(cell_area,ztit,ip_ebil_phy & 1548 1582 , zero_v, zero_v, zero_v, zero_v, zero_v & 1549 1583 , zero_v, zero_v, zero_v, ztsol & … … 1688 1722 IF (read_climoz/=-1) THEN 1689 1723 abort_message ='read_climoz=-1 is recommended when solarlong0=1000.' 1690 CALL abort_ gcm(modname,abort_message,1)1724 CALL abort_physic (modname,abort_message,1) 1691 1725 ENDIF 1692 1726 ELSE … … 1749 1783 IF (ip_ebil_phy.ge.2) THEN 1750 1784 ztit='after reevap' 1751 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,1,dtime &1785 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,1,dtime & 1752 1786 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1753 1787 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 1754 call diagphy( airephy,ztit,ip_ebil_phy &1788 call diagphy(cell_area,ztit,ip_ebil_phy & 1755 1789 , zero_v, zero_v, zero_v, zero_v, zero_v & 1756 1790 , zero_v, zero_v, zero_v, ztsol & … … 1796 1830 ! non nul aux poles. 1797 1831 IF (abs(solarlong0-1000.)<1.e-4) then 1798 call zenang_an(cycle_diurne,jH_cur,rlat,rlon,rmu0,fract) 1832 call zenang_an(iflag_cycle_diurne.GE.1,jH_cur,rlat,rlon,rmu0,fract) 1833 JrNt = 1.0 1799 1834 ELSE 1800 ! Avec ou sans cycle diurne 1801 IF (cycle_diurne) THEN 1835 ! recode par Olivier Boucher en sept 2015 1836 SELECT CASE (iflag_cycle_diurne) 1837 CASE(0) 1838 ! Sans cycle diurne 1839 CALL angle(zlongi, rlat, fract, rmu0) 1840 swradcorr = 1.0 1841 JrNt = 1.0 1842 zrmu0 = rmu0 1843 CASE(1) 1844 ! Avec cycle diurne sans application des poids 1845 ! bit comparable a l ancienne formulation cycle_diurne=true 1846 ! on integre entre gmtime et gmtime+radpas 1802 1847 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 1803 CALL zenang(zlongi,jH_cur,zdtime,rlat,rlon,rmu0,fract) 1804 ELSE 1805 CALL angle(zlongi, rlat, fract, rmu0) 1806 ENDIF 1848 CALL zenang(zlongi,jH_cur,0.0,zdtime,rlat,rlon,rmu0,fract) 1849 zrmu0 = rmu0 1850 swradcorr = 1.0 1851 ! Calcul du flag jour-nuit 1852 JrNt = 0.0 1853 WHERE (fract.GT.0.0) JrNt = 1.0 1854 CASE(2) 1855 ! Avec cycle diurne sans application des poids 1856 ! On integre entre gmtime-pdtphys et gmtime+pdtphys*(radpas-1) 1857 ! Comme cette routine est appele a tous les pas de temps de la physique 1858 ! meme si le rayonnement n'est pas appele je remonte en arriere les 1859 ! radpas-1 pas de temps suivant. Petite ruse avec MOD pour prendre en 1860 ! compte le premier pas de temps de la physique pendant lequel itaprad=0 1861 zdtime1=dtime*REAL(-MOD(itaprad,radpas)-1) 1862 zdtime2=dtime*REAL(radpas-MOD(itaprad,radpas)-1) 1863 CALL zenang(zlongi,jH_cur,zdtime1,zdtime2,rlat,rlon,rmu0,fract) 1864 ! 1865 ! Calcul des poids 1866 ! 1867 zdtime1=-dtime !--on corrige le rayonnement pour representer le 1868 zdtime2=0.0 !--pas de temps de la physique qui se termine 1869 CALL zenang(zlongi,jH_cur,zdtime1,zdtime2,rlat,rlon,zrmu0,zfract) 1870 swradcorr = 0.0 1871 WHERE (rmu0.GE.1.e-10 .OR. fract.GE.1.e-10) swradcorr=zfract/fract*zrmu0/rmu0 1872 ! Calcul du flag jour-nuit 1873 JrNt = 0.0 1874 WHERE (zfract.GT.0.0) JrNt = 1.0 1875 END SELECT 1807 1876 ENDIF 1808 1877 1809 ! AI Janv 20141810 do i = 1, klon1811 if (fract(i).le.0.) then1812 JrNt(i)=0.1813 else1814 JrNt(i)=1.1815 endif1816 enddo1817 1818 1878 if (mydebug) then 1819 call writefield_phy('u_seri',u_seri, llm)1820 call writefield_phy('v_seri',v_seri, llm)1821 call writefield_phy('t_seri',t_seri, llm)1822 call writefield_phy('q_seri',q_seri, llm)1879 call writefield_phy('u_seri',u_seri,nbp_lev) 1880 call writefield_phy('v_seri',v_seri,nbp_lev) 1881 call writefield_phy('t_seri',t_seri,nbp_lev) 1882 call writefield_phy('q_seri',q_seri,nbp_lev) 1823 1883 endif 1824 1884 … … 1887 1947 dtime, date0, itap, days_elapsed+1, & 1888 1948 debut, lafin, & 1889 rlon, rlat, rugoro, rmu0, &1949 rlon, rlat, rugoro, zrmu0, & 1890 1950 zsig, sollwdown, pphi, cldt, & 1891 1951 rain_fall, snow_fall, solsw, sollw, & … … 1963 2023 1964 2024 if (mydebug) then 1965 call writefield_phy('u_seri',u_seri, llm)1966 call writefield_phy('v_seri',v_seri, llm)1967 call writefield_phy('t_seri',t_seri, llm)1968 call writefield_phy('q_seri',q_seri, llm)2025 call writefield_phy('u_seri',u_seri,nbp_lev) 2026 call writefield_phy('v_seri',v_seri,nbp_lev) 2027 call writefield_phy('t_seri',t_seri,nbp_lev) 2028 call writefield_phy('q_seri',q_seri,nbp_lev) 1969 2029 endif 1970 2030 … … 2007 2067 IF (ip_ebil_phy.ge.2) THEN 2008 2068 ztit='after surface_main' 2009 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2069 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2010 2070 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2011 2071 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2012 call diagphy( airephy,ztit,ip_ebil_phy &2072 call diagphy(cell_area,ztit,ip_ebil_phy & 2013 2073 , zero_v, zero_v, zero_v, zero_v, sens & 2014 2074 , evap , zero_v, zero_v, ztsol & … … 2057 2117 ENDDO 2058 2118 IF (check) THEN 2059 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2119 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2060 2120 WRITE(lunout,*) "avantcon=", za 2061 2121 ENDIF … … 2077 2137 DO k = 1, klev 2078 2138 DO i = 1, klon 2079 omega(i,k) = RG*flxmass_w(i,k) / airephy(i)2139 omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) 2080 2140 END DO 2081 2141 END DO … … 2085 2145 IF (iflag_con.EQ.1) THEN 2086 2146 abort_message ='reactiver le call conlmd dans physiq.F' 2087 CALL abort_ gcm(modname,abort_message,1)2147 CALL abort_physic (modname,abort_message,1) 2088 2148 ! CALL conlmd (dtime, paprs, pplay, t_seri, q_seri, conv_q, 2089 2149 ! . d_t_con, d_q_con, … … 2133 2193 enddo 2134 2194 enddo 2195 ! 2196 !jyg< 2197 ! Perform dry adiabatic adjustment on wake profile 2198 ! The corresponding tendencies are added to the convective tendencies 2199 ! after the call to the convective scheme. 2200 IF (iflag_wake>=1) then 2201 IF (ok_adjwk) THEN 2202 limbas(:) = 1 2203 CALL ajsec(paprs, pplay, t_wake, q_wake, limbas, & 2204 d_t_adjwk, d_q_adjwk) 2205 ENDIF 2206 ! 2207 DO k=1,klev 2208 DO i=1,klon 2209 IF (wake_s(i) .GT. 1.e-3) THEN 2210 t_wake(i,k) = t_wake(i,k) + d_t_adjwk(i,k) 2211 q_wake(i,k) = q_wake(i,k) + d_q_adjwk(i,k) 2212 wake_deltat(i,k) = wake_deltat(i,k) + d_t_adjwk(i,k) 2213 wake_deltaq(i,k) = wake_deltaq(i,k) + d_q_adjwk(i,k) 2214 ENDIF 2215 ENDDO 2216 ENDDO 2217 ENDIF ! (iflag_wake>=1) 2218 !>jyg 2219 ! 2135 2220 2136 2221 ! Calcul de l'energie disponible ALE (J/kg) et de la puissance … … 2223 2308 else 2224 2309 abort_message ='Ne pas passer la car www non calcule' 2225 CALL abort_ gcm(modname,abort_message,1)2310 CALL abort_physic (modname,abort_message,1) 2226 2311 2227 2312 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 2322 2407 if (iflagctrl(i).le.1) itau_con(i)=itau_con(i)+1 2323 2408 enddo 2324 2409 ! 2410 !jyg< 2411 ! Add the tendency due to the dry adjustment of the wake profile 2412 IF (iflag_wake>=1) THEN 2413 DO k=1,klev 2414 DO i=1,klon 2415 ftd(i,k) = ftd(i,k) + wake_s(i)*d_t_adjwk(i,k)/dtime 2416 fqd(i,k) = fqd(i,k) + wake_s(i)*d_q_adjwk(i,k)/dtime 2417 d_t_con(i,k) = d_t_con(i,k) + wake_s(i)*d_t_adjwk(i,k) 2418 d_q_con(i,k) = d_q_con(i,k) + wake_s(i)*d_q_adjwk(i,k) 2419 ENDDO 2420 ENDDO 2421 ENDIF 2422 !>jyg 2423 ! 2325 2424 ELSE ! ok_cvl 2326 2425 … … 2403 2502 ELSE 2404 2503 WRITE(lunout,*) "iflag_con non-prevu", iflag_con 2405 call abort_ gcm("physiq", "", 1)2504 call abort_physic("physiq", "", 1) 2406 2505 ENDIF 2407 2506 … … 2415 2514 2416 2515 if (mydebug) then 2417 call writefield_phy('u_seri',u_seri, llm)2418 call writefield_phy('v_seri',v_seri, llm)2419 call writefield_phy('t_seri',t_seri, llm)2420 call writefield_phy('q_seri',q_seri, llm)2516 call writefield_phy('u_seri',u_seri,nbp_lev) 2517 call writefield_phy('v_seri',v_seri,nbp_lev) 2518 call writefield_phy('t_seri',t_seri,nbp_lev) 2519 call writefield_phy('q_seri',q_seri,nbp_lev) 2421 2520 endif 2422 2521 … … 2424 2523 IF (ip_ebil_phy.ge.2) THEN 2425 2524 ztit='after convect' 2426 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2525 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2427 2526 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2428 2527 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2429 call diagphy( airephy,ztit,ip_ebil_phy &2528 call diagphy(cell_area,ztit,ip_ebil_phy & 2430 2529 , zero_v, zero_v, zero_v, zero_v, zero_v & 2431 2530 , zero_v, rain_con, snow_con, ztsol & … … 2435 2534 ! 2436 2535 IF (check) THEN 2437 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2536 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2438 2537 WRITE(lunout,*)"aprescon=", za 2439 2538 zx_t = 0.0 2440 2539 za = 0.0 2441 2540 DO i = 1, klon 2442 za = za + airephy(i)/REAL(klon)2541 za = za + cell_area(i)/REAL(klon) 2443 2542 zx_t = zx_t + (rain_con(i)+ & 2444 snow_con(i))* airephy(i)/REAL(klon)2543 snow_con(i))*cell_area(i)/REAL(klon) 2445 2544 ENDDO 2446 2545 zx_t = zx_t/za*dtime … … 2589 2688 IF (ip_ebil_phy.ge.2) THEN 2590 2689 ztit='after wake' 2591 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2690 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2592 2691 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2593 2692 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2594 call diagphy( airephy,ztit,ip_ebil_phy &2693 call diagphy(cell_area,ztit,ip_ebil_phy & 2595 2694 , zero_v, zero_v, zero_v, zero_v, zero_v & 2596 2695 , zero_v, zero_v, zero_v, ztsol & … … 2682 2781 ,ztv,zpspsk,ztla,zthl & 2683 2782 !cc nrlmd le 10/04/2012 2684 ,pbl_tke_input,pctsrf,omega, airephy&2783 ,pbl_tke_input,pctsrf,omega,cell_area & 2685 2784 ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 2686 2785 ,n2,s2,ale_bl_stat & … … 2734 2833 proba_notrig(i)=1. 2735 2834 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i)) 2835 if ( random_notrig(i) > random_notrig_max ) random_notrig(i)=0. 2736 2836 if ( ale_bl_trig(i) .lt. abs(cin(i))+1.e-10 ) then 2737 2837 tau_trig(i)=tau_trig_shallow … … 2905 3005 IF (ip_ebil_phy.ge.2) THEN 2906 3006 ztit='after dry_adjust' 2907 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3007 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2908 3008 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2909 3009 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2910 call diagphy( airephy,ztit,ip_ebil_phy &3010 call diagphy(cell_area,ztit,ip_ebil_phy & 2911 3011 , zero_v, zero_v, zero_v, zero_v, zero_v & 2912 3012 , zero_v, zero_v, zero_v, ztsol & … … 2958 3058 ENDDO 2959 3059 IF (check) THEN 2960 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)3060 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2961 3061 WRITE(lunout,*)"apresilp=", za 2962 3062 zx_t = 0.0 2963 3063 za = 0.0 2964 3064 DO i = 1, klon 2965 za = za + airephy(i)/REAL(klon)3065 za = za + cell_area(i)/REAL(klon) 2966 3066 zx_t = zx_t + (rain_lsc(i) & 2967 + snow_lsc(i))* airephy(i)/REAL(klon)3067 + snow_lsc(i))*cell_area(i)/REAL(klon) 2968 3068 ENDDO 2969 3069 zx_t = zx_t/za*dtime … … 2973 3073 IF (ip_ebil_phy.ge.2) THEN 2974 3074 ztit='after fisrt' 2975 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3075 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2976 3076 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2977 3077 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2978 call diagphy( airephy,ztit,ip_ebil_phy &3078 call diagphy(cell_area,ztit,ip_ebil_phy & 2979 3079 , zero_v, zero_v, zero_v, zero_v, zero_v & 2980 3080 , zero_v, rain_lsc, snow_lsc, ztsol & … … 2984 3084 2985 3085 if (mydebug) then 2986 call writefield_phy('u_seri',u_seri, llm)2987 call writefield_phy('v_seri',v_seri, llm)2988 call writefield_phy('t_seri',t_seri, llm)2989 call writefield_phy('q_seri',q_seri, llm)3086 call writefield_phy('u_seri',u_seri,nbp_lev) 3087 call writefield_phy('v_seri',v_seri,nbp_lev) 3088 call writefield_phy('t_seri',t_seri,nbp_lev) 3089 call writefield_phy('q_seri',q_seri,nbp_lev) 2990 3090 endif 2991 3091 … … 3056 3156 !jq - Johannes Quaas, 27/11/2003 (quaas@lmd.jussieu.fr) 3057 3157 IF (flag_aerosol .gt. 0) THEN 3058 IF (iflag_rrtm .EQ. 0) THEN !--old radiation3158 IF (iflag_rrtm .EQ. 0) THEN !--old radiation 3059 3159 IF (.NOT. aerosol_couple) THEN 3060 3160 ! … … 3069 3169 IF (aerosol_couple .AND. config_inca == 'aero' ) THEN 3070 3170 abort_message='config_inca=aero et rrtm=1 impossible' 3071 call abort_ gcm(modname,abort_message,1)3171 call abort_physic(modname,abort_message,1) 3072 3172 ELSE 3073 3173 ! 3074 3174 #ifdef CPP_RRTM 3175 IF (NSW.EQ.6) THEN 3176 !--new aerosol properties 3177 ! 3075 3178 CALL readaerosol_optic_rrtm( debut, aerosol_couple, & 3076 3179 new_aod, flag_aerosol, itap, jD_cur-jD_ref, & … … 3080 3183 tausum_aero, tau3d_aero) 3081 3184 3082 CALL aeropt_lw_rrtm 3185 ELSE IF (NSW.EQ.2) THEN 3186 !--for now we use the old aerosol properties 3187 ! 3188 CALL readaerosol_optic( & 3189 debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, & 3190 pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & 3191 mass_solu_aero, mass_solu_aero_pi, & 3192 tau_aero, piz_aero, cg_aero, & 3193 tausum_aero, tau3d_aero) 3194 ! 3195 !--natural aerosols 3196 tau_aero_sw_rrtm(:,:,1,:)=tau_aero(:,:,3,:) 3197 piz_aero_sw_rrtm(:,:,1,:)=piz_aero(:,:,3,:) 3198 cg_aero_sw_rrtm (:,:,1,:)=cg_aero (:,:,3,:) 3199 !--all aerosols 3200 tau_aero_sw_rrtm(:,:,2,:)=tau_aero(:,:,2,:) 3201 piz_aero_sw_rrtm(:,:,2,:)=piz_aero(:,:,2,:) 3202 cg_aero_sw_rrtm (:,:,2,:)=cg_aero (:,:,2,:) 3203 ELSE 3204 abort_message='Only NSW=2 or 6 are possible with aerosols and iflag_rrtm=1' 3205 call abort_physic(modname,abort_message,1) 3206 ENDIF 3207 3208 CALL aeropt_lw_rrtm 3209 ! 3083 3210 #else 3084 3085 abort_message='You should compile with -rrtm if running with iflag_rrtm=1' 3086 call abort_gcm(modname,abort_message,1) 3211 abort_message='You should compile with -rrtm if running with iflag_rrtm=1' 3212 call abort_physic(modname,abort_message,1) 3087 3213 #endif 3088 3214 ! … … 3117 3243 3118 3244 abort_message='You should compile with -rrtm if running with iflag_rrtm=1' 3119 call abort_ gcm(modname,abort_message,1)3245 call abort_physic(modname,abort_message,1) 3120 3246 #endif 3121 3247 ENDIF … … 3217 3343 IF (ip_ebil_phy.ge.2) THEN 3218 3344 ztit="after diagcld" 3219 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3345 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3220 3346 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3221 3347 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3222 call diagphy( airephy,ztit,ip_ebil_phy &3348 call diagphy(cell_area,ztit,ip_ebil_phy & 3223 3349 , zero_v, zero_v, zero_v, zero_v, zero_v & 3224 3350 , zero_v, zero_v, zero_v, ztsol & … … 3286 3412 CALL AEROSOL_METEO_CALC( & 3287 3413 calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs, & 3288 prfl,psfl,pctsrf, airephy,rlat,rlon,u10m,v10m)3414 prfl,psfl,pctsrf,cell_area,rlat,rlon,u10m,v10m) 3289 3415 END IF 3290 3416 … … 3297 3423 rlat, & 3298 3424 rlon, & 3299 airephy, &3425 cell_area, & 3300 3426 paprs, & 3301 3427 pplay, & … … 3316 3442 ibas_con, & 3317 3443 cldfra, & 3318 iim, &3319 jjm, &3444 nbp_lon, & 3445 nbp_lat-1, & 3320 3446 tr_seri, & 3321 3447 ftsol, & … … 3346 3472 IF (ok_cdnc.AND.NRADLP.NE.3) THEN 3347 3473 abort_message='RRTM choix incoherent NRADLP doit etre egal a 3 pour ok_cdnc' 3348 call abort_ gcm(modname,abort_message,1)3474 call abort_physic(modname,abort_message,1) 3349 3475 endif 3350 3476 #else 3351 3477 3352 3478 abort_message='You should compile with -rrtm if running with iflag_rrtm=1' 3353 call abort_ gcm(modname,abort_message,1)3479 call abort_physic(modname,abort_message,1) 3354 3480 #endif 3355 3481 ENDIF … … 3376 3502 cldtaupirad = cldtaupi 3377 3503 cldemirad = cldemi 3504 cldfrarad = cldfra 3378 3505 3379 3506 ! … … 3444 3571 3445 3572 if (mydebug) then 3446 call writefield_phy('u_seri',u_seri, llm)3447 call writefield_phy('v_seri',v_seri, llm)3448 call writefield_phy('t_seri',t_seri, llm)3449 call writefield_phy('q_seri',q_seri, llm)3573 call writefield_phy('u_seri',u_seri,nbp_lev) 3574 call writefield_phy('v_seri',v_seri,nbp_lev) 3575 call writefield_phy('t_seri',t_seri,nbp_lev) 3576 call writefield_phy('q_seri',q_seri,nbp_lev) 3450 3577 endif 3578 3579 ! 3580 !sonia : If Iflag_radia >=2, pertubation of some variables input to radiation 3581 !(DICE) 3582 ! 3583 IF (iflag_radia .ge. 2) THEN 3584 zsav_tsol (:) = zxtsol(:) 3585 call perturb_radlwsw(zxtsol,iflag_radia) 3586 ENDIF 3451 3587 3452 3588 IF (aerosol_couple) THEN … … 3457 3593 wo(:, :, 1), & 3458 3594 cldfrarad, cldemirad, cldtaurad, & 3459 heat,heat0,cool,cool0, radsol,albpla, &3595 heat,heat0,cool,cool0,albpla, & 3460 3596 topsw,toplw,solsw,sollw, & 3461 3597 sollwdown, & … … 3503 3639 zqsat, flwc, fiwc, & 3504 3640 ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & 3505 heat,heat0,cool,cool0, radsol,albpla, &3641 heat,heat0,cool,cool0,albpla, & 3506 3642 topsw,toplw,solsw,sollw, & 3507 3643 sollwdown, & … … 3559 3695 zqsat, flwc, fiwc, & 3560 3696 ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & 3561 heatp,heat0p,coolp,cool0p, radsolp,albplap, &3697 heatp,heat0p,coolp,cool0p,albplap, & 3562 3698 topswp,toplwp,solswp,sollwp, & 3563 3699 sollwdownp, & … … 3583 3719 ENDIF ! aerosol_couple 3584 3720 itaprad = 0 3721 ! 3722 ! If Iflag_radia >=2, reset pertubed variables 3723 ! 3724 IF (iflag_radia .ge. 2) THEN 3725 zxtsol(:) = zsav_tsol (:) 3726 ENDIF 3585 3727 ENDIF ! MOD(itaprad,radpas) 3586 3728 itaprad = itaprad + 1 … … 3600 3742 swup=0. ! MPL 27102011 pour les fichiers AMMA_profiles et AMMA_scalars 3601 3743 swup0=0. 3602 swdn=0.3603 swdn0=0.3604 3744 lwup=0. 3605 3745 lwup0=0. … … 3609 3749 3610 3750 ! 3751 ! Calculer radsol a l'exterieur de radlwsw 3752 ! pour prendre en compte le cycle diurne 3753 ! recode par Olivier Boucher en sept 2015 3754 ! 3755 radsol=solsw*swradcorr+sollw 3756 if (ok_4xCO2atm) then 3757 radsolp=solswp*swradcorr+sollwp 3758 endif 3759 3760 ! 3611 3761 ! Ajouter la tendance des rayonnements (tous les pas) 3612 ! 3613 d_t_swr(:,:)=heat(:,:)*dtime/RDAY 3614 d_t_lwr(:,:)=-cool(:,:)*dtime/RDAY 3615 d_t_sw0(:,:)=heat0(:,:)*dtime/RDAY 3616 d_t_lw0(:,:)=-cool0(:,:)*dtime/RDAY 3762 ! avec une correction pour le cycle diurne dans le SW 3763 ! 3764 3765 DO k=1, klev 3766 d_t_swr(:,k)=swradcorr(:)*heat(:,k)*dtime/RDAY 3767 d_t_sw0(:,k)=swradcorr(:)*heat0(:,k)*dtime/RDAY 3768 d_t_lwr(:,k)=-cool(:,k)*dtime/RDAY 3769 d_t_lw0(:,k)=-cool0(:,k)*dtime/RDAY 3770 ENDDO 3771 3617 3772 CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy) 3618 3773 CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy) … … 3620 3775 ! 3621 3776 if (mydebug) then 3622 call writefield_phy('u_seri',u_seri, llm)3623 call writefield_phy('v_seri',v_seri, llm)3624 call writefield_phy('t_seri',t_seri, llm)3625 call writefield_phy('q_seri',q_seri, llm)3777 call writefield_phy('u_seri',u_seri,nbp_lev) 3778 call writefield_phy('v_seri',v_seri,nbp_lev) 3779 call writefield_phy('t_seri',t_seri,nbp_lev) 3780 call writefield_phy('q_seri',q_seri,nbp_lev) 3626 3781 endif 3627 3782 … … 3629 3784 IF (ip_ebil_phy.ge.2) THEN 3630 3785 ztit='after rad' 3631 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3786 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3632 3787 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3633 3788 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3634 call diagphy( airephy,ztit,ip_ebil_phy &3789 call diagphy(cell_area,ztit,ip_ebil_phy & 3635 3790 , topsw, toplw, solsw, sollw, zero_v & 3636 3791 , zero_v, zero_v, zero_v, ztsol & … … 3705 3860 ! 3706 3861 if (mydebug) then 3707 call writefield_phy('u_seri',u_seri, llm)3708 call writefield_phy('v_seri',v_seri, llm)3709 call writefield_phy('t_seri',t_seri, llm)3710 call writefield_phy('q_seri',q_seri, llm)3862 call writefield_phy('u_seri',u_seri,nbp_lev) 3863 call writefield_phy('v_seri',v_seri,nbp_lev) 3864 call writefield_phy('t_seri',t_seri,nbp_lev) 3865 call writefield_phy('q_seri',q_seri,nbp_lev) 3711 3866 endif 3712 3867 … … 3742 3897 d_t_lif, d_u_lif, d_v_lif) 3743 3898 ENDIF 3744 ! 3745 !----------------------------------------------------------------------------------------- 3899 3746 3900 ! ajout des tendances de la portance de l'orographie 3747 CALL add_phys_tend(d_u_lif,d_v_lif,d_t_lif,dq0,dql0,dqi0,paprs,'lif',abortphy) 3748 !----------------------------------------------------------------------------------------- 3749 ! 3901 CALL add_phys_tend(d_u_lif, d_v_lif, d_t_lif, dq0, dql0, dqi0, paprs, & 3902 'lif', abortphy) 3750 3903 ENDIF ! fin de test sur ok_orolf 3751 ! HINES GWD PARAMETRIZATION3752 3904 3753 3905 IF (ok_hines) then 3754 3755 CALL hines_gwd(klon,klev,dtime,paprs,pplay, & 3756 rlat,t_seri,u_seri,v_seri, & 3757 zustrhi,zvstrhi, & 3758 d_t_hin, d_u_hin, d_v_hin) 3759 ! 3760 ! ajout des tendances 3761 CALL add_phys_tend(d_u_hin,d_v_hin,d_t_hin,dq0,dql0,dqi0,paprs,'hin',abortphy) 3762 3906 ! HINES GWD PARAMETRIZATION 3907 east_gwstress=0. 3908 west_gwstress=0. 3909 du_gwd_hines=0. 3910 dv_gwd_hines=0. 3911 CALL hines_gwd(klon, klev, dtime, paprs, pplay, rlat, t_seri, u_seri, & 3912 v_seri, zustr_gwd_hines, zvstr_gwd_hines, d_t_hin, du_gwd_hines, & 3913 dv_gwd_hines) 3914 zustr_gwd_hines=0. 3915 zvstr_gwd_hines=0. 3916 DO k = 1, klev 3917 zustr_gwd_hines(:)=zustr_gwd_hines(:)+ du_gwd_hines(:, k)/dtime & 3918 * (paprs(:, k)-paprs(:, k+1))/rg 3919 zvstr_gwd_hines(:)=zvstr_gwd_hines(:)+ dv_gwd_hines(:, k)/dtime & 3920 * (paprs(:, k)-paprs(:, k+1))/rg 3921 ENDDO 3922 3923 d_t_hin(:, :)=0. 3924 CALL add_phys_tend(du_gwd_hines, dv_gwd_hines, d_t_hin, dq0, dql0, dqi0, & 3925 paprs, 'hin', abortphy) 3926 ENDIF 3927 3928 IF (.not. ok_hines .and. ok_gwd_rando) then 3929 CALL acama_GWD_rando(DTIME, pplay, rlat, t_seri, u_seri, v_seri, rot, & 3930 zustr_gwd_front, zvstr_gwd_front, du_gwd_front, dv_gwd_front, & 3931 east_gwstress, west_gwstress) 3932 zustr_gwd_front=0. 3933 zvstr_gwd_front=0. 3934 DO k = 1, klev 3935 zustr_gwd_front(:)=zustr_gwd_front(:)+ du_gwd_front(:, k)/dtime & 3936 * (paprs(:, k)-paprs(:, k+1))/rg 3937 zvstr_gwd_front(:)=zvstr_gwd_front(:)+ dv_gwd_front(:, k)/dtime & 3938 * (paprs(:, k)-paprs(:, k+1))/rg 3939 ENDDO 3940 3941 CALL add_phys_tend(du_gwd_front, dv_gwd_front, dt0, dq0, dql0, dqi0, & 3942 paprs, 'front_gwd_rando', abortphy) 3763 3943 ENDIF 3764 3944 … … 3766 3946 call FLOTT_GWD_rando(DTIME, pplay, t_seri, u_seri, v_seri, & 3767 3947 rain_fall + snow_fall, zustr_gwd_rando, zvstr_gwd_rando, & 3768 du_gwd_rando, dv_gwd_rando) 3769 CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0,dqi0,paprs, & 3770 'flott_gwd_rando',abortphy) 3948 du_gwd_rando, dv_gwd_rando, east_gwstress, west_gwstress) 3949 CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0, dqi0, & 3950 paprs, 'flott_gwd_rando', abortphy) 3951 zustr_gwd_rando=0. 3952 zvstr_gwd_rando=0. 3953 DO k = 1, klev 3954 zustr_gwd_rando(:)=zustr_gwd_rando(:)+ du_gwd_rando(:, k)/dtime & 3955 * (paprs(:, k)-paprs(:, k+1))/rg 3956 zvstr_gwd_rando(:)=zvstr_gwd_rando(:)+ dv_gwd_rando(:, k)/dtime & 3957 * (paprs(:, k)-paprs(:, k+1))/rg 3958 ENDDO 3771 3959 end if 3772 3960 … … 3774 3962 3775 3963 if (mydebug) then 3776 call writefield_phy('u_seri',u_seri, llm)3777 call writefield_phy('v_seri',v_seri, llm)3778 call writefield_phy('t_seri',t_seri, llm)3779 call writefield_phy('q_seri',q_seri, llm)3964 call writefield_phy('u_seri',u_seri,nbp_lev) 3965 call writefield_phy('v_seri',v_seri,nbp_lev) 3966 call writefield_phy('t_seri',t_seri,nbp_lev) 3967 call writefield_phy('q_seri',q_seri,nbp_lev) 3780 3968 endif 3781 3969 … … 3808 3996 IF (ip_ebil_phy.ge.2) THEN 3809 3997 ztit='after orography' 3810 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3998 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3811 3999 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3812 4000 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3813 call diagphy( airephy,ztit,ip_ebil_phy &4001 call diagphy(cell_area,ztit,ip_ebil_phy & 3814 4002 , zero_v, zero_v, zero_v, zero_v, zero_v & 3815 4003 , zero_v, zero_v, zero_v, ztsol & … … 3822 4010 CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) 3823 4011 ! ajout de la tendance d'humidite due au methane 3824 CALL add_phys_tend(du0,dv0,dt0,d_q_ch4*dtime,dql0,'q_ch4',abortphy) 4012 CALL add_phys_tend(du0, dv0, dt0, d_q_ch4*dtime, dql0, dqi0, paprs, & 4013 'q_ch4', abortphy) 3825 4014 END IF 3826 4015 ! … … 3915 4104 cdragh,coefh(1:klon,1:klev,is_ave),u1,v1,ftsol,pctsrf, & 3916 4105 frac_impa, frac_nucl, & 3917 pphis, airephy,dtime,itap, &4106 pphis,cell_area,dtime,itap, & 3918 4107 qx(:,:,ivap),da,phi,mp,upwd,dnwd) 3919 4108 … … 3946 4135 3947 4136 d_t_ec(:,:)=0. 3948 forall (k=1: llm) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA4137 forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA 3949 4138 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap), & 3950 4139 u_seri,v_seri,t_seri,q_seri,pbl_tke(:,:,is_ave)-tke0(:,:), & … … 3955 4144 IF (ip_ebil_phy.ge.1) THEN 3956 4145 ztit='after physic' 3957 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &4146 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 3958 4147 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3959 4148 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 3963 4152 ! Donc la somme de ces 2 variations devrait etre nulle. 3964 4153 3965 call diagphy( airephy,ztit,ip_ebil_phy &4154 call diagphy(cell_area,ztit,ip_ebil_phy & 3966 4155 , topsw, toplw, solsw, sollw, sens & 3967 4156 , evap, rain_fall, snow_fall, ztsol & … … 3998 4187 include "calcul_STDlev.h" 3999 4188 ! 4000 ! slp sea level pressure 4001 slp(:) = paprs(:,1)*exp(pphis(:)/(RD*t_seri(:,1)))4189 ! slp sea level pressure derived from Arpege-IFS : CALL ctstar + CALL pppmer 4190 CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp) 4002 4191 ! 4003 4192 !cc prw = eau precipitable … … 4023 4212 paprs, & 4024 4213 q_seri, & 4025 airephy, &4214 cell_area, & 4026 4215 pphi, & 4027 4216 pphis, & … … 4042 4231 ! 4043 4232 if (mydebug) then 4044 call writefield_phy('u_seri',u_seri, llm)4045 call writefield_phy('v_seri',v_seri, llm)4046 call writefield_phy('t_seri',t_seri, llm)4047 call writefield_phy('q_seri',q_seri, llm)4233 call writefield_phy('u_seri',u_seri,nbp_lev) 4234 call writefield_phy('v_seri',v_seri,nbp_lev) 4235 call writefield_phy('t_seri',t_seri,nbp_lev) 4236 call writefield_phy('q_seri',q_seri,nbp_lev) 4048 4237 endif 4049 4238 … … 4133 4322 enddo 4134 4323 4135 write(lunout,*) 'd_t_oli,d_t_vdf,d_t_oro,d_t_lif,d_t_ec' 4324 !jyg< (En attendant de statuer sur le sort de d_t_oli) 4325 !jyg! write(lunout,*) 'd_t_oli,d_t_vdf,d_t_oro,d_t_lif,d_t_ec' 4326 !jyg! do k=1,klev 4327 !jyg! write(lunout,*) d_t_oli(igout,k),d_t_vdf(igout,k), & 4328 !jyg! d_t_oro(igout,k),d_t_lif(igout,k),d_t_ec(igout,k) 4329 !jyg! enddo 4330 write(lunout,*) 'd_t_vdf,d_t_oro,d_t_lif,d_t_ec' 4136 4331 do k=1,klev 4137 write(lunout,*) d_t_ oli(igout,k),d_t_vdf(igout,k), &4332 write(lunout,*) d_t_vdf(igout,k), & 4138 4333 d_t_oro(igout,k),d_t_lif(igout,k),d_t_ec(igout,k) 4139 4334 enddo 4335 !>jyg 4140 4336 4141 4337 write(lunout,*) 'd_ps ',d_ps(igout) … … 4238 4434 IF (abortphy==1) THEN 4239 4435 abort_message ='Plantage hgardfou' 4240 CALL abort_ gcm(modname,abort_message,1)4436 CALL abort_physic (modname,abort_message,1) 4241 4437 ENDIF 4242 4438 … … 4248 4444 !==================================================================== 4249 4445 ! 4250 4251 ! -----------------------------------------------------------------4252 ! WSTATS: Saving statistics4253 ! -----------------------------------------------------------------4254 ! ("stats" stores and accumulates 8 key variables in file "stats.nc"4255 ! which can later be used to make the statistic files of the run:4256 ! "stats") only possible in 3D runs !4257 4258 4259 IF (callstats) THEN4260 4261 call wstats(klon,o_psol%name,"Surface pressure","Pa" &4262 ,2,paprs(:,1))4263 call wstats(klon,o_tsol%name,"Surface temperature","K", &4264 2,zxtsol)4265 zx_tmp_fi2d(:) = rain_fall(:) + snow_fall(:)4266 call wstats(klon,o_precip%name,"Precip Totale liq+sol", &4267 "kg/(s*m2)",2,zx_tmp_fi2d)4268 zx_tmp_fi2d(:) = rain_lsc(:) + snow_lsc(:)4269 call wstats(klon,o_plul%name,"Large-scale Precip", &4270 "kg/(s*m2)",2,zx_tmp_fi2d)4271 zx_tmp_fi2d(:) = rain_con(:) + snow_con(:)4272 call wstats(klon,o_pluc%name,"Convective Precip", &4273 "kg/(s*m2)",2,zx_tmp_fi2d)4274 call wstats(klon,o_sols%name,"Solar rad. at surf.", &4275 "W/m2",2,solsw)4276 call wstats(klon,o_soll%name,"IR rad. at surf.", &4277 "W/m2",2,sollw)4278 zx_tmp_fi2d(:) = topsw(:)-toplw(:)4279 call wstats(klon,o_nettop%name,"Net dn radiatif flux at TOA", &4280 "W/m2",2,zx_tmp_fi2d)4281 4282 4283 4284 call wstats(klon,o_temp%name,"Air temperature","K", &4285 3,t_seri)4286 call wstats(klon,o_vitu%name,"Zonal wind","m.s-1", &4287 3,u_seri)4288 call wstats(klon,o_vitv%name,"Meridional wind", &4289 "m.s-1",3,v_seri)4290 call wstats(klon,o_vitw%name,"Vertical wind", &4291 "m.s-1",3,omega)4292 call wstats(klon,o_ovap%name,"Specific humidity", "kg/kg", &4293 3,q_seri)4294 4295 4296 4297 IF(lafin) THEN4298 write (*,*) "Writing stats..."4299 call mkstats(ierr)4300 ENDIF4301 4302 ENDIF !if callstats4303 4446 4304 4447 IF (lafin) THEN
Note: See TracChangeset
for help on using the changeset viewer.