Changeset 4638


Ignore:
Timestamp:
Jul 21, 2023, 10:42:49 AM (10 months ago)
Author:
acozic
Message:

Add a fix to homogenize type_trac between lmdz and dynamico
LMDZ had lost the backward compatibility of type_trac in list form. This commit makes it possible again

Location:
LMDZ6/trunk/libf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r4523 r4638  
    162162   TYPE(trac_type), POINTER             :: t1, t(:)
    163163   INTEGER :: ierr
     164   CHARACTER(LEN=maxlen),   ALLOCATABLE :: types_trac(:)  !--- Keyword for tracers type(s), parsed version
    164165
    165166   CHARACTER(LEN=*), PARAMETER :: modname="init_infotrac"
     
    175176   CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname)
    176177
     178   lerr=strParse(type_trac, '|', types_trac, n=nt)
     179   IF (nt .GT. 1) THEN
     180      IF (nt .GT. 2) CALL abort_gcm(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
     181      if (nt .EQ. 2) type_trac=types_trac(2)
     182   ENDIF
     183
     184
     185   
    177186   !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION
    178187   msg1 = 'For type_trac = "'//TRIM(type_trac)//'":'
  • LMDZ6/trunk/libf/phylmd/infotrac_phy.F90

    r4636 r4638  
    188188   TYPE(trac_type), POINTER             :: t1, t(:)
    189189   INTEGER :: ierr
    190 
     190   CHARACTER(LEN=maxlen),   ALLOCATABLE :: types_trac(:)  !--- Keyword for tracers type(s), parsed version
     191   
    191192   CHARACTER(LEN=*), PARAMETER :: modname="init_infotrac_phy"
    192193!------------------------------------------------------------------------------------------------------------------------------
     
    200201
    201202   CALL getin_p('type_trac',type_trac)
     203
     204   lerr=strParse(type_trac, '|', types_trac, n=nt)
     205   IF (nt .GT. 1) THEN
     206      IF (nt .GT. 2) CALL abort_physic(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
     207      IF (nt .EQ. 2) type_trac=types_trac(2)
     208   ENDIF
     209
     210   
    202211   CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname)
    203212   lInit = .NOT.ALLOCATED(tracers)
Note: See TracChangeset for help on using the changeset viewer.