Ignore:
Timestamp:
Nov 8, 2024, 4:59:55 PM (2 weeks ago)
Author:
jbclement
Message:

Dynamic + Mars PCM:
Addition of the description for the 'controle' array in the "start.nc" and "startfi.nc" files. It is given by the variable 'controle_descriptor' whose the element 'controle_descriptor(i)' explains 'controle(i)'.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F90

    r2507 r3509  
    88#endif
    99  USE infotrac, ONLY: nqtot, tname, ttext
    10   USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL,    &
     10  USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL, &
    1111                    NF90_CLOSE,  NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER
    12   USE dynredem_mod, ONLY: cre_var, put_var1, put_var2, err, modname, fil
     12  USE dynredem_mod, ONLY: cre_var, put_var1, put_var2, put_char1, err, modname, fil
    1313  use netcdf95, only: NF95_PUT_VAR
    1414  use control_mod, only : planet_type
     
    4444  INTEGER :: iq,l
    4545  INTEGER, PARAMETER :: length=100
     46  INTEGER, PARAMETER :: ldscrpt = 28, ndscrpt = 42
    4647  REAL :: tab_cntrl(length) ! run parameters
     48  character(ndscrpt), dimension(ldscrpt), parameter :: dscrpt_tab_cntrl = (/ &
     49      "(1)  Number of nodes along longitude      ", &
     50      "(2)  Number of nodes along latitude       ", &
     51      "(3)  Number of atmospheric layers         ", &
     52      "(4)  Initial day                          ", &
     53      "(5)  Radius of the planet                 ", &
     54      "(6)  Rotation of the planet (rad/s)       ", &
     55      "(7)  Gravity (m/s2)                       ", &
     56      "(8)  Specific heat Cp (J.kg-1.K-1)        ", &
     57      "(9)  = r/Cp (=kappa)                      ", &
     58      "(10) Lenght of a sol (s)                  ", &
     59      "(11) Dynamical time step (s)              ", &
     60      "(12) Total energy                         ", &
     61      "(13) Total pressure                       ", &
     62      "(14) Total enstrophy                      ", &
     63      "(15) Total enthalpy                       ", &
     64      "(16) Total angular momentum               ", &
     65      "(17) Reference pressure (Pa)              ", &
     66      "(18) Reference surface pressure (Pa)      ", &
     67      "(19) Longitude of center of zoom          ", &
     68      "(20) Latitude of center of zoom           ", &
     69      "(21) Zooming factor, along longitude      ", &
     70      "(22) Zooming factor, along latitude       ", &
     71      "(23) -                                    ", &
     72      "(24) Extention (in longitude) of zoom     ", &
     73      "(25) Extention (in latitude) of zoom      ", &
     74      "(26) -                                    ", &
     75      "(27) Stiffness factor of zoom in longitude", &
     76      "(28) Stiffness factor of zoom in latitude "/)
    4777  INTEGER :: ierr
    4878  CHARACTER(LEN=80) :: abort_message
     
    5080!   For NetCDF:
    5181  CHARACTER(LEN=30) :: unites
    52   INTEGER :: indexID
     82  INTEGER :: indexID, descrptID, dscrpt_sID
    5383  INTEGER :: rlonuID, rlonvID, rlatuID, rlatvID
    5484  INTEGER :: sID, sigID, nID, vID, timID
     
    166196    CALL err(NF90_DEF_DIM(nid,"sig",   llmp1,    sigID))
    167197    CALL err(NF90_DEF_DIM(nid,"temps", NF90_UNLIMITED, timID))
     198    CALL err(NF90_DEF_DIM(nid,"descriptor", ldscrpt, descrptID))
     199    CALL err(NF90_DEF_DIM(nid,"description_size", ndscrpt, dscrpt_sID))
    168200  else
    169201    CALL err(NF90_DEF_DIM(nid,"index", length, indexID))
     
    175207    CALL err(NF90_DEF_DIM(nid,"interlayer",   llmp1,    sigID))
    176208    CALL err(NF90_DEF_DIM(nid,"Time", NF90_UNLIMITED, timID))
     209    CALL err(NF90_DEF_DIM(nid,"descriptor", ldscrpt, descrptID))
     210    CALL err(NF90_DEF_DIM(nid,"description_size", ndscrpt, dscrpt_sID))
    177211  endif
    178212
    179213!--- Define and save invariant fields
    180   CALL put_var1(nid,"controle","Parametres de controle" ,[indexID],tab_cntrl)
     214  CALL put_var1(nid,"controle","Parametres de controle",[indexID],tab_cntrl)
     215  CALL put_char1(nid,"controle_descriptor","Description of control parameters",[dscrpt_sID,descrptID],dscrpt_tab_cntrl)
    181216  CALL put_var1(nid,"rlonu"   ,"Longitudes des points U",[rlonuID],rlonu)
    182217  CALL put_var1(nid,"rlatu"   ,"Latitudes des points U" ,[rlatuID],rlatu)
Note: See TracChangeset for help on using the changeset viewer.