Changeset 1225 for LMDZ4


Ignore:
Timestamp:
Aug 7, 2009, 6:29:23 PM (15 years ago)
Author:
lguez
Message:

Added some "intent" attributes in declarations.

In "phyredem", "dtime" is not declared. It is not in any included
file. Probably accepted by compilers as an intrinsic non-standard
function. Removed this element of "tab_cntrl".

Added some "only" clauses in "use" statements.

If the ozone field is read from a file, it is now updated every
360th of the length of the current year, regardless of that length.

In "physiq", "omega" was output before it was defined. Moved the
output instruction after the definition.

Location:
LMDZ4/branches/LMDZ4-dev/libf
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/dyn3d/calfis.F

    r1222 r1225  
    170170      SAVE firstcal,debut
    171171!      REAL rdayvrai
    172       REAL :: jD_cur, jH_cur
     172      REAL, intent(in):: jD_cur, jH_cur
    173173c
    174174c-----------------------------------------------------------------------
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/aaam_bud.F

    r940 r1225  
    3939c nlon----input-I-Total number of horizontal points that get into physics
    4040c nlev----input-I-Number of vertical levels
    41 c rjour---input-R-Jour compte depuis le debut de la simu (run.def)
    42 c rsec----input-R-Seconde de la journee
    43 c rea-----input-R-Earth radius
    44 c rg------input-R-gravity constant
    45 c ome-----input-R-Earth rotation rate
     41c rjour        -R-Jour compte depuis le debut de la simu (run.def)
     42c rsec         -R-Seconde de la journee
     43c rea          -R-Earth radius
     44c rg           -R-gravity constant
     45c ome          -R-Earth rotation rate
    4646c plat ---input-R-Latitude en degres
    4747c plon ---input-R-Longitude en degres
     
    9494c
    9595      INTEGER iam,nlon,nlev
    96       REAL rjour,rsec,rea,rg,ome
     96      REAL, intent(in):: rjour,rsec,rea,rg,ome
    9797      REAL plat(nlon),plon(nlon),phis(nlon)
    9898      REAL dragu(nlon),liftu(nlon),phyu(nlon)             
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/conf_phys.F90

    r1204 r1225  
    145145  LOGICAL,SAVE :: ok_hines_omp
    146146
    147   logical, intent(out):: read_climoz ! read ozone climatology
     147  logical, intent(out):: read_climoz ! read ozone climatology, OpenMP shared
    148148!
    149149
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/open_climoz_m.F90

    r1220 r1225  
    2222    use mod_phys_lmdz_mpi_transfert, only: bcast_mpi ! broadcast
    2323
    24     integer, intent(out):: ncid ! of "climoz_LMDZ.nc"
     24    integer, intent(out):: ncid ! of "climoz_LMDZ.nc", OpenMP shared
    2525
    2626    real, pointer:: press_in_edg(:)
    27     ! (edges of pressure intervals for ozone climatology, in Pa, in strictly
    28     ! ascending order)
     27    ! edges of pressure intervals for ozone climatology, in Pa, in strictly
     28    ! ascending order, OpenMP shared
    2929
    3030    ! Variables local to the procedure:
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/orbite.F

    r766 r1225  
    124124c          revu pour  GCM  le 30 septembre 1996
    125125c===============================================================
    126 c longi----INPUT : la longitude vraie de la terre dans son plan
     126c longi : la longitude vraie de la terre dans son plan
    127127c                  solaire a partir de l'equinoxe de printemps (degre)
    128 c gmtime---INPUT : temps universel en fraction de jour
    129 c pdtrad---INPUT : pas de temps du rayonnement (secondes)
     128c gmtime : temps universel en fraction de jour
     129c pdtrad : pas de temps du rayonnement (secondes)
    130130c lat------INPUT : latitude en degres
    131131c long-----INPUT : longitude en degres
     
    137137#include "YOMCST.h"
    138138c================================================================
    139       real longi, gmtime, pdtrad
     139      real, intent(in):: longi, gmtime, pdtrad
    140140      real lat(klon), long(klon), pmu0(klon), frac(klon)
    141141c================================================================
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phyredem.F

    r1191 r1225  
    7474         tab_cntrl(ierr) = 0.0
    7575      ENDDO
    76       tab_cntrl(1) = dtime
     76CC      tab_cntrl(1) = dtime
    7777      tab_cntrl(2) = radpas
    7878      tab_cntrl(3) = co2_ppm
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F

    r1221 r1225  
    1212     .            , PVteta)
    1313
    14       USE ioipsl
     14      USE ioipsl, only: histbeg, histvert, histdef, histend, histsync,
     15     $     histwrite, ju2ymds, ymds2ju, ioget_year_len
    1516      USE comgeomphy
    1617      USE write_field_phy
     
    6061c debut---input-L-variable logique indiquant le premier passage
    6162c lafin---input-L-variable logique indiquant le dernier passage
    62 c jD_cur--input-R-jour courant a l'appel de la physique (jour julien)
    63 c jH_cur--input-R-heure courante a l'appel de la physique (jour julien)
     63c jD_cur       -R-jour courant a l'appel de la physique (jour julien)
     64c jH_cur       -R-heure courante a l'appel de la physique (jour julien)
    6465c pdtphys-input-R-pas d'integration pour la physique (seconde)
    6566c paprs---input-R-pression pour chaque inter-couche (en Pa)
     
    186187      INTEGER nlon
    187188      INTEGER nlev
    188       REAL :: jD_cur, jH_cur
     189      REAL, intent(in):: jD_cur, jH_cur
    189190
    190191      REAL pdtphys
     
    11061107!     ascending order
    11071108
     1109      integer:: co3i = 0 ! time index in NetCDF file of current ozone field
     1110c$OMP THREADPRIVATE(co3i)
     1111
     1112      integer ro3i
     1113!     required time index in NetCDF file for the ozone field, between 1 and 360
     1114
    11081115#include "YOMCST.h"
    11091116#include "YOETHF.h"
     
    11301137     s  nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys
    11311138
    1132          write(lunout,*) 'papers, play, phi, u, v, t, omega'
     1139         write(lunout,*) 'paprs, play, phi, u, v, t'
    11331140         do k=1,klev
    11341141            write(lunout,*) paprs(igout,k),pplay(igout,k),pphi(igout,k),
    1135      s   u(igout,k),v(igout,k),t(igout,k),omega(igout,k)
     1142     s   u(igout,k),v(igout,k),t(igout,k)
    11361143         enddo
    11371144         write(lunout,*) 'ovap (g/kg),  oliq (g/kg)'
     
    17121719c Prescrire l'ozone et calculer l'albedo sur l'ocean.
    17131720c
    1714       IF (MOD(itap-1,lmt_pas) == 0) THEN
    1715 C        Once per day, update ozone:
    1716          if (read_climoz) then
    1717 C           Ozone climatology from a NetCDF file
    1718             call regr_pr_av(ncid_climoz, "tro3", julien=days_elapsed+1,
     1721      if (read_climoz) then
     1722C        Ozone from a file
     1723!        Update required ozone index:
     1724         ro3i = int((days_elapsed + jh_cur - jh_1jan)
     1725     $        / ioget_year_len(year_cur) * 360.) + 1
     1726         if (ro3i == 361) ro3i = 360
     1727C        (This should never occur, except perhaps because of roundup
     1728C        error. See documentation.)
     1729         if (ro3i /= co3i) then
     1730C           Update ozone field:
     1731            call regr_pr_av(ncid_climoz, "tro3", julien=ro3i,
    17191732     &           press_in_edg=press_climoz, paprs=paprs, v3=wo)
    17201733!           Convert from mole fraction of ozone to column density of ozone in a
    17211734!           cell, in kDU:
    17221735            wo = wo * rmo3 / rmd * zmasse / dobson_u / 1e3
    1723 C           (By regridding ozone values for LMDZ only once per day, we
    1724 C           have already neglected the variation of pressure in one
    1725 C           day. So do not recompute "wo" at each time step even if
     1736C           (By regridding ozone values for LMDZ only once every 360th of
     1737C           year, we have already neglected the variation of pressure in one
     1738C           360th of year. So do not recompute "wo" at each time step even if
    17261739C           "zmasse" changes a little.)
    1727          else
    1728             wo = ozonecm(rlat, paprs, rjour=real(days_elapsed+1))
     1740            co3i = ro3i
    17291741         end if
     1742      elseif (MOD(itap-1,lmt_pas) == 0) THEN
     1743C        Once per day, update ozone from Royer:
     1744         wo = ozonecm(rlat, paprs, rjour=real(days_elapsed+1))
    17301745      ENDIF
    17311746c
     
    19351950         END DO
    19361951      END DO
     1952      if (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ',
     1953     $     omega(igout, :)
    19371954
    19381955      IF (iflag_con.EQ.1) THEN
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_pr.F90

    r1220 r1225  
    4141
    4242    real, intent(in):: press_in_edg(:)
    43     ! (edges of pressure intervals for input data, in Pa, in strictly
    44     ! ascending order)
     43    ! edges of pressure intervals for input data, in Pa, in strictly
     44    ! ascending order
    4545
    4646    real, intent(in):: paprs(:, :) ! (klon, llm + 1)
Note: See TracChangeset for help on using the changeset viewer.