Changeset 2981 for LMDZ5


Ignore:
Timestamp:
Aug 4, 2017, 7:06:56 PM (7 years ago)
Author:
dcugnet
Message:

Fix for time interpolation when ozone files have 14 records (monthly means).

File:
1 edited

Legend:

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

    r2968 r2981  
    9090  REAL,    PARAMETER :: rho  = 1.3    !--- Max tropopauses sigma ratio
    9191  REAL,    PARAMETER :: o3t0 = 1.E-7  !--- Nominal O3 vmr at tropopause
    92   LOGICAL, PARAMETER :: lo3tp=.FALSE. !--- Use paramztrized O3 vmr at tropopause
     92  LOGICAL, PARAMETER :: lo3tp=.FALSE. !--- Use parametrized O3 vmr at tropopause
    9393
    9494CONTAINS
     
    201201      ELSE IF(lO3Trop) THEN
    202202        CALL msg(lAdjTro,'    O3 CONCENTRATION AT TROPOPAUSE from file.')
     203      ELSE IF(lo3tp) THEN
     204        CALL msg(lAdjTro,'    PARAMETRIZED O3 concentration at tropopause.')
    203205      ELSE
    204         CALL msg(lAdjTro,'    PARAMETRIZED O3 concentration at tropopause.')
     206        CALL msg(lAdjTro,'    CONSTANT O3 concentration at tropopause.')
    205207      END IF
    206208    END IF
     
    211213    !=== TIME INTERPOLATION FOR MONTHLY INPUT FILES
    212214    IF(linterp) THEN
    213       WRITE(str,'(3(a,f7.3))')'Interpolating O3 at julian day ',julien,' from '&
     215      WRITE(str,'(3(a,f12.8))')'Interpolating O3 at julian day ',julien,' from '&
    214216      &//'fields at times ',time_in(irec),' and ', time_in(irec+1)
    215217      CALL msg(.TRUE.,str,sub)
     
    327329    END IF
    328330  ELSE                                  !=== MONTHLY FILES: GET 2 NEAREST RECS
     331    IF(lfirst) irec=locate(time_in,julien) !--- Need to locate surrounding times
    329332    IF(.NOT.lfirst.AND.julien<time_in(irec+1)) RETURN
    330     CALL msg(.TRUE.,sub,'Refreshing adjacent Ozone forcing fields.')
     333    CALL msg(.TRUE.,'Refreshing adjacent Ozone forcing fields.',sub)
    331334    IF(lfirst) THEN                     !=== READ EARLIEST TIME FIELDS
    332       irec=locate(time_in,julien)       !--- Need to locate surrounding times
     335      WRITE(str,'(a,i3,a,f12.8,a)')'Previous available field update (step 1): '&
     336      //'reading record ',irec,' (time ',time_in(irec),')'
     337      CALL msg(.TRUE.,str,sub)
    333338      CALL get_3Dfields(v1m)            !--- Read ozone field(s)
    334339      IF(lAdjTro) THEN                  !--- Additional files for fields strain
     
    338343      END IF
    339344    ELSE                                !=== SHIFT FIELDS
     345      irec=irec+1
     346      WRITE(str,'(a,i3,a,f12.8,a)')'Previous available field update: shifting'&
     347      //' current next one (',irec,', time ',time_in(irec),')'
     348      CALL msg(.TRUE.,str,sub)
    340349      v1m=v1p                           !--- Ozone fields
    341350      IF(lAdjTro) THEN                  !--- Additional files for fields strain
     
    346355    END IF
    347356    irec=irec+1
     357    WRITE(str,'(a,i3,a,f12.8,a)')'Next available field update: reading record'&
     358    ,irec,' (time ',time_in(irec),')'
     359    CALL msg(.TRUE.,str,sub)
    348360    CALL get_3Dfields(v1p)              !--- Read ozone field(s)
    349361    IF(lAdjTro) THEN                    !--- Additional files for fields strain
     
    352364      IF(lO3Trop) CALL get_2Dfield(otp,"tro3_at_tropopause")
    353365    END IF
    354     IF(lfirst) irec=irec-1
     366    irec=irec-1
    355367  END IF
    356368
Note: See TracChangeset for help on using the changeset viewer.