Changeset 1379 for LMDZ4/branches/LMDZ4V5.0-dev/libf
- Timestamp:
- May 6, 2010, 2:19:18 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev/libf
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/etat0_netcdf.F
r1370 r1379 17 17 use regr_lat_time_climoz_m, only: regr_lat_time_climoz 18 18 use conf_phys_m, only: conf_phys 19 ! For parameterization of ozone chemistry: 20 use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz 21 use press_coefoz_m, only: press_coefoz 22 use regr_pr_o3_m, only: regr_pr_o3 19 23 #endif 20 24 !#endif of #ifdef CPP_EARTH … … 145 149 real :: seuil_inversion 146 150 real :: alp_offset 151 logical found 147 152 148 153 integer read_climoz ! read ozone climatology … … 426 431 q3d(:,:,:,1) = qd(:,:,:) 427 432 ! 433 ! Parameterization of ozone chemistry: 434 C Look for ozone tracer: 435 i = 1 436 DO 437 found = tname(i)=="O3" .OR. tname(i)=="o3" 438 if (found .or. i == nqtot) exit 439 i = i + 1 440 end do 441 if (found) then 442 call regr_lat_time_coefoz 443 call press_coefoz 444 call regr_pr_o3(p3d, q3d(:, :, :, i)) 445 C Convert from mole fraction to mass fraction: 446 q3d(:, :, :, i) = q3d(:, :, :, i) * 48. / 29. 447 end if 428 448 429 449 ! Ozone climatology: -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/etat0_netcdf.F
r1370 r1379 17 17 use regr_lat_time_climoz_m, only: regr_lat_time_climoz 18 18 use conf_phys_m, only: conf_phys 19 ! For parameterization of ozone chemistry: 20 use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz 21 use press_coefoz_m, only: press_coefoz 22 use regr_pr_o3_m, only: regr_pr_o3 19 23 #endif 20 24 !#endif of #ifdef CPP_EARTH … … 145 149 real :: seuil_inversion 146 150 real :: alp_offset 151 logical found 147 152 148 153 integer read_climoz ! read ozone climatology … … 426 431 q3d(:,:,:,1) = qd(:,:,:) 427 432 ! 433 ! Parameterization of ozone chemistry: 434 C Look for ozone tracer: 435 i = 1 436 DO 437 found = tname(i)=="O3" .OR. tname(i)=="o3" 438 if (found .or. i == nqtot) exit 439 i = i + 1 440 end do 441 if (found) then 442 call regr_lat_time_coefoz 443 call press_coefoz 444 call regr_pr_o3(p3d, q3d(:, :, :, i)) 445 C Convert from mole fraction to mass fraction: 446 q3d(:, :, :, i) = q3d(:, :, :, i) * 48. / 29. 447 end if 428 448 429 449 ! Ozone climatology: -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/ini_histrac.h
r1279 r1379 14 14 CALL histdef(nid_tra, "aire", "Grid area", "-", & 15 15 iim,jj_nb,nhori, 1,1,1, -99, 32,"once", zsto,zout) 16 CALL histdef(nid_tra, "zmasse", "column density of air in cell", & 17 "kg m-2", iim, jj_nb, nhori, klev, 1, klev, nvert, 32, "ave(X)", & 18 zsto,zout) 16 19 17 20 !TRACEURS … … 91 94 "inst(X)", zout,zout) 92 95 ! DIVERS 93 CALL histdef(nid_tra, "pplay", " flux u mont","-",&96 CALL histdef(nid_tra, "pplay", "pressure","-", & 94 97 iim,jj_nb,nhori, klev,1,klev,nvert, 32, & 95 98 "inst(X)", zout,zout) 96 CALL histdef(nid_tra, " t", "flux u mont","-", &99 CALL histdef(nid_tra, "T", "temperature","K", & 97 100 iim,jj_nb,nhori, klev,1,klev,nvert, 32, & 98 101 "inst(X)", zout,zout) -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/phytrac.F90
r1376 r1379 1 2 1 !$Id $ 3 2 … … 229 228 !############################################ END INITIALIZATION ####### 230 229 230 DO k=1,klev 231 DO i=1,klon 232 zmasse(i,k)=(paprs(i,k)-paprs(i,k+1))/rg 233 END DO 234 END DO 235 231 236 !=============================================================================== 232 237 ! -- Do specific treatment according to chemestry model or local LMDZ tracers … … 237 242 ! -- Traitement des traceurs avec traclmdz 238 243 239 CALL traclmdz(& 240 nstep, pdtphys, t_seri, & 241 paprs, pplay, cdragh, coefh, & 242 yu1, yv1, ftsol, pctsrf, & 243 xlat, couchelimite, sh, & 244 tr_seri, source, solsym, d_tr_cl) 244 CALL traclmdz(nstep, julien, gmtime, pdtphys, t_seri, paprs, pplay, & 245 cdragh, coefh, yu1, yv1, ftsol, pctsrf, xlat, xlon, couchelimite, & 246 sh, tr_seri, source, solsym, d_tr_cl, zmasse) 245 247 246 248 CASE('inca') … … 298 300 !====================================================================== 299 301 300 DO k=1,klev301 DO i=1,klon302 zmasse(i,k)=(paprs(i,k)-paprs(i,k+1))/rg303 END DO304 END DO305 306 302 DO it=1,nbtr 307 303 DO k=1,klev -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/regr_pr_av_m.F90
r1279 r1379 21 21 ! latitude, pressure, julian day. 22 22 ! We assume that the input fields are already on the "rlatu" 23 ! latitudes, except hthat latitudes are in ascending order in the input23 ! latitudes, except that latitudes are in ascending order in the input 24 24 ! file. 25 ! We assume that the inputs fields have the same pressure coordinate.25 ! We assume that all the inputs fields have the same coordinates. 26 26 27 27 ! The target vertical LMDZ grid is the grid of layer boundaries. … … 91 91 if (is_mpi_root) then 92 92 do i = 1, n_var 93 call nf95_inq_varid(ncid, name(i), varid)93 call nf95_inq_varid(ncid, trim(name(i)), varid) 94 94 95 95 ! Get data at the right day from the input file: 96 96 ncerr = nf90_get_var(ncid, varid, v1(1, :, :, i), & 97 97 start=(/1, 1, julien/)) 98 call handle_err("regr_pr_av nf90_get_var " // name(i), ncerr, ncid) 98 call handle_err("regr_pr_av nf90_get_var " // trim(name(i)), ncerr, & 99 ncid) 99 100 end do 100 101 -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/traclmdz_mod.F90
r1376 r1379 6 6 ! only if running without any other chemestry model as INCA or REPROBUS. 7 7 ! 8 9 IMPLICIT NONE 8 10 9 11 REAL,DIMENSION(:,:),ALLOCATABLE,SAVE :: masktr ! Masque reservoir de sol traceur … … 44 46 !$OMP THREADPRIVATE(id_pcs0, id_pcos0, id_pcq0) 45 47 48 INTEGER, SAVE:: id_o3 49 !$OMP THREADPRIVATE(id_o3) 50 ! index of ozone tracer with Cariolle parameterization 51 ! 0 means no ozone tracer 52 46 53 LOGICAL,SAVE :: rnpb=.TRUE. ! Presence du couple Rn222, Pb210 47 54 !$OMP THREADPRIVATE(rnpb) … … 56 63 USE dimphy 57 64 USE infotrac 58 IMPLICIT NONE59 65 60 66 ! Input argument … … 78 84 USE dimphy 79 85 USE infotrac 86 USE regr_pr_comb_coefoz_m, ONLY: alloc_coefoz 87 USE press_coefoz_m, ONLY: press_coefoz 80 88 USE carbon_cycle_mod, ONLY : carbon_cycle_init, carbon_cycle_tr, carbon_cycle_cpl 81 82 IMPLICIT NONE83 89 84 90 INCLUDE "indicesol.h" … … 135 141 136 142 ! 137 ! Recherche des traceurs connus : Be7, CO2,...143 ! Recherche des traceurs connus : Be7, O3, CO2,... 138 144 ! -------------------------------------------- 139 145 id_be=0 146 id_o3=0 140 147 DO it=1,nbtr 141 148 iiq=niadv(it+2) … … 149 156 CALL init_be(pctsrf,masktr(:,id_be),tautr(id_be),vdeptr(id_be),scavtr(id_be),srcbe) 150 157 WRITE(*,*) 'Initialisation srcBe: OK' 158 ELSE IF (tname(iiq)=="O3" .OR. tname(iiq)=="o3") THEN 159 ! Recherche de l'ozone : parametrization de la chimie par Cariolle 160 id_o3=it 161 CALL alloc_coefoz ! allocate ozone coefficients 162 CALL press_coefoz ! read input pressure levels 151 163 END IF 152 164 END DO … … 311 323 END SUBROUTINE traclmdz_init 312 324 313 SUBROUTINE traclmdz( & 314 nstep, pdtphys, t_seri, & 315 paprs, pplay, cdragh, coefh, & 316 yu1, yv1, ftsol, pctsrf, & 317 xlat, couchelimite, sh, & 318 tr_seri, source, solsym, d_tr_cl) 325 SUBROUTINE traclmdz(nstep, julien, gmtime, pdtphys, t_seri, paprs, pplay, & 326 cdragh, coefh, yu1, yv1, ftsol, pctsrf, xlat, xlon, couchelimite, sh, & 327 tr_seri, source, solsym, d_tr_cl, zmasse) 319 328 320 329 USE dimphy 321 330 USE infotrac 331 USE regr_pr_comb_coefoz_m, ONLY: regr_pr_comb_coefoz 332 USE o3_chem_m, ONLY: o3_chem 322 333 USE carbon_cycle_mod, ONLY : carbon_cycle, carbon_cycle_tr, carbon_cycle_cpl 323 324 IMPLICIT NONE325 326 334 INCLUDE "YOMCST.h" 327 335 INCLUDE "indicesol.h" … … 335 343 !Configuration grille,temps: 336 344 INTEGER,INTENT(IN) :: nstep ! nombre d'appels de la physiq 345 INTEGER,INTENT(IN) :: julien ! Jour julien 346 REAL,INTENT(IN) :: gmtime 337 347 REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) 338 348 REAL,DIMENSION(klon),INTENT(IN) :: xlat ! latitudes pour chaque point 349 REAL, INTENT(IN):: xlon(:) ! dim(klon) longitude 339 350 340 351 ! … … 344 355 REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) 345 356 REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) 357 REAL,intent(in):: zmasse (:, :) ! dim(klon,klev) density of air, in kg/m2 346 358 347 359 … … 375 387 376 388 INTEGER :: i, k, it 389 INTEGER lmt_pas ! number of time steps of "physics" per day 377 390 378 391 REAL,DIMENSION(klon) :: d_trs ! Td dans le reservoir 379 REAL,DIMENSION(klon,klev) :: delp ! epaisseur de couche (Pa)380 381 392 REAL,DIMENSION(klon,klev,nbtr) :: d_tr_dec ! Td radioactive 382 393 REAL :: zrho ! Masse Volumique de l'air KgA/m3 … … 485 496 END IF 486 497 487 488 DO k = 1, klev489 DO i = 1, klon490 delp(i,k) = paprs(i,k)-paprs(i,k+1)491 END DO492 END DO493 494 498 DO it=1, nbtr 495 499 IF (couchelimite .AND. pbl_flg(it) == 0 ) THEN ! couche limite avec quantite dans le sol calculee … … 497 501 cdragh, coefh,t_seri,ftsol,pctsrf, & 498 502 tr_seri(:,:,it),trs(:,it), & 499 paprs, pplay, delp,&503 paprs, pplay, zmasse * rg, & 500 504 masktr(:,it),fshtr(:,it),hsoltr(it),& 501 505 tautr(it),vdeptr(it), & … … 592 596 593 597 !====================================================================== 598 ! Parameterization of ozone chemistry 599 !====================================================================== 600 601 IF (id_o3 /= 0) then 602 lmt_pas = NINT(86400./pdtphys) 603 IF (MOD(nstep - 1, lmt_pas) == 0) THEN 604 ! Once per day, update the coefficients for ozone chemistry: 605 CALL regr_pr_comb_coefoz(julien, xlat, paprs, pplay) 606 END IF 607 CALL o3_chem(julien, gmtime, t_seri, zmasse, pdtphys, xlat, & 608 xlon, tr_seri(:, :, id_o3)) 609 END IF 610 611 !====================================================================== 594 612 ! Calcul de cycle de carbon 595 613 !====================================================================== … … 607 625 USE infotrac 608 626 609 IMPLICIT NONE610 611 627 REAL,DIMENSION(klon,nbtr), INTENT(OUT) :: trs_out 612 628 INTEGER :: ierr -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/write_histrac.h
r1279 r1379 9 9 CALL histwrite_phy(nid_tra,"phis",itau_w,pphis) 10 10 CALL histwrite_phy(nid_tra,"aire",itau_w,airephy) 11 CALL histwrite_phy(nid_tra,"zmasse",itau_w,zmasse) 11 12 12 13 !TRACEURS … … 65 66 ! DIVERS 66 67 CALL histwrite_phy(nid_tra,"pplay",itau_w,pplay) 67 CALL histwrite_phy(nid_tra," t",itau_w,t_seri)68 CALL histwrite_phy(nid_tra,"T",itau_w,t_seri) 68 69 CALL histwrite_phy(nid_tra,"mfu",itau_w,pmfu) 69 70 CALL histwrite_phy(nid_tra,"mfd",itau_w,pmfd)
Note: See TracChangeset
for help on using the changeset viewer.