Ignore:
Timestamp:
Feb 9, 2011, 4:21:55 PM (13 years ago)
Author:
jghattas
Message:
  • Added option aer_type=mix1 and mix2

mix1: as aer_type=scenario for SO4 and aer_type=annuel for the other aerosols.
mix2: as aer_type=scenario for SO4 and aer_type=preind for the other aerosols.
For these 2 options 2 files are read : so4.runxxxx.nc for SO4 and aerosolsxxxx.nc the other aerosols.

  • Bug fix for using old sulfate data(files AR4 from O Boucher) : moved test for number of time steps read from file but not available in old file format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4_AR5/libf/phylmd/readaerosol_interp.F90

    r1337 r1483  
    9292  LOGICAL,SAVE       :: debug=.FALSE.! Debugging in this subroutine
    9393!$OMP THREADPRIVATE(vert_interp, debug)
     94  CHARACTER(len=8)      :: type
     95  CHARACTER(len=8)      :: filename
    9496
    9597
     
    173175     ! Reading values corresponding to the closest year taking into count the choice of aer_type.
    174176     ! For aer_type=scenario interpolation between 2 data sets is done in readaerosol.
    175      CALL readaerosol(name_aero(id_aero), aer_type, iyr, klev_src, pt_ap, pt_b, pt_tmp, &
     177     ! If aer_type=mix1, the run type and file name depends on the aerosol.
     178     IF (aer_type=='preind' .OR. aer_type=='actuel' .OR. aer_type=='annuel' .OR. aer_type=='scenario') THEN
     179        ! Standard case
     180        filename='aerosols'
     181        type=aer_type
     182     ELSE IF (aer_type == 'mix1') THEN
     183        ! Special case using a mix of decenal sulfate file and annual aerosols(all aerosols except sulfate)
     184        IF (name_aero(id_aero) == 'SO4') THEN
     185           filename='so4.run '
     186           type='scenario'
     187        ELSE
     188           filename='aerosols'
     189           type='annuel'
     190        END IF
     191     ELSE  IF (aer_type == 'mix2') THEN
     192        ! Special case using a mix of decenal sulfate file and natrual aerosols
     193        IF (name_aero(id_aero) == 'SO4') THEN
     194           filename='so4.run '
     195           type='scenario'
     196        ELSE
     197           filename='aerosols'
     198           type='preind'
     199        END IF
     200     ELSE
     201        CALL abort_gcm('readaerosol_interp', 'this aer_type not supported',1)
     202     END IF
     203
     204     CALL readaerosol(name_aero(id_aero), type, filename, iyr, klev_src, pt_ap, pt_b, pt_tmp, &
    176205          psurf_year(:,:,id_aero), load_year(:,:,id_aero))
    177206     IF (.NOT. ALLOCATED(var_year)) THEN
     
    182211
    183212     ! Reading values corresponding to the preindustrial concentrations.
    184      CALL readaerosol(name_aero(id_aero), 'preind', iyr, pi_klev_src, pt_ap, pt_b, pt_tmp, &
     213     type='preind'
     214     CALL readaerosol(name_aero(id_aero), type, filename, iyr, pi_klev_src, pt_ap, pt_b, pt_tmp, &
    185215          pi_psurf_year(:,:,id_aero), pi_load_year(:,:,id_aero))
    186216
Note: See TracChangeset for help on using the changeset viewer.