Ignore:
Timestamp:
Apr 15, 2014, 4:57:48 PM (11 years ago)
Author:
aslmd
Message:

LMDZ.MARS. If not major, a quite important commit.

  1. No more SAVE,ALLOCATABLE arrays outside modules.

This is important to solve the nesting conundrum in MESOSCALE.
And overall this is good for the harmony of the universe.
(Joke apart, this is good for any interfacing task. And compliant with a F90 spirit).
Note that bit-to-bit compatibility of results in debug mode was checked.

  1. inifis is split in two : phys_state_var_init + conf_phys

This makes interfacing with MESOSCALE more transparent.
This is also clearer for LMDZ.MARS.
Before, inifis has two very different tasks to do.

  1. a bit of cleaning as far as modules and saves are concerned

Point 1

  • Removed SAVE,ALLOCATABLE arrays from

physiq, aeropacity, updatereffrad, soil

and put those in

dimradmars_mod, surfdat_h, tracer_mod, comsoil_h

and changed accordingly the initialization subroutines associated to each module.
Allocating these arrays is thus done at initialization.

Point 2

  • Created a subroutine phys_state_var_init which does all the allocation / initialization work for modules. This was previously done in inifis.
  • Replaced inifis which was then (after the previous modification) just about reading callphys.def and setting a few constants by conf_phys. This mimics the new LMDZ terminology (cf. LMDZ.VENUS for instance)
  • Bye bye inifis.

Point 3

  • Removed comdiurn and put everything in comgeomfi
  • Created a turb_mod module for turbulence variables (e.g. l0 in yamada4)
  • dryness had nothing to do in tracer_h, put it in surfdat_h (like watercaptag)
  • topdust0 does not need to be SAVE in aeropacity. better use sinlat.
  • emisref does not need to be SAVE in newcondens. made it automatic array.
  • Removed useless co2ice argument in initracer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/aeropacity.F

    r1208 r1224  
    66      USE ioipsl_getincom, only: getin
    77      use tracer_mod, only: noms, igcm_h2o_ice, igcm_dust_mass,
    8      &                      igcm_dust_submicron, rho_dust, rho_ice
    9       use comgeomfi_h, only: lati ! grid point latitudes (rad)
     8     &                      igcm_dust_submicron, rho_dust, rho_ice,
     9     &                      nqdust
     10      use comgeomfi_h, only: lati, sinlat ! grid point latitudes (rad)
    1011      use yomaer_h, only: tauvis
    1112       IMPLICIT NONE
     
    111112                               !   Qabs instead of Qext
    112113                               !   (direct comparison with TES)
     114      REAL topdust0(ngrid)
    113115
    114116c   local saved variables
    115117c   ---------------------
    116 
    117       REAL,SAVE,ALLOCATABLE :: topdust0(:)
    118118
    119119c     Level under which the dust mixing ratio is held constant
     
    126126
    127127! indexes of water ice and dust tracers:
    128       INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers
    129128      INTEGER,SAVE :: i_ice=0  ! water ice
    130129      real,parameter :: odpref=610. ! DOD reference pressure (Pa)
     
    140139
    141140      IF (firstcall) THEN
    142         ! allocate local saved arrays
    143         allocate(nqdust(nq))
    144         allocate(topdust0(ngrid))
    145        
    146141        ! identify scatterers that are dust
    147142        naerdust=0
     
    167162          write(*,*) "aeropacity: i_ice=",i_ice
    168163        ENDIF
    169 
    170 c       altitude of the top of the aerosol layer (km) at Ls=2.76rad:
    171 c       in the Viking year scenario
    172         DO ig=1,ngrid
    173             topdust0(ig)=60. -22.*SIN(lati(ig))**2
    174         END DO
    175164
    176165c       typical profile of solsir and (1-w)^(-1):
     
    295284        else if (iddist.eq.2) then          ! "Viking" scenario
    296285          do ig=1,ngrid
     286            ! altitude of the top of the aerosol layer (km) at Ls=2.76rad:
     287            ! in the Viking year scenario
     288            topdust0(ig)=60. -22.*sinlat(ig)**2
    297289            topdust(ig)=topdust0(ig)+18.*zlsconst
    298290          end do
Note: See TracChangeset for help on using the changeset viewer.