Ignore:
Timestamp:
Feb 25, 2015, 5:11:26 PM (10 years ago)
Author:
emillour
Message:

Mars model:
Very minor additions for the 1D model:

  • avoid defining 0 traceurs in startfi file, as that value is resrved in NetCDF for unlimited dimensions,
  • add a check on the presence of co2,co,o and n2 tracers when using nltemodel>0

EM

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

Legend:

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

    r1266 r1380  
    589589       endif
    590590
     591       if (callnlte) then ! NLTE requirements
     592         if (nltemodel.ge.1) then
     593           ! check that co2, co, o and n2 tracers are available
     594           if (igcm_co2.eq.0) then
     595             write(*,*) "initracer: error !!"
     596             write(*,*) "  with nltemodel>0, we need the co2 tracer!"
     597             stop
     598           endif
     599           if (igcm_co.eq.0) then
     600             write(*,*) "initracer: error !!"
     601             write(*,*) "  with nltemodel>0, we need the co tracer!"
     602             stop
     603           endif
     604           if (igcm_o.eq.0) then
     605             write(*,*) "initracer: error !!"
     606             write(*,*) "  with nltemodel>0, we need the o tracer!"
     607             stop
     608           endif
     609           if (igcm_n2.eq.0) then
     610             write(*,*) "initracer: error !!"
     611             write(*,*) "  with nltemodel>0, we need the n2 tracer!"
     612             stop
     613           endif
     614         endif
     615       endif
     616
    591617       if (scavenging) then
    592618       ! verify that we indeed have ccn_mass and ccn_number tracers
  • trunk/LMDZ.MARS/libf/phymars/iostart.F90

    r1130 r1380  
    528528      ENDIF
    529529     
    530       ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
     530      if (nqtot.ne.0) then
     531        ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
     532      else
     533        ! pretend nqtot=1 because 0 size implies unlimited dimension for NetCDF
     534        ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",1,idim5)
     535      endif
    531536      IF (ierr/=NF90_NOERR) THEN
    532537        write(*,*)'open_restartphy: problem defining number_of_advected_fields dimension '
  • trunk/LMDZ.MARS/libf/phymars/physiq.F

    r1377 r1380  
    24542454         call WRITEDIAGFI(ngrid,"pplev","Pressure","Pa",1,zplev)
    24552455         call WRITEDIAGFI(ngrid,"rho","rho","kg.m-3",1,rho)
    2456 !         call WRITEDIAGFI(ngrid,"dtrad","rad. heat. rate",              &
    2457 !     &              "K.s-1",1,dtrad/zpopsk)
    2458 !        call WRITEDIAGFI(ngrid,'sw_htrt','sw heat. rate',
    2459 !     &                   'w.m-2',1,zdtsw/zpopsk)
    2460 !        call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate',
    2461 !     &                   'w.m-2',1,zdtlw/zpopsk)
     2456         call WRITEDIAGFI(ngrid,"dtrad","rad. heat. rate",              &
     2457     &              "K.s-1",1,dtrad)
     2458        call WRITEDIAGFI(ngrid,'sw_htrt','sw heat. rate',
     2459     &                   'w.m-2',1,zdtsw)
     2460        call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate',
     2461     &                   'w.m-2',1,zdtlw)
    24622462         call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness"
    24632463     &                                   ,"kg.m-2",0,co2ice)
  • trunk/LMDZ.MARS/libf/phymars/testphys1d.F

    r1311 r1380  
    373373      ! we still need to set (dummy) tracer number and names for physdem1
    374374        nq=1
     375        nqtot=nq ! set value of nqtot (in infotrac module) as nq
    375376        ! allocate arrays:
    376377        allocate(tname(nq))
     
    381382        allocate(mqtot(nq))
    382383        do iq=1,nq
    383           write(str7,'(a1,i2.2)')'q',iq
     384          write(str7,'(a1,i2.2)')'t',iq
    384385          tname(iq)=str7
    385386        enddo
     
    797798        CALL endg1d(1,nlayer,zlay/1000.,ndt)
    798799
    799 c    ========================================================
     800      write(*,*) "testphys1d: Everything is cool."
     801
    800802      END
    801803 
Note: See TracChangeset for help on using the changeset viewer.