Changeset 1895 for trunk/LMDZ.TITAN/libf


Ignore:
Timestamp:
Jan 16, 2018, 10:53:17 AM (7 years ago)
Author:
jvatant
Message:

Follow-up of r1894 - fix a missing init in phyetat0
--JVO

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

Legend:

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

    r1894 r1895  
    204204! Get value of the "upper_chemistry_layers" dimension from physics start file
    205205
     206      ! NB : nlaykim_up is recalculated in phyetat0 ... this is redundant for newstart
     207      ! If you want to do it properly put ykim_upS in a specific separate header
     208      ! Anyway it should be safe. -- JVO 18
     209
    206210      ierr = NF_INQ_DIMID(nid1,"upper_chemistry_layers",varid)
    207211      IF (ierr .NE. NF_NOERR) THEN
  • trunk/LMDZ.TITAN/libf/phytitan/chem_settings.F90

    r1894 r1895  
    1919USE comchem_h
    2020
    21 USE iostart, only: get_field, get_var
     21USE iostart, only: get_field, get_var, inquire_dimension_length
     22USE callkeys_mod, only : callchim
    2223
    2324IMPLICIT NONE
     
    4243!======================================================================
    4344
    44   ! 0. Allocates arrays in comchem_h
     45  ! 0. Start by reading how many layers of upper chemistry there are
     46 
     47  nlaykim_up=inquire_dimension_length("upper_chemistry_layers")
     48 
     49  ! 1. Allocates arrays in comchem_h
     50 
    4551  CALL ini_comchem_h(ngrid)
    4652
    47   ! 1. Load upper chemistry pressure grid
     53  ! 2. Load upper chemistry pressure grid
    4854 
    4955  CALL get_var("preskim",preskim,found)
     
    5460               maxval(preskim), minval(preskim)
    5561 
    56   ! 2. Load upper chemistry composition fields
     62  ! 3. Inquire ( and load ) upper chemistry composition fields
    5763 
    5864  CALL get_field("H_up",ykim_up(1,:,:),found,indextime)
    5965  IF (.NOT.found) THEN
     66 
    6067    ! We assume we can't do uncomplete chemistry
    6168    WRITE(*,*) "chem_settings: No upper chemistry fields."
     69   
     70    IF ( callchim ) THEN ! if chemistry we must have the upper fields !
     71      CALL abort_physic(modname,"Failed loading uppper chemistry fields, whereas callchim set to true !",1)
     72    ENDIF
     73   
     74    DEALLOCATE(ykim_up) ! it will be useless
     75   
    6276  ELSE
    6377 
Note: See TracChangeset for help on using the changeset viewer.