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

Mars GCM:
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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r2740 r2826  
    99
    1010subroutine phyetat0 (fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq, &
    11                      day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf,co2ice, &
     11                     day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf, &
    1212                     tauscaling,totcloudfrac,wstar,watercap)
    1313
     
    6363  real,intent(out) :: q2(ngrid,nlay+1) !
    6464  real,intent(out) :: qsurf(ngrid,nq) ! tracers on surface
    65   real,intent(out) :: co2ice(ngrid) ! co2 ice cover
    6665  real,intent(out) :: tauscaling(ngrid) ! dust conversion factor
    6766  real,intent(out) :: totcloudfrac(ngrid) ! total cloud fraction
     
    348347endif ! if (startphy_file)
    349348
    350 ! CO2 ice cover
    351 if (startphy_file) then
    352    call get_field("co2ice",co2ice,found,indextime)
    353    if (.not.found) then
    354      call abort_physic(modname, &
    355                 "phyetat0: Failed loading <co2ice>",1)
    356    endif
    357 else
    358    co2ice(:)=0.
    359 endif !if (startphy_file)
    360 write(*,*) "phyetat0: CO2 ice cover <co2ice> range:", &
    361             minval(co2ice), maxval(co2ice)
    362 
    363349! Dust conversion factor
    364350if (startphy_file) then
     
    561547
    562548    if (startphy_file) then
    563        call get_field(txt,qsurf(:,iq),found,indextime)
    564        if (.not.found) then
    565          write(*,*) "phyetat0: Failed loading <",trim(txt),">"
    566          write(*,*) "         ",trim(txt)," is set to zero"
    567          qsurf(:,iq)=0.
    568        endif
    569     else
     549      if (txt.eq."co2") then
     550        ! We first check if co2ice exist in the startfi file (old way)
     551        ! CO2 ice cover
     552        call get_field("co2ice",qsurf(:,iq),found,indextime)
     553        ! If not, we load the corresponding tracer in qsurf
     554        if (.not.found) then
     555          call get_field(txt,qsurf(:,iq),found,indextime)
     556          if (.not.found) then
     557            call abort_physic(modname, &
     558                "phyetat0: Failed loading co2ice. there is neither the variable co2ice nor qsurf",1)
     559          endif
     560        endif
     561      else ! (not the co2 tracer)
     562        call get_field(txt,qsurf(:,iq),found,indextime)
     563        if (.not.found) then
     564          write(*,*) "phyetat0: Failed loading <",trim(txt),">"
     565          write(*,*) "         ",trim(txt)," is set to zero"
     566          qsurf(:,iq)=0.
     567        endif
     568      endif !endif co2
     569    else !(not startphy_file)
    570570      qsurf(:,iq)=0.
    571571    endif ! of if (startphy_file)
     
    573573                 minval(qsurf(:,iq)), maxval(qsurf(:,iq))
    574574  enddo ! of do iq=1,nq
     575
     576    if (txt.eq."co2") then
     577      ! We first check if co2ice exist in the startfi file (old way)
     578      ! CO2 ice cover
     579      if (startphy_file) then
     580        call get_field("co2ice",qsurf(:,iq),found,indextime)
     581      ! If not, we load the corresponding tracer in qsurf
     582        if (.not.found) then
     583          call get_field(txt,qsurf(:,iq),found,indextime)
     584          if (.not.found) then
     585            call abort_physic(modname, &
     586                "phyetat0: Failed loading co2ice",1)
     587          endif
     588        endif
     589      else
     590       ! If we run without startfile, co2ice is set to 0
     591        qsurf(:,iq)=0.
     592      endif !if (startphy_file)
     593        write(*,*) "phyetat0: CO2 ice cover <co2ice> range:", &
     594            minval(qsurf(:,iq)), maxval(qsurf(:,iq))
     595    endif
     596
    575597endif ! of if (nq.ge.1)
    576598
Note: See TracChangeset for help on using the changeset viewer.