Ignore:
Timestamp:
May 4, 2009, 5:24:19 PM (16 years ago)
Author:
lguez
Message:

-- Added "NetCDF95" interface in "bibio".
-- NetCDF95 uses the module "typesizes", which is part of NetCDF, so we
exclude dependency on "typesizes" in "bld.cfg".
-- Added "assert_eq" and "assert" procedures, which are in the public
part of Numerical Recipes.
-- Added some interpolation and regridding utilities in "bibio".
-- Added the ability to read an ozone climatology from a NetCDF file.
-- Commented out unused variables and code in "etat0_netcdf".
-- Updated calls to NetCDF in "etat0_netcdf": from Fortran 77
interface to Fortran 90 interface.
-- Removed useless "deallocate" at the end of "etat0_netcdf".
-- Corrected some declarations not conforming to Fortran standard, such
as "integer*4", or obsolescent such as "character*4".
-- Replaced some calls to not-standard function "float" by calls to
"real".
-- On Brodie at IDRIS, the NetCDF library compiled with OpenMP should
be used. Changed path in "arch-SX8_BRODIE.path".
-- Added warning for incompatibility of debugging options and OpenMP
parallelization in "makelmdz_fcm".

File:
1 edited

Legend:

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

    r1150 r1154  
    2828      USE fonte_neige_mod, ONLY  : fonte_neige_get_vars
    2929      USE phys_output_mod
     30      use open_climoz_m, only: open_climoz ! ozone climatology
     31      use regr_pr, only: regr_pr_av
     32      use netcdf95, only: nf95_close
     33      use mod_phys_lmdz_mpi_data, only: is_mpi_root
    3034
    3135      IMPLICIT none
     
    710714      SAVE lmt_pas                ! frequence de mise a jour
    711715c$OMP THREADPRIVATE(lmt_pas)
     716      real zmasse(klon, llm)
     717C     (column-density of mass of air in a cell, in kg m-2)
     718      real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
    712719
    713720cIM sorties
     
    10931100      LOGICAL,SAVE :: first=.true.
    10941101c$OMP THREADPRIVATE(first)
     1102
     1103      logical, save::  read_climoz ! read ozone climatology
     1104      integer, save:: ncid_climoz ! NetCDF file containing ozone climatology
     1105
     1106      real, pointer, save:: press_climoz(:)
     1107!     edges of pressure intervals for ozone climatology, in Pa, in strictly
     1108!     ascending order
     1109
    10951110#include "YOMCST.h"
    10961111#include "YOETHF.h"
     
    11391154
    11401155      torsfc=0.
     1156      forall (k=1: llm) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg
    11411157
    11421158      if (first) then
     
    12341250     .                  iflag_thermals_ed,iflag_thermals_optflux,
    12351251cnv flags pour la convection et les poches froides
    1236      .                   iflag_coupl,iflag_clos,iflag_wake)
     1252     .                   iflag_coupl,iflag_clos,iflag_wake, read_climoz)
    12371253
    12381254      print*,'iflag_coupl,iflag_clos,iflag_wake',
     
    15551571      call iniradia(klon,klev,paprs(1,1:klev+1))
    15561572
     1573C$omp single
     1574      if (read_climoz) then
     1575         call open_climoz(ncid_climoz, press_climoz)
     1576      END IF
     1577C$omp end single
    15571578      ENDIF
    15581579!
     
    17231744c
    17241745      IF (MOD(itap-1,lmt_pas) .EQ. 0) THEN
    1725          if(prt_level.ge.1) WRITE(lunout,*)' PHYS cond  julien ',julien
    1726          CALL ozonecm( FLOAT(julien), rlat, paprs, wo)
     1746C        Once per day, update ozone:
     1747         if (read_climoz) then
     1748C           Ozone climatology from a NetCDF file
     1749            call regr_pr_av(ncid_climoz, "tro3", julien, press_climoz,
     1750     $           paprs, wo)
     1751!           Convert from mole fraction of ozone to column density of ozone in a
     1752!           cell, in kDU:
     1753            wo = wo * 48. / 29. * zmasse / dobson_u / 1e3
     1754C           (By regridding ozone values for LMDZ only once per day, we
     1755C           have already neglected the variation of pressure in one
     1756C           day. So do not recompute "wo" at each time step even if
     1757C           "zmasse" changes a little.)
     1758         else
     1759            CALL ozonecm(real(julien), rlat, paprs, wo)
     1760         end if
    17271761      ENDIF
    17281762c
     
    34963530!         write(97) u_seri,v_seri,t_seri,q_seri
    34973531!         close(97)
     3532C$OMP single
     3533         if (read_climoz) then
     3534            if (is_mpi_root) then
     3535               call nf95_close(ncid_climoz)
     3536            end if
     3537            deallocate(press_climoz) ! pointer
     3538         end if
     3539C$OMP end single nowait
    34983540      ENDIF
    34993541     
Note: See TracChangeset for help on using the changeset viewer.