Changeset 3509 for trunk


Ignore:
Timestamp:
Nov 8, 2024, 4:59:55 PM (6 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

Location:
trunk
Files:
6 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)
  • trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem_mod.F90

    r1824 r3509  
    44                    NF90_REDEF, NF90_ENDDEF, NF90_PUT_VAR, &
    55                    NF90_PUT_ATT, NF90_GET_VAR, NF90_INQ_VARID, &
    6                     NF90_DEF_VAR
     6                    NF90_DEF_VAR, NF90_CHAR
    77  PRIVATE
    88  PUBLIC :: dynredem_write_u, dynredem_write_v, dynredem_read_u, err
    9   PUBLIC :: cre_var, get_var1, put_var1, put_var2, fil, modname, msg
     9  PUBLIC :: cre_var, get_var1, put_var1, put_var2, put_char1, fil, modname, msg
    1010  include "dimensions.h"
    1111  include "paramet.h"
     
    184184!===============================================================================
    185185!
     186SUBROUTINE put_char1(ncid,var,title,did,v,units)
     187!
     188!===============================================================================
     189  IMPLICIT NONE
     190!===============================================================================
     191! Arguments:
     192  INTEGER,                    INTENT(IN) :: ncid
     193  CHARACTER(LEN=*),           INTENT(IN) :: var, title
     194  INTEGER,                    INTENT(IN) :: did(2)
     195  CHARACTER(*),               INTENT(IN) :: v(:)
     196  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: units
     197!===============================================================================
     198  CALL err(NF90_DEF_VAR(ncid,var,NF90_CHAR,did,nvarid),"inq",var)
     199  IF(title/="")      CALL err(NF90_PUT_ATT(ncid,nvarid,"title",title),var)
     200  IF(PRESENT(units)) CALL err(NF90_PUT_ATT(ncid,nvarid,"units",units),var)
     201  CALL err(NF90_ENDDEF(ncid))
     202  CALL err(NF90_PUT_VAR(ncid,nvarid,v),"put",var)
     203  CALL err(NF90_REDEF(ncid))
     204
     205END SUBROUTINE put_char1
     206!
     207!===============================================================================
     208
     209
     210!===============================================================================
     211!
    186212FUNCTION msg(typ,nam)
    187213!
  • trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F90

    r2507 r3509  
    1010  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
     
    167197    CALL err(NF90_DEF_DIM(nid,"sig",   llmp1,    sigID))
    168198    CALL err(NF90_DEF_DIM(nid,"temps", NF90_UNLIMITED, timID))
     199    CALL err(NF90_DEF_DIM(nid,"descriptor", ldscrpt, descrptID))
     200    CALL err(NF90_DEF_DIM(nid,"description_size", ndscrpt, dscrpt_sID))
    169201  else
    170202    CALL err(NF90_DEF_DIM(nid,"index", length, indexID))
     
    176208    CALL err(NF90_DEF_DIM(nid,"interlayer",   llmp1,    sigID))
    177209    CALL err(NF90_DEF_DIM(nid,"Time", NF90_UNLIMITED, timID))
     210    CALL err(NF90_DEF_DIM(nid,"descriptor", ldscrpt, descrptID))
     211    CALL err(NF90_DEF_DIM(nid,"description_size", ndscrpt, dscrpt_sID))
    178212  endif
    179213
    180214!--- Define and save invariant fields
    181215  CALL put_var1(nid,"controle","Parametres de controle" ,[indexID],tab_cntrl)
     216  CALL put_char1(nid,"controle_descriptor","Description of control parameters",[dscrpt_sID,descrptID],dscrpt_tab_cntrl)
    182217  CALL put_var1(nid,"rlonu"   ,"Longitudes des points U",[rlonuID],rlonu)
    183218  CALL put_var1(nid,"rlatu"   ,"Latitudes des points U" ,[rlatuID],rlatu)
  • trunk/LMDZ.MARS/changelog.txt

    r3491 r3509  
    47364736sub-grid-scale fields in start_archive.nc. This optional behavior is
    47374737triggered at run time by specifying "start2archive.e --add-sso".
     4738
     4739== 08/11/2024 == JBC
     4740Addition 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)'.
  • trunk/LMDZ.MARS/libf/phymars/iostart.F90

    r2952 r3509  
    88   
    99    ! restartfi.nc file dimension identifiers: (see open_restartphy())
    10     INTEGER,SAVE :: idim1 ! "index" dimension
    11     INTEGER,SAVE :: idim2 ! "physical_points" dimension
    12     INTEGER,SAVE :: idim3 ! "subsurface_layers" dimension
    13     INTEGER,SAVE :: idim4 ! "nlayer_plus_1" dimension
    14     INTEGER,SAVE :: idim5 ! "number_of_advected_fields" dimension
    15     INTEGER,SAVE :: idim6 ! "nlayer" dimension
    16     INTEGER,SAVE :: idim7 ! "Time" dimension
    17     INTEGER,SAVE :: idim8 ! "nslope" dimension
    18     INTEGER,SAVE :: idim9 ! "nslope_plus_1" dimension
     10    INTEGER,SAVE :: idim1  ! "index" dimension
     11    INTEGER,SAVE :: idim2  ! "physical_points" dimension
     12    INTEGER,SAVE :: idim3  ! "subsurface_layers" dimension
     13    INTEGER,SAVE :: idim4  ! "nlayer_plus_1" dimension
     14    INTEGER,SAVE :: idim5  ! "number_of_advected_fields" dimension
     15    INTEGER,SAVE :: idim6  ! "nlayer" dimension
     16    INTEGER,SAVE :: idim7  ! "Time" dimension
     17    INTEGER,SAVE :: idim8  ! "nslope" dimension
     18    INTEGER,SAVE :: idim9  ! "nslope_plus_1" dimension
     19    INTEGER,SAVE :: idim10 ! "descriptor" dimension
     20    INTEGER,SAVE :: idim11 ! "description_size" dimension
    1921    INTEGER,SAVE :: timeindex ! current time index (for time-dependent fields)
    20     INTEGER,PARAMETER :: length=100 ! size of tab_cntrl array
    21    
     22    INTEGER,PARAMETER :: length = 100 ! size of tab_cntrl array
     23    INTEGER,PARAMETER :: ldscrpt = 35 ! size of dscrpt_tab_cntrl array
     24    INTEGER,PARAMETER :: ndscrpt = 50 ! size of characters in dscrpt_tab_cntrl array
     25
    2226    INTERFACE get_field
    2327      MODULE PROCEDURE Get_field_r1,Get_field_r2,Get_field_r3
    2428    END INTERFACE get_field
    25    
     29
    2630    INTERFACE get_var
    2731      MODULE PROCEDURE get_var_r0,Get_var_r1,Get_var_r2,Get_var_r3
     
    3337
    3438    INTERFACE put_var
    35       MODULE PROCEDURE put_var_r0,put_var_r1,put_var_r2,put_var_r3
     39      MODULE PROCEDURE put_var_r0,put_var_r1,put_var_r2,put_var_r3, put_var_c1
    3640    END INTERFACE put_var
    3741
    38     PUBLIC nid_start, length
     42    PUBLIC nid_start, length, ldscrpt, ndscrpt
    3943    PUBLIC get_field,get_var,put_field,put_var
    4044    PUBLIC inquire_dimension, inquire_dimension_length
    4145    PUBLIC inquire_field, inquire_field_ndims
    4246    PUBLIC open_startphy,close_startphy,open_restartphy,close_restartphy
    43    
     47
    4448CONTAINS
    4549
     
    178182
    179183  END FUNCTION inquire_dimension_length
    180 
    181 
    182184
    183185  SUBROUTINE Get_Field_r1(field_name,field,found,timeindex)
     
    566568      ierr=NF90_DEF_DIM(nid_restart,"nslope",nslope,idim8)
    567569      IF (ierr/=NF90_NOERR) THEN
    568         write(*,*)'phyredem: problem defining nslope dimension'
    569         write(*,*)trim(nf90_strerror(ierr))
    570         CALL ABORT
     570        write(*,*)'open_restartphy: problem defining nslope dimension'
     571        write(*,*)trim(nf90_strerror(ierr))
     572        CALL abort_physic("open_restartphy","Failed defining nslope",1)
    571573      ENDIF
    572574
    573575      ierr=NF90_DEF_DIM(nid_restart,"inter_slope",nslope+1,idim9)
    574576      IF (ierr/=NF90_NOERR) THEN
    575         write(*,*)'phyredem: problem defining inter slope dimension'
    576         write(*,*)trim(nf90_strerror(ierr))
    577         CALL ABORT
     577        write(*,*)'open_restartphy: problem defining inter_slope dimension'
     578        write(*,*)trim(nf90_strerror(ierr))
     579        CALL abort_physic("open_restartphy","Failed defining inter_slope",1)
     580      ENDIF
     581     
     582      ierr=NF90_DEF_DIM(nid_restart,"descriptor",ldscrpt,idim10)
     583      IF (ierr/=NF90_NOERR) THEN
     584        write(*,*)'open_restartphy: problem defining descriptor dimension '
     585        write(*,*)trim(nf90_strerror(ierr))
     586        CALL abort_physic("open_restartphy","Failed defining descriptor",1)
     587      ENDIF
     588     
     589      ierr=NF90_DEF_DIM(nid_restart,"description_size",ndscrpt,idim11)
     590      IF (ierr/=NF90_NOERR) THEN
     591        write(*,*)'open_restartphy: problem defining description_size dimension '
     592        write(*,*)trim(nf90_strerror(ierr))
     593        CALL abort_physic("open_restartphy","Failed defining description_size",1)
    578594      ENDIF
    579595
     
    946962  END SUBROUTINE put_var_r0
    947963
    948 
    949964  SUBROUTINE put_var_r1(var_name,title,var)
    950965  ! Put a vector in file
     
    967982     CALL put_var_rgen(var_name,title,var,size(var))
    968983
    969   END SUBROUTINE put_var_r2     
     984  END SUBROUTINE put_var_r2
    970985 
    971986  SUBROUTINE put_var_r3(var_name,title,var)
     
    10291044          write(*,*)'put_var_rgen: problem writing Time'
    10301045          write(*,*)trim(nf90_strerror(ierr))
    1031           CALL abort_physic("get_var_rgen","Failed to write Time",1)
     1046          CALL abort_physic("put_var_rgen","Failed to write Time",1)
    10321047        ENDIF
    10331048        return ! nothing left to do
     
    10361051        idim1d=idim1
    10371052      ELSEIF (var_size==nsoilmx) THEN
    1038         ! We know it is an  "mlayer" kind of 1D array
     1053        ! We know it is an "mlayer" kind of 1D array
    10391054        idim1d=idim3
    10401055      ELSEIF (var_size==nslope+1) THEN
    1041         ! We know it is an  "inter slope" kind of 1D array
     1056        ! We know it is an "inter slope" kind of 1D array
    10421057        idim1d=idim9
    10431058      ELSE
    10441059        PRINT *, "put_var_rgen error : wrong dimension"
    10451060        write(*,*) "  var_size =",var_size
    1046         CALL abort_physic("get_var_rgen","Wrong variable dimension",1)
     1061        CALL abort_physic("put_var_rgen","Wrong variable dimension",1)
    10471062
    10481063      ENDIF ! of IF (var_size==length) THEN
     
    10701085    ENDIF ! of IF (is_master)
    10711086   
    1072   END SUBROUTINE put_var_rgen     
     1087  END SUBROUTINE put_var_rgen
     1088
     1089  SUBROUTINE put_var_c1(var_name,title,var)
     1090  ! Put a vector of characters in file
     1091
     1092  USE netcdf, only: NF90_REDEF, NF90_DEF_VAR, NF90_ENDDEF, NF90_PUT_VAR, &
     1093                    NF90_CHAR, &
     1094                    NF90_PUT_ATT, NF90_NOERR, nf90_strerror, &
     1095                    nf90_inq_dimid, nf90_inquire_dimension, NF90_INQ_VARID
     1096  USE comsoil_h, only: nsoilmx
     1097  USE comslope_mod, only: nslope
     1098  USE mod_phys_lmdz_para, only: is_master
     1099
     1100   IMPLICIT NONE
     1101     CHARACTER(LEN=*),INTENT(IN) :: var_name
     1102     CHARACTER(LEN=*),INTENT(IN) :: title
     1103     CHARACTER(LEN=*),INTENT(IN) :: var(:)
     1104
     1105     INTEGER :: ierr
     1106     INTEGER :: nvarid
     1107     INTEGER :: idim1d_1, idim1d_2
     1108     INTEGER :: var_size
     1109     logical,save :: firsttime=.true.
     1110
     1111    IF (is_master) THEN
     1112
     1113      var_size = size(var)
     1114      IF (var_size==ldscrpt) THEN
     1115        ! We know it is a "controle descriptor" kind of 1D array
     1116        idim1d_1=idim11
     1117        idim1d_2=idim10
     1118      ELSE
     1119        PRINT *, "put_var_cgen error : wrong dimension"
     1120        write(*,*) "  var_size =",var_size
     1121        CALL abort_physic("put_var_cgen","Wrong variable dimension",1)
     1122
     1123      ENDIF ! of IF (var_size==length) THEN
     1124
     1125      ! Swich to NetCDF define mode
     1126      ierr=NF90_REDEF (nid_restart)
     1127      ! Define the variable
     1128      ierr=NF90_DEF_VAR(nid_restart,var_name,NF90_CHAR,(/idim1d_1,idim1d_2/),nvarid)
     1129      ! Add a "title" attribute
     1130      IF (LEN_TRIM(title)>0) ierr=NF90_PUT_ATT(nid_restart,nvarid,"title",title)
     1131      ! Swich out of define mode
     1132      ierr=NF90_ENDDEF(nid_restart)
     1133      ! Write variable to file
     1134      ierr=NF90_PUT_VAR(nid_restart,nvarid,var)
     1135      IF (ierr/=NF90_NOERR) THEN
     1136        write(*,*)'put_var_cgen: problem writing '//trim(var_name)
     1137        write(*,*)trim(nf90_strerror(ierr))
     1138        CALL abort_physic("put_var_cgen","Failed writing variable",1)
     1139      ENDIF
     1140    ENDIF ! of IF (is_master)
     1141
     1142  END SUBROUTINE put_var_c1
    10731143
    10741144END MODULE iostart
  • trunk/LMDZ.MARS/libf/phymars/phyredem.F90

    r3338 r3509  
    2121  use dimradmars_mod, only: tauvis
    2222  use iostart, only : open_restartphy, close_restartphy, &
    23                       put_var, put_field, length
     23                      put_var, put_field, length, ldscrpt, ndscrpt
    2424  use mod_grid_phy_lmdz, only : klon_glo
    2525  use planete_h, only: aphelie, emin_turb, lmixmin, obliquit, &
     
    4848  real, intent(in) :: subslope_dist(ngrid,nslope) !undermesh statistics
    4949
    50   real :: tab_cntrl(length) ! nb "length=100" defined in iostart module
    51   integer :: ig
    52   real :: watercaptag_tmp(ngrid)
     50  character(ndscrpt), dimension(ldscrpt), parameter :: dscrpt_tab_cntrl = (/ &
     51      "(1)  Total number of nodes on physics grid        ", &
     52      "(2)  Number of atmospheric layers                 ", &
     53      "(3)  Initial day                                  ", &
     54      "(4)  Initial time of day                          ", &
     55      "(5)  Radius of Mars (m) ~3397200                  ", &
     56      "(6)  Rotation rate (rad.s-1)                      ", &
     57      "(7)  Gravity (m.s-2) ~3.72                        ", &
     58      "(8)  Molar mass of the atmosphere (g.mol-1) ~43.49", &
     59      "(9)  = r/Cp ~0.256793 (=kappa in the dynamics)    ", &
     60      "(10) Length of a sol (s) ~88775                   ", &
     61      "(11) Time step in the physics                     ", &
     62      "(12) -                                            ", &
     63      "(13) -                                            ", &
     64      "(14) Length of year (sols) ~668.6                 ", &
     65      "(15) Min. Sun-Mars distance (Mkm) ~206.66         ", &
     66      "(16) Max. Sun-Mars distance (Mkm) ~249.22         ", &
     67      "(17) Date of perihelion (sols since N. spring)    ", &
     68      "(18) Obliquity of the planet (deg) ~23.98         ", &
     69      "(19) Default surface roughness (m) ~0.01          ", &
     70      "(20) Mixing length ~100                           ", &
     71      "(21) Minimal energy ~1.e-8                        ", &
     72      "(22) Albedo of northern cap ~0.5                  ", &
     73      "(23) Albedo of southern cap ~0.5                  ", &
     74      "(24) Emissivity of northern cap ~0.95             ", &
     75      "(25) Emissivity of southern cap ~0.95             ", &
     76      "(26) Emissivity of martian soil ~.95              ", &
     77      "(27) Mean visible optical depth                   ", &
     78      "(28) -                                            ", &
     79      "(29) -                                            ", &
     80      "(30) -                                            ", &
     81      "(31) Mean scat radius of CO2 snow (north)         ", &
     82      "(32) Mean scat radius of CO2 snow (south)         ", &
     83      "(33) Time scale for snow metamorphism (north)     ", &
     84      "(34) Time scale for snow metamorphism (south)     ", &
     85      "(35) Soil volumetric heat capacity                "/)
     86  real, dimension(length) :: tab_cntrl ! nb "length=100" defined in iostart module
     87  integer                 :: ig
     88  real, dimension(ngrid)  :: watercaptag_tmp
    5389
    5490  ! Create physics start file
    5591  call open_restartphy(filename)
    56  
     92
    5793  ! Build tab_cntrl(:) array
    5894  tab_cntrl(:)=0.0
     
    6197  !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    6298  ! Informations on the physics grid
    63   tab_cntrl(1) = float(klon_glo)  ! total number of nodes on physics grid
    64   tab_cntrl(2) = float(nlay) ! number of atmospheric layers
    65   tab_cntrl(3) = day_ini + int(time)      ! initial day
    66   tab_cntrl(4) = time -int(time)          ! initial time of day
     99  tab_cntrl(1) = float(klon_glo)     ! Total number of nodes on physics grid
     100  tab_cntrl(2) = float(nlay)         ! Number of atmospheric layers
     101  tab_cntrl(3) = day_ini + int(time) ! Initial day
     102  tab_cntrl(4) = time -int(time)     ! Initial time of day
    67103
    68104  ! Informations about Mars, used by dynamics and physics
    69   tab_cntrl(5) = rad      ! radius of Mars (m) ~3397200
    70   tab_cntrl(6) = omeg     ! rotation rate (rad.s-1)
    71   tab_cntrl(7) = g        ! gravity (m.s-2) ~3.72
     105  tab_cntrl(5) = rad      ! Radius of Mars (m) ~3397200
     106  tab_cntrl(6) = omeg     ! Rotation rate (rad.s-1)
     107  tab_cntrl(7) = g        ! Gravity (m.s-2) ~3.72
    72108  tab_cntrl(8) = mugaz    ! Molar mass of the atmosphere (g.mol-1) ~43.49
    73   tab_cntrl(9) = rcp      !  = r/cp  ~0.256793 (=kappa dans dynamique)
    74   tab_cntrl(10) = daysec  ! length of a sol (s)  ~88775
    75 
    76   tab_cntrl(11) = phystep  ! time step in the physics
    77   tab_cntrl(12) = 0.
    78   tab_cntrl(13) = 0.
     109  tab_cntrl(9) = rcp      ! = r/cp  ~0.256793 (=kappa dans dynamique)
     110  tab_cntrl(10) = daysec  ! Length of a sol (s) ~88775
     111  tab_cntrl(11) = phystep ! Time step in the physics
    79112
    80113  ! Informations about Mars, only for physics
    81   tab_cntrl(14) = year_day  ! length of year (sols) ~668.6
    82   tab_cntrl(15) = periheli  ! min. Sun-Mars distance (Mkm) ~206.66
    83   tab_cntrl(16) = aphelie   ! max. SUn-Mars distance (Mkm) ~249.22
    84   tab_cntrl(17) = peri_day  ! date of perihelion (sols since N. spring)
     114  tab_cntrl(14) = year_day  ! Length of year (sols) ~668.6
     115  tab_cntrl(15) = periheli  ! Min. Sun-Mars distance (Mkm) ~206.66
     116  tab_cntrl(16) = aphelie   ! Max. SUn-Mars distance (Mkm) ~249.22
     117  tab_cntrl(17) = peri_day  ! Date of perihelion (sols since N. spring)
    85118  tab_cntrl(18) = obliquit  ! Obliquity of the planet (deg) ~23.98
    86119
    87120  ! Boundary layer and turbulence
    88   tab_cntrl(19) = z0_default   ! default surface roughness (m) ~0.01
    89   tab_cntrl(20) = lmixmin   ! mixing length ~100
    90   tab_cntrl(21) = emin_turb ! minimal energy ~1.e-8
     121  tab_cntrl(19) = z0_default ! Default surface roughness (m) ~0.01
     122  tab_cntrl(20) = lmixmin    ! Mixing length ~100
     123  tab_cntrl(21) = emin_turb  ! Minimal energy ~1.e-8
    91124
    92125  ! Optical properties of polar caps and ground emissivity
     
    96129  tab_cntrl(25) = emisice(2)   ! Emissivity of southern cap ~0.95
    97130  tab_cntrl(26) = emissiv      ! Emissivity of martian soil ~.95
    98   tab_cntrl(31) = iceradius(1) ! mean scat radius of CO2 snow (north)
    99   tab_cntrl(32) = iceradius(2) ! mean scat radius of CO2 snow (south)
    100   tab_cntrl(33) = dtemisice(1) ! time scale for snow metamorphism (north)
    101   tab_cntrl(34) = dtemisice(2) ! time scale for snow metamorphism (south)
     131  tab_cntrl(31) = iceradius(1) ! Mean scat radius of CO2 snow (north)
     132  tab_cntrl(32) = iceradius(2) ! Mean scat radius of CO2 snow (south)
     133  tab_cntrl(33) = dtemisice(1) ! Time scale for snow metamorphism (north)
     134  tab_cntrl(34) = dtemisice(2) ! Time scale for snow metamorphism (south)
    102135
    103136  ! dust aerosol properties
    104   tab_cntrl(27) = tauvis      ! mean visible optical depth
     137  tab_cntrl(27) = tauvis ! Mean visible optical depth
    105138
    106139  ! Soil properties:
    107   tab_cntrl(35) = volcapa ! soil volumetric heat capacity
     140  tab_cntrl(35) = volcapa ! Soil volumetric heat capacity
    108141
    109142  ! Write the controle array
    110143  call put_var("controle","Control parameters",tab_cntrl)
     144
     145  ! Write the controle array descriptor
     146  call put_var("controle_descriptor","Description of control parameters",dscrpt_tab_cntrl)
    111147 
    112148  ! Write the mid-layer depths
Note: See TracChangeset for help on using the changeset viewer.