Ignore:
Timestamp:
Dec 15, 2021, 11:18:49 PM (3 years ago)
Author:
dcugnet
Message:

First commit for new tracers.

  • parser routines readTracFiles, strings_mod and tracer_types added in misc using revision 4 of https://svn.lmd.jussieu.fr/tracers-parser
  • tested in sequential and parallel mode using ioipsl.
  • for now, only two fields of "tracers(:)" derived type vector are used: "name" and "longName".
Location:
LMDZ6/trunk/libf/dyn3d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d/dynetat0.f90

    r2859 r4046  
    1010                         NF90_CLOSE, NF90_GET_VAR
    1111  USE control_mod, ONLY: planet_type
     12  USE strings_mod, ONLY: maxlen
    1213  USE assert_eq_m, ONLY: assert_eq
    1314  USE comvert_mod, ONLY: pa,preff
     
    3637!===============================================================================
    3738! Local variables:
    38   CHARACTER(LEN=256) :: msg, var, modname
     39  CHARACTER(LEN=maxlen) :: msg, var, modname
    3940  INTEGER, PARAMETER :: length=100
    4041  INTEGER :: iq, fID, vID, idecal!, iml, jml, lml, nqt
     
    126127!--- Tracers
    127128  DO iq=1,nqtot
    128     var=tname(iq)
     129    var=TRIM(tracers(iq)%name)
    129130    IF(NF90_INQ_VARID(fID,var,vID)==NF90_NoErr) THEN
    130131      CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",var); CYCLE
     
    153154  INTEGER,          INTENT(IN) :: n1, n2
    154155  CHARACTER(LEN=*), INTENT(IN) :: str1, str2
    155   CHARACTER(LEN=100) :: s1, s2
     156  CHARACTER(LEN=maxlen) :: s1, s2
    156157  IF(n1/=n2) THEN
    157158    s1='value of '//TRIM(str1)//' ='
  • LMDZ6/trunk/libf/dyn3d/dynredem.F90

    r3865 r4046  
    1212                    NF90_64BIT_OFFSET
    1313  USE dynredem_mod, ONLY: cre_var, put_var1, put_var2, err, modname, fil
     14  USE strings_mod, ONLY: maxlen
    1415  USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff, &
    1516                              nivsig,nivsigs
     
    3839  REAL    :: tab_cntrl(length)                     !--- RUN PARAMETERS TABLE
    3940!   For NetCDF:
    40   CHARACTER(LEN=30) :: unites
     41  CHARACTER(LEN=maxlen) :: unites
    4142  INTEGER :: indexID
    4243  INTEGER :: rlonuID, rlonvID, rlatuID, rlatvID
     
    145146  CALL cre_var(nid,"teta" ,"Temperature",[rlonvID,rlatuID,sID,timID])
    146147  DO iq=1,nqtot
    147     CALL cre_var(nid,tname(iq),ttext(iq),[rlonvID,rlatuID,sID,timID])
     148    CALL cre_var(nid,tracers(iq)%name,tracers(iq)%longName,[rlonvID,rlatuID,sID,timID])
    148149  END DO
    149150  CALL cre_var(nid,"masse","Masse d air"    ,[rlonvID,rlatuID,sID,timID])
     
    196197  INTEGER, PARAMETER :: length=100
    197198  REAL               :: tab_cntrl(length) ! tableau des parametres du run
    198   CHARACTER(LEN=256) :: var, dum
     199  CHARACTER(LEN=maxlen) :: var, dum
    199200  LOGICAL            :: lread_inca
    200201!===============================================================================
     
    231232
    232233!--- Save tracers
    233   DO iq=1,nqtot; var=tname(iq); ierr=-1
     234  DO iq=1,nqtot; var=TRIM(tracers(iq)%name); ierr=-1
    234235    IF(lread_inca) THEN                  !--- Possibly read from "start_trac.nc"
    235236      fil="start_trac.nc"
Note: See TracChangeset for help on using the changeset viewer.