!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Version to convert the "CONVEC" files from HDF to NETCDF
!
!==================================================== 
! ~ get number of meteo levels, and set class variable for filenames
!====================================================
! ~ era interim
my.meteo.nlev     : 60
my.ecclass_ecl    : ${my.meteo.class}

!previously ECLEVS:
my.eclevs : ml${my.meteo.nlev}

!------------------------------
! name for choice of number of model levels (previously LEVS)
!------------------------------
#if "${my.levs}" in ["all",""] :
my.mlevs           : ml${my.meteo.nlev}
#elif "${my.levs}" in ["tropo25","tropo34","ml40"] :
my.mlevs           : ${my.levs}
#else :
#error "unsupported number of model levels : ${my.levels}"
#endif

!------------------------------
! ** global surface region:
!------------------------------
! name of global surface region in meteo files:
#if "${region.glbsfc}" != ""
my.regiongm        :  ${region.glbsfc}
#else
my.regiongm        :  glb100x100
#endif

!------------------------------
! ** which fields should be read ?
!------------------------------
! by default, load nothing, just convec
meteo.read.*.*         : F
meteo.read.*.convec    : T

! ! ~ read model level fields,
! !   except on global surface region:
! meteo.read.*.ml                   : F
! meteo.read.${my.regiongm}.ml      : F
! ! ~ read surface fields on global surface region:
! meteo.read.${my.regiongm}.sfc     : F

! ! not the exotic ones yet ...
! meteo.read.${my.regiongm}.ch4fire :  F

!------------------------------
! ** temporal interpolation
!------------------------------
!
! ~ fc fields are 3 hourly instantaneous; keep them constant,
!   except for the accumulated fields which have been averaged over 3 hour:
! ~ fc 3 hourly
meteo.tinterp.*              :  const3
meteo.tinterp.sp             :  interp3
meteo.tinterp.sfc.aver       :  aver3
meteo.tinterp.convec         :  aver3
!
! ~ an fields 6 hourly instantaneous; keep them constant, 
!   except oro and lsm which are constant:
meteo.tinterp.sfc.an         :  interp6
! ~ constant
meteo.tinterp.oro            :  const
meteo.tinterp.lsm            :  const
! ~ surface roughness Olsson/Ganzeveld is per month:
meteo.tinterp.srols          :  month

!------------------------------
! ** source keys : how to form a file name ?
!------------------------------
tmm.sourcekey.*.ml      :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.mlevs}-${my.region1m};tres=_00p03
tmm.sourcekey.*.sfc.fc  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-sfc-${my.regiongm};tres=_00p03
tmm.sourcekey.*.sfc.an  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-an0tr6-sfc-${my.regiongm};tres=_00p06
tmm.sourcekey.*.convec  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.eclevs}-glb100x100;tres=_00p03;filekey=convec

!------------------------------
! ** install meteo files
!------------------------------
! location of meteo files;
! either a permanent archive, or a temporary scratch:
tmm.dir        : ${my.meteo.dir}

! Clean up the temporary meteo ?
tmm.dir.clean  : F
tmm.dir.size   : 300G

! Meteo files could be setup before the actual program is started.
tmm.setup.apply        :  ${my.tmm.setup.apply}

! display progress ?
tmm.setup.verbose      :  T

! file permission mode for newly created files:
!  o user archive            : 644
!  o archive shared by group : 664
tmm.setup.mode         :  664

! number of sets defined below:
tmm.setup.nset         :  4

tmm.setup.001.apply    :  F
tmm.setup.001.files    :  oro lsm albedo sr srols veg
tmm.setup.001.sources  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-an0tr6-sfc-${my.regiongm};tres=_00p06
tmm.setup.001.search   :  ${my.meteo.search}
!
tmm.setup.002.apply    :  F
tmm.setup.002.files    :  blh ci cp d2m ewss g10m lsp nsss sd sf skt slhf src sshf ssr ssrd sst str strd swvl1 t2m u10m v10m
tmm.setup.002.sources  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-sfc-${my.regiongm};tres=_00p03
tmm.setup.002.search   :  ${my.meteo.search}
!
tmm.setup.003.apply    :  F
tmm.setup.003.files    :  sp mfuv mfw t q cld convec
tmm.setup.003.sources  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.mlevs}-${my.region1m};tres=_00p03
tmm.setup.003.search   :  ${my.meteo.search}

tmm.setup.004.apply    :  T
tmm.setup.004.files    :  sp convec
tmm.setup.004.sources  :  tm5-hdf:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.mlevs}-${my.region1m};tres=_00p03
tmm.setup.004.search   :  ${my.meteo.search}

!------------------------------
! ** output meteo
!------------------------------
! should meteo be put out ? (used in the storage script):
tmm.output                    :  T
! By default, write none:
tmm.output.*.*                      :  F
tmm.output.*.convec       :  T

tmm.destkey.${my.region1}.convec    :  tm5-nc:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.mlevs}-${my.region1}-<yyyy>;tres=_00p03;filekey=convec

!tmm.destkey.${my.region1}.ml        :  tm5-nc:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-${my.mlevs}-${my.region1}-<yyyy>;tres=_00p03

tmm.destkey.${my.regiongm}.sfc      :  tm5-nc:mdir=ec-${my.ecclass_ecl}-fc012up2tr3-sfc-${my.regiongm}-<yyyy>;tres=_00p03
tmm.destkey.${my.regiongm}.sfc.an   :  tm5-nc:mdir=ec-${my.ecclass_ecl}-an0tr6-sfc-${my.regiongm}-<yyyy>;tres=_00p06

! TM5 writes new meteo files to:
tmm.output.dir                :  ${my.project.dir}/tm5_meteo_out

! ensure creation via 'install' facilty:
tmm.output.install.dir        :  ${tmm.output.dir}

!------------------------------
! Options for "tm5-tmm-store" script.
!------------------------------
! display messages ?
tmm.output.store.verbose    :  T
! Specify one or more archives
!
tmm.output.store.archives   :  ecfs:umask=002%/nlh/TM/meteo-nc/*.tar5
!tmm.output.store.archives   :  ${SCRATCH}/NO-TAPE-YET/TM/meteo-nc/*.tar5

! zip tar files (empty or zipper command: gzip bzip2):
tmm.output.store.zipper     :  gzip

!------------------------------
! ** CF conventions
!------------------------------
cf-standard-name-table        : ${PWD}/tools/cf/data/cf-standard-name-table-v15.xml
