Changeset 1273


Ignore:
Timestamp:
Dec 4, 2009, 2:23:25 PM (15 years ago)
Author:
Laurent Fairhead
Message:

Correction d'un bug sur le calcul de la date courante pour la lecture
des aerosols
Attention, les resultats sont modifies suite a un decalage d'une journee
dans l'ancien calcul de la date
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90

    r1270 r1273  
    105105
    106106  ! Use phys_cal_mod
    107   !iday= day_cur
    108   !iyr = year_cur
    109   !im  = mth_cur
    110 
    111   iday = INT(r_day)
    112   iyr  = iday/360
    113   iday = iday-iyr*360         ! day of the actual year
    114   iyr  = iyr + annee_ref      ! year of the run   
    115   im   = iday/30 +1           ! the actual month
     107  iday= day_cur
     108  iyr = year_cur
     109  im  = mth_cur
     110
     111!  iday = INT(r_day)
     112!  iyr  = iday/360
     113!  iday = iday-iyr*360         ! day of the actual year
     114!  iyr  = iyr + annee_ref      ! year of the run   
     115!  im   = iday/30 +1           ! the actual month
    116116  CALL ymds2ju(iyr, im, iday, 0., jDay)
     117!   CALL ymds2ju(iyr, im, iday-(im-1)*30, 0., jDay)
     118
    117119
    118120  IF(MOD(itap-1,NINT(86400./pdtphys)) == 0)THEN
     
    239241     CALL ymds2ju(year_cur+1, 1, 1, 0.0, month_start(14))
    240242     month_mid(:) = month_start (:) + month_len(:)/2.
     243     
     244     if (debug) then
     245       write(lunout,*)' month_len = ',month_len
     246       write(lunout,*)' month_mid = ',month_mid
     247     endif
    241248
    242249  END IF  ! IF ( (first .OR. iday==0) .AND. lnewday ) THEN
     
    290297       CALL abort_gcm('readaerosol_interp', 'number of months undefined',1)
    291298     ENDIF
     299     if (debug) then
     300       write(lunout,*)' jDay, day1, day2, im, im2 = ', jDay, day1, day2, im, im2
     301     endif
    292302
    293303 
     
    491501                         var_year(i,k,im2,id_aero) - var_year(i,k,im,id_aero)
    492502                 END IF
    493                  
    494503                 WRITE(lunout,*) 'stop for aerosol : ',name_aero(id_aero)
     504                 WRITE(lunout,*) 'day1, day2, jDay = ', day1, day2, jDay
    495505                 CALL abort_gcm('readaerosol_interp','Error in interpolation 1',1)
    496506              END IF
Note: See TracChangeset for help on using the changeset viewer.