Ignore:
Timestamp:
Mar 10, 2017, 5:46:08 PM (7 years ago)
Author:
dcugnet
Message:

Fix and cleaning/improvements over the previous commit:

  • Old style climoz files are handled without trouble.
  • New style climoz (monthly with 14 records or daily) are handled

with the same read_climoz key values (1 or 2).

  • Daily files reading activation is done using the same key

used in ce0l to create them: ok_daily_climoz=y. This key is now
put to FALSE by default (old style 360 days files are not considered
as daily).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/physiq_mod.F90

    r2819 r2820  
    16701670       !$omp single
    16711671       IF (read_climoz >= 1) CALL open_climoz(ncid_climoz, press_cen_climoz,   &
    1672                                          press_edg_climoz, time_climoz)
     1672           press_edg_climoz, time_climoz, ok_daily_climoz, adjust_tropopause)
    16731673       !$omp end single
    16741674       !
     
    19751975
    19761976          wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz)
    1977        ELSE IF(ANY([1,2]==read_climoz)) THEN
    1978           ro3i = REAL(INT((days_elapsed+jh_cur-jh_1jan)/year_len*360.))
    1979           IF(INT(ro3i) == 360) ro3i = 359.
    1980           ! (This should never occur, except perhaps because of roundup
    1981           ! error. See documentation.)
    1982           WRITE(*,*)' >> Using 360 records ozone files (old method).'
    1983           CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz),      &
    1984                                ro3i+1., press_edg_climoz, paprs, wo)
    1985           FORALL (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd &
    1986                * zmasse / dobson_u / 1e3
    19871977       ELSE
     1978          !--- ro3i = elapsed days number since current year 1st january, 0h
     1979          ro3i=days_elapsed+jh_cur-jh_1jan
     1980          !--- scaling for old style files (360 records)
     1981          IF(SIZE(time_climoz)==360.AND..NOT.ok_daily_climoz) ro3i=ro3i*360./year_len
    19881982          IF(adjust_tropopause) THEN
    1989             WRITE(*,*)' >> Adjusting O3 field to match gcm tropopause.'
    1990             CALL dyn_tropopause(t_seri, ztsol, paprs, pplay, presnivs, rot,  &
    1991                  pr_tropopause)
    1992             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz-2),  &
    1993                  days_elapsed+jh_cur-jh_1jan, press_edg_climoz, paprs, wo,   &
    1994                  time_climoz,  latitude_deg,  press_cen_climoz, pr_tropopause)
     1983             CALL dyn_tropopause(t_seri, ztsol, paprs, pplay, presnivs, rot, &
     1984                  pr_tropopause)
     1985             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz),   &
     1986                      ro3i,  press_edg_climoz,  paprs,   wo, time_climoz,    &
     1987                           latitude_deg,  press_cen_climoz,  pr_tropopause)
    19951988          ELSE
    1996             WRITE(*,*)' >> Interpolating O3 field directly on gcm levels.'
    1997             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz-2),  &
    1998                  days_elapsed+jh_cur-jh_1jan, press_edg_climoz, paprs, wo,   &
    1999                  time_climoz)
     1989             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz),   &
     1990                      ro3i,  press_edg_climoz,  paprs,  wo,  time_climoz)
    20001991          END IF
    20011992          ! Convert from mole fraction of ozone to column density of ozone in a
Note: See TracChangeset for help on using the changeset viewer.