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/vdifc_mod.F

    r2840 r2932  
    2828c      use geometry_mod, only: longitude_deg,latitude_deg !  Joseph
    2929      use dust_param_mod, only: doubleq, submicron, lifting
     30      use write_output_mod, only: write_output
    3031
    3132      IMPLICIT NONE
     
    395396! Some usefull diagnostics for the new surface layer parametrization :
    396397
    397 !        call WRITEDIAGFI(ngrid,'vdifc_zcdv_true',
     398!        call write_output('vdifc_zcdv_true',
    398399!     &              'momentum drag','no units',
    399 !     &                         2,zcdv_true)
    400 !        call WRITEDIAGFI(ngrid,'vdifc_zcdh_true',
     400!     &                         zcdv_true(:))
     401!        call write_output('vdifc_zcdh_true',
    401402!     &              'heat drag','no units',
    402 !     &                         2,zcdh_true)
    403 !        call WRITEDIAGFI(ngrid,'vdifc_ust',
    404 !     &              'friction velocity','m/s',2,ust)
    405 !       call WRITEDIAGFI(ngrid,'vdifc_tst',
    406 !     &              'friction temperature','K',2,tst)
    407 !        call WRITEDIAGFI(ngrid,'vdifc_zcdv',
     403!     &                         zcdh_true(:))
     404!        call write_output('vdifc_ust',
     405!     &              'friction velocity','m/s',ust(:))
     406!       call write_output('vdifc_tst',
     407!     &              'friction temperature','K',tst(:))
     408!        call write_output('vdifc_zcdv',
    408409!     &              'aerodyn momentum conductance','m/s',
    409 !     &                         2,zcdv)
    410 !        call WRITEDIAGFI(ngrid,'vdifc_zcdh',
     410!     &                         zcdv(:))
     411!        call write_output('vdifc_zcdh',
    411412!     &              'aerodyn heat conductance','m/s',
    412 !     &                         2,zcdh)
     413!     &                         zcdh(:))
    413414
    414415c    ** schema de diffusion turbulente dans la couche limite
     
    10571058c --------- end of tracers  ----------------------------
    10581059
    1059          call WRITEDIAGFI(ngrid,"surf_h2o_lh",
     1060         call write_output("surf_h2o_lh",
    10601061     &                          "Ground ice latent heat flux",
    1061      &                               "W.m-2",2,surf_h2o_lh(:))
     1062     &                               "W.m-2",surf_h2o_lh(:))
    10621063
    10631064C       Diagnostic output for HDO
    10641065        if (hdo) then
    1065             CALL WRITEDIAGFI(ngrid,'hdoflux',
     1066            CALL write_output('hdoflux',
    10661067     &                       'hdoflux',
    1067      &                       ' ',2,hdoflux
    1068             CALL WRITEDIAGFI(ngrid,'h2oflux',
     1068     &                       ' ',hdoflux(:)
     1069            CALL write_output('h2oflux',
    10691070     &                       'h2oflux',
    1070      &                       ' ',2,h2oflux)
     1071     &                       ' ',h2oflux(:))
    10711072        endif
    10721073
Note: See TracChangeset for help on using the changeset viewer.