Opened 8 years ago

Closed 7 years ago

#109 closed defect (fixed)

Latitudes and longitudes of the PFT map file are not read in all cases in the slowproc_update subroutine.

Reported by: maignan Owned by: jgipsl
Priority: major Milestone: ORCHIDEE 1.9.7
Component: Anthropogenic processes Version: trunc
Keywords: LUC Cc:


A bug has been discovered by the DOFOCO team (Matt and Sebastiaan): in some cases when reading a PFT map, the latitudes and longitudes of the file are not read in the slowproc_update subroutine (lines with !@FM are modified lines):

!@FM First tml should be initialized to 0:
tml=0 !@FM 

    IF ( veget_year > 0 ) THEN
       IF (tml > 0) THEN
          ALLOCATE(itau(tml), STAT=ALLOC_ERR)
          IF (ALLOC_ERR/=0) THEN
             WRITE(numout,*) "ERROR IN ALLOCATION of itau : ",ALLOC_ERR
!@FM Here we terminate this IF:
       IF (is_root_prc) THEN
          IF (tml > 0) THEN
             CALL fliogstc (fid, t_axis=itau,x_axis=lon_lu,y_axis=lat_lu)
             IF (veget_year <= tml) THEN
                CALL fliogetv (fid,"time_counter",time_counter, start=(/ veget_year /), count=(/ 1 /))
                WRITE(numout,*) "slowproc_update LAND_USE : the date read for vegetmax is ",time_counter
                CALL fliogetv (fid,"time_counter",time_counter, start=(/ tml /), count=(/ 1 /))
                WRITE(numout,*) "slowproc_update LAND_USE : You try to update vegetmax with a the date greater than in the file."
                WRITE(numout,*) "                           We will keep the last one :",time_counter
             CALL fliogstc (fid, x_axis=lon_lu,y_axis=lat_lu)
!@FM This one disappears:
    IF (tml > 0) THEN
       CALL bcast(itau)
    CALL bcast(lon_lu)
    CALL bcast(lat_lu)

This modification has been tested successfully.

Change History (2)

comment:1 Changed 7 years ago by jgipsl

  • Owner changed from somebody to jgipsl
  • Status changed from new to accepted

The solution in the ticket seems fine.

On the current version it is possible to avoid this problem by setting VEGET_YEAR=1 in run.def, at least for the default PFTmaps from AR5. This is how it is done in the configurations using libIGCM.

comment:2 Changed 7 years ago by jgipsl

  • Resolution set to fixed
  • Status changed from accepted to closed

Commit done on the trunk [1850]

Note: See TracTickets for help on using tickets.