Ignore:
Timestamp:
Apr 25, 2025, 10:57:05 AM (4 months ago)
Author:
afalco
Message:

Pluto: added missing controle descriptor parameters.
Update for restarts from generic (restarts in 1D)
AF

File:
1 edited

Legend:

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

    r3735 r3736  
    22
    33implicit none
     4
     5INTEGER,SAVE :: nid_restart ! NetCDF file identifier for restartfi.nc file
    46
    57contains
     
    1517                       iceradius, dtemisice, phisfi
    1618  use iostart, only : open_restartphy, close_restartphy, &
    17                       put_var, put_field, length
     19                      put_var, put_field, length, ldscrpt, ndscrpt
    1820  use mod_grid_phy_lmdz, only : klon_glo
    1921  use planete_mod, only: year_day, periastr, apoastr, peri_day, &
     
    8183
    8284  ! Create physics start file
    83   call open_restartphy(filename)
     85  call open_restartphy(filename,nid_restart)
    8486
    8587! tab_cntrl() contains run parameters
     
    133135  tab_cntrl(35) = volcapa ! soil volumetric heat capacity
    134136
    135   call put_var("controle","Control parameters",tab_cntrl)
     137  call put_var(nid_restart,"controle","Control parameters",tab_cntrl)
    136138
    137139  ! Write the controle array descriptor
     
    140142
    141143  ! Write the mid-layer depths
    142   call put_var("soildepth","Soil mid-layer depth",mlayer)
     144  call put_var(nid_restart,"soildepth","Soil mid-layer depth",mlayer)
    143145
    144146  ! Write longitudes
    145   call put_field("longitude","Longitudes of physics grid",lonfi)
     147  call put_field(nid_restart,"longitude","Longitudes of physics grid",lonfi)
    146148
    147149  ! Write latitudes
    148   call put_field("latitude","Latitudes of physics grid",latfi)
     150  call put_field(nid_restart,"latitude","Latitudes of physics grid",latfi)
    149151
    150152  ! Write mesh areas
    151   call put_field("area","Mesh area",cell_area)
     153  call put_field(nid_restart,"area","Mesh area",cell_area)
    152154
    153155  ! Write surface geopotential
    154   call put_field("phisfi","Geopotential at the surface",phisfi)
     156  call put_field(nid_restart,"phisfi","Geopotential at the surface",phisfi)
    155157
    156158  ! Write surface albedo
    157   !call put_field("albedodat","Albedo of bare ground",alb)
     159  !call put_field(nid_restart,"albedodat","Albedo of bare ground",alb)
    158160
    159161  ! Subgrid topogaphy variables
    160   call put_field("ZMEA","Relief: mean relief",zmea)
    161   call put_field("ZSTD","Relief: standard deviation",zstd)
    162   call put_field("ZSIG","Relief: sigma parameter",zsig)
    163   call put_field("ZGAM","Relief: gamma parameter",zgam)
    164   call put_field("ZTHE","Relief: theta parameter",zthe)
     162  call put_field(nid_restart,"ZMEA","Relief: mean relief",zmea)
     163  call put_field(nid_restart,"ZSTD","Relief: standard deviation",zstd)
     164  call put_field(nid_restart,"ZSIG","Relief: sigma parameter",zsig)
     165  call put_field(nid_restart,"ZGAM","Relief: gamma parameter",zgam)
     166  call put_field(nid_restart,"ZTHE","Relief: theta parameter",zthe)
    165167
    166168  ! Close file
    167   call close_restartphy
     169  call close_restartphy(nid_restart)
    168170
    169171end subroutine physdem0
     
    197199
    198200  ! Open file
    199   call open_restartphy(filename)
     201  call open_restartphy(filename, nid_restart)
    200202
    201203  ! First variable to write must be "Time", in order to correctly
     
    204206
    205207  ! Surface temperature
    206   call put_field("tsurf","Surface temperature",tsurf)
     208  call put_field(nid_restart,"tsurf","Surface temperature",tsurf)
    207209
    208210  ! Soil inertia
    209   call put_field("inertiedat","Soil thermal inertia",inertiesoil)
     211  call put_field(nid_restart,"inertiedat","Soil thermal inertia",inertiesoil)
    210212
    211213  ! Soil temperature
    212   call put_field("tsoil","Soil temperature",tsoil)
     214  call put_field(nid_restart,"tsoil","Soil temperature",tsoil)
    213215
    214216  ! Emissivity of the surface
    215   call put_field("emis","Surface emissivity",emis)
     217  call put_field(nid_restart,"emis","Surface emissivity",emis)
    216218
    217219  ! Albedo of the surface
    218   call put_field("albedodat","Albedo of bare ground",alb)
     220  call put_field(nid_restart,"albedodat","Albedo of bare ground",alb)
    219221
    220222  ! Planetary Boundary Layer
    221   call put_field("q2","pbl wind variance",q2)
     223  call put_field(nid_restart,"q2","pbl wind variance",q2)
    222224
    223225! cloud fraction and sea ice !AF24: removed
     
    228230  if (nq>0) then
    229231    do iq=1,nq
    230       call put_field(noms(iq),"tracer on surface",qsurf(:,iq))
     232      call put_field(nid_restart,noms(iq),"tracer on surface",qsurf(:,iq))
    231233    enddo
    232234  endif ! of if (nq>0)
     
    235237
    236238! close file
    237       CALL close_restartphy
     239      CALL close_restartphy(nid_restart)
    238240!$OMP BARRIER
    239241
Note: See TracChangeset for help on using the changeset viewer.