Changeset 1790


Ignore:
Timestamp:
Sep 29, 2017, 1:57:44 PM (7 years ago)
Author:
jvatant
Message:

Update 1D model that hasn't been cleaned since migration from generic

+ remove co2,water, kcm ...
+ added moyzon

Also correct deftank according to r1788
--JVO

Location:
trunk/LMDZ.TITAN
Files:
1 added
6 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/deftank/callphys.def

    r1681 r1790  
    9595Fat1AU = 1366.0
    9696
    97 ## Tracer and aerosol options
    98 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~
    99 # Gravitational sedimentation of tracers (just H2O ice for now) ?
    100 sedimentation = .false.
    101 
    10297## Other physics options
    10398## ~~~~~~~~~~~~~~~~~~~~~
  • trunk/LMDZ.TITAN/libf/dyn3d/disvert.F

    r1621 r1790  
    33! to use  'getin'
    44      USE ioipsl_getincom
    5       USE callkeys_mod, ONLY: kastprof,pceil
     5      USE callkeys_mod, ONLY: pceil
    66      USE comvert_mod, ONLY: ap,bp,sig,nivsigs,nivsig,pa,preff,
    77     .                  aps,bps,presnivs,pseudoalt,scaleheight
     
    6464      write(*,*) " autozlevs = ", autozlevs
    6565
    66       write(*,*)"Operate in kastprof mode?"
    67       kastprof=.false.
    68       call getin("kastprof",kastprof)
    69       write(*,*)" kastprof = ",kastprof
    70 
    71       print*,'kast=',kastprof
    72 
    7366      pceil=100.0 ! Pascals
    7467      PRINT *,'Ceiling pressure (Pa) ?'
     
    8174      endif
    8275
    83       if(kastprof.and.iim.gt.1)then
    84          print*,'kastprof no good in 3D...'
    85          call abort
    86       endif
    87 
    8876      psurf=610. ! default value for psurf
    8977      PRINT *,'Surface pressure (Pa) ?'
     
    9179      write(*,*) " psurf = ",psurf
    9280
    93       if(kastprof)then
    94 
    95         sig(1)=1
    96         do l=2,llm
    97                                 !sig(l)=1. - real(l-1)/real(llm) ! uses linear sigma spacing
    98                                 !sig(l)=exp(-real(l-1)*h/real(llm)) ! uses log sigma spacing
    99                                 !sig(l)=exp(-real(l-1)*Hmax/real(llm)) ! uses log sigma spacing
    100            sig(l)=(pceil/psurf)**(real(l-1)/real(llm)) ! uses log sigma spacing
    101            
    102         end do
    103         sig(llm+1)=0
    104 
    105       elseIF(ierr4.eq.0)then
     81      IF(ierr4.eq.0)then
    10682         PRINT*,'****************************'
    10783         PRINT*,'Lecture de z2sig.def'
  • trunk/LMDZ.TITAN/libf/dyn3d/logic_mod.F90

    r1593 r1790  
    33IMPLICIT NONE 
    44
    5 LOGICAL purmats,forward,leapf,apphys,statcl,conser, &
    6      & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus,hybrid,autozlevs
     5  LOGICAL purmats ! true if time stepping is purely Matsuno scheme
     6                  ! false implies Matsuno-Leapfrog time stepping scheme
     7  LOGICAL forward ! true if during forward phase of Matsuno step
     8  LOGICAL leapf ! true if during a leapfrog time stepping step
     9  LOGICAL apphys ! true if during a time step when physics will be called
     10  LOGICAL statcl
     11  LOGICAL conser
     12  LOGICAL apdiss ! true if during a time step when dissipation will be called
     13  LOGICAL apdelq
     14  LOGICAL saison
     15  LOGICAL ecripar
     16  LOGICAL fxyhypb ! true if using hyperbolic function discretization
     17                  ! for latitudinal grid
     18  LOGICAL ysinus ! true if using sine function discretiation
     19                 ! for latitudinal grid
     20  LOGICAL read_start ! true if reading a start.nc file to initialize fields
     21  LOGICAL ok_guide ! true if nudging
     22  LOGICAL ok_strato
     23  LOGICAL tidal  ! true if adding tidal forces (for Titan)
     24  LOGICAL ok_gradsfile
     25  LOGICAL ok_limit  ! true for boundary conditions file creation (limit.nc)
     26  LOGICAL ok_etat0  ! true for initial states creation (start.nc, startphy.nc)
     27  LOGICAL read_orop ! true for sub-cell scales orographic params read in file
     28  LOGICAL hybrid ! vertical coordinate is hybrid if true (sigma otherwise)
     29                 ! (only used if disvert_type==2)
     30  LOGICAL autozlevs ! true if auto-discretization of vertical levels
     31  LOGICAL moyzon_mu,moyzon_ch ! used for zonal averages in Titan
    732
    8 INTEGER iflag_phys ! ==1 if calling a physics package
     33  INTEGER iflag_phys ! type of physics to call: 0 none, 1: phy*** package,
     34                     ! 2: Held & Suarez, 101-200: aquaplanets & terraplanets
     35  INTEGER iflag_trac
    936
    1037END MODULE logic_mod
  • trunk/LMDZ.TITAN/libf/phytitan/dyn1d/rcm1d.F

    r1621 r1790  
    66      use mod_grid_phy_lmdz, only : regular_lonlat
    77      use infotrac, only: nqtot, tname
    8       use surfdat_h, only: albedodat, phisfi, dryness, watercaptag,
     8      use surfdat_h, only: albedodat, phisfi,
    99     &                     zmea, zstd, zsig, zgam, zthe,
    1010     &                     emissiv, emisice, iceradius,
     
    1414      use phyredem, only: physdem0,physdem1
    1515      use geometry_mod, only: init_geometry
    16       use slab_ice_h, only: noceanmx
    1716      use planete_mod, only: apoastr,periastr,year_day,peri_day,
    1817     &         obliquit,nres,z0,lmixmin,emin_turb,coefvis,coefir,
     
    2322     &                            nday, iphysiq
    2423      use callkeys_mod, only: tracer,check_cpp_match,rings_shadow,
    25      &                        specOLR,water,pceil,ok_slab_ocean
     24     &                        specOLR,pceil
    2625      USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff, sig,
    2726     &                       presnivs,pseudoalt,scaleheight
     
    5857!     A. Spiga
    5958!     J. Leconte (2012)
     59!     J. Vatant d'Ollone (2017)
    6060!
    6161!==================================================================
     
    8888      REAL,ALLOCATABLE :: qsurf(:)    ! tracer surface budget (e.g. kg.m-2)
    8989      REAL,ALLOCATABLE :: tsoil(:)    ! subsurface soil temperature (K)
    90 !      REAL co2ice               ! co2ice layer (kg.m-2) !not used anymore
    91       integer :: i_co2_ice=0     ! tracer index of co2 ice
    92       integer :: i_h2o_ice=0     ! tracer index of h2o ice
    93       integer :: i_h2o_vap=0     ! tracer index of h2o vapor
    9490      REAL emis(1)               ! surface layer
    9591      REAL q2(llm+1)             ! Turbulent Kinetic Energy
     
    112108      integer :: nq !=1 ! number of tracers
    113109 
    114       character*2 str2
    115       character (len=7) :: str7
    116110      character(len=44) :: txt
    117111
    118       logical oldcompare, earthhack,saveprofile
     112      logical saveprofile
    119113
    120114!     added by RW for zlay computation
     
    125119      real logplevs(llm)
    126120
    127 !     added by BC
    128       REAL cloudfrac(1,llm)
    129       REAL hice(1),totcloudfrac(1)
    130 
    131 !     added by BC for ocean
    132       real rnat(1)
    133       REAL tslab(1,noceanmx),tsea_ice(1),sea_ice(1)
    134       real pctsrf_sic(1)
    135 
    136 
     121!     added by JVO
     122      REAL tankCH4(1)
    137123
    138124!     added by AS to avoid the use of adv trac common
     
    157143      IF (.not. ALLOCATED(zgam)) ALLOCATE(zgam(1))
    158144      IF (.not. ALLOCATED(zthe)) ALLOCATE(zthe(1))
    159       IF (.not. ALLOCATED(dryness)) ALLOCATE(dryness(1))
    160       IF (.not. ALLOCATED(watercaptag)) ALLOCATE(watercaptag(1))
    161145      !! those are defined in comdiurn_h.F90
    162146      IF (.not.ALLOCATED(sinlat)) ALLOCATE(sinlat(1))
     
    272256            endif
    273257          enddo !of do iq=1,nq
    274 ! check for co2_ice / h2o_ice tracers:
    275          i_co2_ice=0
    276          i_h2o_ice=0
    277          i_h2o_vap=0
    278          do iq=1,nq
    279            if (tname(iq)=="co2_ice") then
    280              i_co2_ice=iq
    281            elseif (tname(iq)=="h2o_ice") then
    282              i_h2o_ice=iq
    283            elseif (tname(iq)=="h2o_vap") then
    284              i_h2o_vap=iq
    285            endif
    286          enddo
    287258        else
    288259          write(*,*) 'Cannot find required file "traceur.def"'
     
    577548            write(*,*)"  tracer:",trim(txt)
    578549             
    579             ! CO2
    580             if (txt.eq."co2_ice") then
    581                q(:,iq)=0.   ! kg/kg of atmosphere
    582                qsurf(iq)=0. ! kg/m2 at the surface               
    583                ! Look for a "profile_co2_ice" input file
    584                open(91,file='profile_co2_ice',status='old',
    585      &         form='formatted',iostat=ierr)
    586                if (ierr.eq.0) then
    587                   read(91,*) qsurf(iq)
    588                   do ilayer=1,nlayer
    589                      read(91,*) q(ilayer,iq)
    590                   enddo
    591                else
    592                   write(*,*) "No profile_co2_ice file!"
    593                endif
    594                close(91)
    595             endif ! of if (txt.eq."co2")
    596          
    597             ! WATER VAPOUR
    598             if (txt.eq."h2o_vap") then
    599                q(:,iq)=0.   ! kg/kg of atmosphere
    600                qsurf(iq)=0. ! kg/m2 at the surface
    601                ! Look for a "profile_h2o_vap" input file   
    602                open(91,file='profile_h2o_vap',status='old',
    603      &         form='formatted',iostat=ierr)
    604                if (ierr.eq.0) then
    605                   read(91,*) qsurf(iq)
    606                   do ilayer=1,nlayer
    607                      read(91,*) q(ilayer,iq)
    608                   enddo
    609                else
    610                   write(*,*) "No profile_h2o_vap file!"
    611                endif
    612                close(91)
    613             endif ! of if (txt.eq."h2o_vap")
    614            
    615             ! WATER ICE
    616             if (txt.eq."h2o_ice") then
    617                q(:,iq)=0.   ! kg/kg of atmosphere
    618                qsurf(iq)=0. ! kg/m2 at the surface
    619                ! Look for a "profile_h2o_ice" input file
    620                open(91,file='profile_h2o_ice',status='old',
    621      &         form='formatted',iostat=ierr)
    622                if (ierr.eq.0) then
    623                   read(91,*) qsurf(iq)
    624                   do ilayer=1,nlayer
    625                      read(91,*) q(ilayer,iq)
    626                   enddo
    627                else
    628                   write(*,*) "No profile_h2o_ice file!"
    629                endif
    630                close(91)
    631             endif ! of if (txt.eq."h2o_ice")
    632 
    633550         enddo ! of do iq=1,nq
    634551         
     
    673590      emissiv=emis(1) ! we do this so that condense_co2 sets things to the right
    674591                   ! value if there is no snow
    675 
    676       if(i_co2_ice.gt.0)then
    677          qsurf(i_co2_ice)=0 ! default value for co2ice
    678          print*,'Initial CO2 ice on the surface (kg.m-2)'
    679          call getin("co2ice",qsurf(i_co2_ice))
    680          write(*,*) " co2ice = ",qsurf(i_co2_ice)
    681          IF (qsurf(i_co2_ice).ge.1.E+0) THEN
    682             ! if we have some CO2 ice on the surface, change emissivity
    683             if (latitude(1).ge.0) then ! northern hemisphere
    684               emis(1)=emisice(1)
    685             else ! southern hemisphere
    686               emis(1)=emisice(2)
    687             endif
    688          ENDIF
    689       endif
    690592
    691593c  calcul des pressions et altitudes en utilisant les niveaux sigma
     
    823725
    824726
    825 ! Initialize slab ocean
    826 ! -----------------
    827       rnat=1. ! default value for rnat
    828       if(inertiedat(1,1).GE.10000.)then
    829          rnat=0.
    830       endif
    831       if(ok_slab_ocean)then
    832       rnat=0.
    833       tslab(1,1)=tsurf(1)
    834       tslab(1,2)=tsurf(1)
    835       tsea_ice=tsurf
    836       pctsrf_sic=0.
    837       sea_ice=0.
    838       endif
    839 
    840 
    841 
    842727c  Write a "startfi" file
    843728c  --------------------
     
    850735      call physdem1("startfi.nc",nsoilmx,1,llm,nq,
    851736     &                dtphys,time,
    852      &                tsurf,tsoil,emis,q2,qsurf,
    853      &                cloudfrac,totcloudfrac,hice,
    854      &                rnat,pctsrf_sic,tslab,tsea_ice,sea_ice)
     737     &                tsurf,tsoil,emis,q2,qsurf,tankCH4)
    855738
    856739c=======================================================================
Note: See TracChangeset for help on using the changeset viewer.