Ignore:
Timestamp:
Apr 3, 2023, 6:17:05 PM (20 months ago)
Author:
romain.vande
Message:

Mars PCM:
Add a new routine to write output called write_output.
It needs to be imported (for example : use write_output_mod, only: write_output)
Then, it requires only 4 arguments : the name of the variable, its title, its units and the variable itself.
It detects the dimension of the variable and decide to output either in diagfi or diagsoil.
It is also compatible with XIOS (xml file needs to be adapted)
Writediagfi and writediagsoil routines are still available in case.
RV

File:
1 edited

Legend:

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

    r2903 r2932  
    3030       use comcstfi_h, only: cpp, g, r, pi
    3131       use dust_param_mod, only: freedust
    32 
     32       use write_output_mod, only: write_output
    3333#ifndef MESOSCALE
    3434       USE vertical_layers_mod, ONLY: ap, bp
     
    332332     &                       rdust,zcondicea,zfallice,zdq_scav,pdqsc)
    333333      endif
    334              call WRITEdiagfi(ngrid,"zfallice",
     334             call write_output("zfallice",
    335335     &         "",
    336      &         " ",2,zfallice(ngrid,1))
     336     &         " ",zfallice(:,1))
    337337      ELSE ! if co2 clouds
    338338        condens_layer(:,:) = 0.
     
    349349          piceco2(ig) = piceco2(ig) + zdqssed_co2(ig)*ptimestep
    350350        ENDDO
    351        call WRITEdiagfi(ngrid,"zfallice",
     351       call write_output("zfallice",
    352352     &         "",
    353      &         " ",2,zdqssed_co2) ! otherwise we have not 1 day(1proc) = 1 day (24procs) test
     353     &         " ",zdqssed_co2(:)) ! otherwise we have not 1 day(1proc) = 1 day (24procs) test
    354354      ENDIF ! end of if co2clouds
    355355
    356       call WRITEdiagfi(ngrid,"pdtc_atm",
     356      call write_output("pdtc_atm",
    357357     &         "temperature tendency due to CO2 condensation",
    358      &         " ",3,pdtc)
     358     &         " ",pdtc(:,:))
    359359     
    360        call WRITEdiagfi(ngrid,"condens_layer",
     360       call write_output("condens_layer",
    361361     &         "",
    362      &         " ",3,condens_layer)
     362     &         " ",condens_layer(:,:))
    363363
    364364c     *************************
     
    716716c        END DO
    717717c     END DO
    718 c     call WRITEDIAGFI(ngrid,'tconda1',
     718c     call write_output('tconda1',
    719719c    &'Taux de condensation CO2 atmospherique /Pa',
    720 c    & 'kg.m-2.Pa-1.s-1',3,tconda1)
    721 c     call WRITEDIAGFI(ngrid,'tconda2',
     720c    & 'kg.m-2.Pa-1.s-1',tconda1)
     721c     call write_output('tconda2',
    722722c    &'Taux de condensation CO2 atmospherique /m',
    723 c    & 'kg.m-3.s-1',3,tconda2)
     723c    & 'kg.m-3.s-1',tconda2)
    724724
    725725! output falling co2 ice in 1st layer:
    726 !      call WRITEDIAGFI(ngrid,'fallice',
     726!      call write_output('fallice',
    727727!     &'Precipitation of co2 ice',
    728 !     & 'kg.m-2.s-1',2,zfallice(1,1))
     728!     & 'kg.m-2.s-1',zfallice(1,1))
    729729
    730730#ifndef MESOSCALE
Note: See TracChangeset for help on using the changeset viewer.