Changeset 2916 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Mar 16, 2023, 11:50:06 AM (21 months ago)
Author:
emillour
Message:

Mars PCM
Add a "diagsoil" flag to trigger outputing a diagsoil.nc file
(default is diagsoil=.false.)
EM

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

Legend:

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

    r2823 r2916  
    4545      use datafile_mod, only: datadir
    4646      use wstats_mod, only: callstats
     47      use writediagsoil_mod, only: diagsoil
    4748      use calchim_mod, only: ichemistry
    4849      use co2condens_mod, only: scavco2cond
     
    133134         write(*,*) " callstats = ",callstats
    134135
     136         write(*,*) "Write sub-surface fields in file diagsoil.nc ?"
     137         diagsoil=.false. ! default value
     138         call getin_p("diagsoil",diagsoil)
     139         write(*,*) " diagsoil = ",diagsoil
     140         
    135141         write(*,*) "Save EOF profiles in file 'profiles' for ",
    136142     &              "Climate Database?"
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2915 r2916  
    9090      use phyetat0_mod, only: phyetat0, tab_cntrl_mod
    9191      use wstats_mod, only: callstats, wstats, mkstats
     92      use writediagsoil_mod, only: writediagsoil
    9293      use eofdump_mod, only: eofdump
    9394      USE vertical_layers_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt
  • trunk/LMDZ.MARS/libf/phymars/writediagsoil.F90

    r2573 r2916  
     1module writediagsoil_mod
     2
     3implicit none
     4
     5logical,save :: diagsoil ! global flag to trigger generating a diagsoil.nc
     6                         ! file or not. Initialized in conf_phys()
     7
     8contains
     9
    110subroutine writediagsoil(ngrid,name,title,units,dimpx,px)
    211
     
    1625use time_phylmdz_mod, only: ecritphy, day_step, iphysiq
    1726use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather
    18 use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, &
    19                               nbp_lon, nbp_lat
     27use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, nbp_lon, nbp_lat
     28use mod_grid_phy_lmdz, only : grid_type, unstructured
    2029
    2130implicit none
     
    7281real px2(ngrid)
    7382#endif
     83
     84! 0. Do we ouput a diagsoil.nc file? If not just bail out now.
     85if(.not.diagsoil) return
     86
     87! additional check: one can only output diagsoil.nc files
     88! in lon-lat case (or 1D)
     89if (grid_type==unstructured) then
     90  write(*,*) "writediagsoil: Error !!!"
     91  write(*,*) "diagsoil.nc outputs not possible on unstructured grids!!"
     92  call abort_physic("writediagsoil","impossible on unstructured grid",1)
     93endif
    7494
    7595! 1. Initialization step
     
    398418
    399419end subroutine writediagsoil
     420
     421end module writediagsoil_mod
Note: See TracChangeset for help on using the changeset viewer.