Ignore:
Timestamp:
Apr 8, 2016, 4:57:00 PM (9 years ago)
Author:
emillour
Message:

Generic GCM:

  • Made nsoilmx be no longer a "parameter" and thus added the possibility to define the number of subsurface layers nsoilmx, along with first layer thickness "lay1_soil" and companion coefficient "alpha_soil", in callphys.def at run time. As before (when these were hard-coded), these are such that the depth of soil mid-layers are: mlayer(k)=lay1_soil*alpha_soil(k-1/2), for k=0,nsoil-1

EM

Location:
trunk/LMDZ.GENERIC/libf/dynlonlat_phylonlat/phystd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/dynlonlat_phylonlat/phystd/newstart.F

    r1524 r1538  
    3636      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
    3737      use inifis_mod, only: inifis
     38      use control_mod, only: nday
    3839      implicit none
    3940
     
    9596c------------------
    9697      REAL tsurf(ngridmx)       ! surface temperature
    97       REAL tsoil(ngridmx,nsoilmx) ! soil temperature
     98      REAL,ALLOCATABLE :: tsoil(:,:) ! soil temperature
    9899!      REAL co2ice(ngridmx)     ! CO2 ice layer
    99100      REAL emis(ngridmx)        ! surface emissivity
     
    103104!      REAL rnaturfi(ngridmx)
    104105      real alb(iip1,jjp1),albfi(ngridmx) ! albedos
    105       real ith(iip1,jjp1,nsoilmx),ithfi(ngridmx,nsoilmx) ! thermal inertia (3D)
     106      real,allocatable :: ith(:,:,:),ithfi(:,:) ! thermal inertia (3D)
    106107      real surfith(iip1,jjp1),surfithfi(ngridmx) ! surface thermal inertia (2D)
    107108      REAL latfi(ngridmx),lonfi(ngridmx),airefi(ngridmx)
     
    113114
    114115      REAL rnat(ngridmx)
    115       REAL tslab(ngridmx,nsoilmx) ! slab ocean temperature
     116      REAL,ALLOCATABLE :: tslab(:,:) ! slab ocean temperature
    116117      REAL pctsrf_sic(ngridmx) ! sea ice cover
    117118      REAL tsea_ice(ngridmx) ! temperature sea_ice
     
    274275! ... this has to be done before phyetat0
    275276      call initracer(ngridmx,nqtot,tname)
     277
     278      ! default nsoilmx is set in comsoil_h
     279      call getin_p("nsoilmx",nsoilmx)
     280
     281      ! allocate some local arrays now that we know all dimensions
     282      allocate(tsoil(ngridmx,nsoilmx))
     283      allocate(ith(iip1,jjp1,nsoilmx))
     284      allocate(ithfi(ngridmx,nsoilmx))
     285      allocate(tslab(ngridmx,nsoilmx))
    276286
    277287! Take care of arrays in common modules
     
    475485!    (for instance initracer needs to know about some flags, and/or
    476486!      'datafile' path may be changed by user)
    477       call inifis(ngridmx,llm,nqtot,day_ini,daysec,dtphys,
     487      call inifis(ngridmx,llm,nqtot,day_ini,daysec,nday,dtphys,
    478488     &                latfi,lonfi,airefi,rad,g,r,cpp)
    479489
  • trunk/LMDZ.GENERIC/libf/dynlonlat_phylonlat/phystd/start2archive.F

    r1478 r1538  
    1919c=======================================================================
    2020
     21      use ioipsl_getin_p_mod, only: getin_p
    2122      use infotrac, only: infotrac_init, nqtot, tname
    2223      USE comsoil_h
     
    6970c ------------------------------------
    7071      REAL tsurf(ngridmx)       ! Surface temperature
    71       REAL tsoil(ngridmx,nsoilmx) ! Soil temperature
     72      REAL,ALLOCATABLE :: tsoil(:,:) ! Soil temperature
    7273      REAL co2ice(ngridmx)      ! CO2 ice layer
    7374      REAL q2(ngridmx,llm+1)
     
    9394      REAL T(ip1jmp1,llm),us(ip1jmp1,llm),vs(ip1jmp1,llm)
    9495      REAL tsurfS(ip1jmp1)
    95       REAL tsoilS(ip1jmp1,nsoilmx)
    96       REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
     96      REAL,ALLOCATABLE :: tsoilS(:,:)
     97      REAL,ALLOCATABLE :: ithS(:,:) ! Soil Thermal Inertia
    9798      REAL co2iceS(ip1jmp1)
    9899      REAL q2S(ip1jmp1,llm+1)
     
    147148      CALL init_phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
    148149      call initcomgeomphy
     150
     151! get value of nsoilmx (default is set in comsoil_h)
     152      call getin_p("nsoilmx",nsoilmx)
     153     
     154      ! allocate some local arrays now that we know all dimensions
     155      allocate(tsoil(ngridmx,nsoilmx))
     156      allocate(tsoilS(ip1jmp1,nsoilmx))
     157      allocate(ithS(ip1jmp1,nsoilmx))
    149158
    150159      ! ALLOCATE ARRAYS IN comgeomfi_h (usually done in inifis)
Note: See TracChangeset for help on using the changeset viewer.