Ignore:
Timestamp:
Jan 7, 2018, 5:35:22 PM (7 years ago)
Author:
jvatant
Message:

Some adjustments to r1871 on start_archive managment of chemistry dimension.
--JVO

Location:
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/ini_archive.F

    r1647 r1886  
    3535c=======================================================================
    3636
     37      USE comchem_h, ONLY: nlaykim_up
    3738      USE comsoil_h
    3839!      use control_mod
     
    8081      INTEGER idim_tim
    8182      INTEGER idim_nsoilmx ! "subsurface_layers" dimension ID #
     83      INTEGER idim_nlaykim_up ! "upper_chemistry_layers" dimension ID #
    8284      INTEGER nid,nvarid
    8385      real sig_s(llm),s(llm)
     
    162164      ierr = NF_DEF_DIM (nid, "altitude", llm, idim_llm)
    163165      ierr = NF_DEF_DIM (nid,"subsurface_layers",nsoilmx,idim_nsoilmx)
     166      ierr = NF_DEF_DIM (nid,"upper_chemistry_layers",
     167     .                        nlaykim_up,idim_nlaykim_up)
    164168
    165169      ierr = NF_DEF_DIM (nid,"index", length, idim_index)
  • trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F

    r1871 r1886  
    111111      INTEGER Lmodif
    112112
    113       LOGICAL nokim
     113      LOGICAL kim
    114114
    115115      REAL ptotal
     
    226226        PRINT*, "start2archive: Missing field(s) for upper chemistry ...
    227227     . I presume they're all absent !"
    228         nokim=.TRUE.
     228        kim=.FALSE.
    229229      ELSE
    230230        PRINT*,"start2archive: I found a field for upper chemistry ...
     
    232232        ! Allocates upper chemistry fields in comchem_h on physical and scalar grid
    233233        CALL allokim_start2archive(ngridmx,ip1jmp1)
     234        kim=.TRUE.
    234235      ENDIF
    235236
     
    366367      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tankCH4,tankCH4S)
    367368
    368       IF (nokim .eqv. .FALSE.) THEN ! NB : fields are in comchem_h
     369      IF (kim) THEN ! NB : fields are in comchem_h
    369370         call gr_fi_dyn(nlaykim_up,ngridmx,iip1,jjp1,H,H_S)
    370371         call gr_fi_dyn(nlaykim_up,ngridmx,iip1,jjp1,H2,H2_S)
     
    560561c-----------------------------------------------------------------
    561562
    562       IF (nokim .eqv. .FALSE.) THEN
     563      IF (kim) THEN
    563564         call write_archive(nid,ntime,'H_up',
    564565     .              'H in upper atmosphere','kg/kg',4,H_S)
  • trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/write_archive.F

    r1871 r1886  
    175175          ierr=NF_INQ_DIMID(nid,"upper_chemistry_layers",id(3))
    176176          if (ierr.ne.NF_NOERR) then
    177            write(*,*)"write_archive: dimension
    178      &                <upper_chemistry_layers> is missing !!!"
     177           write(*,*)"write_archive: dimension",
     178     &               " <upper_chemistry_layers> is missing !!!"
    179179           call abort
    180180          endif
Note: See TracChangeset for help on using the changeset viewer.