Changeset 7262 for branches/ORCHIDEE_2_2


Ignore:
Timestamp:
2021-07-27T19:02:48+02:00 (3 years ago)
Author:
agnes.ducharne
Message:

As in r7065 and r76158 for the new driver. Runs OK on jean-zay with the old driver, but not yet tested with the new driver. The corresponding configurations need to be added following r7081, r7082, and r7719.

Location:
branches/ORCHIDEE_2_2/ORCHIDEE/src_driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90

    r7258 r7262  
    204204    REAL(r_std) :: s_sec, e_sec, dateend, diff_sec, date_end 
    205205    INTEGER(i_std) :: i, ic 
     206    CHARACTER(LEN=20) :: str_cyclic_start(2), str_cyclic_end(2) 
     207    INTEGER(i_std) :: c_year_start, c_month_start, c_day_start, c_year_end, c_month_end, c_day_end 
     208    REAL(r_std) :: c_sec_start, c_sec_end 
    206209    ! 
    207210    !Config Key  = START_DATE 
     
    212215    CALL getin('START_DATE',str_sdate) 
    213216    ! 
     217    !Config Key  = CYCLIC_STARTDATE 
     218    !Config Desc = Date at which the cyclic year is started 
     219    !Config Def  = NONE 
     220    !Config Help = The format is the same as in the CF convention : 1999-09-13 12:0:0 
     221    str_cyclic_start = " " 
     222    CALL getin('CYCLIC_STARTDATE',str_cyclic_start) 
     223     
     224    ! 
     225    !Config Key  = CYCLIC_ENDDATE 
     226    !Config Desc = Date at which the cyclic year is ended 
     227    !Config Def  = NONE 
     228    !Config Help = The format is the same as in the CF convention : 1999-09-13 12:0:0 
     229    str_cyclic_end = " " 
     230    CALL getin('CYCLIC_ENDDATE',str_cyclic_end) 
     231     
     232 
     233    ! 
     234    ! the start date of simulation  
    214235    IF ( (INDEX(str_sdate(1),"-") .NE. INDEX(str_sdate(1),"-", .TRUE.)) .AND. & 
    215236         &  (INDEX(str_sdate(2),":") .NE. INDEX(str_sdate(2),":", .TRUE.)) ) THEN 
     
    230251       CALL ipslerr(3, "forcing_integration_time", "START_DATE incorrectly specified in run.def", str_sdate(1), str_sdate(2)) 
    231252    ENDIF 
    232     CALL ymds2ju (s_year, s_month, s_day, s_sec, date_start) 
     253    !--------------------------------- 
     254    ! cyclic start date 
     255    IF ( (INDEX(str_cyclic_start(1),"-") .NE. INDEX(str_cyclic_start(1),"-", .TRUE.)) .AND. & 
     256         &  (INDEX(str_cyclic_start(2),":") .NE. INDEX(str_cyclic_start(2),":", .TRUE.)) ) THEN 
     257       DO i=1,2 
     258          tmpstr = str_cyclic_start(1) 
     259          ic = INDEX(tmpstr,"-") 
     260          tmpstr(ic:ic) = " " 
     261          str_cyclic_start(1) = tmpstr 
     262          tmpstr = str_cyclic_start(2) 
     263          ic = INDEX(tmpstr,":") 
     264          tmpstr(ic:ic) = " " 
     265          str_cyclic_start(2) = tmpstr 
     266       ENDDO 
     267       READ (str_cyclic_start(1),*) c_year_start, c_month_start, c_day_start 
     268       READ (str_cyclic_start(2),*) hours, minutes, seci 
     269       c_sec_start = hours*3600. + minutes*60. + seci 
     270    ELSE IF ( len_trim(str_cyclic_start(1)) .NE. 0 ) THEN 
     271       CALL ipslerr(3, "forcing_integration_time", "CYCLIC_STARTDATE incorrectly specified in run.def", str_cyclic_start(1), str_cyclic_start(2)) 
     272    ENDIF 
     273    ! if s_year not the same as c_year, use cyear to compute date_start 
     274    IF ( ( s_year .NE. c_year_start) .AND. (len_trim(str_cyclic_start(1)) .NE. 0)) THEN 
     275       CALL ymds2ju (c_year_start, c_month_start, c_day_start, c_sec_start, date_start) 
     276    ELSE 
     277       CALL ymds2ju (s_year, s_month, s_day, s_sec, date_start) 
     278    ENDIF 
    233279    CALL forcing_printdate(date_start, "This is after reading the start date") 
     280 
    234281    ! 
    235282    !Config Key  = END_DATE 
     
    258305       CALL ipslerr(3, "forcing_integration_time", "END_DATE incorrectly specified in run.def", str_edate(1), str_edate(2)) 
    259306    ENDIF 
    260     CALL ymds2ju (e_year, e_month, e_day, e_sec, date_end) 
    261     ! 
    262     CALL time_diff (s_year,s_month,s_day,s_sec,e_year,e_month,e_day,e_sec,diff_sec) 
     307 
     308    !--------------------------------- 
     309    ! for cyclic end date 
     310    IF ( (INDEX(str_cyclic_end(1),"-") .NE. INDEX(str_cyclic_end(1),"-", .TRUE.)) .AND. & 
     311         &  (INDEX(str_cyclic_end(2),":") .NE. INDEX(str_cyclic_end(2),":", .TRUE.)) ) THEN 
     312       DO i=1,2 
     313          tmpstr = str_cyclic_end(1) 
     314          ic = INDEX(tmpstr,"-") 
     315          tmpstr(ic:ic) = " " 
     316          str_cyclic_end(1) = tmpstr 
     317          tmpstr = str_cyclic_end(2) 
     318          ic = INDEX(tmpstr,":") 
     319          tmpstr(ic:ic) = " " 
     320          str_cyclic_end(2) = tmpstr 
     321       ENDDO 
     322       READ (str_cyclic_end(1),*) c_year_end, c_month_end, c_day_end 
     323       READ (str_cyclic_end(2),*) hours, minutes, seci 
     324       c_sec_end = hours*3600. + minutes*60. + seci 
     325    ELSE IF ( len_trim(str_cyclic_end(1)) .NE. 0 ) THEN 
     326       CALL ipslerr(3, "forcing_integration_time", "CYCLIC_ENDDATE incorrectly specified in run.def", str_cyclic_end(1), str_cyclic_end(2)) 
     327    ENDif 
     328 
     329    ! if e_year not the same as c_year_end, use cyear_end to compute date_end 
     330    IF (( e_year .NE. c_year_end)  .AND. (len_trim(str_cyclic_end(1)) .NE. 0) )THEN 
     331       CALL ymds2ju (c_year_end, c_month_end, c_day_end, c_sec_end, date_end) 
     332    ELSE 
     333       CALL ymds2ju (e_year, e_month, e_day, e_sec, date_end) 
     334    ENDIF 
     335     
     336    ! 
     337    IF (( s_year .NE. c_year_start) .AND. (len_trim(str_cyclic_start(1)) .NE. 0) )then 
     338       CALL time_diff (c_year_start,c_month_start,c_day_start,c_sec_start,c_year_end,c_month_end,c_day_end,c_sec_end,diff_sec) 
     339    ELSE 
     340       CALL time_diff (s_year,s_month,s_day,s_sec,e_year,e_month,e_day,e_sec,diff_sec) 
     341    ENDIF 
     342 
    263343    ! 
    264344    !Config Key  = DT_SECHIBA 
     
    403483       ENDIF 
    404484       CALL forcing_getglogrid(nb_forcefile, forfilename, iim_tmp, jjm_tmp, nbpoint_tmp, .FALSE., landonly) 
     485        
    405486       ! 
    406487       IF ( PRESENT(wunit) ) THEN 
     
    429510          nbpoint_loc = nbpoint_in 
    430511       ENDIF 
     512        
    431513       ! 
    432514       ! Treat the time dimension now : 
     
    453535       ENDIF 
    454536       CALL forcing_integration_time(startdate, dt, nbdt) 
    455        ! 
     537 
    456538       ! Test that the time interval requested by the user correspond to the time available in the  
    457539       ! forcing file. 
     
    463545          CALL ipslerr (3,'forcing_open', 'Start time requested by the user is outside of the time interval',& 
    464546               & "covered by the forcing file.","Please verify the configuration in the run.def file.") 
     547           
    465548       ENDIF 
    466549       ! 
     
    496579       nbpoint_proc = nbpoint_glo 
    497580    ENDIF 
     581     
    498582    ! 
    499583    ! On the slave processes we need to allocate the memory for the data on root_prc to be bcast 
     
    748832    ! 
    749833    mid_int = time_int(1) + (dt/2.0)/one_day 
    750     imin = MINLOC( ABS(time_central(1:slab_size) - mid_int), mask ) 
     834    imin = MINLOC( ABS(time_central(1:slab_size) - mid_int), mask(1:slab_size) ) 
    751835    ! 
    752836    ! Verify that this is a possible date 
     
    757841       ! 
    758842    ELSE 
    759        WRITE(*,*) "imin(1) = ", imin(1), (time_int_in(1) + (dt/2.0)/one_day) 
    760843       CALL forcing_printdate(time_int_in(1), "===> Start of target time interval.") 
    761844       CALL forcing_printdate(time_int_in(2), "===> End of target time interval.") 
     
    823906    mid_int = time_int(1) + (dt/2.0)/one_day 
    824907    ! Locate that time on the time axis of the forcing. 
    825     imin = MINLOC( ABS(time_central(1:slab_size) - mid_int), mask ) 
     908    imin = MINLOC( ABS(time_central(1:slab_size) - mid_int), mask(1:slab_size) ) 
    826909    ! 
    827910    ! Determine which indices are to the left (slabind_a) and right (slabind_b) of the model time and will be used 
    828911    ! for the linear interpolation. 
    829912    ! 
     913 
    830914    IF ( imin(1) > 1 .AND. imin(1) < slab_size ) THEN 
    831915       ! 
     
    851935       IF ( mid_int < time_central(slabind_a) ) THEN 
    852936          IF ( time_int(2) < time_central(slabind_a) ) THEN 
    853              WRITE(*,*) "imin(1) = ", imin(1), (time_int_in(1) + (dt/2.0)/one_day) 
    854937             CALL forcing_printdate(time_int_in(1), "===> Start of target time interval.") 
    855938             CALL forcing_printdate(time_int_in(2), "===> End of target time interval.") 
     
    869952       IF ( mid_int > time_central(slabind_b) ) THEN 
    870953          IF ( time_int(1) > time_central(slabind_b) ) THEN 
    871              WRITE(*,*) "imin(1) = ", imin(1), (time_int_in(1) + (dt/2.0)/one_day) 
    872954             CALL forcing_printdate(time_int_in(1), "===> Start of target time interval.") 
    873955             CALL forcing_printdate(time_int_in(2), "===> End of target time interval.") 
     
    10271109       ! In principle 3 time steps can contribute to the time step closest to the center of the forcing interval 
    10281110       ! 
    1029        imin = MINLOC( ABS(time_central(1:slab_size)-(time_int(1)+time_int(2))/2.0), mask ) 
     1111       imin = MINLOC( ABS(time_central(1:slab_size)-(time_int(1)+time_int(2))/2.0), mask(1:slab_size) ) 
    10301112       tind(1) = MAX(imin(1)-1,1) 
    10311113       tind(2) = imin(1) 
     
    12161298    ! Locate the time step in the SLAB at hand 
    12171299    ! 
    1218     imin = MINLOC( ABS(time_cent(1:slab_size)-(time_int(1)+time_int(2))/2.0), mask ) 
     1300    imin = MINLOC( ABS(time_cent(1:slab_size)-(time_int(1)+time_int(2))/2.0), mask(1:slab_size) ) 
    12191301    ! 
    12201302    ! Compute all the angels we will encounter for the current forcing interval 
     
    12411323       julian_tmp = (time_int(1)+time_int(2))/2.0 
    12421324       split_time = julian_tmp+split*tlen/one_day 
    1243        tmin = MINLOC( ABS(time_cent(1:slab_size) - split_time), mask) 
     1325       tmin = MINLOC( ABS(time_cent(1:slab_size) - split_time), mask(1:slab_size)) 
    12441326       DO WHILE (  tmin(1) .EQ. imin(1) .AND. split_time .LE. timebnd(slab_size,2) ) 
    12451327          split = split + 1 
    12461328          split_time = julian_tmp+split*tlen/one_day 
    1247           tmin = MINLOC( ABS(time_cent(1:slab_size) - split_time), mask) 
     1329          tmin = MINLOC( ABS(time_cent(1:slab_size) - split_time), mask(1:slab_size)) 
    12481330       ENDDO 
    12491331       ! 
     
    16251707       ! 
    16261708       first_call_readslab = .FALSE. 
     1709       write(numout, *) "first_call_readslab in forcing_readslab_root" 
    16271710       ! 
    16281711    ELSE        
     
    16361719       ! 
    16371720       current_offset = position_slab(2)-2 
    1638        ! 
    1639     ENDIF 
     1721       write(numout, *) "first_call_readslab in forcing_readslab_root 22" 
     1722       ! 
     1723    ENDIF 
     1724     
    16401725    ! 
    16411726    ! Check that the slab size is not too large 
     
    16531738       inslabpos=1 
    16541739       WRITE(*,*) ">> Reading from global position ", start_globtime, "up to ", end_globtime 
     1740       write(numout,*) time_sourcefile  
    16551741       ! 
    16561742       DO if=MINVAL(time_sourcefile(start_globtime:end_globtime)),MAXVAL(time_sourcefile(start_globtime:end_globtime)) 
     
    16931779             CALL forcing_varforslab(if, "Tairmin", nctstart, nctcount, inslabpos, tairmin, cellmethod) 
    16941780          ENDIF 
     1781           
     1782           
    16951783          CALL forcing_varforslab(if, "Tair", nctstart, nctcount, inslabpos, tair, cellmethod) 
    16961784          CALL forcing_attributetimeaxe(cellmethod, timeid_tair) 
     
    17961884       ! 
    17971885       IF ( position_slab(2)-position_slab(1) .GT. slab_size ) THEN 
    1798           WRITE(*,*) "Postition_slab =",  position_slab 
    1799           WRITE(*,*) "Interval read : ", position_slab(2)-position_slab(1) 
    1800           WRITE(*,*) "Time start and end : ", time(1,1), time(slab_size,1) 
    18011886          DO it =1,nbtax 
    18021887             WRITE(*,*) "Checking time_tmp on idex : ", it 
     
    18061891             WRITE(*,*) "Interval read : ", imax(1)-imin(1)+1 
    18071892          ENDDO 
    1808           WRITE(*,*) "current_offset, slab_size =", current_offset, slab_size 
    18091893          CALL ipslerr (3,'forcing_readslab_root',"The time slab read does not fit the number of variables read.",& 
    18101894               &        "Could there be an error in the time axis ?"," ") 
     
    24112495          ! 
    24122496       ENDDO 
     2497       IF ( iim_glo == 0 .AND. jjm_glo == 0 ) THEN 
     2498          CALL ipslerr (3,'forcing_getglogrid',"Did not recognize any dimensions in : ", filename(iff), " ") 
     2499       ENDIF 
    24132500    ENDDO 
     2501     
    24142502    ! 
    24152503    ! 3.0 Read the spatial coordinate variables found in the first file. 
     
    25752663       CALL forcing_contfrac2d(force_id(1), testvar_id, contfrac_id, testvar2d, contfrac2d, & 
    25762664            & testvar_missing, contfrac_missing, nbland_glo) 
     2665        
     2666 
    25772667       ! 
    25782668       ! We have found a variable on which we can count the number of land points. We can build 
     
    25812671       IF ( landonly ) THEN 
    25822672          nbpoint_glo = nbland_glo 
     2673           
     2674     
    25832675          IF ( .NOT. ALLOCATED(lindex_glo)) ALLOCATE(lindex_glo(nbpoint_glo)) 
    25842676          IF ( .NOT. ALLOCATED(contfrac_glo)) ALLOCATE(contfrac_glo(nbpoint_glo)) 
    25852677          IF ( .NOT. ALLOCATED(testvar)) ALLOCATE(testvar(nbpoint_glo)) 
     2678           
     2679  
    25862680          IF ( contfrac_id > 0 ) THEN 
    25872681             CALL forcing_buildindex(contfrac2d, contfrac_missing, landonly, lindex_glo, contfrac_glo) 
    25882682             CALL forcing_reindex(iim_glo, jjm_glo, testvar2d, nbland_glo, testvar, lindex_glo) 
     2683               
     2684 
    25892685          ELSE 
    25902686             CALL forcing_buildindex(testvar2d, testvar_missing, landonly, lindex_glo, testvar) 
    25912687             contfrac_glo(:) = 1.0 
     2688              
    25922689          ENDIF 
    25932690       ELSE 
     
    26142711    dump_mask = closefile  
    26152712    CALL forcing_checkindex(dump_mask, testvarname, testvar) 
     2713     
    26162714    ! 
    26172715    ! 
     
    26272725    jjm_tmp = jjm_glo 
    26282726    nbpoint_tmp = nbpoint_glo 
     2727     
    26292728    ! 
    26302729    ! Clean up ! 
     
    26682767    ! 
    26692768    INTEGER(i_std) :: i,j,k 
    2670     ! 
    2671     k=0 
    2672     DO i=1,iim_glo 
    2673        DO j=1,jjm_glo 
    2674           IF ( landonly ) THEN 
    2675              IF ( var2d(i,j) /= var_missing ) THEN 
     2769 
     2770    IF ( MAXVAL(var2d) >= var_missing ) THEN 
     2771       ! Case when we have missing values in the vard2d 
     2772       k=0 
     2773       DO i=1,iim_glo 
     2774          DO j=1,jjm_glo 
     2775             IF ( landonly ) THEN 
     2776                IF ( var2d(i,j) /= var_missing .AND. var2d(i,j) > 0.0 ) THEN 
     2777                   k = k + 1 
     2778                   lindex(k) = (j-1)*iim_glo+i  
     2779                   var(k) = var2d(i,j) 
     2780                ENDIF 
     2781             ELSE 
     2782                ! When we take all point, no test is performed. 
    26762783                k = k + 1 
    26772784                lindex(k) = (j-1)*iim_glo+i  
    26782785                var(k) = var2d(i,j) 
    26792786             ENDIF 
    2680           ELSE 
    2681              ! When we take all point, no test is performed. 
    2682              k = k + 1 
    2683              lindex(k) = (j-1)*iim_glo+i  
    2684              var(k) = var2d(i,j) 
    2685           ENDIF 
     2787          ENDDO 
    26862788       ENDDO 
    2687     ENDDO 
     2789    ELSE 
     2790       ! We suppose that this is land fraction variable 
     2791       k=0 
     2792       DO i=1,iim_glo 
     2793          DO j=1,jjm_glo 
     2794             IF ( landonly ) THEN 
     2795                IF ( var2d(i,j) > 0.0 ) THEN 
     2796                   k = k + 1 
     2797                   lindex(k) = (j-1)*iim_glo+i  
     2798                   var(k) = var2d(i,j) 
     2799                ENDIF 
     2800             ELSE 
     2801                ! When we take all point, no test is performed. 
     2802                k = k + 1 
     2803                lindex(k) = (j-1)*iim_glo+i  
     2804                var(k) = var2d(i,j) 
     2805             ENDIF 
     2806          ENDDO 
     2807       ENDDO 
     2808    ENDIF 
     2809    ! 
    26882810    ! 
    26892811  END SUBROUTINE forcing_buildindex 
     
    27212843    ! First determine the contfrac variable 
    27222844    ! 
     2845     
    27232846    IF ( contfrac_id > 0 ) THEN 
    27242847       iret = NF90_INQUIRE_VARIABLE(ifile, contfrac_id, ndims=it) 
     
    28222945               "We do not know how to handle this.", " ") 
    28232946       ENDIF 
    2824        ! 
    2825        ! Count the number of land points. 
    2826        ! 
    2827        DO i=1,iim_glo 
    2828           DO j=1,jjm_glo 
    2829              IF ( contfrac(i,j) /= contfrac_missing ) THEN 
    2830                 nbland = nbland + 1 
    2831              ENDIF 
     2947        
     2948       IF ( MAXVAL(contfrac) >= contfrac_missing ) THEN 
     2949          ! We have missing values in contfrac and we use it to count number of land points 
     2950          DO i=1,iim_glo 
     2951             DO j=1,jjm_glo 
     2952                IF ( contfrac(i,j) /= contfrac_missing .AND. contfrac(i,j) > 0.0 ) THEN 
     2953                   nbland = nbland + 1 
     2954                ENDIF 
     2955             ENDDO 
    28322956          ENDDO 
    2833        ENDDO 
    2834        ! 
     2957           
     2958       ELSE 
     2959          ! Then ocean is fully contfrc=0 ! 
     2960          DO i=1,iim_glo 
     2961             DO j=1,jjm_glo 
     2962                IF ( contfrac(i,j) > 0.0 ) THEN 
     2963                   nbland = nbland + 1 
     2964                ENDIF 
     2965             ENDDO 
     2966          ENDDO 
     2967           
     2968       ENDIF 
     2969 
    28352970       ! If we did not find any land points on the map (i.e. iim_glo > 1 and jjm_glo > 1) then we 
    28362971       ! look for fractions larger then 0. 
     
    28452980          ENDDO 
    28462981       ENDIF 
    2847        ! 
     2982        
    28482983       ! Did we get a result ? 
    28492984       ! 
     
    29833118       CALL forcing_reindex(nbpoint_glo, testvar, nbpoint_glo, testvar_reind, reindex_glo) 
    29843119       ! 
     3120        
    29853121       CALL forcing_writetestvar("forcing_mask_glo.nc", iim_glo, jjm_glo, nbpoint_glo, & 
    29863122            &                    lon_glo(:,1), lat_glo(1,:), lindex_glo, mask_glo, & 
     
    32483384    ! 
    32493385    nbpoint_loc = SUM(mask_loc) 
     3386     
     3387 
    32503388    IF ( .NOT. zoom_forcing .AND. nbpoint_loc .NE. nbpoint_glo) THEN 
    32513389       WRITE(*,*) "We have not zoomed into the forcing file still we get a number of" 
     
    39454083        ! 
    39464084        DO it=1,nbtime_perfile(iff) 
    3947            time_infiles(tstart+it) = date0_file(iff,tcnt) + time_read(it)*convtosec(iff)/one_day 
     4085           !!time_infiles(tstart+it) = date0_file(iff,tcnt) + time_read(it)*convtosec(iff)/one_day 
     4086           IF ( convtosec(iff) < one_day ) THEN 
     4087              time_infiles(tstart+it) = date0_file(iff,tcnt) + time_read(it)*convtosec(iff)/one_day 
     4088           ELSE 
     4089              ! In the case of daily forcing the start time has to be 00UTC in Julian days. 
     4090              time_infiles(tstart+it) = date0_file(iff,tcnt) + INT(time_read(it)) 
     4091           ENDIF 
    39484092        ENDDO 
    39494093        if ( check ) WRITE(*,*) "File ", iff, "goes from ",  time_infiles(tstart+1), " to ", & 
     
    42474391        ! Zoom into the data and put it in the right place in the slab of data. 
    42484392        ! 
     4393         
    42494394        CALL forcing_reindex(iim_glo, jjm_glo, timecount, tmp_slab2d, nbpoint_loc, slab_size, data, inslabpos, reindex2d_loc) 
     4395         
    42504396     ENDIF 
    42514397  ELSE 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/orchideedriver.f90

    r7261 r7262  
    5050  USE ioipslctrl 
    5151  USE xios_orchidee 
     52   
    5253  ! 
    5354  !- 
     
    317318  IF ( is_root_prc) THEN 
    318319     CALL globgrd_getdomsz(gridfilename, iim_glo, jjm_glo, nbindex_g, model_guess, file_id, forfilename, zoom_lon, zoom_lat) 
     320     write(numout,*) "nbindex_g after calling globgrd_getdomsz in orchideedriver", nbindex_g 
    319321     nbseg = 4 
    320322  ENDIF 
     
    342344          &               kindex_g, contfrac_glo, calendar) 
    343345  ENDIF 
     346   
    344347  ! 
    345348  CALL bcast(lon_glo) 
     
    369372  ENDDO 
    370373  ! 
     374   
    371375  WRITE(*,*) "Rank", mpi_rank, " Before parallel region All land points : ",  nbindex_g 
    372376  WRITE(*,*) "Rank", mpi_rank, " from ", iim_glo, " point in Lon. and ", jjm_glo, "in Lat." 
     
    382386  !- 
    383387  CALL grid_set_glo(iim_glo, jjm_glo, nbindex_g) 
     388   
     389 
    384390  CALL grid_allocate_glo(nbseg) 
    385391  ! Copy the list of indexes of land points into index_g used by ORCHIDEE and then broacast to all 
     
    477483  !- 
    478484  CALL forcing_integration_time(date0, dt, nbdt) 
     485  write(numout, *) "orchideedriver date0", date0, dt, nbdt 
    479486  ! 
    480487  !- 
     
    558565  ! 
    559566  CALL ioipslctrl_restini(itau, date0, dt, rest_id, rest_id_stom, itau_offset, date0_shifted) 
    560   WRITE(numout,*) "itau_offset : ", itau_offset, date0, date0_shifted 
    561   WRITE(numout,*) "itau_offset diff = ", date0_shifted, date0, date0_shifted-date0 
    562567  ! 
    563568  ! To ensure that itau starts with 0 at date0 for the restart, we have to set an off-set to achieve this.  
     
    574579       date0,    year_end, month_end, day_end, julian_diff,  & 
    575580       lon,      lat,      znt) 
    576  
    577581  CALL sechiba_xios_initialize  
    578582 
     
    599603     timestep_interval(1) = julian_start 
    600604     timestep_interval(2) = julian_end 
    601      julian = julian_end 
     605     julian = (julian_start + julian_end) /2.0  !julian_end 
     606      
    602607     ! 
    603608     ! Get the forcing data 
     
    605610     CALL forcing_getvalues(timestep_interval, dt, zlev_tq, zlev_uv, temp_air, qair, & 
    606611          &                 precip_rain, precip_snow, swdown, lwdown, sinang, u, v, pb) 
     612      
    607613     !- 
    608614     ! 
Note: See TracChangeset for help on using the changeset viewer.