Ignore:
Timestamp:
Nov 17, 2009, 2:00:14 PM (15 years ago)
Author:
lguez
Message:

1) Reactivated ability to read ozone (that was deactivated because of
dependency on version of IOIPSL). Added ability to read a pressure
coordinate in Pa in "regr_lat_time_climoz".

2) Added the ability to read a second ozone climatology, corresponding to
daylight ozone:

-- "read_climoz" is now an integer variable, instead of a logical
variable.

-- Added argument "read_climoz" to "phys_state_var_init",
"phys_output_open" and "regr_lat_time_climoz".

-- Created new variable "ozone_daylight" for "hist*.nc" output files.

-- Added a third dimension to variable "wo" in module
"phys_state_var_mod" and variable "POZON" in "radlwsw": index 1 for
average day-night ozone, index 2 for daylight ozone.

-- Added a fourth dimension to variables "o3_in", "o3_regr_lat" and
"o3_out" in "regr_lat_time_climoz": index 1 for average day-night
ozone, index 2 for daylight ozone.

-- In "physiq", moved call to "conf_phys" before call to
"phys_state_var_init". Thus, "conf_phys" is now inside the block "if
(first)" instead of "IF (debut)". There were definitions of "bl95_b0"
and "bl95_b1" that were useless because the variables were overwritten
by "conf_phys". Removed those definitions.

-- In "radlwsw", we pass the average day-night ozone to "LW_LMDAR4"
and the daylight ozone, if we have it, to "SW_LMDAR4" or
"SW_AEROAR4". If we do not have a specific field for daylight ozone
then "SW_LMDAR4" or "SW_AEROAR4" just get the average day-night ozone.

-- "regr_lat_time_climoz" now manages latitudes where the input ozone
field is missing at all levels (polar night).

-- Encapsulated "radlwsw" in a module.

3) Modifications to make sequential and parallel versions of
"create_etat0_limit" almost identical:

-- In "dyn3dpar/create_etat0_limit.F". No need to call
"phys_state_var_init", removed "use phys_state_var_mod" statement. No
need for "clesphys.h", removed "include" statement.

-- In "dyn3dpar/etat0_netcdf.F". Added argument "tau_ratqs" in call to
"conf_phys" (this bug was already corrected in "dyn3d"). Moved call to
"inifilr" after call to "infotrac_init" (as in "dyn3d").

4) Other peripheral modifications:

-- Added procedures "nf95_get_att" and "nf95_def_var_scalar" in
NetCDF95 interface. Overloaded "nf95_put_var" with three more
procedures: "nf95_put_var_FourByteReal", "nf95_put_var_FourByteInt",
"nf95_put_var_1D_FourByteInt".

-- Overloaded "regr1_step_av" with one more procedure:
"regr14_step_av". Overloaded "regr3_lint" with one more procedure:
"regr34_lint".

-- Corrected call to "Init_Phys_lmdz" in "dyn3d/create_etat0_limit.F":
the last argument should be an array, not a scalar.

-- Encapsulated "conf_phys" in a module.

-- Splitted module "regr_pr" into "regr_pr_av_m" and "regr_pr_int_m".

5) Tests:

This revision was compared to revision 1259, with optimization options
"debug" and "dev", parallelization options "none", "mpi", "omp" and
"mpi_omp", 1 and 2 MPI processes, 1 and 2 OpenMP threads, with the
compiler "FORTRAN90/SX Version 2.0 for SX-8". Both programs
"create_etat0_limit" and "gcm" were tested. In all cases,
parallelization does not change the results. With "read_climoz = 0" in
the ".def" files, the results of revision 1259 and of this revision
are the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/radlwsw.F90

    r1246 r1263  
     1module radlwsw_m
     2
     3  IMPLICIT NONE
     4
     5contains
     6
    17SUBROUTINE radlwsw( &
    28   dist, rmu0, fract, &
     
    2430
    2531  USE DIMPHY
    26 
    27   IMPLICIT NONE
     32  use assert_m, only: assert
     33
    2834  !======================================================================
    2935  ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719
     
    103109  REAL,    INTENT(in)  :: t(KLON,KLEV), q(KLON,KLEV)
    104110
    105   REAL, INTENT(in)::wo(KLON,KLEV)
     111  REAL, INTENT(in):: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2)
    106112  ! column-density of ozone in a layer, in kilo-Dobsons
     113  ! "wo(:, :, 1)" is for the average day-night field,
     114  ! "wo(:, :, 2)" is for daylight time.
    107115
    108116  LOGICAL, INTENT(in)  :: ok_ade, ok_aie                                 ! switches whether to use aerosol direct (indirect) effects or not
     
    157165  REAL(KIND=8) PTAVE(kdlon,kflev)
    158166  REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev)
    159   real(kind=8) POZON(kdlon,kflev) ! mass fraction of ozone
     167
     168  real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone
     169  ! "POZON(:, :, 1)" is for the average day-night field,
     170  ! "POZON(:, :, 2)" is for daylight time.
     171
    160172  REAL(KIND=8) PAER(kdlon,kflev,5)
    161173  REAL(KIND=8) PCLDLD(kdlon,kflev)
     
    187199  real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
    188200
     201  call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo")
    189202  ! initialisation
    190203  tauaero(:,:,:,:)=0.
     
    245258        PWV(i,k) = MAX (q(iof+i,k), 1.0e-12)
    246259        PQS(i,k) = PWV(i,k)
    247         POZON(i,k) = wo(iof+i, k) * RG * dobson_u * 1e3 &
     260        POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 &
    248261             / (paprs(iof+i, k) - paprs(iof+i, k+1))
    249262        PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k)
     
    298311    IF (iflag_rrtm == 0) THEN
    299312       ! Old radiation scheme, used for AR4 runs
     313       ! average day-night ozone for longwave
    300314       CALL LW_LMDAR4(&
    301315            PPMB, PDP,&
    302316            PPSOL,PDT0,PEMIS,&
    303             PTL, PTAVE, PWV, POZON, PAER,&
     317            PTL, PTAVE, PWV, POZON(:, :, 1), PAER,&
    304318            PCLDLD,PCLDLU,&
    305319            PVIEW,&
     
    309323            ZFLUP, ZFLDN, ZFLUP0,ZFLDN0)
    310324
    311 
     325       ! daylight ozone, if we have it, for short wave
    312326       IF (.NOT. new_aod) THEN
    313327          ! use old version
     
    315329               PPMB, PDP, &
    316330               PPSOL, PALBD, PALBP,&
    317                PTAVE, PWV, PQS, POZON, PAER,&
     331               PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,&
    318332               PCLDSW, PTAU, POMEGA, PCG,&
    319333               zheat, zheat0,&
     
    330344               PPMB, PDP,&
    331345               PPSOL, PALBD, PALBP,&
    332                PTAVE, PWV, PQS, POZON, PAER,&
     346               PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,&
    333347               PCLDSW, PTAU, POMEGA, PCG,&
    334348               zheat, zheat0,&
     
    438452 ENDDO ! j = 1, nb_gr
    439453
    440 
    441454END SUBROUTINE radlwsw
    442455
    443 
     456end module radlwsw_m
Note: See TracChangeset for help on using the changeset viewer.