Changeset 471 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Dec 13, 2011, 11:57:59 PM (13 years ago)
Author:
aslmd
Message:

LMDZ.GENERIC

13/12/2011 == AS

  • Same spirit as previous commit, but for ngasmx which is now read in gases.def -- before arrays w/ dim ngasmx are allocated dynamically
  • Allocation is done in su_gases.F90 which is called in inifis
  • Outside su_gases.F90, very few modifications to the code : the new module "gases_h.F90" simply replaces the old common "gases.h" !
  • Compiles fine. Tested with debugging options through pgdbg. Runs fine. Exact same results in Early Mars test case.
Location:
trunk/LMDZ.GENERIC
Files:
1 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r470 r471  
    565565M              469   libf/phystd/radinc_h.F90
    566566M              469   libf/phystd/radcommon_h.F90
     567
     568== 13/12/2011 == AS
     569- Same spirit as previous commit, but for ngasmx which is now read in gases.def -- before arrays w/ dim ngasmx are allocated dynamically
     570- Allocation is done in su_gases.F90 which is called in inifis
     571- Outside su_gases.F90, very few modifications to the code : the new module "gases_h.F90" simply replaces the old common "gases.h" !
     572- Compiles fine. Tested with debugging options through pgdbg. Runs fine. Exact same results in Early Mars test case.
  • trunk/LMDZ.GENERIC/libf/phystd/calc_cpp_mugaz.F90

    r253 r471  
    1313!==================================================================
    1414
     15      use gases_h
    1516      implicit none
    1617
    1718#include "comcstfi.h"
    1819!#include "callkeys.h"
    19 #include "gases.h"
    2020
    2121      integer igas
  • trunk/LMDZ.GENERIC/libf/phystd/calc_rayleigh.F90

    r305 r471  
    2626      use radinc_h, only: L_NSPECTV
    2727      use radcommon_h, only: WAVEV, BWNV, DWNV, tstellar, tauray, scalep
     28      use gases_h
    2829
    2930      implicit none
     
    3132#include "comcstfi.h"
    3233#include "callkeys.h"
    33 #include "gases.h"
    3434
    3535      real*8 wl
  • trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90

    r470 r471  
    1313      use datafile_mod, only: datadir
    1414      use ioipsl_getincom
     15      use gases_h
    1516
    1617      implicit none
     
    3536#include "callkeys.h"
    3637#include "tracer.h"
    37 #include "gases.h"
    3838
    3939!-----------------------------------------------------------------------
  • trunk/LMDZ.GENERIC/libf/phystd/condens_co2cloud.F90

    r253 r471  
    77
    88      use radinc_h, only : naerkind
     9      use gases_h
    910
    1011      implicit none
     
    5657#include "callkeys.h"
    5758#include "tracer.h"
    58 #include "gases.h"
    5959
    6060!-----------------------------------------------------------------------
  • trunk/LMDZ.GENERIC/libf/phystd/condense_cloud.F90

    r305 r471  
    77
    88      use radinc_h, only : naerkind
     9      use gases_h
    910
    1011      implicit none
     
    5657#include "callkeys.h"
    5758#include "tracer.h"
    58 #include "gases.h"
    5959
    6060!-----------------------------------------------------------------------
  • trunk/LMDZ.GENERIC/libf/phystd/cp_neutral.F90

    r305 r471  
    11double precision function cp_neutral(T)
    22
     3  use gases_h
     4
    35  implicit none
    4 
    5 #include "gases.h"
    66
    77  ! inputs
  • trunk/LMDZ.GENERIC/libf/phystd/gradients_kcm.F90

    r366 r471  
    22
    33  use params_h
     4  use gases_h
    45  implicit none
    5 
    6 #include "gases.h"
    76
    87  ! inputs
  • trunk/LMDZ.GENERIC/libf/phystd/kcmprof_fn.F90

    r366 r471  
    33use params_h
    44use watercommon_h, only : mH2O
     5use gases_h
    56implicit none
    67
     
    1516#include "comcstfi.h"
    1617#include "callkeys.h"
    17 #include "gases.h"
    1818
    1919  integer ilay, nlay
  • trunk/LMDZ.GENERIC/libf/phystd/optci.F90

    r305 r471  
    55      use radinc_h
    66      use radcommon_h, only: gasi, tlimit, wrefVAR, Cmk,tgasref,pfgasref,wnoi,scalep
     7      use gases_h
    78      implicit none
    89
     
    3031#include "comcstfi.h"
    3132#include "callkeys.h"
    32 #include "gases.h"
    3333
    3434
  • trunk/LMDZ.GENERIC/libf/phystd/optcv.F90

    r366 r471  
    55      use radinc_h
    66      use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep
     7      use gases_h
    78
    89      implicit none
     
    3637#include "callkeys.h"
    3738#include "comcstfi.h"
    38 #include "gases.h"
    3939
    4040      real*8 DTAUV(L_NLAYRAD,L_NSPECTV,L_NGAUSS)
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r470 r471  
    99      use radinc_h, only : naerkind
    1010      use watercommon_h, only : mx_eau_sol, To, RLVTT, mH2O
    11      
     11      use gases_h
    1212      implicit none
    1313
     
    21472147      icount=icount+1
    21482148
     2149      !!! DEALLOCATE STUFF
     2150      if (lastcall) then
     2151        IF ( ALLOCATED( gnom ) ) DEALLOCATE( gnom )    !! this was allocated in su_gases.F90
     2152        IF ( ALLOCATED( gfrac ) ) DEALLOCATE( gfrac )  !! this was allocated in su_gases.F90
     2153      endif
     2154
     2155
    21492156      return
    21502157    end subroutine physiq
  • trunk/LMDZ.GENERIC/libf/phystd/su_gases.F90

    r368 r471  
    11subroutine su_gases
     2
     3  use gases_h
    24
    35  implicit none
    46
    5 #include "gases.h"
    6 
    7        integer ngas, igas, ierr
     7       integer igas, ierr
    88
    99!==================================================================
     
    2424          write(*,*) "sugases.F90: reading file gases.def"
    2525          read(90,*)
    26           read(90,*,iostat=ierr) ngas
     26          read(90,*,iostat=ierr) ngasmx
    2727          if (ierr.ne.0) then
    2828             write(*,*) "sugases.F90: error reading number of gases"
     
    3030             call abort
    3131          endif
    32           ! check that the number of gases is indeed ngasmx
    33           if (ngas.ne.ngasmx) then
    34              write(*,*) "sugases.F90: error, wrong number of gases:"
    35              write(*,*) "ngas=",ngas," whereas ngasmx=",ngasmx
    36              write(*,*) "Check that the values in gases.def and gases.h match..."
    37              call abort
    38           endif
    3932
    40           do igas=1,ngas
     33          PRINT *, "OK I HAVE ",ngasmx, " GASES. NOW I ALLOCATE ARRAYS AND READ NAMES AND FRAC."
     34
     35          IF ( .NOT. ALLOCATED( gnom ) ) ALLOCATE( gnom( ngasmx ) )
     36          do igas=1,ngasmx
    4137             read(90,*,iostat=ierr) gnom(igas)
    4238             if (ierr.ne.0) then
     
    4440                call abort
    4541             endif
    46           enddo                  !of do igas=1,ngas
     42          enddo                  !of do igas=1,ngasmx
    4743         
    4844          vgas=0
    49           do igas=1,ngas
     45          IF ( .NOT. ALLOCATED( gfrac ) ) ALLOCATE( gfrac( ngasmx ) )
     46          do igas=1,ngasmx
    5047             read(90,*,iostat=ierr) gfrac(igas)
    5148             if (ierr.ne.0) then
     
    6562             endif
    6663             
    67           enddo                  !of do igas=1,ngas
     64          enddo                  !of do igas=1,ngasmx
    6865
    6966       else
  • trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90

    r470 r471  
    2424      use radcommon_h, only : wrefvar,gastype
    2525      use datafile_mod, only: datadir
     26      use gases_h
    2627      implicit none
    2728
    2829#include "callkeys.h"
    29 #include "gases.h"
    3030
    3131!==================================================================
Note: See TracChangeset for help on using the changeset viewer.