Changeset 1887 for trunk/LMDZ.TITAN/libf


Ignore:
Timestamp:
Jan 8, 2018, 11:40:54 PM (7 years ago)
Author:
jvatant
Message:

For more convenience values of upper chemistry
pressure grid "preskim" is stored in the startfi too.
--JVO

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

Legend:

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

    r1886 r1887  
    3535c=======================================================================
    3636
    37       USE comchem_h, ONLY: nlaykim_up
     37      USE comchem_h, ONLY: nlaykim_up, preskim
    3838      USE comsoil_h
    3939!      use control_mod
     
    444444#endif
    445445
     446!---------------------------------------------------------------------
     447! Upper chemistry mid-layer pressure preskim() (known from comchem.h)
     448!---------------------------------------------------------------------
     449      ierr=NF_REDEF (nid) ! Enter NetCDF (re-)define mode
     450      ! define variable
     451#ifdef NC_DOUBLE
     452      ierr=NF_DEF_VAR(nid,"preskim",NF_DOUBLE,1,idim_nlaykim_up,nvarid)
     453#else
     454      ierr=NF_DEF_VAR(nid,"preskim",NF_FLOAT,1,idim_nlaykim_up,nvarid)
     455#endif
     456      ierr=NF_PUT_ATT_TEXT (nid,nvarid,"long_name", 34,
     457     .                        "Upper chemistry mid-layer pressure")
     458      ierr=NF_PUT_ATT_TEXT (nid,nvarid,"units",1,"Pa")
     459      ierr=NF_PUT_ATT_TEXT (nid,nvarid,"positive",2,"up")
     460      ierr=NF_ENDDEF(nid) ! Leave NetCDF define mode
     461      ! write variable
     462#ifdef NC_DOUBLE
     463      ierr=NF_PUT_VAR_DOUBLE (nid,nvarid,preskim)
     464#else
     465      ierr=NF_PUT_VAR_REAL (nid,nvarid,preskim)
     466#endif
     467
    446468c-----------------------------------------------------------------------
    447469c  Ecriture aire et coefficients de passage cov. <-> contra. <--> naturel
  • trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F

    r1886 r1887  
    218218       CALL abort
    219219      ENDIF
     220
     221      ALLOCATE(preskim(nlaykim_up))
    220222     
    221       ! Allocate arrays of nlaykim_up size, only if they're present
     223      ! Allocate other arrays of nlaykim_up size, only if they're present
    222224      ! The test is on HCN but could be on any as we assume we can't do incomplete chemistry
    223225
     
    286288       IF (ierr .NE. NF_NOERR) THEN
    287289          PRINT*, "start2archive: Lecture echoue pour <controle>"
     290          CALL abort
     291       ENDIF
     292
     293! load upper chemistry pressure grid from physics start file
     294
     295      ierr = NF_INQ_VARID (nid1, "preskim", varid)
     296      IF (ierr .NE. NF_NOERR) THEN
     297       PRINT*, "start2archive: Le champ <preskim> est absent"
     298       CALL abort
     299      ENDIF
     300#ifdef NC_DOUBLE
     301       ierr = NF_GET_VAR_DOUBLE(nid1, varid, preskim)
     302#else
     303      ierr = NF_GET_VAR_REAL(nid1, varid, preskim)
     304#endif
     305       IF (ierr .NE. NF_NOERR) THEN
     306          PRINT*, "start2archive: Lecture echoue pour <preskim>"
    288307          CALL abort
    289308       ENDIF
  • trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90

    r1871 r1887  
    1313! NB : For the startfile we use nlaykim_up grid (upper atm) and for outputs we use nlaykim_tot grid (all layers)
    1414
    15    REAL,SAVE,ALLOCATABLE,DIMENSION(:,:) :: zlay_kim  ! Altitude (km) of all chemistry layers
     15   REAL,SAVE,ALLOCATABLE,DIMENSION(:) :: preskim  ! Pressure (Pa) of upper chemistry (mid)-layers
     16!$OMP_THREADPRIVATE(preskim)
     17
     18   REAL,SAVE,ALLOCATABLE,DIMENSION(:,:) :: zlay_kim  ! Altitude (km) of all chemistry (mid)-layers
    1619!$OMP_THREADPRIVATE(zlay_kim)
    1720
Note: See TracChangeset for help on using the changeset viewer.