Ignore:
Timestamp:
Apr 7, 2009, 6:41:02 PM (15 years ago)
Author:
jghattas
Message:

Recuperation des developpements fait uniquement sur la branche LMDZ4_V4_patches :

  • ajoute de la nouvelle flag ok_dynzon
  • ajoute du parametre aer_type
  • optimisation : isccp_cloud_types.F

+ bug pour le slab dans conf_phys.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/readsulfate.F

    r1116 r1143  
    3636#include "chem.h"     
    3737#include "dimensions.h"     
    38 cym#include "dimphy.h"     
    3938#include "temps.h"     
     39#include "clesphys.h"
     40#include "iniprint.h"
    4041c
    4142c Input:
     
    8485
    8586      if (is_mpi_root) then
     87
     88        IF (aer_type /= 'actuel  ' .AND. aer_type /= 'preind  ' .AND.   &
     89     &      aer_type /= 'scenario') THEN
     90          WRITE(lunout,*)' *** Warning ***'
     91          WRITE(lunout,*)'Option aer_type pour les aerosols = ',        &
     92     &        aer_type
     93          WRITE(lunout,*)'Cas non prevu, force a preind'
     94          aer_type = 'preind  '
     95        ENDIF
    8696           
    8797      iday = INT(r_day)
     
    118128
    119129
    120       IF (iyr .lt. 1850) THEN
    121          cyear='.nat'
    122          WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
    123          CALL getso4fromfile(cyear, so4_1)
    124       ELSE IF (iyr .ge. 2100) THEN
    125          cyear='2100'
    126          WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
    127          CALL getso4fromfile(cyear, so4_1)
     130
     131      IF (aer_type == 'actuel  ') then
     132        cyear='1980'
     133        CALL getso4fromfile(cyear, so4_1)
     134      ELSE IF (aer_type == 'preind  ') THEN
     135        cyear='.nat'
     136        CALL getso4fromfile(cyear, so4_1)
    128137      ELSE
     138        IF (iyr .lt. 1850) THEN
     139           cyear='.nat'
     140           WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
     141           CALL getso4fromfile(cyear, so4_1)
     142        ELSE IF (iyr .ge. 2100) THEN
     143           cyear='2100'
     144           WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
     145           CALL getso4fromfile(cyear, so4_1)
     146        ELSE
    129147
    130148        ! Read in data:
    131       ! a) from actual 10-yr-period
    132 
    133       IF (iyr.LT.1900) THEN
    134          iyr1 = 1850
    135          iyr2 = 1900
    136       ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN
    137          iyr1 = 1900
    138          iyr2 = 1920
    139       ELSE
    140          iyr1 = INT(iyr/10)*10
    141          iyr2 = INT(1+iyr/10)*10
    142       ENDIF
    143       WRITE(cyear,'(I4)') iyr1
    144       WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
    145       CALL getso4fromfile(cyear, so4_1)
     149        ! a) from actual 10-yr-period
     150
     151          IF (iyr.LT.1900) THEN
     152             iyr1 = 1850
     153             iyr2 = 1900
     154          ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN
     155             iyr1 = 1900
     156             iyr2 = 1920
     157          ELSE
     158             iyr1 = INT(iyr/10)*10
     159             iyr2 = INT(1+iyr/10)*10
     160          ENDIF
     161          WRITE(cyear,'(I4)') iyr1
     162        ENDIF
     163        WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
     164        CALL getso4fromfile(cyear, so4_1)
    146165
    147166     
    148167      ! If to read two decades:
    149       IF (.NOT.lonlyone) THEN
     168        IF (.NOT.lonlyone) THEN
    150169         
    151170      ! b) from the next following one
    152       WRITE(cyear,'(I4)') iyr2
    153       WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
    154       CALL getso4fromfile(cyear, so4_2)
    155 
     171          WRITE(cyear,'(I4)') iyr2
     172          WRITE(*,*) 'getso4  iyr=', iyr,'   ',cyear
     173          CALL getso4fromfile(cyear, so4_2)
     174
     175 
    156176      ! Interpolate linarily to the actual year:
    157       DO it=1,12
    158          DO k=1,klev
    159             DO j=1,jjm
    160                DO i=1,iim
    161                   so4_1(i,j,k,it)=so4_1(i,j,k,it)
     177        DO it=1,12
     178           DO k=1,klev
     179              DO j=1,jjm
     180                 DO i=1,iim
     181                    so4_1(i,j,k,it)=so4_1(i,j,k,it)
    162182     .                 - FLOAT(iyr-iyr1)/FLOAT(iyr2-iyr1)
    163183     .                 * (so4_1(i,j,k,it) - so4_2(i,j,k,it))
    164                ENDDO
    165             ENDDO
    166          ENDDO
    167       ENDDO                           
    168      
    169       ENDIF !lonlyone
    170       ENDIF !(iyr .lt. 1850)
    171  
     184                 ENDDO
     185              ENDDO
     186           ENDDO
     187        ENDDO                           
     188
     189
     190        ENDIF !lonlyone   
     191      ENDIF !aer_type
    172192     
    173193      ! Transform the horizontal 2D-field into the physics-field
     
    537557
    538558      SUBROUTINE getso4fromfile (cyr, so4)
    539       use dimphy
     559      USE dimphy
    540560#include "netcdf.inc"
    541561#include "dimensions.h"     
    542 cccc#include "dimphy.h"
    543562      CHARACTER*15 fname
    544563      CHARACTER*4 cyr
Note: See TracChangeset for help on using the changeset viewer.