Changeset 467 for LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
- Timestamp:
- Aug 6, 2003, 4:50:49 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
r463 r467 191 191 PARAMETER(klevp1=klev+1) 192 192 #include "raddim.h" 193 REAL*8 ZFSUP(KDLON,KFLEV+1) 194 REAL*8 ZFSDN(KDLON,KFLEV+1) 195 REAL*8 ZFSUP0(KDLON,KFLEV+1) 196 REAL*8 ZFSDN0(KDLON,KFLEV+1) 193 cc REAL*8 ZFSUP(KDLON,KFLEV+1) 194 cc REAL*8 ZFSDN(KDLON,KFLEV+1) 195 cc REAL*8 ZFSUP0(KDLON,KFLEV+1) 196 cc REAL*8 ZFSDN0(KDLON,KFLEV+1) 197 c 198 REAL swdn0(klon,2), swdn(klon,2), swup0(klon,2), swup(klon,2) 199 SAVE swdn0 , swdn, swup0, swup 197 200 198 201 cccIM cf. FH 199 202 real u850(klon),v850(klon),u200(klon),v200(klon) 200 203 real u500(klon),v500(klon),phi500(klon),w500(klon) 204 cIM 205 real prw(klon) 206 207 cIM ISCCP - proprietes microphysiques des nuages convectifs 208 REAL convliq(klon,klev) ! eau liquide nuageuse convective 209 REAL convfra(klon,klev) ! fraction nuageuse convective 210 211 REAL cldl_c(klon),cldm_c(klon),cldh_c(klon) !nuages bas, moyen et haut 212 REAL cldt_c(klon),cldq_c(klon) !nuage total, eau liquide integree 213 REAL cldl_s(klon),cldm_s(klon),cldh_s(klon) !nuages bas, moyen et haut 214 REAL cldt_s(klon),cldq_s(klon) !nuage total, eau liquide integree 215 216 INTEGER kinv, linv 217 218 cIM ISCCP simulator BEGIN 219 INTEGER igfi2D(iim,jjmp1) 220 cv3.4 221 INTEGER debug, debugcol 222 INTEGER npoints 223 PARAMETER(npoints=klon) 224 INTEGER sunlit(klon) 225 226 INTEGER ncol, seed(klon) 227 228 cIM dans clesphys.h top_height, overlap 229 c PARAMETER(ncol=100) 230 c PARAMETER(ncol=625) 231 PARAMETER(ncol=10) 232 REAL tautab(0:255) 233 INTEGER invtau(-20:45000) 234 REAL emsfc_lw 235 PARAMETER(emsfc_lw=0.99) 236 REAL ran0 ! type for random number fuction 237 238 REAL pfull(klon,klev) 239 REAL phalf(klon,klev+1) 240 REAL cldtot(klon,klev) 241 REAL dtau_s(klon,klev) 242 REAL dtau_c(klon,klev) 243 REAL dem_s(klon,klev) 244 REAL dem_c(klon,klev) 245 cPLUS : variables de haut en bas pour le simulateur ISCCP 246 REAL qv(klon,klev) 247 REAL cc(klon,klev) 248 REAL conv(klon,klev) 249 REAL dtau_sH2B(klon,klev) 250 REAL dtau_cH2B(klon,klev) 251 REAL at(klon,klev) 252 REAL dem_sH2B(klon,klev) 253 REAL dem_cH2B(klon,klev) 254 255 c output from ISCCP 256 REAL fq_isccp(klon,7,7) 257 REAL totalcldarea(klon) 258 REAL meanptop(klon) 259 REAL meantaucld(klon) 260 REAL boxtau(klon,ncol) 261 REAL boxptop(klon,ncol) 262 263 c grille 4d physique 264 INTEGER l, ni, nj, kmax, lmax, nrec 265 INTEGER ni1, ni2, nj1, nj2 266 c PARAMETER(kmax=7, lmax=7) 267 PARAMETER(kmax=8, lmax=8) 268 INTEGER kmaxm1, lmaxm1 269 PARAMETER(kmaxm1=kmax-1, lmaxm1=lmax-1) 270 c INTEGER iimx7, jjmx7, jjmp1x7 271 c PARAMETER(iimx7=iim*7, jjmx7=jjm*7, jjmp1x7=jjmp1*7) 272 c REAL fq4d(iim,jjmp1,7,7) 273 c REAL fq3d(iimx7, jjmp1x7) 274 INTEGER iimx8, jjmx8, jjmp1x8 275 PARAMETER(iimx8=iim*8, jjmx8=jjm*8, jjmp1x8=jjmp1*8) 276 REAL fq4d(iim,jjmp1,8,8) 277 REAL fq3d(iimx8, jjmp1x8) 278 cIM180603 SAVE fq3d 279 280 c REAL maxfq3d, minfq3d 281 c 282 INTEGER iw, iwmax 283 REAL wmin, pas_w 284 c PARAMETER(wmin=-100.,pas_w=10.,iwmax=30) 285 PARAMETER(wmin=-200.,pas_w=10.,iwmax=40) 286 REAL o500(klon) 287 INTEGER nreg, nbreg 288 PARAMETER(nbreg=5) 289 c REAL histoW(iwmax,kmaxm1,lmaxm1) 290 REAL histoW(kmaxm1,lmaxm1,iwmax,nbreg) 291 REAL nhistoW(kmaxm1,lmaxm1,iwmax,nbreg) 292 cIM180603 293 c SAVE histoW, nhistoW 294 c SAVE nhistoW 295 REAL nhistoWt(kmaxm1,lmaxm1,iwmax,nbreg) 296 SAVE nhistoWt 297 298 c REAL histoWinv(kmaxm1,lmaxm1,iwmax) 299 c REAL nhistoW(kmaxm1,lmaxm1,iwmax) 300 INTEGER linv 301 c LOGICAL pct_ocean(klon,nbreg) 302 INTEGER pct_ocean(klon,nbreg) 303 REAL rlonPOS(klon) 304 c CHARACTER*4 pdirect 305 306 c sorties ISCCP 307 308 logical ok_isccp 309 real ecrit_isccp 310 integer nid_isccp 311 save ok_isccp, ecrit_isccp, nid_isccp 312 313 #define histISCCP 314 #undef histISCCP 315 #ifdef histISCCP 316 c data ok_isccp,ecrit_isccp/.true.,0.125/ 317 c data ok_isccp,ecrit_isccp/.true.,1./ 318 data ok_isccp/.true./ 319 #else 320 data ok_isccp/.false./ 321 #endif 322 323 REAL zx_tau(kmaxm1), zx_pc(lmaxm1), zx_o500(iwmax) 324 c DATA zx_tau/0.1, 1.3, 3.6, 9.4, 23., 60./ 325 c DATA zx_pc/50., 180., 310., 440., 560., 680., 800., 1015./ 326 c DATA zx_pc/50., 180., 310., 440., 560., 680., 800./ 327 cOK DATA zx_tau/0.0, 0.1, 1.3, 3.6, 9.4, 23., 60./ 328 cOK DATA zx_pc/800., 680., 560., 440., 310., 180., 50./ 329 330 c tester l'alure 331 DATA zx_tau/1., 2., 3., 4., 5., 6., 7./ 332 c DATA zx_pc/1., 2., 3., 4., 5., 6., 7./ 333 DATA zx_pc/7., 6., 5., 4., 3., 2., 1./ 334 335 INTEGER komega, nhoriRD 336 337 c statistiques regime dynamique END 338 339 c REAL del_lon(iim), del_lat(jjmp1) 340 REAL del_lon, del_lat 341 c REAL zx_lonx7(iimx7), zx_latx7(jjmp1x7) 342 REAL zx_lonx8(iimx8), zx_latx8(jjmp1x8) 343 c INTEGER nhorix7 344 INTEGER nhorix8 345 346 cIM ISCCP simulator END 201 347 202 348 logical ok_hf … … 497 643 SAVE topsw0,toplw0,solsw0,sollw0, heat0, cool0 498 644 cccIM 499 SAVE ZFSUP,ZFSDN,ZFSUP0,ZFSDN0500 645 501 646 INTEGER itaprad … … 753 898 CALL phyetat0 ("startphy.nc",dtime,co2_ppm_etat0,solaire_etat0, 754 899 . rlat,rlon,pctsrf, ftsol,ftsoil,deltat,fqsurf,qsol,fsnow, 755 . falbe, f evap, rain_fall,snow_fall,solsw, sollwdown,900 . falbe, falblw, fevap, rain_fall,snow_fall,solsw, sollwdown, 756 901 . dlw,radsol,frugs,agesno,clesphy0, 757 902 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro,tabcntr0, … … 880 1025 c Initialisation des sorties 881 1026 c============================================================= 1027 1028 #ifdef histISCCP 1029 #include "ini_histISCCP.h" 1030 #endif 1031 882 1032 #ifdef histhf 883 1033 #include "ini_histhf.h" … … 958 1108 ENDIF 959 1109 C 960 IF (if_ebil.ge.1) THEN961 1110 DO i = 1, klon 962 1111 ztsol(i) = 0. … … 967 1116 ENDDO 968 1117 ENDDO 1118 C 1119 IF (if_ebil.ge.1) THEN 969 1120 ztit='after dynamic' 970 1121 CALL diagetpq(paire,ztit,ip_ebil,1,1,dtime … … 1072 1223 DO nsrf = 1, nbsrf 1073 1224 DO i = 1, klon 1074 frugs(i,nsrf) = MAX(frugs(i,nsrf),0.001)1075 ccccfrugs(i,nsrf) = MAX(frugs(i,nsrf),0.000015)1225 c frugs(i,nsrf) = MAX(frugs(i,nsrf),0.001) 1226 frugs(i,nsrf) = MAX(frugs(i,nsrf),0.000015) 1076 1227 ENDDO 1077 1228 ENDDO … … 1091 1242 rmu0 = -999.999 1092 1243 ENDIF 1093 C 1244 cIM BEG 1245 DO i=1, klon 1246 sunlit(i)=1 1247 IF(rmu0(i).EQ.0.) sunlit(i)=0 1248 c IF(rmu0(i).EQ.0.) THEN 1249 c sunlit(i)=0 1250 c PRINT*,' il fait nuit ',i,rlat(i),rlon(i) 1251 c ENDIF 1252 ENDDO 1253 cIM END 1094 1254 C Calcul de l'abedo moyen par maille 1095 1255 albsol(:)=0. … … 1103 1263 C 1104 1264 C Repartition sous maille des flux LW et SW 1105 DO nsrf = 1, nbsrf 1106 DO i = 1, klon 1107 fsollw(i,nsrf) = sollwdown(i) - RSIGMA*ftsol(i,nsrf)**4 1108 fsolsw(i,nsrf) = solsw(i)*(1.-falbe(i,nsrf))/(1.-albsol(i)) 1109 ENDDO 1110 ENDDO 1265 C Modif OM+PASB+JLD 1266 C Repartition du longwave par sous-surface linearisee 1267 Cn 1268 DO nsrf = 1, nbsrf 1269 DO i = 1, klon 1270 c$$$ fsollw(i,nsrf) = sollwdown(i) - RSIGMA*ftsol(i,nsrf)**4 1271 c$$$ fsollw(i,nsrf) = sollw(i) 1272 fsollw(i,nsrf) = sollw(i) 1273 $ + 4.0*RSIGMA*ztsol(i)**3 * (ztsol(i)-ftsol(i,nsrf)) 1274 fsolsw(i,nsrf) = solsw(i)*(1.-falbe(i,nsrf))/(1.-albsol(i)) 1275 ENDDO 1276 ENDDO 1111 1277 1112 1278 fder = dlw … … 1116 1282 e julien, rmu0, 1117 1283 e ok_veget, ocean, npas, nexca, ftsol, 1118 $ soil_model, ftsoil, qsol,1284 $ soil_model,cdmmax, cdhmax, ftsoil, qsol, 1119 1285 $ paprs,pplay,radsol, fsnow,fqsurf,fevap,falbe,falblw, 1120 1286 $ fluxlat, … … 1616 1782 enddo 1617 1783 1784 cIM ISCCP simulator BEGIN 1785 IF (ok_isccp) THEN 1786 cIM calcul tau. emi nuages convectifs 1787 convfra(:,:)=rnebcon(:,:) 1788 convliq(:,:)=rnebcon(:,:)*clwcon(:,:) 1789 c CALL newmicro (paprs, pplay,ok_newmicro, 1790 c . t_seri, cldliq, cldfra, cldtau, cldemi, 1791 c . cldh, cldl, cldm, cldt, cldq) 1792 CALL newmicro (paprs, pplay,ok_newmicro, 1793 . t_seri, convliq, convfra, dtau_c, dem_c, 1794 . cldh_c, cldl_c, cldm_c, cldt_c, cldq_c) 1795 1796 cIM calcul tau. emi nuages startiformes 1797 CALL newmicro (paprs, pplay,ok_newmicro, 1798 . t_seri, cldliq, cldfra, dtau_s, dem_s, 1799 . cldh_s, cldl_s, cldm_s, cldt_s, cldq_s) 1800 cIM calcul diagramme (PC, tau) cf. ISCCP D 1801 c seed=50 1802 c seed=ran0(klon) 1803 cT1O3 1804 c top_height=1 1805 cT3O3 1806 c top_height=3 1807 c overlap=3 1808 cIM cf GCM 1809 cldtot(:,:)=min(max(cldfra(:,:),rnebcon(:,:)),1.) 1810 1811 cIM inversion des niveaux de pression ==> de haut en bas 1812 DO k=1,klev 1813 kinv=klev-k+1 1814 DO i=1,klon 1815 pfull(i,k)=pplay(i,kinv) 1816 c on met toutes les variables de Haut 2 Bas 1817 qv(i,k)=q_seri(i,kinv) 1818 cc(i,k)=cldtot(i,kinv) 1819 conv(i,k)=rnebcon(i,kinv) 1820 dtau_sH2B(i,k)=dtau_s(i,kinv) 1821 dtau_cH2B(i,k)=dtau_c(i,kinv) 1822 at(i,k)=t_seri(i,kinv) 1823 dem_sH2B(i,k)=dem_s(i,kinv) 1824 dem_cH2B(i,k)=dem_c(i,kinv) 1825 1826 ENDDO 1827 ENDDO 1828 1829 DO k=1,klev+1 1830 kinv=klev-k+2 1831 DO i=1,klon 1832 phalf(i,k)=paprs(i,kinv) 1833 ENDDO 1834 ENDDO 1835 1836 c open(99,file='tautab.bin',access='sequential', 1837 c $ form='unformatted',status='old') 1838 c read(99) tautab 1839 1840 cIM210503 1841 IF (debut) THEN 1842 open(99,file='tautab.formatted', FORM='FORMATTED') 1843 read(99,'(f30.20)') tautab 1844 close(99) 1845 c 1846 open(99,file='invtau.formatted',form='FORMATTED') 1847 read(99,'(i10)') invtau 1848 close(99) 1849 c 1850 nsrf=3 1851 DO nreg=1, nbreg 1852 DO i=1, klon 1853 1854 c IF (debut) THEN 1855 IF(rlon(i).LT.0.) THEN 1856 rlonPOS(i)=rlon(i)+360. 1857 ELSE 1858 rlonPOS(i)=rlon(i) 1859 ENDIF 1860 c ENDIF 1861 1862 c pct_ocean(i,nreg)=.FALSE. 1863 pct_ocean(i,nreg)=0 1864 1865 c DO nsrf = 1, nbsrf 1866 1867 c test si c'est 1 point d'ocean 1868 IF(pctsrf(i,nsrf).EQ.1.) THEN 1869 1870 IF(nreg.EQ.1) THEN 1871 1872 c TROP 1873 IF(rlat(i).GE.-30.AND.rlat(i).LE.30.) THEN 1874 c pct_ocean(i,nreg)=.TRUE. 1875 pct_ocean(i,nreg)=1 1876 ENDIF 1877 1878 c PACIFIQUE NORD 1879 ELSEIF(nreg.EQ.2) THEN 1880 IF(rlat(i).GE.40.AND.rlat(i).LE.60.) THEN 1881 IF(rlonPOS(i).GE.160..AND.rlonPOS(i).LE.235.) THEN 1882 c pct_ocean(i,nreg)=.TRUE. 1883 pct_ocean(i,nreg)=1 1884 ENDIF 1885 ENDIF 1886 c CALIFORNIE ST-CU 1887 ELSEIF(nreg.EQ.3) THEN 1888 IF(rlonPOS(i).GE.220..AND.rlonPOS(i).LE.250.) THEN 1889 IF(rlat(i).GE.15.AND.rlat(i).LE.35.) THEN 1890 c pct_ocean(i,nreg)=.TRUE. 1891 pct_ocean(i,nreg)=1 1892 ENDIF 1893 ENDIF 1894 c HAWAI 1895 ELSEIF(nreg.EQ.4) THEN 1896 IF(rlonPOS(i).GE.180..AND.rlonPOS(i).LE.220.) THEN 1897 IF(rlat(i).GE.15.AND.rlat(i).LE.35.) THEN 1898 c pct_ocean(i,nreg)=.TRUE. 1899 pct_ocean(i,nreg)=1 1900 ENDIF 1901 ENDIF 1902 c WARM POOL 1903 ELSEIF(nreg.EQ.5) THEN 1904 IF(rlonPOS(i).GE.70..AND.rlonPOS(i).LE.150.) THEN 1905 IF(rlat(i).GE.-5.AND.rlat(i).LE.20.) THEN 1906 c pct_ocean(i,nreg)=.TRUE. 1907 pct_ocean(i,nreg)=1 1908 ENDIF 1909 ENDIF 1910 ENDIF !nbreg 1911 c TROP 1912 c IF(rlat(i).GE.-30.AND.rlat(i).LE.30.) THEN 1913 c pct_ocean(i)=.TRUE. 1914 c WRITE(*,*) 'pct_ocean =',i, rlon(i), rlat(i) 1915 c ENDIF !lon 1916 c ENDIF !lat 1917 1918 ENDIF !pctsrf 1919 c ENDDO 1920 ENDDO !klon 1921 ENDDO !nbreg 1922 1923 cIM somme de toutes les nhistoW BEG 1924 DO nreg = 1, nbreg 1925 DO k = 1, kmaxm1 1926 DO l = 1, lmaxm1 1927 DO iw = 1, iwmax 1928 nhistoWt(k,l,iw,nreg)=0. 1929 ENDDO 1930 ENDDO 1931 ENDDO 1932 ENDDO 1933 cIM somme de toutes les nhistoW END 1934 ENDIF 1935 1936 1937 c CALL ISCCP_CLOUD_TYPES(nlev,ncol,seed,pfull,phalf,qv, 1938 c & cc,conv,dtau_s,dtau_c,top_height,overlap, 1939 c & tautab,invtau,skt,emsfc_lw,at,dem_s,dem_c,fq_isccp, 1940 c & totalcldarea,meanptop,meantaucld,boxtau,boxptop) 1941 1942 c DO i=1, klon 1943 c i=1 1944 c1011 CONTINUE 1945 c 1946 cIM on verifie les donnees de INPUT en dehors du simulateur ISCCP 1947 cIM 1D non-vectorise (!) pour qu'on gagne du temps ... 1948 cIM 1949 c BEGIN find unpermittable data..... 1950 ! ---------------------------------------------------! 1951 ! find unpermittable data..... 1952 ! 1953 c do 13 k=1,klev 1954 c ca prend trop de temps ?? 1955 c cldtot(:,:) = min(max(cldtot(:,:),0.),1.) 1956 c rnebcon(:,:) = min(max(rnebcon(:,:),0.),1.) 1957 c dtau_s(:,:) = max(dtau_s(:,:),0.) 1958 c dem_s(:,:) = min(max(dem_s(:,:),0.),1.) 1959 c dtau_c(:,:) = max(dtau_c(:,:),0.) 1960 c dem_c(:,:) = min(max(dem_c(:,:),0.),1.) 1961 c ca prend trop de temps ?? 1962 1963 c if (cldtot(i,k) .lt. 0.) then 1964 c print *, ' error = cloud fraction less than zero' 1965 c STOP 1966 c end if 1967 c if (cldtot(i,k) .gt. 1.) then 1968 c print *, ' error = cloud fraction greater than 1' 1969 c STOP 1970 c end if 1971 c if (rnebcon(i,k) .lt. 0.) then 1972 c print *, 1973 c & ' error = convective cloud fraction less than zero' 1974 c STOP 1975 c end if 1976 c if (rnebcon(i,k) .gt. 1.) then 1977 c print *, 1978 c & ' error = convective cloud fraction greater than 1' 1979 c STOP 1980 c end if 1981 1982 c if (dtau_s(i,k) .lt. 0.) then 1983 c print *, 1984 c & ' error = stratiform cloud opt. depth less than zero' 1985 c STOP 1986 c end if 1987 c if (dem_s(i,k) .lt. 0.) then 1988 c print *, 1989 c & ' error = stratiform cloud emissivity less than zero' 1990 c STOP 1991 c end if 1992 c if (dem_s(i,k) .gt. 1.) then 1993 c print *, 1994 c & ' error = stratiform cloud emissivity greater than 1' 1995 c STOP 1996 c end if 1997 1998 c if (dtau_c(i,k) .lt. 0.) then 1999 c print *, 2000 c & ' error = convective cloud opt. depth less than zero' 2001 c STOP 2002 c end if 2003 c if (dem_c(i,k) .lt. 0.) then 2004 c print *, 2005 c & ' error = convective cloud emissivity less than zero' 2006 c STOP 2007 c end if 2008 c if (dem_c(i,k) .gt. 1.) then 2009 c print *, 2010 c & ' error = convective cloud emissivity greater than 1' 2011 c STOP 2012 c end if 2013 c13 continue 2014 2015 ! ---------------------------------------------------! 2016 c 2017 c END find unpermittable data..... 2018 cv2.2.1.1 DO i=1, klon 2019 c i=1 2020 c seed=i 2021 c 2022 cv3.4 2023 if (debut) then 2024 DO i=1, klon 2025 seed(i)=i+100 2026 c seed(i)=i+50 2027 ENDDO 2028 endif 2029 c seed=aint(ran0(klon)) 2030 c CALL ISCCP_CLOUD_TYPES(klev,ncol,seed,pfull(i,:),phalf(i,:) 2031 cv2.2.1.1 2032 c CALL ISCCP_CLOUD_TYPES(klev,ncol,seed(i),pfull(i,:),phalf(i,:) 2033 c & ,q_seri(i,:), 2034 c & cldtot(i,:),rnebcon(i,:),dtau_s(i,:),dtau_c(i,:), 2035 c & top_height,overlap, 2036 c & tautab,invtau,ztsol,emsfc_lw,t_seri(i,:),dem_s(i,:), 2037 c & dem_c(i,:), 2038 c & fq_isccp(i,:,:), 2039 c & totalcldarea(i),meanptop(i),meantaucld(i), 2040 c & boxtau(i,:),boxptop(i,:)) 2041 cv2.2.1.1 2042 cv3.4 2043 debug=0 2044 debugcol=0 2045 cIM260503 2046 c o500 ==> distribution nuage ftion du regime dynamique 2047 DO i=1, klon 2048 o500(i)=omega(i,8)*864. 2049 c PRINT*,'pphi8 ',pphi(i,8),'zphi8,11,12',zphi(i,8), 2050 c & zphi(i,11),zphi(i,12) 2051 ENDDO 2052 2053 c axe vertical pour les differents niveaux des histogrammes 2054 c DO iw=1, iwmax 2055 c zx_o500(iw)=wmin+(iw-1./2.)*pas_w 2056 c ENDDO 2057 c PRINT*,' phys AVANT seed(3361)=',seed(3361) 2058 CALL ISCCP_CLOUD_TYPES( 2059 & debug, 2060 & debugcol, 2061 & klon, 2062 & sunlit, 2063 & klev, 2064 & ncol, 2065 & seed, 2066 & pfull, 2067 & phalf, 2068 c var de bas en haut ==> PB ! 2069 c & q_seri, 2070 c & cldtot, 2071 c & rnebcon, 2072 c & dtau_s, 2073 c & dtau_c, 2074 c var de Haut en Bas BEG 2075 & qv, cc, conv, dtau_sH2B, dtau_cH2B, 2076 c var de Haut en Bas END 2077 & top_height, 2078 & overlap, 2079 & tautab, 2080 & invtau, 2081 & ztsol, 2082 & emsfc_lw, 2083 c var de bas en haut ==> PB ! 2084 c & t_seri, 2085 c & dem_s, 2086 c & dem_c, 2087 c var de Haut en Bas BEG 2088 & at, dem_sH2B, dem_cH2B, 2089 cIM260503 2090 c & o500, pct_ocean, 2091 c var de Haut en Bas END 2092 & fq_isccp, 2093 & totalcldarea, 2094 & meanptop, 2095 & meantaucld, 2096 & boxtau, 2097 & boxptop) 2098 c & boxptop, 2099 cIM 260503 2100 c & histoW, 2101 c & nhistoW 2102 c &) 2103 2104 cIM 200603 2105 c PRINT*,'physiq fq_isccp(6,1,1)',fq_isccp(6,1,1) 2106 2107 cIM 200603 2108 cIM somme de toutes les nhistoW BEG 2109 c DO k = 1, kmaxm1 2110 c DO l = 1, lmaxm1 2111 c DO iw = 1, iwmax 2112 c nhistoWt(k,l,iw)=nhistoWt(k,l,iw)+nhistoW(k,l,iw) 2113 ccc IF(k.EQ.1.AND.l.EQ.1.AND.iw.EQ.1) then 2114 c IF(nhistoWt(k,l,iw).NE.0.) THEN 2115 c PRINT*,' physiq nWt', k,l,iw,nhistoWt(k,l,iw) 2116 c ENDIF 2117 c ENDDO 2118 c ENDDO 2119 c ENDDO 2120 cIM somme de toutes les nhistoW END 2121 c PRINT*,' phys APRES seed(3361)=',seed(3361) 2122 cv3.4 2123 c i=i+1 2124 c IF(i.LE.klon) THEN 2125 c GOTO 1011 2126 c ENDIF 2127 cv2.2.1.1 ENDDO 2128 2129 c passage de la grille (klon,7,7) a (iim,jjmp1,7,7) 2130 c minfq3d=100. 2131 c maxfq3d=0. 2132 cIM calcul des correspondances entre la grille physique et 2133 cIM la grille dynamique 2134 c DO i=1, klon 2135 c grid_phys(i)=i 2136 c PRINT*,'i, grid_phys',i,grid_phys(i) 2137 c ENDDO 2138 c CALL gr_fi_dyn(1,klon,iimp1,jjmp1,grid_phys,grid_dyn) 2139 c DO j=1, jjmp1 2140 c DO i=1, iimp1 2141 c PRINT*,'i,j grid_dyn ',i,j,grid_dyn(i,j) 2142 c ENDDO 2143 c ENDDO 2144 c 2145 DO l=1, lmax 2146 DO k=1, kmax 2147 cIM grille physique ==> grille ecriture 2D (iim,jjmp1) 2148 c 2149 DO i=1, iim 2150 fq4d(i,1,k,l)=fq_isccp(1,k,l) 2151 cc PRINT*,'first j=1 i =',i 2152 ENDDO 2153 DO j=2, jjm 2154 DO i=1, iim 2155 cERROR ?? ig=i+iim*(j-1) 2156 ig=i+1+(j-2)*iim 2157 cc PRINT*,'i =',i,'j =',j,'ig=',ig 2158 fq4d(i,j,k,l)=fq_isccp(ig,k,l) 2159 ENDDO 2160 ENDDO 2161 DO i=1, iim 2162 fq4d(i,jjmp1,k,l)=fq_isccp(klon,k,l) 2163 cc PRINT*,'last jjmp1 i =',i 2164 ENDDO 2165 IF(debut) THEN 2166 DO j=1, jjmp1 2167 DO i=1, iim 2168 IF(j.GE.2.AND.j.LE.jjm) THEN 2169 igfi2D(i,j)=i+1+(j-2)*iim 2170 c PRINT*,'i=',i,'j=',j,'ig=',igfi2D(i,j) 2171 ELSEIF(j.EQ.1) THEN 2172 igfi2D(i,j)=1 2173 c PRINT*,'i=',i,'j=',j,'ig=',igfi2D(i,j) 2174 ELSEIF(j.EQ.jjmp1) THEN 2175 igfi2D(i,j)=klon 2176 c PRINT*,'i=',i,'j=',j,'ig=',igfi2D(i,j) 2177 ENDIF 2178 ENDDO 2179 ENDDO 2180 ENDIF 2181 c STOP 2182 c 2183 c CALL gr_fi_ecrit(1,klon,iim,jjmp1,fq_isccp(:,k,l), 2184 c $ fq4d(:,:,k,l)) 2185 ENDDO 2186 ENDDO 2187 DO l=1, lmax 2188 fq4d(:,:,8,l)=-1.e+10 2189 fq4d(:,:,l,8)=-1.e+10 2190 ENDDO 2191 DO l=1, lmax 2192 DO k=1, kmax 2193 DO j=1, jjmp1 2194 DO i=1, iim 2195 2196 c inversion TAU ?! 2197 c ni=(i-1)*lmax+l 2198 c nj=(j-1)*kmax+kmax-k+1 2199 c 2200 c210503 inversion en PC ==> pas besoin !!! 2201 c ni=(i-1)*lmax+lmax-l+1 2202 c nj=(j-1)*kmax+k 2203 c 2204 c210503 2205 ni=(i-1)*lmax+l 2206 nj=(j-1)*kmax+k 2207 2208 c210503 if(k.EQ.8) then 2209 c fq4d(i,j,8,l)=-1.e+10 2210 c endif 2211 2212 c210503 if(l.EQ.8) then 2213 c fq4d(i,j,k,8)=-1.e+10 2214 c endif 2215 2216 fq3d(ni,nj)=fq4d(i,j,k,l) 2217 2218 c if(fq3d(ni,nj).lt.0.) then 2219 c print*,' fq3d LT ZERO ',ni,nj,fq3d(ni,nj) 2220 c endif 2221 c if(fq3d(ni,nj).gt.100.) then 2222 c print*,' fq3d GT 100 ',ni,nj,fq3d(ni,nj) 2223 c endif 2224 c max & min fq3d 2225 c if(fq3d(ni,nj).gt.maxfq3d) maxfq3d=fq3d(ni,nj) 2226 c if(fq3d(ni,nj).lt.minfq3d) minfq3d=fq3d(ni,nj) 2227 2228 ENDDO 2229 ENDDO 2230 c fq4d(:,:,8,l)=-1.e+10 2231 c fq4d(:,:,k,8)=-1.e+10 2232 c k=k+1 2233 c if(k.LE.kmax) then 2234 c goto 1022 2235 c endif 2236 ENDDO 2237 c l=l+1 2238 c if(l.LE.lmax) then 2239 c goto 1021 2240 c endif 2241 ENDDO 2242 2243 c print*,' minfq3d=',minfq3d,' maxfq3d=',maxfq3d 2244 c 2245 c calculs statistiques distribution nuage ftion du regime dynamique 2246 c DO i=1, klon 2247 c! o500(i)=omega(i,9)*864. 2248 c! PRINT*,' o500=',o500(i),' pphi(9)=',pphi(i,9) 2249 c o500(i)=omega(i,8)*864. 2250 cc PRINT*,' pphi(8)',pphi(i,8),'pphi(11)',pphi(i,11), 2251 cc .'pphi(12)',pphi(i,12) 2252 cc PRINT*,' zphi8,11,12=',zphi(i,8),zphi(i,11),zphi(i,12) 2253 cc PRINT*,' o500',o500(i),' w500',w500(i) 2254 c ENDDO 2255 2256 c axe vertical pour les differents niveaux des histogrammes 2257 c DO iw=1, iwmax 2258 c zx_o500(iw)=wmin+(iw-1./2.)*pas_w 2259 c ENDDO 2260 2261 2262 c Ce calcul doit etre fait a partir de valeurs mensuelles ?? 2263 cc CALL histo_o500_pctau(o500,fq4d,histoW) 2264 cc CALL histo_o500_pctau(paire,pctsrf,o500,fq4d,histoW) 2265 cc CALL histo_o500_pctau(pct_ocean,rlat,o500,fq4d,histoW) 2266 ccOK ??? CALL histo_o500_pctau(pct_ocean,o500,fq4d,histoW) 2267 c CALL histo_o500_pctau(klon,pct_ocean,o500,fq4d,histoW,nhistoW) 2268 c CALL histo_o500_pctau(klon,pct_ocean,o500,fq_isccp, 2269 CALL histo_o500_pctau(nbreg,pct_ocean,o500,fq_isccp, 2270 &histoW,nhistoW) 2271 c 2272 cIM somme de toutes les nhistoW BEG 2273 DO nreg=1, nbreg 2274 DO k = 1, kmaxm1 2275 DO l = 1, lmaxm1 2276 DO iw = 1, iwmax 2277 nhistoWt(k,l,iw,nreg)=nhistoWt(k,l,iw,nreg)+ 2278 & nhistoW(k,l,iw,nreg) 2279 ccc IF(k.EQ.1.AND.l.EQ.1.AND.iw.EQ.1) then 2280 c IF(nhistoWt(k,l,iw).NE.0.) THEN 2281 c PRINT*,' physiq nWt', k,l,iw,nhistoWt(k,l,iw) 2282 c ENDIF 2283 ENDDO 2284 ENDDO 2285 ENDDO 2286 ENDDO 2287 cIM somme de toutes les nhistoW END 2288 c 2289 c IF(lafin) THEN 2290 c DO nreg=1, nbreg 2291 c DO iw=1, iwmax 2292 c DO l=1,lmaxm1 2293 c DO k=1,kmaxm1 2294 c IF(histoW(k,l,iw,nreg).NE.0.) then 2295 c PRINT*,'physiq H nH',k,l,iw, 2296 c & histoW(k,l,iw,nreg), 2297 c & nhistoW(k,l,iw,nreg),nhistoWt(k,l,iw,nreg) 2298 c ENDIF 2299 c ENDDO 2300 c ENDDO 2301 c ENDDO 2302 c ENDDO 2303 cIM verif fq_isccp, fq4d, fq3d 2304 c DO l=1, lmaxm1 2305 c DO k=1,kmaxm1 2306 c i=74 2307 c j=36 2308 c DO j=1, jjmp1 2309 c DO i=1, iim 2310 c DO l=1, lmaxm1 2311 c WRITE(*,'(a,3i4,7f10.4)') 2312 c & 'fq_isccp,j,i,l=',j,i,l, 2313 c & (fq_isccp(igfi2D(i,j),k,l),k=1,kmaxm1) 2314 c WRITE(*,'(a,3i4,7f10.4)') 2315 c & 'fq4d,j,i,l=',j,i,l,(fq4d(i,j,k,l),k=1,kmaxm1) 2316 c ENDDO 2317 c ENDDO 2318 c ENDDO 2319 c ni1=(i-1)*8+1 2320 c ni2=i*8 2321 c nj1=(j-1)*8+1 2322 c nj2=j*8 2323 c DO ni=ni1,ni2 2324 c WRITE(*,'(a,2i4,7f10.4)') 2325 c & 'fq3d, ni,nj=',ni,nj, 2326 c & (fq3d(ni,nj),nj=nj1,nj2) 2327 c ENDDO 2328 c ENDIF 2329 2330 c DO iw=1, iwmax 2331 c DO l=1,lmaxm1 2332 c DO k=1,kmaxm1 2333 c PRINT*,' iw,l,k,nhistoW=',iw,l,k,nhistoW(k,l,iw) 2334 c ENDDO 2335 c ENDDO 2336 c ENDDO 2337 2338 c DO iw=1, iwmax 2339 c DO l=1, lmaxm1 2340 c linv=lmaxm1-l+1 2341 c DO k=1, kmaxm1 2342 c histoWinv(k,l,iw)=histoW(iw,k,l) 2343 c ENDDO 2344 c ENDDO 2345 c ENDDO 2346 c 2347 c pb syncronisation ?? : 48 * 30 * 7 (jour1) + 48* 29 * 7 (jour suivant) 2348 c 2349 2350 2351 ENDIF !ok_isccp 2352 cIM ISCCP simulator END 2353 1618 2354 c On prend la somme des fractions nuageuses et des contenus en eau 1619 2355 cldfra(:,:)=min(max(cldfra(:,:),rnebcon(:,:)),1.) … … 1717 2453 cccIMs topsw0,toplw0,solsw0,sollw0) 1718 2454 s topsw0,toplw0,solsw0,sollw0, 1719 s ZFSUP,ZFSDN,ZFSUP0,ZFSDN0)2455 s swdn0, swdn, swup0, swup ) 1720 2456 itaprad = 0 1721 2457 ENDIF … … 1968 2704 cIM cf. FH slp(:) = paprs(:,1)*exp(pphis(:)/(289.*t_seri(:,1))) 1969 2705 slp(:) = paprs(:,1)*exp(pphis(:)/(RD*t_seri(:,1))) 2706 c PRINT*,' physiq slp ',slp(2185),paprs(2185,1),pphis(2185), 2707 c . RD,t_seri(2185,1) 2708 c 2709 ccc prw = eau precipitable 2710 DO i = 1, klon 2711 prw(i) = 0. 2712 DO k = 1, klev 2713 prw(i) = prw(i) + 2714 . q_seri(i,k)*(paprs(i,k)-paprs(i,k+1))/RG 2715 ENDDO 2716 c PRINT*,' i ',i,' prw',prw(i) 2717 ENDDO 1970 2718 c 1971 2719 … … 1973 2721 c Ecriture des sorties 1974 2722 c============================================================= 2723 2724 #ifdef histISCCP 2725 #include "write_histISCCP.h" 2726 #endif 1975 2727 1976 2728 #ifdef histhf … … 2024 2776 CALL phyredem ("restartphy.nc",dtime,radpas, 2025 2777 . rlat, rlon, pctsrf, ftsol, ftsoil, deltat, fqsurf, qsol, 2026 . fsnow, falbe, fevap, rain_fall, snow_fall,2778 . fsnow, falbe,falblw, fevap, rain_fall, snow_fall, 2027 2779 . solsw, sollwdown,dlw, 2028 2780 . radsol,frugs,agesno,
Note: See TracChangeset
for help on using the changeset viewer.