Ignore:
Timestamp:
Dec 6, 2022, 12:01:16 AM (2 years ago)
Author:
lguez
Message:

Sync latest trunk changes to Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/dyn3dmem/dynredem_loc.F90

    r4013 r4368  
    99  USE parallel_lmdz
    1010  USE mod_hallo
    11   USE infotrac
     11  USE strings_mod, ONLY: maxlen
     12  USE infotrac, ONLY: nqtot, tracers
    1213  USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL,    &
    1314                    NF90_CLOSE,  NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER,   &
    1415                    NF90_64BIT_OFFSET
    1516  USE dynredem_mod, ONLY: cre_var, put_var, err, modname, fil
    16   USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff, &
    17                          nivsig,nivsigs
     17  USE comvert_mod,  ONLY: ap, bp, presnivs, pa, preff, nivsig, nivsigs,&
     18                          aps,bps,pseudoalt
    1819  USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad
    1920  USE logic_mod, ONLY: fxyhypb, ysinus
     
    3637!===============================================================================
    3738! Local variables:
    38   INTEGER :: iq, l
     39  INTEGER :: iq
    3940  INTEGER, PARAMETER :: length=100
    4041  REAL    :: tab_cntrl(length)                     !--- RUN PARAMETERS TABLE
    4142  REAL    :: phis_glo(ip1jmp1)
    4243!   For NetCDF:
    43   CHARACTER(LEN=30) :: unites
     44  CHARACTER(LEN=maxlen) :: unites
    4445  INTEGER :: indexID
    4546  INTEGER :: rlonuID, rlonvID, rlatuID, rlatvID
    46   INTEGER :: sID, sigID, nID, vID, timID
     47  INTEGER :: sID, sigID, nID, timID
    4748  INTEGER :: yyears0, jjour0, mmois0
    48   REAL    :: zan0, zjulian, hours
     49  REAL    :: zjulian, hours
    4950!===============================================================================
    5051  modname='dynredem0'; fil=fichnom
     
    144145
    145146!--- Define fields saved later
    146   WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')"),&
     147  WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')") &
    147148               yyears0,mmois0,jjour0
    148149  CALL cre_var(nid,"temps","Temps de simulation",[timID],unites)
     
    151152  CALL cre_var(nid,"teta" ,"Temperature",[rlonvID,rlatuID,sID,timID])
    152153  DO iq=1,nqtot
    153     CALL cre_var(nid,tname(iq),ttext(iq),[rlonvID,rlatuID,sID,timID])
     154    CALL cre_var(nid,tracers(iq)%name,tracers(iq)%longName,[rlonvID,rlatuID,sID,timID])
    154155  END DO
    155156  CALL cre_var(nid,"masse","Masse d air"    ,[rlonvID,rlatuID,sID,timID])
     
    174175  USE parallel_lmdz
    175176  USE mod_hallo
    176   USE infotrac
     177  USE strings_mod, ONLY: maxlen
     178  USE infotrac, ONLY: nqtot, tracers, types_trac
    177179  USE control_mod
    178180  USE netcdf,   ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_GET_VAR, NF90_INQ_VARID,  &
     
    200202!===============================================================================
    201203! Local variables:
    202   INTEGER :: l, iq, nid, vID, ierr, nid_trac, vID_trac
     204  INTEGER :: iq, nid, vID, ierr, nid_trac, vID_trac
    203205  INTEGER, SAVE :: nb=0
    204206  INTEGER, PARAMETER :: length=100
    205207  REAL               :: tab_cntrl(length) ! tableau des parametres du run
    206   CHARACTER(LEN=256) :: var, dum
     208  CHARACTER(LEN=maxlen) :: var, dum
    207209  LOGICAL            :: lread_inca
    208210!===============================================================================
     
    211213  IF(mpi_rank==0) THEN !++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    212214  modname='dynredem1_loc'; fil=fichnom
    213   fil=fichnom
    214215  CALL err(NF90_OPEN(fil,NF90_WRITE,nid),"open",fil)
    215216
     
    242243!$OMP MASTER
    243244  fil="start_trac.nc"
    244   IF(type_trac=='inca' .OR. type_trac=='inco') INQUIRE(FILE=fil,EXIST=lread_inca)
     245  IF(ANY(types_trac=='inca') .OR. ANY(types_trac=='inco')) INQUIRE(FILE=fil,EXIST=lread_inca)
    245246  IF(lread_inca) CALL err(NF90_OPEN(fil,NF90_NOWRITE,nid_trac),"open")
    246247!$OMP END MASTER
     
    248249
    249250!--- Save tracers
    250   DO iq=1,nqtot; var=tname(iq); ierr=-1
     251  DO iq=1,nqtot; var=TRIM(tracers(iq)%name); ierr=-1
    251252    IF(lread_inca) THEN                  !--- Possibly read from "start_trac.nc"
    252253!$OMP MASTER     
Note: See TracChangeset for help on using the changeset viewer.