Ignore:
Timestamp:
Nov 8, 2024, 10:57:27 AM (13 days ago)
Author:
afalco
Message:

Pluto: import write_output function from Mars.
xios specific outputs.
AF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/writediagsoil.F90

    r3184 r3506  
     1module writediagsoil_mod
     2
     3implicit none
     4
     5contains
     6
    17subroutine writediagsoil(ngrid,name,title,units,dimpx,px)
    28
     
    8692    stop
    8793  endif
    88  
     94
    8995  ! Set output sample rate
    9096  isample=int(ecritphy) ! same as for diagfi outputs
    9197  ! Note ecritphy is known from control.h
    92  
     98
    9399  ! Create output NetCDF file
    94100  if (is_master) then
     
    129135    enddo
    130136   endif
    131    
     137
    132138   ! write "header" of file (longitudes, latitudes, geopotential, ...)
    133139   if (klon_glo>1) then ! general 3D case
     
    138144
    139145  endif ! of if (is_master)
    140  
     146
    141147  ! set zitau to -1 to be compatible with zitau incrementation step below
    142148  zitau=-1
    143  
     149
    144150else
    145151  ! If not an initialization call, simply open the NetCDF file
     
    164170    date=float(zitau+1)/float(day_step)
    165171    ! Note: day_step is known from control.h
    166    
     172
    167173    if (is_master) then
    168174     ! Get NetCDF ID for "time"
     
    176182     if (ierr.ne.NF_NOERR) then
    177183      write(*,*)"writediagsoil: Failed writing date to time variable"
    178       stop 
     184      stop
    179185     endif
    180186    endif ! of if (is_master)
     
    217223  endif
    218224#endif
    219  
     225
    220226  ! B. Write (append) the variable to the NetCDF file
    221227  if (is_master) then
     
    235241    call def_var(nid,name,title,units,4,id,varid,ierr)
    236242  endif ! of if (ierr.ne.NF_NOERR)
    237  
     243
    238244  ! B.2. Prepare things to be able to write/append the variable
    239245  corners(1)=1
     
    241247  corners(3)=1
    242248  corners(4)=ntime
    243  
     249
    244250  if (klon_glo==1) then
    245251    edges(1)=1
     
    250256  edges(3)=nsoilmx
    251257  edges(4)=1
    252  
     258
    253259  ! B.3. Write the slab of data
    254260!#ifdef NC_DOUBLE
     
    324330  corners(2)=1
    325331  corners(3)=ntime
    326  
     332
    327333  if (klon_glo==1) then
    328334    edges(1)=1
     
    332338  edges(2)=nbp_lat
    333339  edges(3)=1
    334  
     340
    335341  ! B.3. Write the slab of data
    336342!#ifdef NC_DOUBLE
     
    373379  ! B.2. Prepare things to be able to write/append the variable
    374380  corners(1)=ntime
    375  
     381
    376382  edges(1)=1
    377383
     
    396402
    397403end subroutine writediagsoil
     404
     405end module writediagsoil_mod
Note: See TracChangeset for help on using the changeset viewer.