Changeset 634 for LMDZ4/branches/LMDZ4_par_0/libf/phylmd/interface_surf.F90
- Timestamp:
- May 4, 2005, 5:11:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4_par_0/libf/phylmd/interface_surf.F90
r633 r634 22 22 ! L. Fairhead, LMD, 02/2000 23 23 24 USE ioipsl24 !ym USE ioipsl 25 25 26 26 IMPLICIT none … … 76 76 & z0_new, pctsrf_new, agesno,fqcalving,ffonte, run_off_lic_0) 77 77 78 78 USE dimphy,only : monocpu 79 79 ! Cette routine sert d'aiguillage entre l'atmosphere et la surface en general 80 80 ! (sols continentaux, oceans, glaces) pour les fluxs de chaleur et d'humidite. … … 235 235 real, dimension(klon):: fder_prev 236 236 REAL, dimension(klon) :: bidule 237 INTEGER :: j 237 238 238 239 if (check) write(*,*) 'Entree ', modname … … 394 395 395 396 else 397 398 if (.not.monocpu) then 399 abort_message='Appel a ORCHIDEE non encore parallelise !!' 400 call abort_gcm(modname,abort_message,1) 401 endif 396 402 !! CALL albsno(klon,agesno,alb_neig_grid) 397 403 ! … … 434 440 ! 435 441 if (ocean == 'couple') then 442 if (.not.monocpu) then 443 abort_message='Couplage avec l OCEAN non encore parallelise !!' 444 call abort_gcm(modname,abort_message,1) 445 endif 446 436 447 if (nexca == 0) then 437 448 abort_message='nexca = 0 dans interfoce_cpl' … … 510 521 if (ocean == 'couple') then 511 522 523 if (.not.monocpu) then 524 abort_message='Couplage avec l OCEAN non encore parallelise !!' 525 call abort_gcm(modname,abort_message,1) 526 endif 527 512 528 cumul = .true. 513 529 … … 555 571 ! 556 572 if (ocean == 'couple') then 557 573 574 if (.not.monocpu) then 575 abort_message='Couplage avec l OCEAN non encore parallelise !!' 576 call abort_gcm(modname,abort_message,1) 577 endif 578 558 579 cumul =.false. 559 580 … … 596 617 !IM cf LF 597 618 DO ii = 1, knon 598 IF (pctsrf_new(ii,nisurf) < EPSFRA) then 619 j=knindex(ii) 620 IF (pctsrf_new(j,nisurf) < EPSFRA) then 599 621 snow(ii) = 0.0 600 622 !IM cf LF/JLD tsurf(ii) = RTT - 1.8 … … 666 688 if (ocean == 'couple') then 667 689 690 if (.not.monocpu) then 691 abort_message='Couplage avec l OCEAN non encore parallelise !!' 692 call abort_gcm(modname,abort_message,1) 693 endif 694 668 695 cumul =.true. 669 696 … … 733 760 734 761 ! passage du run-off des glaciers calcule dans fonte_neige au coupleur 735 bidule=0. 736 bidule(1:knon)= run_off_lic(1:knon) 737 call gath2cpl(bidule, tmp_rlic, klon, knon,iim,jjm,knindex) 762 if (ocean=='couple') then 763 764 if (.not.monocpu) then 765 abort_message='Couplage avec l OCEAN non encore parallelise !!' 766 call abort_gcm(modname,abort_message,1) 767 endif 768 769 bidule=0. 770 bidule(1:knon)= run_off_lic(1:knon) 771 call gath2cpl(bidule, tmp_rlic, klon, knon,iim,jjm,knindex) 772 773 endif 738 774 ! 739 775 ! calcul albedo … … 1239 1275 & pctsrf_new) 1240 1276 1277 USE ioipsl 1241 1278 ! Cette routine sert d'interface entre le modele atmospherique et un 1242 1279 ! coupleur avec un modele d'ocean 'complet' derriere … … 1909 1946 ! 1910 1947 SUBROUTINE interfoce_lim(itime, dtime, jour, & 1911 & klon , nisurf, knon, knindex, &1948 & klon_xx, nisurf, knon, knindex, & 1912 1949 & debut, & 1913 & lmt_sst, pctsrf_new) 1950 & lmt_sst_p, pctsrf_new_p) 1951 1952 USE dimphy,klon=>klon2,klon2=>klon 1914 1953 1915 1954 ! Cette routine sert d'interface entre le modele atmospherique et un fichier … … 1938 1977 real , intent(IN) :: dtime 1939 1978 integer, intent(IN) :: jour 1979 integer, intent(in) :: klon_xx 1940 1980 integer, intent(IN) :: nisurf 1941 1981 integer, intent(IN) :: knon 1942 integer, intent(IN) :: klon 1943 integer, dimension(klon), intent(in) :: knindex 1982 integer, dimension(klon2), intent(in) :: knindex 1944 1983 logical, intent(IN) :: debut 1945 1984 1946 1985 ! Parametres de sortie 1947 real, intent(out), dimension(klon) :: lmt_sst 1948 real, intent(out), dimension(klon,nbsrf) :: pctsrf_new 1986 real, intent(out), dimension(klon2) :: lmt_sst_p 1987 real, intent(out), dimension(klon2,nbsrf) :: pctsrf_new_p 1988 1989 ! real, dimension(klon) :: lmt_sst 1990 real, dimension(klon,nbsrf) :: pctsrf_new 1949 1991 1950 1992 ! Variables locales … … 1962 2004 logical, save :: check = .FALSE. 1963 2005 ! Champs lus dans le fichier de CL 1964 real, allocatable , save, dimension(:) :: sst_lu, rug_lu, nat_lu 1965 real, allocatable , save, dimension(:,:) :: pct_tmp 2006 real, allocatable , save, dimension(:) :: sst_lu_p, rug_lu_p, nat_lu_p 2007 real, allocatable , save, dimension(:,:) :: pct_tmp_p 2008 real, dimension(klon,nbsrf) :: pct_tmp 2009 real, dimension(klon) :: sst_lu 2010 real, dimension(klon) :: nat_lu 1966 2011 ! 1967 2012 ! quelques variables pour netcdf … … 1973 2018 ! Fin déclaration 1974 2019 ! 1975 1976 if (debut .and. .not. allocated(sst_lu )) then2020 2021 if (debut .and. .not. allocated(sst_lu_p)) then 1977 2022 lmt_pas = nint(86400./dtime * 1.0) ! pour une lecture une fois par jour 1978 2023 jour_lu = jour - 1 1979 allocate(sst_lu (klon))1980 allocate(nat_lu (klon))1981 allocate(pct_tmp (klon,nbsrf))2024 allocate(sst_lu_p(klon2)) 2025 allocate(nat_lu_p(klon2)) 2026 allocate(pct_tmp_p(klon2,nbsrf)) 1982 2027 endif 1983 2028 … … 1992 2037 ! Ouverture du fichier 1993 2038 ! 2039 if (phy_rank==0) then 2040 1994 2041 fich = trim(fich) 1995 2042 ierr = NF_OPEN (fich, NF_NOWRITE,nid) … … 2131 2178 ! 2132 2179 ierr = NF_CLOSE(nid) 2133 deja_lu = .true. 2134 jour_lu = jour 2135 endif 2180 endif ! phyrank 2136 2181 ! 2137 2182 ! Recopie des variables dans les champs de sortie 2138 2183 ! 2139 lmt_sst = 999999999. 2184 call ScatterField(sst_lu,sst_lu_p,1) 2185 call ScatterField(pct_tmp(:,is_oce),pct_tmp_p(:,is_oce),1) 2186 call ScatterField(pct_tmp(:,is_sic),pct_tmp_p(:,is_sic),1) 2187 2188 deja_lu = .true. 2189 jour_lu = jour 2190 endif 2191 2192 lmt_sst_p = 999999999. 2193 2140 2194 do ii = 1, knon 2141 lmt_sst (ii) = sst_lu(knindex(ii))2195 lmt_sst_p(ii) = sst_lu_p(knindex(ii)) 2142 2196 enddo 2143 2197 2144 pctsrf_new(:,is_oce) = pct_tmp(:,is_oce) 2145 pctsrf_new(:,is_sic) = pct_tmp(:,is_sic) 2198 do ii=1,klon2 2199 pctsrf_new_p(ii,is_oce)=pct_tmp_p(ii,is_oce) 2200 pctsrf_new_p(ii,is_sic)=pct_tmp_p(ii,is_sic) 2201 enddo 2202 2146 2203 2147 2204 END SUBROUTINE interfoce_lim … … 2151 2208 ! 2152 2209 SUBROUTINE interfsur_lim(itime, dtime, jour, & 2153 & klon , nisurf, knon, knindex, &2210 & klon_xx, nisurf, knon, knindex, & 2154 2211 & debut, & 2155 & lmt_alb, lmt_rug) 2212 & lmt_alb_p, lmt_rug_p) 2213 2214 USE dimphy,klon=>klon2,klon2=>klon 2156 2215 2157 2216 ! Cette routine sert d'interface entre le modele atmospherique et un fichier … … 2184 2243 integer, intent(IN) :: nisurf 2185 2244 integer, intent(IN) :: knon 2186 integer, intent(IN) :: klon 2187 integer, dimension(klon ), intent(in) :: knindex2245 integer, intent(IN) :: klon_xx 2246 integer, dimension(klon2), intent(in) :: knindex 2188 2247 logical, intent(IN) :: debut 2189 2248 2190 2249 ! Parametres de sortie 2191 real, intent(out), dimension(klon) :: lmt_alb 2192 real, intent(out), dimension(klon) :: lmt_rug 2250 real, intent(out), dimension(klon2) :: lmt_alb_p 2251 real, intent(out), dimension(klon2) :: lmt_rug_p 2252 2253 ! real, dimension(klon) :: lmt_alb 2254 ! real, dimension(klon) :: lmt_rug 2193 2255 2194 2256 ! Variables locales … … 2206 2268 logical,save :: check = .false. 2207 2269 ! Champs lus dans le fichier de CL 2208 real, allocatable , save, dimension(:) :: alb_lu, rug_lu 2270 real, allocatable , save, dimension(:) :: alb_lu_p, rug_lu_p 2271 real, dimension(klon) :: alb_lu, rug_lu 2209 2272 ! 2210 2273 ! quelques variables pour netcdf … … 2220 2283 lmt_pas = nint(86400./dtime * 1.0) ! pour une lecture une fois par jour 2221 2284 jour_lu_sur = jour - 1 2222 allocate(alb_lu (klon))2223 allocate(rug_lu (klon))2285 allocate(alb_lu_p(klon2)) 2286 allocate(rug_lu_p(klon2)) 2224 2287 endif 2225 2288 … … 2232 2295 ! Tester d'abord si c'est le moment de lire le fichier 2233 2296 if (mod(itime-1, lmt_pas) == 0 .and. .not. deja_lu_sur) then 2297 2298 if (phy_rank==0) then 2234 2299 ! 2235 2300 ! Ouverture du fichier … … 2289 2354 ! 2290 2355 ierr = NF_CLOSE(nid) 2356 2357 2358 endif !! phyrank 2359 2360 call ScatterField(alb_lu,alb_lu_p,1) 2361 call ScatterField(rug_lu,rug_lu_p,1) 2362 2291 2363 deja_lu_sur = .true. 2292 2364 jour_lu_sur = jour … … 2297 2369 !!$ lmt_alb(:) = 0.0 2298 2370 !!$ lmt_rug(:) = 0.0 2299 lmt_alb(:) = 999999. 2300 lmt_rug(:) = 999999. 2371 2372 lmt_alb_p(:) = 999999. 2373 lmt_rug_p(:) = 999999. 2301 2374 DO ii = 1, knon 2302 lmt_alb (ii) = alb_lu(knindex(ii))2303 lmt_rug (ii) = rug_lu(knindex(ii))2375 lmt_alb_p(ii) = alb_lu_p(knindex(ii)) 2376 lmt_rug_p(ii) = rug_lu_p(knindex(ii)) 2304 2377 enddo 2305 2378
Note: See TracChangeset
for help on using the changeset viewer.