Changeset 1844 for trunk/LMDZ.TITAN/libf


Ignore:
Timestamp:
Dec 7, 2017, 10:15:41 AM (7 years ago)
Author:
jvatant
Message:

Enable tracers input profiles in 1D
--JVO

Location:
trunk/LMDZ.TITAN/libf/phytitan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/phytitan/dyn1d/rcm1d.F

    r1843 r1844  
    66      use mod_grid_phy_lmdz, only : regular_lonlat
    77      use infotrac, only: nqtot, tname
    8       use tracer_h, only: initracer2
     8      use tracer_h
    99      use surfdat_h, only: albedodat, phisfi,
    1010     &                     zmea, zstd, zsig, zgam, zthe,
     
    122122!     added by JVO
    123123      REAL tankCH4(1)
     124
     125      CHARACTER*20 file_prof
     126      LOGICAL findprof
    124127
    125128!     added by AS to avoid the use of adv trac common
     
    732735! ------------------
    733736      if(tracer) then
    734         call initracer2(nq,tname) ! We need tracers infos in physdem1
    735       endif
     737        call initracer2(nq,tname) ! We need tracers names for physdem1 and also to read profiles
     738       
     739        ! Inquire if we have tracers input profiles
     740       
     741        do iq=1,nq
     742       
     743          file_prof = "profile_"//trim(noms(iq))
     744
     745          INQUIRE(file=trim(file_prof),exist=findprof)
     746       
     747          IF (findprof) THEN
     748            ! Read profile for tracer. First line is surface value.
     749            PRINT *, "Input file found for tracer ", noms(iq)
     750            OPEN(11,file=trim(file_prof),status='old',form='formatted')
     751            PRINT *, "---> reading tracer profile from input file ..."
     752            READ(11,*) qsurf(1)
     753            DO ilayer=1,nlayer
     754              READ (11,*) q(ilayer,iq)
     755            ENDDO
     756          ELSE
     757            PRINT *, "No input profile found for ", trim(noms(iq))
     758            PRINT *, "---> we set it to zero !!"
     759          ENDIF
     760
     761        enddo ! nq loop
     762       
     763      endif ! end if tracer
    736764
    737765c  Write a "startfi" file
  • trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90

    r1843 r1844  
    408408! --------------------------------
    409409      if (firstcall) then
    410         ! initracer:
    411         !   initialize nmicro,
    412         call initracer2(nq,nametrac)
    413 
    414         ! ----------------------------------------------------------------------------
     410
     411        ! Initialisation of nmicro as well as tracers names, indexes ...
     412        if (ngrid.ne.1) then
     413           call initracer2(nq,nametrac) ! Already done in rcm1d
     414        endif
    415415
    416416        ! Allocate saved arrays.
Note: See TracChangeset for help on using the changeset viewer.