- Timestamp:
- Jul 28, 2000, 2:38:04 PM (24 years ago)
- Location:
- LMDZ.3.3/branches
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/dyn3d/etat0_netcdf.F
r99 r112 10 10 ! 11 11 ! 12 INTEGER, PARAMETER :: KIDIA=1, KFDIA=iim*(jjm-1)+2,13 .KLON=KFDIA-KIDIA+1,KLEV=llm12 c INTEGER, PARAMETER :: KIDIA=1, KFDIA=iim*(jjm-1)+2, 13 c .KLON=KFDIA-KIDIA+1,KLEV=llm 14 14 ! 15 15 #include "comgeom2.h" 16 16 #include "comvert.h" 17 17 #include "comconst.h" 18 #include "indicesol.h" 19 #include "dimphy.h" 20 #include "dimsoil.h" 18 21 ! 19 22 REAL :: latfi(klon), lonfi(klon) … … 25 28 REAL :: t3d(iip1, jjp1, llm), tpot(iip1, jjp1, llm) 26 29 REAL :: q3d(iip1, jjp1, llm,nqmx), qsat(iip1, jjp1, llm) 27 REAL :: tsol(klon), qsol(klon), sn(klon), radsol(klon) 28 REAL :: deltat(klon), rugmer(klon), agesno(klon) 30 REAL :: tsol(klon), qsol(klon), sn(klon) 31 REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf) 32 REAL :: albe(klon,nbsrf), evap(klon,nbsrf) 33 REAL :: tsoil(klon,nsoilmx,nbsrf) 34 REAL :: radsol(klon),rain_fall(klon), snow_fall(klon) 35 REAL :: solsw(klon), sollw(klon) 36 REAL :: deltat(klon), frugs(klon,nbsrf), agesno(klon),rugmer(klon) 29 37 REAL :: zmea(iip1*jjp1), zstd(iip1*jjp1) 30 38 REAL :: zsig(iip1*jjp1), zgam(iip1*jjp1), zthe(iip1*jjp1) 31 39 REAL :: zpic(iip1*jjp1), zval(iip1*jjp1), rugsrel(iip1*jjp1) 32 40 REAL :: qd(iip1, jjp1, llm) 33 ! 41 REAL :: pctsrf(klon, nbsrf) 42 REAL :: t_ancien(klon,klev), q_ancien(klon,klev) ! 43 ! declarations pour lecture glace de mer 44 INTEGER :: iml_lic, jml_lic, llm_tmp, ttm_tmp, iret 45 INTEGER :: itaul(1), fid 46 REAL :: lev(1), date, dt 47 REAL, ALLOCATABLE, DIMENSION(:,:) :: lon_lic, lat_lic 48 REAL, ALLOCATABLE, DIMENSION(:) :: dlon_lic, dlat_lic 49 REAL, ALLOCATABLE, DIMENSION (:,:) :: fraclic 50 REAL :: flic_tmp(iip1, jjp1) 51 REAL :: champint(iim, jjp1) 52 ! 53 34 54 CHARACTER*80 :: varname 35 55 ! 36 INTEGER :: i,j, ig, l 56 INTEGER :: i,j, ig, l, ji 37 57 REAL :: xpi 38 58 ! … … 144 164 ! 145 165 ! 166 167 168 C 169 C on initialise les sous surfaces 170 C 171 pctsrf=0. 172 !cree le masque a partir du fichier relief 173 varname = 'zmasq' 174 zmasq(:) = 0. 175 CALL startget(varname,iip1,jjp1,rlonv,rlatu,klon,zmasq,0.0) 176 WHERE (zmasq(1 : klon) .LE. EPSFRA) 177 zmasq(1 : klon) = 0. 178 END WHERE 179 WRITE(*,*)zmasq 180 181 182 183 146 184 varname = 'psol' 147 185 psol(:,:) = 0.0 … … 227 265 ! This line needs to be replaced by a call to restget to get the values in the restart file 228 266 tsol(:) = 0.0 229 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, tsol, 267 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, tsol,0.0) 230 268 ! 231 269 WRITE(*,*) 'TSOL construit :' … … 234 272 varname = 'qsol' 235 273 qsol(:) = 0.0 236 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, qsol, 274 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, qsol,0.0) 237 275 ! 238 276 varname = 'snow' 239 277 sn(:) = 0.0 240 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, sn, 278 CALL startget(varname, iip1, jjp1, rlonv, rlatu, klon, sn,0.0) 241 279 ! 242 280 varname = 'rads' … … 278 316 CALL startget(varname,iip1,jjp1,rlonv,rlatu,klon,zval,0.0) 279 317 rugsrel(:) = 0.0 318 319 320 C 321 C lecture du fichier glace de terre pour fixer la fraction de terre 322 C et de glace de terre 323 C 324 CALL flininfo("landiceref.nc", iml_lic, jml_lic,llm_tmp, ttm_tmp 325 $ , fid) 326 ALLOCATE(lat_lic(iml_lic, jml_lic), stat=iret) 327 ALLOCATE(lon_lic(iml_lic, jml_lic), stat=iret) 328 ALLOCATE(dlon_lic(iml_lic), stat=iret) 329 ALLOCATE(dlat_lic(jml_lic), stat=iret) 330 ALLOCATE(fraclic(iml_lic, jml_lic), stat=iret) 331 CALL flinopen("landiceref.nc", .FALSE., iml_lic, jml_lic, llm_tmp 332 $ , lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, fid) 333 CALL flinget(fid, 'landice', iml_lic, jml_lic, llm_tmp, ttm_tmp 334 $ , 1, 1, fraclic) 335 CALL flinclo(fid) 336 C 337 C interpolation sur la grille T du modele 338 C 339 WRITE(*,*) 'dimensions de landice iml_lic, jml_lic : ', 340 $ iml_lic, jml_lic 341 c 342 C sil les coordonnees sont en degres, on les transforme 343 C 344 IF( MAXVAL( lon_lic(:,:) ) .GT. 2.0 * asin(1.0) ) THEN 345 lon_lic(:,:) = lon_lic(:,:) * 2.0* ASIN(1.0) / 180. 346 ENDIF 347 IF( maxval( lat_lic(:,:) ) .GT. 2.0 * asin(1.0)) THEN 348 lat_lic(:,:) = lat_lic(:,:) * 2.0 * asin(1.0) / 180. 349 ENDIF 350 351 dlon_lic(1 : iml_lic) = lon_lic(1 : iml_lic, 1) 352 dlat_lic(1 : jml_lic) = lat_lic(1 , 1 : jml_lic) 353 C 354 CALL grille_m(iml_lic, jml_lic, dlon_lic, dlat_lic, fraclic 355 $ ,iim, jjp1, 356 $ rlonv, rlatu, flic_tmp(1 : iim, 1 : jjp1)) 357 c$$$ flic_tmp(1 : iim, 1 : jjp1) = champint(1: iim, 1 : jjp1) 358 flic_tmp(iip1, 1 : jjp1) = flic_tmp(1 , 1 : jjp1) 359 C 360 C passage sur la grille physique 361 C 362 CALL gr_dyn_fi(1, iip1, jjp1, klon, flic_tmp, 363 $ pctsrf(1:klon, is_lic)) 364 C adequation avec le maque terre/mer 365 WHERE (pctsrf(1 : klon, is_lic) .LE. EPSFRA ) 366 pctsrf(1 : klon, is_lic) = 0. 367 END WHERE 368 WHERE (zmasq( 1 : klon) .LE. EPSFRA) 369 pctsrf(1 : klon, is_lic) = 0. 370 END WHERE 371 pctsrf(1 : klon, is_ter) = zmasq(1 : klon) 372 DO ji = 1, klon 373 IF (zmasq(ji) .GT. EPSFRA) THEN 374 IF ( pctsrf(ji, is_lic) .GE. zmasq(ji)) THEN 375 pctsrf(ji, is_lic) = zmasq(ji) 376 pctsrf(ji, is_ter) = 0. 377 ELSE 378 pctsrf(ji,is_ter) = zmasq(ji) - pctsrf(ji, is_lic) 379 ENDIF 380 ENDIF 381 END DO 382 C 383 C sous surface ocean et glace de mer (pour demarrer on met glace de mer a 0) 384 C 385 pctsrf(1 : klon, is_oce) = (1. - zmasq(1 : klon)) 386 WHERE (pctsrf(1 : klon, is_oce) .LT. EPSFRA) 387 pctsrf(1 : klon, is_oce) = 0. 388 END WHERE 389 C 390 C verif que somme des sous surface = 1 391 C 392 ji=count( (abs( sum(pctsrf(1 : klon, 1 : nbsrf), dim = 2)) - 1.0 ) 393 $ .GT. EPSFRA) 394 IF (ji .NE. 0) THEN 395 WRITE(*,*) 'pb repartition sous maille pour ',ji,' points' 396 ENDIF 397 398 399 400 401 280 402 C Calcul intermediaire 281 403 c … … 333 455 solaire = 1370.0 334 456 335 call physdem(lonfi, latfi, phystep,radpas,co2_ppm, 336 . solaire,tsol, qsol, 337 . sn, radsol, deltat, rugmer, 338 . agesno, zmea, zstd, zsig, 339 . zgam, zthe, zpic, zval, 340 . rugsrel) 457 c call physdem(lonfi, latfi, phystep,radpas,co2_ppm, 458 c . solaire,tsol, qsol, 459 c . sn, radsol, deltat, rugmer, 460 c . agesno, zmea, zstd, zsig, 461 c . zgam, zthe, zpic, zval, 462 c . rugsrel) 463 464 c 465 c Initialisation 466 c tsol, qsol, sn,albe, evap,tsoil,rain_fall, snow_fall,solsw, sollw,frugs 467 c 468 tsolsrf(:,is_ter) = tsol 469 tsolsrf(:,is_lic) = tsol 470 tsolsrf(:,is_oce) = tsol 471 tsolsrf(:,is_sic) = tsol 472 snsrf(:,is_ter) = sn 473 snsrf(:,is_lic) = sn 474 snsrf(:,is_oce) = sn 475 snsrf(:,is_sic) = sn 476 albe(:,is_ter) = 0.08 477 albe(:,is_lic) = 0.6 478 albe(:,is_oce) = 0.5 479 albe(:,is_sic) = 0.6 480 evap(:,:) = 0. 481 qsolsrf(:,is_ter) = qsol 482 qsolsrf(:,is_lic) = qsol 483 qsolsrf(:,is_oce) = 150. 484 qsolsrf(:,is_sic) = 150. 485 do i = 1, nbsrf 486 do j = 1, nsoilmx 487 tsoil(:,j,i) = tsol 488 enddo 489 enddo 490 rain_fall = 0.; snow_fall = 0. 491 solsw = 165. 492 sollw = -53. 493 t_ancien = 273.15 494 q_ancien = 0. 495 agesno = 0. 496 deltat = 0. 497 frugs(:,is_oce) = rugmer 498 frugs(:,is_ter) = rugmer 499 frugs(:,is_lic) = rugmer 500 frugs(:,is_sic) = rugmer 501 502 call phyredem("startphy.nc",phystep,radpas, co2_ppm, solaire, 503 $ latfi, lonfi, pctsrf, tsolsrf, tsoil, deltat, qsolsrf, snsrf, 504 $ albe, evap, rain_fall, snow_fall, solsw, sollw, 505 $ radsol, frugs, agesno, 506 $ zmea, zstd, zsig, zgam, zthe, zpic, zval, rugsrel, 507 $ t_ancien, q_ancien) 341 508 342 509 C Sortie Visu pour les champs dynamiques -
LMDZ.3.3/branches/rel-LF/libf/dyn3d/gcm.F
r99 r112 437 437 438 438 c rajout debug 439 clafin = .true.439 lafin = .true. 440 440 441 441 CALL calfis( nqmx, lafin ,rdayvrai,rday_ecri,time , … … 503 503 504 504 c ajout debug 505 cIF( lafin ) then506 cabort_message = 'Simulation finished'507 ccall abort_gcm(modname,abort_message,0)508 cENDIF505 IF( lafin ) then 506 abort_message = 'Simulation finished' 507 call abort_gcm(modname,abort_message,0) 508 ENDIF 509 509 510 510 c ******************************************************************** -
LMDZ.3.3/branches/rel-LF/libf/dyn3d/modif_etat0.F
r97 r112 245 245 C Ecriture etat initial physique 246 246 C 247 WRITE(*,*) 247 WRITE(*,*)'zmasq avant phyredem' 248 248 WRITE(*,*) zmasq 249 249 -
LMDZ.3.3/branches/rel-LF/libf/phylmd/YOMCST.inc
r97 r112 1 1 ! A1.0 Fundamental constants 2 REAL RPI,RCLUM,RHPLA,RKBOL,RNAVO2 REAL :: RPI,RCLUM,RHPLA,RKBOL,RNAVO 3 3 ! A1.1 Astronomical constants 4 REAL RDAY,REA,REPSM,RSIYEA,RSIDAY,ROMEGA4 REAL :: RDAY,REA,REPSM,RSIYEA,RSIDAY,ROMEGA 5 5 ! A1.1.bis Constantes concernant l'orbite de la Terre: 6 REAL R_ecc, R_peri, R_incl6 REAL :: R_ecc, R_peri, R_incl 7 7 ! A1.2 Geoide 8 REAL RA,RG,R1SA8 REAL :: RA,RG,R1SA 9 9 ! A1.3 Radiation 10 REAL RSIGMA,RI010 REAL :: RSIGMA,RI0 11 11 ! A1.4 Thermodynamic gas phase 12 REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV13 REAL RKAPPA,RETV12 REAL :: R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV 13 REAL :: RKAPPA,RETV 14 14 ! A1.5,6 Thermodynamic liquid,solid phases 15 REAL RCW,RCS15 REAL :: RCW,RCS 16 16 ! A1.7 Thermodynamic transition of phase 17 REAL RLVTT,RLSTT,RLMLT,RTT,RATM17 REAL :: RLVTT,RLSTT,RLMLT,RTT,RATM 18 18 ! A1.8 Curve of saturation 19 REAL RESTT,RALPW,RBETW,RGAMW,RALPS,RBETS,RGAMS20 REAL RALPD,RBETD,RGAMD19 REAL :: RESTT,RALPW,RBETW,RGAMW,RALPS,RBETS,RGAMS 20 REAL :: RALPD,RBETD,RGAMD 21 21 ! 22 22 COMMON/YOMCST/RPI ,RCLUM ,RHPLA ,RKBOL ,RNAVO & -
LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F
r109 r112 1 SUBROUTINE clmain(dtime,pctsrf,t,q,u,v, 1 SUBROUTINE clmain(dtime,itap,pctsrf, 2 . t,q,u,v, 2 3 . jour, rmu0, 3 . ok_veget, ts,4 . ok_veget, ocean, npas, nexca, ts, 4 5 . paprs,pplay,radsol,snow,qsol,evap,albe, 5 6 . rain_f, snow_f, solsw, sollw, fder, 6 7 . rlon, rlat, rugos, 7 . debut, lafin, 8 . debut, lafin, agesno, 8 9 . d_t,d_q,d_u,d_v,d_ts, 9 10 . flux_t,flux_q,flux_u,flux_v,cdragh,cdragm, … … 33 34 c Arguments: 34 35 c dtime----input-R- interval du temps (secondes) 36 c itap-----input-I- numero du pas de temps 35 37 c t--------input-R- temperature (K) 36 38 c q--------input-R- vapeur d'eau (kg/kg) … … 75 77 c 76 78 REAL dtime 79 integer itap 77 80 REAL t(klon,klev), q(klon,klev) 78 81 REAL u(klon,klev), v(klon,klev) … … 84 87 REAL dflux_t(klon), dflux_q(klon) 85 88 REAL flux_u(klon,klev, nbsrf), flux_v(klon,klev, nbsrf) 86 REAL rugmer(klon) 89 REAL rugmer(klon), agesno(klon) 87 90 REAL cdragh(klon), cdragm(klon) 88 91 integer jour ! jour de l'annee en cours 89 92 real rmu0(klon) ! cosinus de l'angle solaire zenithal 90 93 LOGICAL debut, lafin, ok_veget 94 character*6 ocean 95 integer npas, nexca 91 96 cAA INTEGER itr 92 97 cAA REAL tr(klon,klev,nbtr) … … 288 293 yv1(j) = v1lay(i) 289 294 yrads(j) = totalflu(i) 290 c ycal(j) = cal(i)291 c ybeta(j) = beta(i)292 c ydif(j) = dif_grnd(i)293 295 ypaprs(j,klev+1) = paprs(i,klev+1) 294 296 ENDDO … … 331 333 ytauy = y_flux_v(:,1) 332 334 c calculer la diffusion de "q" et de "h" 333 CALL clqh(knon, dtime, nsrf, ni, pctsrf, rlon, rlat, 334 e jour, rmu0, 335 CALL clqh(dtime, itap, jour, debut,lafin, 336 e rlon, rlat, 337 e knon, nsrf, ni, pctsrf, 338 e ok_veget, ocean, npas, nexca, 339 e rmu0, 335 340 e yu1, yv1, ycoefh, 336 341 e yt,yq,yts,ypaprs,ypplay, … … 338 343 e yrain_f, ysnow_f, yfder, ytaux, ytauy, 339 344 e ysollw, ysolsw, 340 s pctsrf_new, 345 s pctsrf_new, agesno, 341 346 s y_d_t, y_d_q, y_d_ts, yz0_new, 342 347 s y_flux_t, y_flux_q, y_dflux_t, y_dflux_q) … … 349 354 ENDDO 350 355 ENDIF 351 c352 cAA MAINTENANT DANS PHYTRAC353 cAAc calculer la diffusion des traceurs354 cAA IF (itr.GE.1) THEN355 cAA DO it = 1, itr356 cAA CALL cltrac(knon,dtime,ycoefh, yt, ytr(1,1,it), yflxsrf(1,it),357 cAA e ypaprs, ypplay, ydelp,358 cAA s y_d_tr(1,1,it))359 cAA ENDDO360 cAA ENDIF361 c362 356 DO j = 1, knon 363 357 y_dflux_t(j) = y_dflux_t(j) * ypct(j) … … 427 421 ENDDO 428 422 c 429 cAA IF (itr.GE.1) THEN430 cAA DO it = 1, itr431 cAA DO k = 1, klev432 cAA DO j = 1, knon433 cAA y_d_tr(j,k,it) = y_d_tr(j,k,it) * ypct(j)434 cAA ENDDO435 cAA ENDDO436 cAA ENDDO437 cAA DO j = 1, knon438 cAA i = ni(j)439 cAA DO it = 1, itr440 cAA DO k = 1, klev441 cAA d_tr(i,k,it) = d_tr(i,k,it) + y_d_tr(j,k,it)442 cAA ENDDO443 cAA ENDDO444 cAA ENDDO445 cAA ENDIF446 c447 423 99999 CONTINUE 448 424 c 425 C 426 C On utilise les nouvelles surfaces 427 C A rajouter: conservation de l'albedo 428 C 429 pctsrf = pctsrf_new 449 430 450 431 RETURN 451 432 END 452 SUBROUTINE clqh(knon,dtime,nisurf,knindex,pctsrf, rlon, rlat, 453 e jour, rmu0 433 SUBROUTINE clqh(dtime,itime, jour,debut,lafin, 434 e rlon, rlat, 435 e knon, nisurf, knindex, pctsrf, 436 e ok_veget, ocean, npas, nexca, 437 e rmu0, 454 438 e u1lay,v1lay,coef, 455 439 e t,q,ts,paprs,pplay, … … 457 441 e precip_rain, precip_snow, fder, taux, tauy, 458 442 e lwdown, swdown, 459 s pctsrf_new, 443 s pctsrf_new, agesno, 460 444 s d_t, d_q, d_ts, z0_new, 461 445 s flux_t, flux_q,dflux_s,dflux_l) … … 499 483 REAL qsol(klon) ! humidite de la surface 500 484 real precip_rain(klon), precip_snow(klon) 485 REAL agesno(klon) 501 486 integer jour ! jour de l'annee en cours 502 487 real rmu0(klon) ! cosinus de l'angle solaire zenithal … … 504 489 real pctsrf(klon,nbsrf) 505 490 real rlon(klon), rlat(klon) 491 logical ok_veget 492 character*6 ocean 493 integer npas, nexca 494 506 495 c 507 496 REAL d_t(klon,klev) ! incrementation de "t" … … 565 554 integer itime 566 555 integer nisurf 567 logical debut, lafin , ok_veget556 logical debut, lafin 568 557 real zlev1(klon) 569 558 real fder(klon), taux(klon), tauy(klon) … … 575 564 real p1lay(klon) 576 565 real coef1lay(klon) 577 character*6 ocean578 566 579 567 ! Parametres de sortie … … 691 679 C Appel a interfsurf (appel generique) routine d'interface avec la surface 692 680 693 ok_veget = .false.694 ocean = 'force '695 696 681 petAcoef=zx_ch(:,1) 697 682 peqAcoef=zx_cq(:,1) … … 717 702 e albedo, snow, qsol, 718 703 e ts, p1lay, psref, radsol, 719 e ocean, zmasq,704 e ocean, npas, nexca, zmasq, 720 705 s evap, fluxsens, fluxlat, dflux_l, dflux_s, 721 s tsol_rad, tsurf_new, alb_new, emis_new, z0_new, pctsrf_new) 706 s tsol_rad, tsurf_new, alb_new, emis_new, z0_new, 707 s pctsrf_NEW, agesno) 722 708 723 709 flux_t(:,1) = fluxsens -
LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90
r109 r112 36 36 37 37 #include "YOMCST.inc" 38 39 40 ! run_off ruissellement total 38 #include "indicesol.inc" 39 40 41 ! run_off ruissellement total 41 42 real, allocatable, dimension(:),save :: run_off 42 43 … … 56 57 & albedo, snow, qsol, & 57 58 & tsurf, p1lay, ps, radsol, & 58 & ocean, zmasq, &59 & ocean, npas, nexca, zmasq, & 59 60 & evap, fluxsens, fluxlat, dflux_l, dflux_s, & 60 & tsol_rad, tsurf_new, alb_new, emis_new, z0_new, pctsrf_new )61 & tsol_rad, tsurf_new, alb_new, emis_new, z0_new, pctsrf_new, agesno) 61 62 62 63 … … 125 126 ! pctsrf_new nouvelle repartition des surfaces 126 127 127 include 'indicesol.h'128 128 129 129 ! Parametres d'entree … … 153 153 real, dimension(klon), intent(IN) :: fder, taux, tauy 154 154 character (len = 6) :: ocean 155 integer :: npas, nexca ! nombre et pas de temps couplage 155 156 real, dimension(knon), intent(INOUT) :: evap, snow, qsol 156 157 … … 161 162 real, dimension(knon), intent(OUT):: dflux_l, dflux_s 162 163 real, dimension(klon,nbsrf), intent(OUT) :: pctsrf_new 164 real, dimension(klon), intent(INOUT):: agesno 163 165 164 166 ! Local … … 166 168 character (len = 80) :: abort_message 167 169 logical, save :: first_call = .true. 168 integer :: error170 INTEGER :: error, ii 169 171 logical :: check = .true. 170 172 real, dimension(knon):: cal, beta, dif_grnd, capsol 171 173 real, parameter :: calice=1.0/(5.1444e+06*0.15), tau_gl=1./86400.*5. 172 174 real, parameter :: calsno=1./(2.3867e+06*.15) 173 integer :: nexca !pas de temps couplage174 175 real, dimension(knon):: alb_ice 175 176 real, dimension(knon):: tsurf_temp 176 real, dimension(klon):: a gesno, alb_neig_grid, alb_eau177 real, dimension(klon):: alb_neig_grid, alb_eau 177 178 real, dimension(knon):: alb_neig 179 REAL, DIMENSION(knon):: lmt_rug, lmt_alb 180 real, DIMENSION(knon):: zfra 178 181 179 182 if (check) write(*,*) 'Entree ', modname … … 203 206 abort_message='voir ci-dessus' 204 207 call abort_gcm(modname,abort_message,1) 208 endif 205 209 endif 206 210 first_call = .false. … … 233 237 ! 234 238 235 CALL albsno( agesno,alb_neig_grid)236 ! 237 ! 238 ! 239 CALL albsno(klon,agesno,alb_neig_grid) 240 241 242 239 243 if (.not. ok_veget) then 240 244 ! … … 256 260 & klon, nisurf, knon, knindex, debut, & 257 261 & lmt_alb, lmt_rug) 258 alb_neig = alb_neig_grid(knindex) 262 ! 263 ! Pb compilo sun 264 ! alb_neig = alb_neig_grid(knindex) 265 ! alb_new = alb_neig*zfra + lmt_alb(knindex)*(1.0-zfra) 266 ! z0_new = lmt_rug(knindex) 267 ! 268 DO ii = 1, knon 269 alb_neig(ii) = alb_neig_grid(knindex(ii)) 270 alb_new(ii) = lmt_alb(knindex(ii)) 271 enddo 259 272 zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0))) 260 alb_new = alb_neig*zfra + lmt_alb(knindex)*(1.0-zfra) 261 z0_new = lmt_rug(knindex) 262 273 alb_new = alb_neig*zfra + alb_new*(1.0-zfra) 274 DO ii = 1, knon 275 z0_new(ii) = lmt_rug(knindex(ii)) 276 enddo 263 277 else 264 278 ! … … 293 307 call interfoce(itime, dtime, & 294 308 & klon, iim, jjm, nisurf, pctsrf, knon, knindex, rlon, rlat, & 295 & ocean, n exca, debut, lafin, &309 & ocean, npas, nexca, debut, lafin, & 296 310 & swdown, lwdown, precip_rain, precip_snow, evap, tsurf, & 297 311 & fder, albedo, taux, tauy, zmasq, & 298 312 & tsurf_new, alb_new, alb_ice, pctsrf_new) 299 300 tsurf_temp = tsurf_new301 313 302 314 ! else if (ocean == 'slab ') then … … 310 322 endif 311 323 324 tsurf_temp = tsurf_new 312 325 cal = 0. 313 326 beta = 1. … … 324 337 ! 325 338 326 if ( minval(rmu0) == maxval(rmu0) && minval(rmu0) = -999.999 ) then 327 CALL alboc(FLOAT(jour),rlat,alb_eau) 328 else ! cycle diurne 329 CALL alboc_cd(rmu0,alb_eau) 330 endif 331 alb_new = alb_eau(knindex) 332 339 if ( minval(rmu0) == maxval(rmu0) .and. minval(rmu0) == -999.999 ) then 340 CALL alboc(FLOAT(jour),rlat,alb_eau) 341 else ! cycle diurne 342 CALL alboc_cd(rmu0,alb_eau) 343 endif 344 DO ii =1, knon 345 alb_new(ii) = alb_eau(knindex(ii)) 346 enddo 333 347 ! 334 348 else if (nisurf == is_sic) then … … 341 355 ! 342 356 if (ocean == 'couple') then 343 nexca = 0344 357 345 358 call interfoce(itime, dtime, & 346 359 & klon, iim, jjm, nisurf, pctsrf, knon, knindex, rlon, rlat, & 347 & ocean, n exca, debut, lafin, &360 & ocean, npas, nexca, debut, lafin, & 348 361 & swdown, lwdown, precip_rain, precip_snow, evap, tsurf, & 349 362 & fder, albedo, taux, tauy, zmasq, & … … 357 370 ! call interfoce(nisurf) 358 371 else ! lecture conditions limites 359 ! call interfoce(itime, dtime, jour, & 360 ! & klon, nisurf, knon, knindex, & 361 ! & debut, & 362 ! & tsurf_new, pctsrf_new) 363 ! endif 372 call interfoce(itime, dtime, jour, & 373 & klon, nisurf, knon, knindex, & 374 & debut, & 375 & tsurf_new, pctsrf_new) 364 376 365 377 cal = calice … … 381 393 ! 382 394 zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0))) 383 alb_neig = alb_neig_grid(knindex) 395 DO ii = 1, knon 396 alb_neig = alb_neig_grid(knindex(ii)) 397 enddo 384 398 alb_new = alb_neig*zfra + 0.6 * (1.0-zfra) 385 399 … … 409 423 ! 410 424 zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0))) 411 alb_neig = alb_neig_grid(knindex) 425 DO ii =1, knon 426 alb_neig = alb_neig_grid(knindex(ii)) 427 enddo 412 428 alb_new = alb_neig*zfra + 0.6 * (1.0-zfra) 413 429 … … 634 650 SUBROUTINE interfoce_cpl(itime, dtime, & 635 651 & klon, iim, jjm, nisurf, pctsrf, knon, knindex, rlon, rlat, & 636 & ocean, n exca, debut, lafin, &652 & ocean, npas, nexca, debut, lafin, & 637 653 & swdown, lwdown, precip_rain, precip_snow, evap, tsurf, & 638 654 & fder, albsol, taux, tauy, zmasq, & … … 691 707 ! 692 708 693 #include 'indicesol.h'694 709 695 710 ! Parametres d'entree … … 708 723 real, dimension(knon), intent(IN) :: precip_rain, precip_snow 709 724 real, dimension(knon), intent(IN) :: tsurf, fder, albsol, taux, tauy 710 integer :: nexca725 INTEGER :: nexca, npas 711 726 real, dimension(klon), intent(IN) :: zmasq 712 727 … … 719 734 ! Variables locales 720 735 integer :: j, error, sum_error, ig 721 integer :: npas722 736 character (len = 20) :: modname = 'interfoce_cpl' 723 737 character (len = 80) :: abort_message … … 792 806 ! initialisation couplage 793 807 ! 794 call inicma(npas , nexca, dtime)808 call inicma(npas , nexca, dtime) 795 809 ! 796 810 ! 1ere lecture champs ocean … … 824 838 endif ! fin if (debut) 825 839 826 ! !fichier restart et fichiers histoires827 828 ! !calcul des fluxs a passer840 ! fichier restart et fichiers histoires 841 842 ! calcul des fluxs a passer 829 843 830 844 cpl_sols(:,nisurf) = cpl_sols(:,nisurf) + swdown / FLOAT(nexca) … … 1037 1051 ! 1038 1052 1039 #include "indicesol.h"1040 1053 1041 1054 ! Parametres d'entree … … 1055 1068 ! Variables locales 1056 1069 integer :: ii 1057 integer:: lmt_pas ! frequence de lecture des conditions limites1070 INTEGER,save :: lmt_pas ! frequence de lecture des conditions limites 1058 1071 ! (en pas de physique) 1059 1072 logical,save :: deja_lu ! pour indiquer que le jour a lire a deja … … 1063 1076 character (len = 20) :: modname = 'interfoce_lim' 1064 1077 character (len = 80) :: abort_message 1065 character (len = 20) :: fich ='limit '1066 logical :: newlmt = .false.1078 character (len = 20) :: fich ='limit.nc' 1079 LOGICAL :: newlmt = .TRUE. 1067 1080 logical :: check = .true. 1068 1081 ! Champs lus dans le fichier de CL … … 1079 1092 ! 1080 1093 1081 if (debut ) then1094 if (debut .and. .not. allocated(sst_lu)) then 1082 1095 lmt_pas = nint(86400./dtime * 1.0) ! pour une lecture une fois par jour 1083 1096 jour_lu = jour - 1 … … 1096 1109 ! Ouverture du fichier 1097 1110 ! 1111 fich = trim(fich) 1098 1112 ierr = NF_OPEN (fich, NF_NOWRITE,nid) 1099 1113 if (ierr.NE.NF_NOERR) then … … 1119 1133 endif 1120 1134 #ifdef NC_DOUBLE 1121 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct srf_new(1,is_oce))1135 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct_tmp(1,is_oce)) 1122 1136 #else 1123 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct srf_new(1,is_oce))1137 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct_tmp(1,is_oce)) 1124 1138 #endif 1125 1139 if (ierr /= NF_NOERR) then … … 1136 1150 endif 1137 1151 #ifdef NC_DOUBLE 1138 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct srf_new(1,is_sic))1152 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct_tmp(1,is_sic)) 1139 1153 #else 1140 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct srf_new(1,is_sic))1154 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct_tmp(1,is_sic)) 1141 1155 #endif 1142 1156 if (ierr /= NF_NOERR) then … … 1153 1167 endif 1154 1168 #ifdef NC_DOUBLE 1155 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct srf_new(1,is_ter))1169 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct_tmp(1,is_ter)) 1156 1170 #else 1157 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct srf_new(1,is_ter))1171 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct_tmp(1,is_ter)) 1158 1172 #endif 1159 1173 if (ierr /= NF_NOERR) then … … 1170 1184 endif 1171 1185 #ifdef NC_DOUBLE 1172 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct srf_new(1,is_lic))1186 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,epais,pct_tmp(1,is_lic)) 1173 1187 #else 1174 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct srf_new(1,is_lic))1188 ierr = NF_GET_VARA_REAL(nid,nvarid,start,epais,pct_tmp(1,is_lic)) 1175 1189 #endif 1176 1190 if (ierr /= NF_NOERR) then … … 1240 1254 ! Recopie des variables dans les champs de sortie 1241 1255 ! 1242 lmt_sst = sst_lu(knindex) 1256 do ii = 1, knon 1257 lmt_sst(ii) = sst_lu(knindex(ii)) 1258 enddo 1259 ! je peux pas utiliser la ligne suivante a cause du compilo Sun 1260 ! lmt_sst = sst_lu(knindex) 1243 1261 pctsrf_new = pct_tmp 1244 1262 … … 1275 1293 ! 1276 1294 1277 #include "indicesol.h"1278 1295 1279 1296 ! Parametres d'entree … … 1301 1318 character (len = 20) :: modname = 'interfoce_lim' 1302 1319 character (len = 80) :: abort_message 1303 character (len = 20) :: fich ='limit '1320 character (len = 20) :: fich ='limit.nc' 1304 1321 logical :: newlmt = .false. 1305 1322 logical :: check = .true. … … 1323 1340 endif 1324 1341 1325 if ((jour - jour_lu_sur) /= 0) deja_lu = .false.1342 if ((jour - jour_lu_sur) /= 0) deja_lu_sur = .false. 1326 1343 1327 if (check) write(*,*)modname,':: jour_lu , deja_lu_sur', jour_lu, deja_lu_sur1344 if (check) write(*,*)modname,':: jour_lu_sur, deja_lu_sur', jour_lu_sur, deja_lu_sur 1328 1345 1329 1346 ! Tester d'abord si c'est le moment de lire le fichier … … 1332 1349 ! Ouverture du fichier 1333 1350 ! 1351 fich = trim(fich) 1334 1352 ierr = NF_OPEN (fich, NF_NOWRITE,nid) 1335 1353 if (ierr.NE.NF_NOERR) then … … 1339 1357 ! 1340 1358 ! La tranche de donnees a lire: 1341 ! 1359 1342 1360 start(1) = 1 1343 1361 start(2) = jour + 1 … … 1389 1407 ! Recopie des variables dans les champs de sortie 1390 1408 ! 1391 lmt_alb = alb_lu(knindex) 1392 lmt_rug = rug_lu(knindex) 1409 DO ii = 1, knon 1410 lmt_alb(ii) = alb_lu(knindex(ii)) 1411 lmt_rug(ii) = rug_lu(knindex(ii)) 1412 enddo 1393 1413 1394 1414 END SUBROUTINE interfsur_lim … … 1441 1461 #include "YOETHF.inc" 1442 1462 #include "FCTTRE.inc" 1443 #include 'indicesol.h'1444 1463 1445 1464 ! Parametres d'entree … … 1606 1625 !######################################################################### 1607 1626 ! 1608 1609 SUBROUTINE sol_dem_write(itime, klon, rlon, rlat, &1610 & pctsrf_new,tsurf_new,alb_new)1611 1612 ! Routine d'ecriture de l'etat de redemarrage pour le sol1613 !1614 ! L.Fairhead1615 !1616 ! input:1617 ! itime numero du pas de temps1618 ! klon nombre total de points de grille1619 ! rlon longitudes1620 ! rlat latitudes1621 ! tsurf_new temperature au sol1622 ! alb_new albedo1623 ! pctsrf_new repartition des surfaces1624 1625 include 'indicesol.h'1626 #include 'temps.inc'1627 include 'netcdf.inc'1628 1629 ! Parametres d'entree1630 integer, intent(IN) :: itime1631 integer, intent(IN) :: klon1632 real, dimension(klon), intent(IN) :: rlon, rlat1633 real, dimension(klon,nbsrf), intent(IN) :: tsurf_new, alb_new1634 real, dimension(klon,nbsrf), intent(IN) :: pctsrf_new1635 1636 ! Variables locales1637 integer :: ierr, nid1638 integer :: idim1, idim2, idim31639 integer,parameter :: length = 1001640 character (len = 20) :: modname = 'sol_dem_write'1641 character (len = 80) :: abort_message1642 real, dimension(length) :: tab_cntrl = 0.1643 integer :: nvarid1644 1645 ierr = NF_CREATE('restartsol', NF_CLOBBER, nid)1646 IF (ierr.NE.NF_NOERR) THEN1647 abort_message=' Pb d''ouverture du fichier restartsol'1648 CALL abort_gcm(modname,abort_message,ierr)1649 ENDIF1650 1651 ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 23, &1652 & "Fichier redemmarage sol")1653 ierr = NF_DEF_DIM (nid, "index", length, idim1)1654 ierr = NF_DEF_DIM (nid, "points_physiques", klon, idim2)1655 ierr = NF_DEF_DIM (nid, "nombre_surfaces", nbsrf, idim3)1656 ierr = NF_ENDDEF(nid)1657 1658 tab_cntrl(13) = day_end1659 tab_cntrl(14) = anne_ini1660 1661 ierr = NF_REDEF (nid)1662 #ifdef NC_DOUBLE1663 ierr = NF_DEF_VAR (nid, "controle", NF_DOUBLE, 1, idim1,nvarid)1664 #else1665 ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid)1666 #endif1667 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, &1668 & "Parametres de controle")1669 ierr = NF_ENDDEF(nid)1670 #ifdef NC_DOUBLE1671 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl)1672 #else1673 ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl)1674 #endif1675 1676 ierr = NF_REDEF (nid)1677 #ifdef NC_DOUBLE1678 ierr = NF_DEF_VAR (nid, "longitude", NF_DOUBLE, 1, idim2,nvarid)1679 #else1680 ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid)1681 #endif1682 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, &1683 & "Longitudes de la grille physique")1684 ierr = NF_ENDDEF(nid)1685 #ifdef NC_DOUBLE1686 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon)1687 #else1688 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon)1689 #endif1690 !1691 ierr = NF_REDEF (nid)1692 #ifdef NC_DOUBLE1693 ierr = NF_DEF_VAR (nid, "latitude", NF_DOUBLE, 1, idim2,nvarid)1694 #else1695 ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid)1696 #endif1697 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31, &1698 & "Latitudes de la grille physique")1699 ierr = NF_ENDDEF(nid)1700 #ifdef NC_DOUBLE1701 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat)1702 #else1703 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat)1704 #endif1705 ierr = NF_REDEF (nid)1706 #ifdef NC_DOUBLE1707 ierr = NF_DEF_VAR (nid, "TS", NF_DOUBLE, 1, idim2,nvarid)1708 #else1709 ierr = NF_DEF_VAR (nid, "TS", NF_FLOAT, 1, idim2,nvarid)1710 #endif1711 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, &1712 & "Temperature de surface")1713 ierr = NF_ENDDEF(nid)1714 1715 1716 1717 1718 END SUBROUTINE sol_dem_write1719 !1720 !#########################################################################1721 !1722 1627 SUBROUTINE gath2cpl(champ_in, champ_out, klon, knon, iim, jjm, knindex) 1723 1628 … … 1806 1711 !######################################################################### 1807 1712 ! 1808 ! 1809 !######################################################################### 1810 ! 1811 SUBROUTINE albsno(agesno,alb_neig_grid) 1713 SUBROUTINE albsno(klon, agesno,alb_neig_grid) 1812 1714 IMPLICIT none 1813 c 1814 #include "dimensions.h" 1815 #include "dimphy.h" 1816 INTEGER nvm 1817 PARAMETER (nvm=8) 1818 REAL veget(klon,nvm) 1819 REAL alb_neig(klon) 1820 REAL agesno(klon) 1821 c 1822 INTEGER i, nv 1823 c 1824 REAL init(nvm), decay(nvm), as 1825 SAVE init, decay 1715 1716 integer :: klon 1717 INTEGER, PARAMETER :: nvm = 8 1718 REAL, dimension(klon,nvm) :: veget 1719 REAL, DIMENSION(klon) :: alb_neig_grid, agesno 1720 1721 INTEGER :: i, nv 1722 1723 REAL, DIMENSION(nvm),SAVE :: init, decay 1724 REAL :: as 1826 1725 DATA init /0.55, 0.14, 0.18, 0.29, 0.15, 0.15, 0.14, 0./ 1827 1726 DATA decay/0.30, 0.67, 0.63, 0.45, 0.40, 0.14, 0.06, 1./ 1828 c 1727 1829 1728 veget = 0. 1830 1729 veget(:,1) = 1. ! desert partout 1831 1730 DO i = 1, klon 1832 alb_neig (i) = 0.01731 alb_neig_grid(i) = 0.0 1833 1732 ENDDO 1834 1733 DO nv = 1, nvm 1835 1734 DO i = 1, klon 1836 1735 as = init(nv)+decay(nv)*EXP(-agesno(i)/5.) 1837 alb_neig (i) = alb_neig(i) + veget(i,nv)*as1736 alb_neig_grid(i) = alb_neig_grid(i) + veget(i,nv)*as 1838 1737 ENDDO 1839 1738 ENDDO 1840 c 1739 1841 1740 END SUBROUTINE albsno 1842 1741 ! -
LMDZ.3.3/branches/rel-LF/libf/phylmd/phyetat0.F
r98 r112 2 2 . rlat,rlon, pctsrf, tsol,tsoil,deltat,qsol,snow, 3 3 . albe, evap, rain_fall, snow_fall, solsw, sollw, 4 . radsol, rugmer,agesno,clesphy0,4 . radsol,frugs,agesno,clesphy0, 5 5 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugsrel,tabcntr0, 6 6 . t_ancien,q_ancien,ancien_ok) … … 35 35 REAL sollw(klon) 36 36 real solsw(klon) 37 REAL rugmer(klon)37 REAL frugs(klon,nbsrf) 38 38 REAL agesno(klon) 39 39 REAL zmea(klon) … … 640 640 xmax = MAX(evap(i,nsrf),xmax) 641 641 ENDDO 642 PRINT*,' Neigedu sol EVAP**:', nsrf, xmin, xmax642 PRINT*,'evap du sol EVAP**:', nsrf, xmin, xmax 643 643 ENDDO 644 644 ELSE … … 660 660 xmax = MAX(evap(i,1),xmax) 661 661 ENDDO 662 PRINT*,' Neigedu sol <EVAP>', xmin, xmax662 PRINT*,'Evap du sol <EVAP>', xmin, xmax 663 663 DO nsrf = 2, nbsrf 664 664 DO i = 1, klon … … 793 793 PRINT*,'Rayonnement net au sol radsol:', xmin, xmax 794 794 c 795 c Lecture de la longueur de rugosite en mer: 796 c 797 ierr = NF_INQ_VARID (nid, "RUGMER", nvarid) 798 IF (ierr.NE.NF_NOERR) THEN 799 PRINT*, 'phyetat0: Le champ <RUGMER> est absent' 800 CALL abort 801 ENDIF 802 #ifdef NC_DOUBLE 803 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rugmer) 804 #else 805 ierr = NF_GET_VAR_REAL(nid, nvarid, rugmer) 806 #endif 807 IF (ierr.NE.NF_NOERR) THEN 808 PRINT*, 'phyetat0: Lecture echouee pour <RUGMER>' 809 CALL abort 810 ENDIF 811 xmin = 1.0E+20 812 xmax = -1.0E+20 813 DO i = 1, klon 814 xmin = MIN(rugmer(i),xmin) 815 xmax = MAX(rugmer(i),xmax) 816 ENDDO 817 PRINT*,'Rugosite sur la mer rugmer:', xmin, xmax 795 c Lecture de la longueur de rugosite 796 c 797 c 798 ierr = NF_INQ_VARID (nid, "RUG", nvarid) 799 IF (ierr.NE.NF_NOERR) THEN 800 PRINT*, 'phyetat0: Le champ <RUG> est absent' 801 PRINT*, ' Mais je vais essayer de lire RUG**' 802 DO nsrf = 1, nbsrf 803 IF (nsrf.GT.99) THEN 804 PRINT*, "Trop de sous-mailles" 805 CALL abort 806 ENDIF 807 WRITE(str2,'(i2.2)') nsrf 808 ierr = NF_INQ_VARID (nid, "RUG"//str2, nvarid) 809 IF (ierr.NE.NF_NOERR) THEN 810 PRINT*, "phyetat0: Le champ <RUG"//str2//"> est absent" 811 CALL abort 812 ENDIF 813 #ifdef NC_DOUBLE 814 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, frugs(1,nsrf)) 815 #else 816 ierr = NF_GET_VAR_REAL(nid, nvarid, frugs(1,nsrf)) 817 #endif 818 IF (ierr.NE.NF_NOERR) THEN 819 PRINT*, "phyetat0: Lecture echouee pour <RUG"//str2//">" 820 CALL abort 821 ENDIF 822 xmin = 1.0E+20 823 xmax = -1.0E+20 824 DO i = 1, klon 825 xmin = MIN(frugs(i,nsrf),xmin) 826 xmax = MAX(frugs(i,nsrf),xmax) 827 ENDDO 828 PRINT*,'evap du sol RUG**:', nsrf, xmin, xmax 829 ENDDO 830 ELSE 831 PRINT*, 'phyetat0: Le champ <RUG> est present' 832 PRINT*, ' J ignore donc les autres RUG**' 833 #ifdef NC_DOUBLE 834 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, frugs(1,1)) 835 #else 836 ierr = NF_GET_VAR_REAL(nid, nvarid, frugs(1,1)) 837 #endif 838 IF (ierr.NE.NF_NOERR) THEN 839 PRINT*, "phyetat0: Lecture echouee pour <RUG>" 840 CALL abort 841 ENDIF 842 xmin = 1.0E+20 843 xmax = -1.0E+20 844 DO i = 1, klon 845 xmin = MIN(frugs(i,1),xmin) 846 xmax = MAX(frugs(i,1),xmax) 847 ENDDO 848 PRINT*,'Neige du sol <RUG>', xmin, xmax 849 DO nsrf = 2, nbsrf 850 DO i = 1, klon 851 frugs(i,nsrf) = frugs(i,1) 852 ENDDO 853 ENDDO 854 ENDIF 855 818 856 c 819 857 c Lecture de l'age de la neige: -
LMDZ.3.3/branches/rel-LF/libf/phylmd/phyredem.F
r98 r112 3 3 . albedo, evap, rain_fall, snow_fall, 4 4 . solsw, sollw, 5 . radsol, rugmer,agesno,5 . radsol,frugs,agesno, 6 6 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugsrel, 7 7 . t_ancien, q_ancien) … … 38 38 real sollw(klon) 39 39 REAL radsol(klon) 40 REAL rugmer(klon)40 REAL frugs(klon,nbsrf) 41 41 REAL agesno(klon) 42 42 REAL zmea(klon) … … 464 464 #endif 465 465 c 466 ierr = NF_REDEF (nid) 467 #ifdef NC_DOUBLE 468 ierr = NF_DEF_VAR (nid, "RUGMER", NF_DOUBLE, 1, idim2,nvarid) 469 #else 470 ierr = NF_DEF_VAR (nid, "RUGMER", NF_FLOAT, 1, idim2,nvarid) 471 #endif 472 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 473 . "Longueur de rugosite sur mer") 474 ierr = NF_ENDDEF(nid) 475 #ifdef NC_DOUBLE 476 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugmer) 477 #else 478 ierr = NF_PUT_VAR_REAL (nid,nvarid,rugmer) 479 #endif 466 DO nsrf = 1, nbsrf 467 IF (nsrf.LE.99) THEN 468 WRITE(str2,'(i2.2)') nsrf 469 ierr = NF_REDEF (nid) 470 #ifdef NC_DOUBLE 471 ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_DOUBLE,1,idim2,nvarid) 472 #else 473 ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_FLOAT,1,idim2,nvarid) 474 #endif 475 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, 476 . "rugosite de surface No."//str2) 477 ierr = NF_ENDDEF(nid) 478 ELSE 479 PRINT*, "Trop de sous-mailles" 480 CALL abort 481 ENDIF 482 #ifdef NC_DOUBLE 483 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,nsrf)) 484 #else 485 ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,nsrf)) 486 #endif 487 ENDDO 480 488 c 481 489 ierr = NF_REDEF (nid) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
r109 r112 70 70 logical rnpb 71 71 parameter(rnpb=.true.) 72 PARAMETER (npas=1440)73 PARAMETER (nexca=48)74 PARAMETER (itimestep=1800)72 c PARAMETER (npas=1440) 73 c PARAMETER (nexca=48) 74 c PARAMETER (itimestep=1800) 75 75 EXTERNAL fromcpl, intocpl, inicma 76 76 REAL cpl_sst(iim,jjmp1), cpl_sic(iim,jjmp1) 77 77 REAL cpl_alb_sst(iim,jjmp1), cpl_alb_sic(iim,jjmp1) 78 character *6 ocean 79 parameter (ocean = 'force ') 78 80 c====================================================================== 79 81 c ok_ocean indique l'utilisation du modele oceanique "slab ocean", … … 669 671 PRINT*, 'La frequence de sortie region est de ', ecrit_reg 670 672 ENDIF 673 674 c 675 c Initialiser le couplage si necessaire 676 c 677 npas = 0 678 nexca = 0 679 if (ocean == 'couple') then 680 npas = itaufin/ iphysiq 681 nexca = 86400 / dtime 682 write(*,*)' ##### Ocean couple #####' 683 write(*,*)' Valeurs des pas de temps' 684 write(*,*)' npas = ', npas 685 write(*,*)' nexca = ', nexca 686 endif 671 687 c 672 688 c … … 1536 1552 DO i = 1, klon 1537 1553 if (.not. ok_veget) then 1538 frugs(i,is_ter) = SQRT(frugs(i,is_ter)**2+rugoro(i)**2) 1554 frugs(i,is_ter) = SQRT(frugs(i,is_ter)**2+rugoro(i)**2) 1555 endif 1539 1556 frugs(i,is_lic) = rugoro(i) 1540 1557 frugs(i,is_oce) = rugmer(i) … … 1563 1580 ENDIF 1564 1581 1565 CALL clmain(dtime, pctsrf,1582 CALL clmain(dtime,itap,pctsrf, 1566 1583 e t_seri,q_seri,u_seri,v_seri, 1567 1584 e julien, rmu0, 1568 e ok_veget, ftsol,1585 e ok_veget, ocean, npas, nexca, ftsol, 1569 1586 e paprs,pplay,radsol, fsnow,fqsol,fevap,falbe, 1570 1587 e rain_fall, snow_fall, solsw, sollw, fder, 1571 1588 e rlon, rlat, frugs, 1572 e debut, lafin, 1589 e debut, lafin, agesno, 1573 1590 s d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_ts, 1574 1591 s fluxt,fluxq,fluxu,fluxv,cdragh,cdragm,rugmer, … … 2793 2810 . falbe, fevap, rain_fall, snow_fall, 2794 2811 . solsw, sollw, 2795 . radsol, rugmer,agesno,2812 . radsol,frugs,agesno, 2796 2813 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro, 2797 2814 . t_ancien, q_ancien) -
LMDZ.3.3/branches/rel-LF/liste_des_sources_f90
r2 r112 1 1 USE IOIPSL 2 2 libf/bibio/initdynav.F 3 USE ioipsl4 libf/bibio/ writedynav.F3 USE IOIPSL 4 libf/bibio/initfluxsto.F 5 5 USE IOIPSL 6 6 libf/bibio/inithist.F 7 7 USE ioipsl 8 libf/bibio/writedynav.F 9 USE ioipsl 8 10 libf/bibio/writehist.F 9 11 USE IOIPSL 12 libf/dyn3d/abort_gcm.F 13 USE IOIPSL 14 libf/dyn3d/dynredem.F 15 USE ioipsl 16 libf/dyn3d/etat0_netcdf.F 17 USE IOIPSL 18 libf/dyn3d/fluxstokenc.F 19 USE IOIPSL 20 libf/dyn3d/gcm.F 21 USE IOIPSL 10 22 libf/dyn3d/gcmtest.F 11 USE IOIPSL12 libf/dyn3d/abort_gcm.F13 23 USE ioipsl 14 24 libf/dyn3d/offline.F 15 25 USE ioipsl 16 26 libf/dyn3d/startvar.F 17 USE IOIPSL 18 libf/dyn3d/etat0_netcdf.F 27 USE ioipsl 28 libf/dyn3d/modif_etat0.F 29 USE IOIPSL 30 libf/phylmd/initphysto.F 19 31 USE ioipsl 20 32 libf/phylmd/physiq.F 21 33 USE ioipsl 34 libf/phylmd/phystokenc.F 35 USE ioipsl 22 36 libf/phylmd/phytrac.F 37 USE ioipsl 38 libf/phylmd/donneesgrads.F 39 USE IOIPSL 40 libf/phylmd/1DUTILS.h 41 libf/phylmd/interface_surf.F90 -
LMDZ.3.3/branches/rel-LF/tmp
r2 r112 1 fast 1 g 2 C -
LMDZ.3.3/branches/rel-LF/tmp90
r2 r112 1 1 USE IOIPSL 2 2 libf/bibio/initdynav.F 3 USE ioipsl4 libf/bibio/ writedynav.F3 USE IOIPSL 4 libf/bibio/initfluxsto.F 5 5 USE IOIPSL 6 6 libf/bibio/inithist.F 7 7 USE ioipsl 8 libf/bibio/writedynav.F 9 USE ioipsl 8 10 libf/bibio/writehist.F 9 11 USE IOIPSL 12 libf/dyn3d/abort_gcm.F 13 USE IOIPSL 14 libf/dyn3d/dynredem.F 15 USE ioipsl 16 libf/dyn3d/etat0_netcdf.F 17 USE IOIPSL 18 libf/dyn3d/fluxstokenc.F 19 USE IOIPSL 20 libf/dyn3d/gcm.F 21 USE IOIPSL 10 22 libf/dyn3d/gcmtest.F 11 USE IOIPSL12 libf/dyn3d/abort_gcm.F13 23 USE ioipsl 14 24 libf/dyn3d/offline.F 15 25 USE ioipsl 16 26 libf/dyn3d/startvar.F 17 USE IOIPSL 18 libf/dyn3d/etat0_netcdf.F 27 USE ioipsl 28 libf/dyn3d/modif_etat0.F 29 USE IOIPSL 30 libf/phylmd/initphysto.F 19 31 USE ioipsl 20 32 libf/phylmd/physiq.F 21 33 USE ioipsl 34 libf/phylmd/phystokenc.F 35 USE ioipsl 22 36 libf/phylmd/phytrac.F 37 USE ioipsl 38 libf/phylmd/donneesgrads.F 39 USE IOIPSL 40 libf/phylmd/1DUTILS.h 41 libf/phylmd/interface_surf.F90 -
LMDZ.3.3/branches/unlabeled-1.4.2/makegcm
r107 r112 668 668 endif 669 669 670 if ($code == 'create_etat0') then 671 set include="$include"' -I$(LIBF)/phylmd' 672 endif 670 673 ################################################################# 671 674 # Execution de la comande make... ENFIN! … … 696 699 endif 697 700 701 set ar=ar 698 702 set link="$f90 $optim90" 699 703
Note: See TracChangeset
for help on using the changeset viewer.