Opened 8 years ago

Closed 6 years ago

#216 closed enhancement (wontfix)

abstraction of restget_p for 3 dimensions

Reported by: ajornet Owned by: somebody
Priority: major Milestone: ORCHIDEE 3.0
Component: Driver files Version: trunc
Keywords: restget_p restart Cc: ajornet

Description

In order to get data from restart files, you need to make a trick for three dimensions variables.

Example:

shum_ngrnd_perma(:,:,:) = val_exp
DO m=1,nvm
   WRITE(part_str,'(I2)') m
   IF ( m < 10 ) part_str(1:1) = '0'
   var_name = 'shum_ngrnd_perma_'//part_str(1:LEN_TRIM(part_str))
   CALL ioconf_setatt_p('UNITS', '-')
   CALL ioconf_setatt_p('LONG_NAME','soil humidity')
   CALL restget_p (rest_id, var_name, nbp_glo, ngrnd, 1, kjit, TRUE., shum_ngrnd_perma(:,:,m), "gather", nbp_glo, index_g) !need to add veg dim 
END DO

Upgrade this method to src_parallel/ioipsl_para.f90 with the name restget_p_opp_r3d.

SUBROUTINE restget_p_opp_r3d &
  (fid, vname_q, iim, jjm, llm, itau, def_beha, &
   var, MY_OPERATOR, nbindex, ijndex)
    IMPLICIT NONE
    !-
    INTEGER :: fid
    CHARACTER(LEN=*) :: vname_q
    INTEGER :: iim, jjm, llm, itau
    LOGICAL def_beha
    REAL :: var(:,:,:)
    CHARACTER(LEN=*) :: MY_OPERATOR
    INTEGER :: nbindex, ijndex(nbindex)
    !-----------------------------
    CHARACTER(LEN=5) :: part_str
    CHARACTER(LEN=LEN(vname_q) + LEN(part_str)) :: var_name
    INTEGER :: m

    DO m=1, SIZE(var, 3)
        WRITE(part_str,'(I2)') m
        IF ( m < 10 ) part_str(1:1) = '0'
        var_name = vname_q//part_str(1:LEN_TRIM(part_str))
        CALL restget_p (fid, var_name, iim, jjm, llm, itau, def_beha, &
             var(:,:,m), MY_OPERATOR, nbindex, ijndex)
    END DO

END SUBROUTINE restget_p_opp_r3d

This way restget_p can keep the same scheme for more types of variables.

shum_ngrnd_perma(:,:,:) = val_exp

var_name = 'shum_ngrnd_perma_'
CALL ioconf_setatt_p('UNITS', '-')
CALL ioconf_setatt_p('LONG_NAME','soil humidity')
CALL restget_p (rest_id, var_name, nbp_glo, ngrnd, 1, kjit, TRUE., shum_ngrnd_perma, "gather", nbp_glo, index_g) !need to add veg dim 

Change History (4)

comment:1 Changed 8 years ago by ajornet

comment:2 Changed 7 years ago by ajornet

  • Cc ajornet added

comment:3 Changed 6 years ago by jgipsl

  • Milestone changed from orchidee_1_9_6 to ORCHIDEE 3.0

comment:4 Changed 6 years ago by jgipsl

  • Resolution set to wontfix
  • Status changed from new to closed

IOIPSL will be adapted instead of the method described in this ticket. See IOIPSL ticket here:
https://forge.ipsl.jussieu.fr/igcmg/ticket/110

Note: See TracTickets for help on using tickets.