Ignore:
Timestamp:
Oct 5, 2012, 2:52:43 AM (12 years ago)
Author:
aslmd
Message:

MESOSCALE : adaptation for polar runs with new physics. co2 mr is now taken from GCM and given as an input (previously was initialized at 0.95). added mars=10 which is a case with CO2 being the only tracer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/readmeteo.F90

    r665 r802  
    8888real, dimension(:,:,:), allocatable :: swatericefile!, swaterfile
    8989real, dimension(:,:,:,:), allocatable :: dustfile,dustnfile
     90real, dimension(:,:,:,:), allocatable :: co2file
    9091real, dimension(:,:,:,:), allocatable :: ccnfile,ccnnfile
    9192
     
    230231allocate(dustfile(lonlen,latlen,altlen,timelen))
    231232allocate(dustnfile(lonlen,latlen,altlen,timelen))
     233allocate(co2file(lonlen,latlen,altlen,timelen))
    232234allocate(ccnfile(lonlen,latlen,altlen,timelen))
    233235allocate(ccnnfile(lonlen,latlen,altlen,timelen))
     
    285287dustfile(:,:,:,:)=0
    286288dustnfile(:,:,:,:)=0
     289co2file(:,:,:,:)=0
    287290ccnfile(:,:,:,:)=0
    288291ccnnfile(:,:,:,:)=0
     
    636639!! special water stuff
    637640!!------------------------
     641
     642    print *,'CO2 mass mixing ratio'
     643    ierr=NF_INQ_VARID(nid,"co2",nvarid)
     644    if (ierr.ne.NF_NOERR) then
     645      write(*,*) "...No co2 - co2 mixing ratio set to 0.95"
     646      co2file(:,:,:,:)=0.95
     647    else
     648      ierr=NF_GET_VAR_REAL(nid,nvarid,co2file)
     649    endif
    638650
    639651!!------------------------
     
    12301242!    ... Copy&Paste part !
    12311243!------------------------!
     1244FIELD='CO2'
     1245UNITS='kg/kg'
     1246DESC='CO2 mixing ratio'
     1247XLVL=200100.
     1248SLAB=co2file(:,:,1,time_out(l))
     1249        ! And now put everything in the destination file
     1250        ! ... Header
     1251        write(1) IFV
     1252        write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ
     1253        write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON
     1254        ! ... Data
     1255        write(1) SLAB
     1256!print *,'The field '//DESC//' was written to '//output
     1257
     1258!------------------------!
     1259! >>> Write a variable   !
     1260!    ... Copy&Paste part !
     1261!------------------------!
    12321262FIELD='DUSTQ'
    12331263UNITS='kg/kg'
     
    15331563        XLVL=levels(k)
    15341564        SLAB=isoilfile(:,:,k,time_out(l))
     1565                ! And now put everything in the destination file
     1566                ! ... Header
     1567        write(1) IFV
     1568        write(1) HDATE,XFCST,SOURCE,FIELD,UNITS,DESC,XLVL,NX,NY,IPROJ
     1569        write(1) STARTLOC,STARTLAT,STARTLON,DELTALAT,DELTALON
     1570                ! ... Data
     1571                write(1) SLAB
     1572END DO
     1573!print *,'The field '//DESC//' was written to '//output
     1574
     1575!------------------------!
     1576! >>> Write a variable   !
     1577!    ... Copy&Paste part !
     1578!------------------------!
     1579FIELD='CO2'
     1580UNITS='kg/kg'
     1581DESC='CO2 mixing ratio'
     1582DO k = 1,altlen
     1583        XLVL=levels(k)
     1584        SLAB=co2file(:,:,k,time_out(l))
    15351585                ! And now put everything in the destination file
    15361586                ! ... Header
     
    16761726deallocate(dustfile)
    16771727deallocate(dustnfile)
     1728deallocate(co2file)
    16781729deallocate(ccnfile)
    16791730deallocate(ccnnfile)
Note: See TracChangeset for help on using the changeset viewer.