Ignore:
Timestamp:
Jul 11, 2021, 11:39:01 PM (3 years ago)
Author:
dcugnet
Message:

In readTracFiles: the separator between the tracer name and its phase is no longer hardcoded and equal to "-",
but is a parameter ("phases_sep") which default value is "_".
Few more fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ-tracers/libf/phylmd/phyetat0.F90

    r3891 r3957  
    575575USE dimphy, only: klon
    576576USE print_control_mod, ONLY: lunout
    577 
     577USE readTracFiles_mod, ONLY: known_phases, old_phases, nphases, phases_sep
     578USE strings_mod,       ONLY: strIdx
    578579IMPLICIT NONE
    579580
     
    588589! Local variables
    589590LOGICAL found
     591INTEGER :: ix, ip
     592CHARACTER(LEN=256) :: oldname
    590593
    591594   CALL get_field(name, field, found)
     595   ix = strIdx([('trs_H2O'//phases_sep//known_phases(ip:ip), ip=1, nphases)], name)
     596   IF (.NOT. found .AND. ix /= 0) THEN           !--- Old file, water: H2Ov/l/i instead of H2O_g/_l/_s
     597      oldname = 'trs_H2O'//old_phases(ix:ix)
     598      CALL get_field(oldname, field, found)
     599   END IF
    592600   IF (.NOT. found) THEN
    593601     WRITE(lunout,*) "phyetat0: Le champ <",TRIM(name),"> est absent"
    594602     WRITE(lunout,*) "Depart legerement fausse. Mais je continue"
    595603     field(:,:)=default
     604   ELSE IF(ix /= 0) THEN
     605     WRITE(lunout,*)"phyetat0: Le champ <",TRIM(name),"> est absent => initialisation a <"//TRIM(oldname)//">"
    596606   ENDIF
    597607   WRITE(lunout,*) TRIM(name), descr, MINval(field),MAXval(field)
Note: See TracChangeset for help on using the changeset viewer.