Ignore:
Timestamp:
May 6, 2020, 4:46:33 PM (5 years ago)
Author:
lrossi
Message:

MARS GCM:
Implementation of HDO in the physics
New tracers hdo_vap and hdo_ice are added. Cf. traceur.def.isotopes in deftank for exemple of traceur.def.
All HDO related computations are activated by flag hdo=.true. in callphys.def. (see callphys.def.hdo in deftank for an example)
Additional option hdofrac (true by default) allows for turning on/off fractionation (for tests).
For now, only functional with simplified cloud scheme (so microphys=.false. and activice=.false. also recommended).
Initialisation of start files can be done with option 'inihdo' in newstart.
LR

File:
1 edited

Legend:

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

    r2293 r2312  
    117117      integer :: nq=1 ! number of tracers
    118118      real :: latitude(1), longitude(1), cell_area(1)
     119      integer iqh2ovap
     120      integer iqh2oice
    119121
    120122      character*2 str2
     
    294296          ! WATER VAPOUR
    295297          if (txt.eq."h2o_vap") then
     298             iqh2ovap=iq !remember index for water vap
    296299            !look for a "profile_h2o_vap" input file
    297300            open(91,file='profile_h2o_vap',status='old',
     
    309312          ! WATER ICE
    310313          if (txt.eq."h2o_ice") then
     314                iqh2oice = iq !remember index for water ice
    311315            !look for a "profile_h2o_vap" input file
    312316            open(91,file='profile_h2o_ice',status='old',
     
    322326            close(91)
    323327          endif ! of if (txt.eq."h2o_ice")
     328
     329          ! HDO VAPOUR
     330          if (txt.eq."hdo_vap") then
     331            !look for a "profile_hdo_vap" input file
     332            open(91,file='profile_hdo_vap',status='old',
     333     &       form='formatted',iostat=ierr)
     334            if (ierr.eq.0) then
     335              read(91,*) qsurf(iq)
     336              do ilayer=1,nlayer
     337                read(91,*) q(ilayer,iq)
     338              enddo
     339            else
     340              write(*,*) "No profile_hdo_vap file!"
     341              do ilayer=1,nlayer
     342                q(ilayer,iq) =  q(ilayer,iqh2ovap)*2*155.76e-6*5
     343              enddo
     344            endif
     345            close(91)
     346          endif ! of if (txt.eq."hdo_ice")
     347          ! HDO ICE
     348          if (txt.eq."hdo_ice") then
     349            !look for a "profile_hdo_vap" input file
     350            open(91,file='profile_hdo_ice',status='old',
     351     &       form='formatted',iostat=ierr)
     352            if (ierr.eq.0) then
     353              read(91,*) qsurf(iq)
     354              do ilayer=1,nlayer
     355                read(91,*) q(ilayer,iq)
     356              enddo
     357            else
     358              write(*,*) "No profile_hdo_ice file!"
     359                qsurf(iq) = qsurf(iqh2oice) * 2*155.76e-6*5
     360               do ilayer=1,nlayer
     361                q(ilayer,iq) = q(ilayer,iqh2oice) * 2*155.76e-6*5
     362              enddo
     363            endif
     364            close(91)
     365          endif ! of if (txt.eq."hdo_ice")
     366
     367
    324368          ! DUST
    325369          !if (txt(1:4).eq."dust") then
Note: See TracChangeset for help on using the changeset viewer.