Changeset 2278


Ignore:
Timestamp:
Apr 7, 2020, 10:15:46 AM (5 years ago)
Author:
emillour
Message:

Generic GCM:

  • Get rid of "zerophys"; modern Fortran syntax is better to initialize an array.

EM

Location:
trunk/LMDZ.GENERIC
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r2269 r2278  
    15211521- Cleanup OpenMP statements in callcorrk.F90 and also use "call abort_physic"
    15221522  instead of "stop" or "call abort"
     1523
     1524== 07/04/2020 == EM
     1525- Get rid of "zerophys"; modern Fortran syntax is better to initialize an
     1526  array.
  • trunk/LMDZ.GENERIC/libf/phystd/initracer.F

    r1980 r2278  
    2525      character(len=30),intent(in) :: nametrac(nq) ! name of the tracer from dynamics
    2626
    27 !      real qsurf(ngrid,nq)       ! tracer on surface (e.g.  kg.m-2)
    28 !      real co2ice(ngrid)           ! co2 ice mass on surface (e.g.  kg.m-2)
    2927      character(len=30) :: txt ! to store some text
    3028      integer iq,ig,count
    3129      real r0_lift , reff_lift
    32 !      logical :: oldnames ! =.true. if old tracer naming convention (q01,...)
    3330
    3431
     
    128125      ! 1. find dust tracers
    129126      count=0
    130 !      if (dustbin.gt.0) then
    131 !        do iq=1,nq
    132 !          txt=" "
    133 !          write(txt,'(a4,i2.2)')'dust',count+1   
    134 !          if (noms(iq).eq.txt) then
    135 !            count=count+1
    136 !            igcm_dustbin(count)=iq
    137 !            mmol(iq)=100.
    138 !          endif
    139 !        enddo !do iq=1,nq
    140 !      endif ! of if (dustbin.gt.0)
    141 
    142 
    143 !      if (doubleq) then
    144 !        do iq=1,nq
    145 !          if (noms(iq).eq."dust_mass") then
    146 !            igcm_dust_mass=iq
    147 !            count=count+1
    148 !          endif
    149 !          if (noms(iq).eq."dust_number") then
    150 !            igcm_dust_number=iq
    151 !            count=count+1
    152 !          endif
    153 !        enddo
    154 !      endif ! of if (doubleq)
     127
    155128      ! 2. find chemistry and water tracers
    156129      do iq=1,nq
     
    370343c     Initialisation tracers ....
    371344c------------------------------------------------------------
    372       call zerophys(nq,rho_q)
     345      rho_q(1:nq)=0
    373346
    374347      rho_dust=2500.  ! Mars dust density (kg.m-3)
    375348      rho_ice=920.    ! Water ice density (kg.m-3)
    376349      rho_co2=1620.   ! CO2 ice density (kg.m-3)
    377 
    378 
    379 
    380 c$$$      if (doubleq) then
    381 c$$$c       "doubleq" technique
    382 c$$$c       -------------------
    383 c$$$c      (transport of mass and number mixing ratio)
    384 c$$$c       iq=1: Q mass mixing ratio, iq=2: N number mixing ratio
    385 c$$$
    386 c$$$        if( (nq.lt.2).or.(water.and.(nq.lt.3)) ) then
    387 c$$$          write(*,*)'initracer: nq is too low : nq=', nq
    388 c$$$          write(*,*)'water= ',water,' doubleq= ',doubleq   
    389 c$$$        end if
    390 c$$$
    391 c$$$        varian=0.637    ! Characteristic variance   
    392 c$$$        qext(igcm_dust_mass)=3.04   ! reference extinction at 0.67 um for ref dust
    393 c$$$        qext(igcm_dust_number)=3.04 ! reference extinction at 0.67 um for ref dust
    394 c$$$        rho_q(igcm_dust_mass)=rho_dust
    395 c$$$        rho_q(igcm_dust_number)=rho_dust
    396 c$$$
    397 c$$$c       Intermediate calcul for computing geometric mean radius r0
    398 c$$$c       as a function of mass and number mixing ratio Q and N
    399 c$$$c       (r0 = (r3n_q * Q/ N)
    400 c$$$        r3n_q = exp(-4.5*varian**2)*(3./4.)/(pi*rho_dust)
    401 c$$$
    402 c$$$c       Intermediate calcul for computing effective radius reff
    403 c$$$c       from geometric mean radius r0
    404 c$$$c       (reff = ref_r0 * r0)
    405 c$$$        ref_r0 = exp(2.5*varian**2)
    406 c$$$       
    407 c$$$c       lifted dust :
    408 c$$$c       '''''''''''
    409 c$$$        reff_lift = 3.e-6      !  Effective radius of lifted dust (m)
    410 c$$$        alpha_devil(igcm_dust_mass)=9.e-9   !  dust devil lift mass coeff
    411 c$$$        alpha_lift(igcm_dust_mass)=3.0e-15  !  Lifted mass coeff
    412 c$$$
    413 c$$$        r0_lift = reff_lift/ref_r0
    414 c$$$        alpha_devil(igcm_dust_number)=r3n_q*
    415 c$$$     &                        alpha_devil(igcm_dust_mass)/r0_lift**3
    416 c$$$        alpha_lift(igcm_dust_number)=r3n_q*
    417 c$$$     &                        alpha_lift(igcm_dust_mass)/r0_lift**3
    418 c$$$
    419 c$$$c       Not used:
    420 c$$$        radius(igcm_dust_mass) = 0.
    421 c$$$        radius(igcm_dust_number) = 0.
    422 c$$$
    423 c$$$      else
    424 
    425 
    426 c$$$       if (dustbin.gt.1) then
    427 c$$$        print*,'ATTENTION:',
    428 c$$$     $   ' properties of dust need input in initracer !!!'
    429 c$$$        stop
    430 c$$$
    431 c$$$       else if (dustbin.eq.1) then
    432 c$$$
    433 c$$$c       This will be used for 1 dust particle size:
    434 c$$$c       ------------------------------------------
    435 c$$$        radius(igcm_dustbin(1))=3.e-6
    436 c$$$        Qext(igcm_dustbin(1))=3.04
    437 c$$$        alpha_lift(igcm_dustbin(1))=0.0e-6
    438 c$$$        alpha_devil(igcm_dustbin(1))=7.65e-9
    439 c$$$        qextrhor(igcm_dustbin(1))=(3./4.)*Qext(igcm_dustbin(1))
    440 c$$$     &                         /(rho_dust*radius(igcm_dustbin(1)))
    441 c$$$        rho_q(igcm_dustbin(1))=rho_dust
    442 c$$$
    443 c$$$       endif
    444 c$$$!      end if    ! (doubleq)
    445350
    446351c     Initialization for water vapor
     
    453358         qextrhor(igcm_h2o_vap)= 0.
    454359
    455 c       "Dryness coefficient" controlling the evaporation and
    456 c        sublimation from the ground water ice (close to 1)
    457 c        HERE, the goal is to correct for the fact
    458 c        that the simulated permanent water ice polar caps
    459 c        is larger than the actual cap and the atmospheric
    460 c        opacity not always realistic.
    461 
    462 
    463 !         if(ngrid.eq.1)
    464 
    465 
    466 !     to be modified for BC+ version?
    467 
    468360         !! this is defined in surfdat_h.F90
    469361         IF (.not.ALLOCATED(dryness)) ALLOCATE(dryness(ngrid))
     
    475367         enddo
    476368
    477 
    478 
    479 
    480 !         IF (caps) THEN
    481 c Perennial H20 north cap defined by watercaptag=true (allows surface to be
    482 c hollowed by sublimation in vdifc).
    483 !         do ig=1,ngrid
    484 !           if (lati(ig)*180./pi.gt.84) then
    485 !             if (ngrid.ne.1) watercaptag(ig)=.true.
    486 !             dryness(ig) = 1.
    487 c Use the following cap definition for high spatial resolution (latitudinal bin <= 5 deg)
    488 c             if (lati(ig)*180./pi.lt.85.and.long(ig).ge.0) then
    489 c               if (ngrid.ne.1) watercaptag(ig)=.true.
    490 c               dryness(ig) = 1.
    491 c             endif
    492 c             if (lati(ig)*180./pi.ge.85) then
    493 c               if (ngrid.ne.1) watercaptag(ig)=.true.
    494 c               dryness(ig) = 1.
    495 c             endif
    496 !           endif  ! (lati>80 deg)
    497 !         end do ! (ngrid)
    498 !        ENDIF ! (caps)
    499 
    500 !         if(iceparty.and.(nq.ge.2)) then
    501369
    502370           radius(igcm_h2o_ice)=3.e-6
     
    508376     $       / (rho_ice*radius(igcm_h2o_ice))
    509377
    510 
    511 
    512 !         elseif(iceparty.and.(nq.lt.2)) then
    513 !            write(*,*) 'nq is too low : nq=', nq
    514 !            write(*,*) 'water= ',water,' iceparty= ',iceparty
    515 !         endif
    516378
    517379      end if  ! (water)
     
    545407      write(*,*) 'alpha_devil = ', alpha_devil
    546408      write(*,*) 'radius  = ', radius
    547 !      if(doubleq) then
    548 !        write(*,*) 'reff_lift (um) =  ', reff_lift
    549 !        write(*,*) 'size distribution variance  = ', varian
    550 !        write(*,*) 'r3n_q , ref_r0 : ', r3n_q , ref_r0
    551 !      end if
    552409      write(*,*) 'Qext  = ', qext
    553410      write(*,*)
  • trunk/LMDZ.GENERIC/libf/phystd/vdifc.F

    r1993 r2278  
    432432         end do
    433433
    434          call zerophys(ngrid*nq,pdqsdif)
     434         pdqsdif(1:ngrid,1:nq)=0
    435435
    436436!     Implicit inversion of q
Note: See TracChangeset for help on using the changeset viewer.