Ignore:
Timestamp:
Nov 10, 2012, 4:55:04 PM (13 years ago)
Author:
aslmd
Message:

LMDZ.GENERIC. Corrected problems with allocated arrays in start2archive and newstart. Applied a workaround to make those work without tracers (-cpp NOTRAC -- perhaps there is a better solution). Checked that everything works in debug mode.

Location:
trunk/LMDZ.GENERIC/libf/dyn3d
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/dyn3d/iniadvtrac.F

    r253 r837  
    2020      INTEGER :: iq
    2121      INTEGER :: ierr
     22
     23#ifdef NOTRAC
    2224
    2325! Look for file traceur.def
     
    137139c
    138140
     141#endif
    139142
    140143      end
  • trunk/LMDZ.GENERIC/libf/dyn3d/lect_start_archive.F

    r787 r837  
    12561256c     write(49,*) 'ucov',vcov
    12571257
     1258      if (nqmx .gt. 0) then
    12581259c traceurs surface
    12591260      do iq = 1, nqmx
     
    13171318! no need to transfer "co2ice" any more; it is in qsurf(igcm_co2_ice)
    13181319
     1320      endif !! if nqmx .ne. 0
     1321
    13191322c-----------------------------------------------------------------------
    13201323c   Initialisation  h:  (passage de t -> h)
  • trunk/LMDZ.GENERIC/libf/dyn3d/newstart.F

    r787 r837  
    250250      call initracer(ngridmx,nqmx,tnom)
    251251
     252! Take care of arrays in common modules
     253      ! ALLOCATE ARRAYS in surfdat_h (if not already done, e.g. when using start_archive)
     254      IF (.not. ALLOCATED(albedodat)) ALLOCATE(albedodat(ngridmx))
     255      IF (.not. ALLOCATED(phisfi)) ALLOCATE(phisfi(ngridmx))
     256      IF (.not. ALLOCATED(zmea)) ALLOCATE(zmea(ngridmx))
     257      IF (.not. ALLOCATED(zstd)) ALLOCATE(zstd(ngridmx))
     258      IF (.not. ALLOCATED(zsig)) ALLOCATE(zsig(ngridmx))
     259      IF (.not. ALLOCATED(zgam)) ALLOCATE(zgam(ngridmx))
     260      IF (.not. ALLOCATED(zthe)) ALLOCATE(zthe(ngridmx))
     261      ! ALLOCATE ARRAYS in comsoil_h (if not already done)
     262      IF (.not.ALLOCATED(layer))
     263     . ALLOCATE(layer(nsoilmx))
     264      IF (.not.ALLOCATED(mlayer))
     265     . ALLOCATE(mlayer(0:nsoilmx-1))
     266      IF (.not.ALLOCATED(inertiedat))
     267     . ALLOCATE(inertiedat(ngridmx,nsoilmx))
     268      ! ALLOCATE ARRAYS IN comgeomfi_h (done in inifis usually)
     269      IF (.not. ALLOCATED(lati)) ALLOCATE(lati(ngridmx))
     270      IF (.not. ALLOCATED(long)) ALLOCATE(long(ngridmx))
     271      IF (.not. ALLOCATED(area)) ALLOCATE(area(ngridmx))
     272      cursor = 1 ! added by AS in dimphys. 1 for sequential runs.
    252273
    253274c-----------------------------------------------------------------------
     
    299320        CALL dynetat0(fichnom,nqmx,vcov,ucov,teta,q,masse,
    300321     .       ps,phis,time)
    301 
    302 
    303         ! ALLOCATE ARRAYS IN comgeomfi_h (done in inifis usually)
    304         IF (.not. ALLOCATED(lati)) ALLOCATE(lati(ngridmx))
    305         IF (.not. ALLOCATED(long)) ALLOCATE(long(ngridmx))
    306         IF (.not. ALLOCATED(area)) ALLOCATE(area(ngridmx))
    307         cursor = 1 ! added by AS in dimphys. 1 for sequential runs.
    308322
    309323        write(*,*) 'Reading file STARTFI'
  • trunk/LMDZ.GENERIC/libf/dyn3d/start2archive.F

    r787 r837  
    2020
    2121      USE comsoil_h
     22      USE comgeomfi_h
    2223
    2324      implicit none
     
    123124
    124125      grireg   = .TRUE.
     126      cursor = 1 ! added by AS in dimphys.
     127
     128      ! ALLOCATE ARRAYS IN comgeomfi_h (usually done in inifis)
     129      ! this must be here for start2archive to work
     130      IF (.not. ALLOCATED(lati)) ALLOCATE(lati(ngridmx))
     131      IF (.not. ALLOCATED(long)) ALLOCATE(long(ngridmx))
     132      IF (.not. ALLOCATED(area)) ALLOCATE(area(ngridmx))
    125133
    126134c=======================================================================
Note: See TracChangeset for help on using the changeset viewer.