Changeset 1154


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".

Location:
LMDZ4/branches/LMDZ4-dev
Files:
16 added
11 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.path

    r826 r1154  
    1 set NETCDF_LIBDIR=/SXlocal/pub/netCDF/netCDF-3.6.1/lib
    2 set NETCDF_INCDIR=/SXlocal/pub/netCDF/netCDF-3.6.1/include
     1set NETCDF_LIBDIR=/SXlocal/pub/netCDF/3.6.1-openmp/lib
     2set NETCDF_INCDIR=/SXlocal/pub/netCDF/3.6.1-openmp/include
    33set IOIPSL_INCDIR=$LMDGCM/../../lib
    44set IOIPSL_LIBDIR=$LMDGCM/../../lib
     
    99set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
    1010set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
    11 
  • LMDZ4/branches/LMDZ4-dev/bld.cfg

    r1019 r1154  
    6767bld::excl_dep        inc::netcdf.inc
    6868bld::excl_dep        use::netcdf
     69bld::excl_dep        use::typesizes
    6970bld::excl_dep        h::netcdf.inc
    7071bld::excl_dep        h::mpif.h
     
    7778bld::excl_dep        use::mod_prism_put_proto
    7879bld::excl_dep        use::mkl_dfti
     80
    7981# Don't generate interface files
    8082bld::tool::geninterface none
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3d/etat0_netcdf.F

    r1151 r1154  
    1414      USE phys_state_var_mod
    1515      USE filtreg_mod
     16      use regr_lat_time_climoz_m, only: regr_lat_time_climoz
    1617#endif
    1718!#endif of #ifdef CPP_EARTH
     19      use netcdf, only: nf90_open, NF90_NOWRITE, nf90_close
    1820      !
    1921      IMPLICIT NONE
    2022      !
    21 #include "netcdf.inc"
    2223#include "dimensions.h"
    2324#include "paramet.h"
     
    4950      REAL :: vvent(iip1, jjm, llm)
    5051      REAL :: t3d(iip1, jjp1, llm), tpot(iip1, jjp1, llm)
    51       REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: q3d
    5252      REAL :: qsat(iip1, jjp1, llm)
     53      REAL,ALLOCATABLE :: q3d(:, :, :,:)
    5354      REAL :: tsol(klon), qsol(klon), sn(klon)
    54       REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf)
     55!!      REAL :: tsolsrf(klon,nbsrf)
     56      real qsolsrf(klon,nbsrf),snsrf(klon,nbsrf)
    5557      REAL :: albe(klon,nbsrf), evap(klon,nbsrf)
    5658      REAL :: alblw(klon,nbsrf)
     
    7274      !
    7375
    74       CHARACTER*80 :: varname
     76      CHARACTER(len=80) :: varname
    7577      !
    7678      INTEGER :: i,j, ig, l, ji,ii1,ii2
     
    102104      REAL :: w(ip1jmp1,llm)
    103105      REAL ::phystep
    104       REAL :: rugsrel(iip1*jjp1)
     106CC      REAL :: rugsrel(iip1*jjp1)
    105107      REAL :: fder(klon)
    106       real zrel(iip1*jjp1),chmin,chmax
    107 
    108       CHARACTER*80 :: visu_file
     108!!      real zrel(iip1*jjp1),chmin,chmax
     109
     110!!      CHARACTER(len=80) :: visu_file
    109111      INTEGER :: visuid
    110112
     
    140142      REAL      :: solarlong0
    141143      real :: seuil_inversion
     144      logical  read_climoz ! read ozone climatology
    142145
    143146      !
     
    163166!      CALL defrun_new(99,.TRUE.,clesphy0)
    164167      CALL conf_gcm( 99, .TRUE. , clesphy0 )
    165       call conf_phys(ok_journe, ok_mensuel, ok_instan,                  &
    166      &                 ok_hf, ok_LES,                                   &
     168      call conf_phys(  ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES, &
    167169     &                 solarlong0,seuil_inversion,                      &
    168170     &                 fact_cldcon, facttemps,ok_newmicro,iflag_radia,  &
     
    174176     &                 iflag_thermals,nsplit_thermals,tau_thermals,     &
    175177     &                 iflag_thermals_ed,iflag_thermals_optflux,        &
    176      &                 iflag_coupl,iflag_clos,iflag_wake )
     178     &                 iflag_coupl,iflag_clos,iflag_wake, read_climoz )
     179
    177180      dtvr   = daysec/FLOAT(day_step)
    178181      print*,'dtvr',dtvr
    179182
    180 
    181 
    182183      CALL iniconst()
    183184      CALL inigeom()
    184185
    185186! Initialisation pour traceurs
    186       CALL infotrac_init
    187       ALLOCATE(q3d(iip1,jjp1,llm,nqtot))
    188 
     187      call infotrac_init
     188      ALLOCATE(q3d(iip1, jjp1, llm, nqtot))
    189189
    190190      CALL inifilr()
     
    246246
    247247      write(*,*)'Essai de lecture masque ocean'
    248       iret = nf_open("o2a.nc", NF_NOWRITE, nid_o2a)
     248      iret = nf90_open("o2a.nc", NF90_NOWRITE, nid_o2a)
    249249      if (iret .ne. 0) then
    250250        write(*,*)'ATTENTION!! pas de fichier o2a.nc trouve'
     
    265265      else
    266266        couple = .true.
    267         iret = nf_close(nid_o2a)
     267        iret = nf90_close(nid_o2a)
    268268        call flininfo("o2a.nc", iml_omask, jml_omask, llm_tmp, ttm_tmp
    269269     $    , nid_o2a)
     
    402402     .                           maxval(qsat(:,:,:))
    403403      !
    404       WRITE(*,*) 'QSAT :', qsat(10,20,:)
     404CC      WRITE(*,*) 'QSAT :', qsat(10,20,:)
    405405      !
    406406      varname = 'q'
     
    413413      q3d(:,:,:,1) = qd(:,:,:)
    414414      !
     415
     416      if (read_climoz) call regr_lat_time_climoz ! ozone climatology
     417
    415418      varname = 'tsol'
    416419      ! This line needs to be replaced by a call to restget to get the values in the restart file
     
    477480     .     jjm, rlonu, rlatv , interbar )
    478481c
    479       rugsrel(:) = 0.0
    480       IF(ok_orodr)  THEN
    481         DO i = 1, iip1* jjp1
    482          rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. )
    483         ENDDO
    484       ENDIF
     482cc      rugsrel(:) = 0.0
     483cc      IF(ok_orodr)  THEN
     484cc        DO i = 1, iip1* jjp1
     485cc         rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. )
     486cc        ENDDO
     487cc      ENDIF
    485488
    486489
     
    716719      q_ancien = 0.
    717720      agesno = 0.
     721c
    718722      frugs(1:klon,is_oce) = rugmer(1:klon)
    719723      frugs(1:klon,is_ter) = MAX(1.0e-05, zstd(1:klon)*zsig(1:klon)/2.0)
     
    752756
    753757C     Sortie Visu pour les champs dynamiques
    754       if (1.eq.0 ) then
    755       print*,'sortie visu'
    756       time_step = 1.
    757       t_ops = 2.
    758       t_wrt = 2.
    759       itau = 2.
    760       visu_file='Etat0_visu.nc'
    761       CALL initdynav(visu_file,dayref,anneeref,time_step,
    762      .              t_ops, t_wrt, visuid)
    763       CALL writedynav(visuid, itau,vvent ,
    764      .                uvent,tpot,pk,phi,q3d,masse,psol,phis)
    765       else
     758cc      if (1.eq.0 ) then
     759cc      print*,'sortie visu'
     760cc      time_step = 1.
     761cc      t_ops = 2.
     762cc      t_wrt = 2.
     763cc      itau = 2.
     764cc      visu_file='Etat0_visu.nc'
     765cc      CALL initdynav(visu_file,dayref,anneeref,time_step,
     766cc     .              t_ops, t_wrt, visuid)
     767cc      CALL writedynav(visuid, itau,vvent ,
     768cc     .                uvent,tpot,pk,phi,q3d,masse,psol,phis)
     769cc      else
    766770         print*,'CCCCCCCCCCCCCCCCCC REACTIVER SORTIE VISU DANS ETAT0'
    767       endif
     771cc      endif
    768772      print*,'entree histclo'
    769773      CALL histclo
    770 
    771       DEALLOCATE(q3d)
    772774
    773775#endif
     
    776778      !
    777779      END SUBROUTINE etat0_netcdf
    778 
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3d/temps.h

    r792 r1154  
    1515
    1616      INTEGER   itaufin
    17       INTEGER*4 itau_dyn, itau_phy
    18       INTEGER*4 day_ini, day_end, annee_ref, day_ref
     17      INTEGER(kind=4) itau_dyn, itau_phy
     18      INTEGER(kind=4) day_ini, day_end, annee_ref, day_ref
    1919      REAL      dt
    2020
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/etat0_netcdf.F

    r1151 r1154  
    99      USE ioipsl
    1010      USE dimphy
     11      USE infotrac
    1112      USE fonte_neige_mod
    1213      USE pbl_surface_mod
    1314      USE phys_state_var_mod
    1415      USE filtreg_mod
    15       USE infotrac
     16      use regr_lat_time_climoz_m, only: regr_lat_time_climoz
    1617#endif
    1718!#endif of #ifdef CPP_EARTH
     19      use netcdf, only: nf90_open, NF90_NOWRITE, nf90_close
    1820      !
    1921      IMPLICIT NONE
    2022      !
    21 #include "netcdf.inc"
    2223#include "dimensions.h"
    2324#include "paramet.h"
     
    4344      ! local variables:
    4445      REAL :: latfi(klon), lonfi(klon)
    45       REAL :: orog(iip1,jjp1), rugo(iip1,jjp1),
    46      . psol(iip1, jjp1), phis(iip1, jjp1)
     46      REAL :: orog(iip1,jjp1), rugo(iip1,jjp1)
     47      REAL :: psol(iip1, jjp1), phis(iip1, jjp1)
    4748      REAL :: p3d(iip1, jjp1, llm+1)
    4849      REAL :: uvent(iip1, jjp1, llm)
     
    5253      REAL,ALLOCATABLE :: q3d(:, :, :,:)
    5354      REAL :: tsol(klon), qsol(klon), sn(klon)
    54       REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf)
     55!!      REAL :: tsolsrf(klon,nbsrf)
     56      real qsolsrf(klon,nbsrf),snsrf(klon,nbsrf)
    5557      REAL :: albe(klon,nbsrf), evap(klon,nbsrf)
    5658      REAL :: alblw(klon,nbsrf)
     
    7274      !
    7375
    74       CHARACTER*80 :: varname
     76      CHARACTER(len=80) :: varname
    7577      !
    7678      INTEGER :: i,j, ig, l, ji,ii1,ii2
    77       INTEGER :: nq
    7879      REAL :: xpi
    7980      !
     
    103104      REAL :: w(ip1jmp1,llm)
    104105      REAL ::phystep
    105       REAL :: rugsrel(iip1*jjp1)
     106CC      REAL :: rugsrel(iip1*jjp1)
    106107      REAL :: fder(klon)
    107       real zrel(iip1*jjp1),chmin,chmax
    108 
    109       CHARACTER*80 :: visu_file
     108!!      real zrel(iip1*jjp1),chmin,chmax
     109
     110!!      CHARACTER(len=80) :: visu_file
    110111      INTEGER :: visuid
    111112
     
    141142      REAL      :: solarlong0
    142143      real :: seuil_inversion
     144      logical  read_climoz ! read ozone climatology
    143145
    144146      !
     
    174176     &                 iflag_thermals,nsplit_thermals,tau_thermals,     &
    175177     &                 iflag_thermals_ed,iflag_thermals_optflux,        &
    176      &                 iflag_coupl,iflag_clos,iflag_wake )
     178     &                 iflag_coupl,iflag_clos,iflag_wake, read_climoz )
    177179
    178180      dtvr   = daysec/FLOAT(day_step)
     
    181183      CALL iniconst()
    182184      CALL inigeom()
    183       !
     185
    184186      CALL inifilr()
    185 C init pour traceurs
     187! Initialisation pour traceurs
    186188      call infotrac_init
    187       ALLOCATE(q3d(iip1, jjp1, llm,nqtot))
    188 !      CALL phys_state_var_init()
     189      ALLOCATE(q3d(iip1, jjp1, llm, nqtot))
     190!     CALL phys_state_var_init()
    189191      !
    190192      latfi(1) = ASIN(1.0)
     
    243245
    244246      write(*,*)'Essai de lecture masque ocean'
    245       iret = nf_open("o2a.nc", NF_NOWRITE, nid_o2a)
     247      iret = nf90_open("o2a.nc", NF90_NOWRITE, nid_o2a)
    246248      if (iret .ne. 0) then
    247249        write(*,*)'ATTENTION!! pas de fichier o2a.nc trouve'
     
    262264      else
    263265        couple = .true.
    264         iret = nf_close(nid_o2a)
     266        iret = nf90_close(nid_o2a)
    265267        call flininfo("o2a.nc", iml_omask, jml_omask, llm_tmp, ttm_tmp
    266268     $    , nid_o2a)
     
    399401     .                           maxval(qsat(:,:,:))
    400402      !
    401       WRITE(*,*) 'QSAT :', qsat(10,20,:)
     403CC      WRITE(*,*) 'QSAT :', qsat(10,20,:)
    402404      !
    403405      varname = 'q'
     
    410412      q3d(:,:,:,1) = qd(:,:,:)
    411413      !
     414
     415      if (read_climoz) call regr_lat_time_climoz ! ozone climatology
     416
    412417      varname = 'tsol'
    413418      ! This line needs to be replaced by a call to restget to get the values in the restart file
     
    474479     .     jjm, rlonu, rlatv , interbar )
    475480c
    476       rugsrel(:) = 0.0
    477       IF(ok_orodr)  THEN
    478         DO i = 1, iip1* jjp1
    479          rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. )
    480         ENDDO
    481       ENDIF
     481cc      rugsrel(:) = 0.0
     482cc      IF(ok_orodr)  THEN
     483cc        DO i = 1, iip1* jjp1
     484cc         rugsrel(i) = MAX( 1.e-05, zstd(i)* zsig(i) /2. )
     485cc        ENDDO
     486cc      ENDIF
    482487
    483488
     
    750755
    751756C     Sortie Visu pour les champs dynamiques
    752       if (1.eq.0 ) then
    753       print*,'sortie visu'
    754       time_step = 1.
    755       t_ops = 2.
    756       t_wrt = 2.
    757       itau = 2.
    758       visu_file='Etat0_visu.nc'
    759       CALL initdynav(visu_file,dayref,anneeref,time_step,
    760      .              t_ops, t_wrt, visuid)
    761       CALL writedynav(visuid, itau,vvent ,
    762      .                uvent,tpot,pk,phi,q3d,masse,psol,phis)
    763       else
     757cc      if (1.eq.0 ) then
     758cc      print*,'sortie visu'
     759cc      time_step = 1.
     760cc      t_ops = 2.
     761cc      t_wrt = 2.
     762cc      itau = 2.
     763cc      visu_file='Etat0_visu.nc'
     764cc      CALL initdynav(visu_file,dayref,anneeref,time_step,
     765cc     .              t_ops, t_wrt, visuid)
     766cc      CALL writedynav(visuid, itau,vvent ,
     767cc     .                uvent,tpot,pk,phi,q3d,masse,psol,phis)
     768cc      else
    764769         print*,'CCCCCCCCCCCCCCCCCC REACTIVER SORTIE VISU DANS ETAT0'
    765       endif
     770cc      endif
    766771      print*,'entree histclo'
    767772      CALL histclo
     
    772777      !
    773778      END SUBROUTINE etat0_netcdf
    774 
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/temps.h

    r985 r1154  
    1515
    1616      INTEGER   itaufin
    17       INTEGER*4 itau_dyn, itau_phy
    18       INTEGER*4 day_ini, day_end, annee_ref, day_ref
     17      INTEGER(kind=4) itau_dyn, itau_phy
     18      INTEGER(kind=4) day_ini, day_end, annee_ref, day_ref
    1919      REAL      dt
    2020!$OMP THREADPRIVATE(/temps/)
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/clesphys.h

    r1150 r1154  
    1313       INTEGER nbapp_rad, iflag_con
    1414       REAL co2_ppm, solaire
    15        REAL*8 RCO2, RCH4, RN2O, RCFC11, RCFC12 
    16        REAL*8 CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
     15       REAL(kind=8) RCO2, RCH4, RN2O, RCFC11, RCFC12 
     16       REAL(kind=8) CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
    1717
    1818!OM ---> correction du bilan d'eau global
     
    3939!IM lev_histmth : niveau sorties mensuelles
    4040       INTEGER lev_histhf, lev_histday, lev_histmth
    41        CHARACTER*4 type_run
     41       CHARACTER(len=4) type_run
    4242! aer_type: pour utiliser un fichier constant dans readaerosol
    4343       CHARACTER*8 :: aer_type
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/conf_phys.F90

    r1150 r1154  
    77
    88  subroutine conf_phys(ok_journe, ok_mensuel, ok_instan, ok_hf, &
    9  &                     ok_LES,&
    10  &                     solarlong0,seuil_inversion, &
    11  &                     fact_cldcon, facttemps,ok_newmicro,iflag_radia,&
    12  &                     iflag_cldcon, &
    13  &                     iflag_ratqs,ratqsbas,ratqshaut, &
    14  &                     ok_ade, ok_aie, aerosol_couple, &
    15  &                     flag_aerosol, new_aod, &
    16  &                     bl95_b0, bl95_b1,&
    17  &                     iflag_thermals,nsplit_thermals,tau_thermals, &
    18  &                     iflag_thermals_ed,iflag_thermals_optflux, &
    19  &                     iflag_coupl,iflag_clos,iflag_wake )
     9                       ok_LES,&
     10                       solarlong0,seuil_inversion, &
     11                       fact_cldcon, facttemps,ok_newmicro,iflag_radia,&
     12                       iflag_cldcon, &
     13                       iflag_ratqs,ratqsbas,ratqshaut, &
     14                       ok_ade, ok_aie, aerosol_couple, &
     15                       flag_aerosol, new_aod, &
     16                       bl95_b0, bl95_b1,&
     17                       iflag_thermals,nsplit_thermals,tau_thermals, &
     18                       iflag_thermals_ed,iflag_thermals_optflux, &
     19                       iflag_coupl,iflag_clos,iflag_wake, read_climoz)
    2020
    2121   use IOIPSL
     
    140140  LOGICAL,SAVE :: ok_strato_omp
    141141  LOGICAL,SAVE :: ok_hines_omp
     142
     143  logical, intent(out):: read_climoz ! read ozone climatology
    142144!
    143145
     
    12211223  call getin('ecrit_LES', ecrit_LES_omp)
    12221224!
     1225  read_climoz = .false. ! default value
     1226  call getin('read_climoz', read_climoz)
    12231227
    12241228!$OMP END MASTER
     
    14671471
    14681472  write(numout,*)' lonmin lonmax latmin latmax bilKP_ins =',&
    1469  & lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
     1473   lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
    14701474  write(numout,*)' ecrit_ hf, day, mth, reg, tra, ISCCP, LES',&
    1471  & ecrit_hf, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES
     1475   ecrit_hf, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES
    14721476
    14731477  write(numout,*) 'ok_strato = ', ok_strato
    14741478  write(numout,*) 'ok_hines = ',  ok_hines
     1479  write(numout,*) 'read_climoz = ', read_climoz
    14751480 
    14761481!$OMP END MASTER
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/indicesol.h

    r793 r1154  
    2424      PARAMETER (epsfra=1.0E-05)
    2525!
    26       CHARACTER *3 clnsurf(nbsrf)
     26      CHARACTER(len=3) clnsurf(nbsrf)
    2727      DATA clnsurf/'ter', 'lic', 'oce', 'sic'/
    2828      SAVE clnsurf
  • 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     
  • LMDZ4/branches/LMDZ4-dev/makelmdz_fcm

    r1140 r1154  
    210210endif
    211211
     212if ( ( "$parallel" == 'omp' || "$parallel" == 'mpi_omp' ) \
     213   && ( "$compil_mod" == 'debug' ) ) then
     214    echo 'Usually, parallelization with OpenMP requires some optimization.'
     215    echo 'We suggest switching to "-dev".'
     216    exit 1
     217    ##set COMPIL_FFLAGS="%DEV_FFLAGS"
     218endif
     219
    212220if ( "$veget" == 'true' ) then
    213221   set CPP_KEY="$CPP_KEY CPP_VEGET"
Note: See TracChangeset for help on using the changeset viewer.