Changeset 2828 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Nov 23, 2022, 11:14:30 AM (2 years ago)
Author:
romain.vande
Message:

Mars newstart and startarchive:
Same as previous commit for newstart and startarchive.
The variable co2ice is deleted. All the co2 ice on surface is now in qsurf(:,igcm_co2).
CO2 tracer is now mandatory. diagfi output is unchanged.
RV

Location:
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
Files:
4 edited

Legend:

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

    r2630 r2828  
    11      SUBROUTINE lect_start_archive(ngrid,nlayer,nqtot,
    22     &     date,tsurf,tsoil,albedo,emis,q2,
    3      &     t,ucov,vcov,ps,co2ice,h,phisold_newgrid,
     3     &     t,ucov,vcov,ps,h,phisold_newgrid,
    44     &     q,qsurf,tauscaling,totcloudfrac,surfith,nid,
    55     &     watercap)
     
    4646      REAL,INTENT(OUT) :: tsurf(ngrid) ! surface temperature
    4747      REAL,INTENT(OUT) :: tsoil(ngrid,nsoilmx) ! soil temperature
    48       REAL,INTENT(OUT) :: co2ice(ngrid) ! CO2 ice layer
    4948      REAL,INTENT(OUT) :: albedo(ngrid,2) ! surface albedo
    5049      REAL,INTENT(OUT) :: emis(ngrid) ! ground emissivity
     
    193192      logical :: oldtracernames=.false.
    194193      integer :: counter
     194      integer :: igcm_co2
    195195      character(len=30) :: txt ! to store some text
    196196      real :: tmpval ! to store a temporary variable/value
     
    702702      count=(/imold+1,jmold+1,1,0/)
    703703       
    704       ierr = NF_INQ_VARID (nid, "co2ice", nvarid)
    705       IF (ierr .NE. NF_NOERR) THEN
    706          PRINT*, "lect_start_archive: <co2ice> is missing"
     704      ierr = NF_INQ_VARID (nid, "co2", nvarid)
     705      IF (ierr .NE. NF_NOERR) THEN
     706         PRINT*, "lect_start_archive: <co2> is missing"
    707707         CALL abort
    708708      ENDIF
     
    713713#endif
    714714      IF (ierr .NE. NF_NOERR) THEN
    715          PRINT*, "lect_start_archive: Failed loading <co2ice>"
     715         PRINT*, "lect_start_archive: Failed loading <co2>"
    716716         PRINT*, NF_STRERROR(ierr)
    717717         CALL abort
     
    875875            write(*,*) 'lect_start_archive: loading surface tracer',
    876876     &                     ' h2o_ice instead of h2o_vap'
     877          endif
     878          if(txt.eq."co2_surf") then
     879            igcm_co2=iq
    877880          endif
    878881        ENDIF ! of IF (oldtracernames)
     
    14661469      enddo
    14671470     
    1468       call gr_dyn_fi (1,iim+1,jjm+1,ngrid,co2ices,co2ice)
     1471      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,co2ices,qsurf(:,igcm_co2))
    14691472
    14701473c-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r2825 r2828  
    2929      use surfdat_h, only: phisfi, z0, zmea, zstd, zsig, zgam, zthe,
    3030     &                     albedodat, z0_default, qsurf, tsurf,
    31      &                     co2ice, emis, hmons, summit, base, watercap
     31     &                     emis, hmons, summit, base, watercap
    3232      use comsoil_h, only: inertiedat, layer, mlayer, nsoilmx, tsoil
    3333      use control_mod, only: day_step, iphysiq, anneeref, planet_type
     
    420420        CALL lect_start_archive(ngridmx,llm,nqtot,
    421421     &   date,tsurf,tsoil,albedo,emis,q2,
    422      &   t,ucov,vcov,ps,co2ice,teta,phisold_newgrid,q,qsurf,
     422     &   t,ucov,vcov,ps,teta,phisold_newgrid,q,qsurf,
    423423     &   tauscaling,totcloudfrac,surfith,nid,watercap)
    424424        write(*,*) "OK, read start_archive file"
     
    442442        CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
    443443     &        day_ini,time,tsurf,tsoil,albedo,emis,
    444      &        q2,qsurf,co2ice,tauscaling,totcloudfrac,
     444     &        q2,qsurf,tauscaling,totcloudfrac,
    445445     &        wstar,watercap)
    446446       
     
    525525      write(*,*) 'isotherm     : Isothermal Temperatures, wind set to
    526526     $ zero'
    527       write(*,*) 'co2ice=0     : remove CO2 polar cap'
     527      write(*,*) 'co2ice=0     : remove CO2 polar cap i.e.
     528     $ qsurf(co2)=0 '
    528529      write(*,*) 'ptot         : change total pressure'
    529530      write(*,*) 'therm_ini_s  : set soil thermal inertia to reference
     
    688689                patm = patm + ps(i,j)*aire(i,j)
    689690                airetot= airetot + aire(i,j)
    690                 pcap = pcap + aire(i,j)*co2ice(ig)*g
     691                pcap = pcap + aire(i,j)*qsurf(ig,igcm_co2)*g
    691692             ENDDO
    692693          ENDDO
     
    13221323        else if (trim(modif) .eq. 'co2ice=0') then
    13231324           do ig=1,ngridmx
    1324               co2ice(ig)=0
     1325              qsurf(ig,igcm_co2)=0
    13251326              emis(ig)=emis(ngridmx/2)
    13261327           end do
     
    17891790      call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot,
    17901791     &              dtphys,hour_ini,
    1791      &              tsurf,tsoil,co2ice,albedo,emis,q2,qsurf,tauscaling,
     1792     &              tsurf,tsoil,albedo,emis,q2,qsurf,tauscaling,
    17921793     &              totcloudfrac,wstar,watercap)
    17931794
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F

    r2814 r2828  
    6363      REAL tsurf(ngridmx)        ! Surface temperature
    6464      REAL tsoil(ngridmx,nsoilmx) ! Soil temperature
    65       REAL co2ice(ngridmx)        ! CO2 ice layer
    6665      REAL watercap(ngridmx)        ! h2o ice layer
    6766      REAL tauscaling(ngridmx) ! dust conversion factor
     
    8281      REAL tsoilS(ip1jmp1,nsoilmx)
    8382      REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
    84       REAL co2iceS(ip1jmp1)
    8583      REAL watercapS(ip1jmp1)
    8684      REAL tauscalingS(ip1jmp1)
     
    111109      character*80      fichnom
    112110      integer :: ierr,ntime
     111      integer :: igcm_co2
    113112      integer :: nq,numvanle
    114113      character(len=30) :: txt ! to store some text
     
    163162
    164163      CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
    165      &      day_ini_fi,timefi,tsurf,tsoil,albedo,emis,q2,qsurf,co2ice,
     164     &      day_ini_fi,timefi,tsurf,tsoil,albedo,emis,q2,qsurf,
    166165     &      tauscaling,totcloudfrac,wstar,watercap)
    167166
     
    246245c
    247246c tsurf --> tsurfS
    248 c co2ice --> co2iceS
    249247c watercap --> watercapS
    250248c tsoil --> tsoilS
     
    260258
    261259      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsurf,tsurfS)
    262       call gr_fi_dyn(1,ngridmx,iip1,jjp1,co2ice,co2iceS)
    263260      call gr_fi_dyn(1,ngridmx,iip1,jjp1,watercap,watercapS)
    264261      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil,tsoilS)
     
    276273c=======================================================================
    277274
     275      DO iq=1,nqtot
     276        if (trim(tname(iq)) .eq. "co2") then
     277           igcm_co2=iq
     278        endif
     279      enddo
     280
    278281      ptotal =  0.
    279282      co2icetotal = 0.
     
    282285           ptotal=ptotal+aire(i+(iim+1)*(j-1))*ps(i+(iim+1)*(j-1))/g
    283286           co2icetotal = co2icetotal +
    284      &            co2iceS(i+(iim+1)*(j-1))*aire(i+(iim+1)*(j-1))
     287     &            qsurfS(i+(iim+1)*(j-1),igcm_co2)*aire(i+(iim+1)*(j-1))
    285288         ENDDO
    286289      ENDDO
     
    357360c-----------------------------------------------------------------------
    358361
    359       call write_archive(nid,ntime,'co2ice','couche de glace co2',
    360      &  'kg/m2',2,co2iceS)
    361362      call write_archive(nid,ntime,'watercap','couche de glace h2o',
    362363     &  'kg/m2',2,watercapS)
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F

    r2814 r2828  
    6666      REAL tsurf(ngridmx)        ! Surface temperature
    6767      REAL tsoil(ngridmx,nsoilmx) ! Soil temperature
    68       REAL co2ice(ngridmx)        ! CO2 ice layer
    6968      REAL watercap(ngridmx)        ! h2o ice layer
    7069      REAL tauscaling(ngridmx) ! dust conversion factor
     
    8887      REAL tsoilS(ip1jmp1,nsoilmx)
    8988      REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
    90       REAL co2iceS(ip1jmp1)
    9189      REAL watercapS(ip1jmp1)
    9290      REAL tauscalingS(ip1jmp1)
     
    128126      character*80      fichnom
    129127      integer :: ierr,ntime
     128      integer :: igcm_co2
    130129      integer :: nq,numvanle
    131130      character(len=30) :: txt ! to store some text
     
    180179
    181180      CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
    182      &      day_ini_fi,timefi,tsurf,tsoil,albedo,emis,q2,qsurf,co2ice,
     181     &      day_ini_fi,timefi,tsurf,tsoil,albedo,emis,q2,qsurf,
    183182     &      tauscaling,totcloudfrac,wstar,watercap)
    184183
     
    263262c
    264263c tsurf --> tsurfS
    265 c co2ice --> co2iceS
    266264c tsoil --> tsoilS
    267265c emis --> emisS
     
    274272
    275273      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsurf,tsurfS)
    276       call gr_fi_dyn(1,ngridmx,iip1,jjp1,co2ice,co2iceS)
    277274      call gr_fi_dyn(1,ngridmx,iip1,jjp1,watercap,watercapS)
    278275      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil,tsoilS)
     
    301298c=======================================================================
    302299
     300      DO iq=1,nqtot
     301        if (trim(tname(iq)) .eq. "co2") then
     302           igcm_co2=iq
     303        endif
     304      enddo
     305
    303306      ptotal =  0.
    304307      co2icetotal = 0.
     
    307310           ptotal=ptotal+aire(i+(iim+1)*(j-1))*ps(i+(iim+1)*(j-1))/g
    308311           co2icetotal = co2icetotal +
    309      &            co2iceS(i+(iim+1)*(j-1))*aire(i+(iim+1)*(j-1))
     312     &            qsurfS(i+(iim+1)*(j-1),igcm_co2)*aire(i+(iim+1)*(j-1))
    310313         ENDDO
    311314      ENDDO
     
    382385c-----------------------------------------------------------------------
    383386
    384       call write_archive(nid,ntime,'co2ice','couche de glace co2',
    385      &  'kg/m2',2,co2iceS)
    386387      call write_archive(nid,ntime,'watercap','couche de glace h2o',
    387388     &  'kg/m2',2,watercapS)
Note: See TracChangeset for help on using the changeset viewer.