Project

General

Profile

Data assimilation of snow observations with CRAMPON

Implementation of a Particle Filter to assimilate spatialized snow observations within SURFEX platform
Development of vortex task to perform the assimilation sequence on beaufix-hendrix, launched through a s2m (snowtools) command.

Git projects :
  • Surfex_Git2, branch cen_dev
  • Vortex, branch cen_assim
  • snowtools_git, branch master

Main developments

  • Spatialized PF algorithm developped into SURFEX/SODA in semi-distributed and distributed geometries.
  • Use of ESCROC ensemblist version of Crocus (Lafaysse et al. 2017) and perturbed meteorological forcings (Charrois et al., 2016)
  • Use of Vortex (cen_assim branch) /snowtools_git to launch the assimilation sequence on beaufix and store data on hendrix (similarly as described in Run a SURFEX-Crocus experiment with vortex)

Developer name

Bertrand Cluzet

Date of start of development

January 2018

Commit number before the development

  • Surfex_Git2 : b469f610
  • Vortex : 4ab65aa3

Current status

  • Surfex_Git2: Phased in SURFEX V8.1 branch cen_dev on commit b3a05a2c
  • Vortex : Phased with recent (late october 2018 (commit 87922088)) cen_dev branch, on commit fcf8a739
In progress :
  • Surfex_Git2 : snow depth data assimilation (November 2018), PF assimilation diagnostic file (later)

Key technical points (SURFEX)

  • new diag variable SPECMOD to represent sow reflectance in MODIS bands, sampled from SPEC_ALB
  • writing of this diag variable into PREP file (mandatory for soda assimilation)
  • new dimension in PRO file : MODIS_bands
  • in SODA, use of a SURFEX_LIST (vector of SURFEX_TYPE) to store all members (PREP files) before the assimilation mix
  • mixing of PREP is done "manually" in PUT_ALL_VAR_PF.F90. Some fields (..._ISBA) are not mixed at the moment (no need for us.)
    Need to actualize this routine after any change in the SURFEX types and variable names and for new prognostic/cumulated variables
  • LFIX_OUTPUT (see below)
  • reading of obs. in NETCDF.
  • computing Snow Cover Fraction from SWE in PREP : implementation of a depletion curve (Zaitchik et al., 2009, De Lannoy et al., 2012)

Evaluated against SURFEX test database ?

No, in progress.

New test added in the database

No, in progress

Changes in namelist

&NAM_ASSIM

LASSIM = .TRUE.                       ! Activate Surfex data assimilation  
LCRAMPON = .TRUE.                     ! Activate CRAMPON
CASSIM_ISBA = 'PF   '                 ! Particle Filter activation in SODA  (/!\ don't forget the '   ' ) 
LPF_CROCUS = 'GLOBAL' (default)       ! select the PF algo to perform ('GLOBAL', 'RLOCAL', 'KLOCAL')
NLOC_PF = 0 (default)                 ! set the number of obs (>0) to select in the 'RLOCAL' and 'KLOCAL' algo.
NPRINTLEV=1,                          ! verbosity
LEXTRAP_SEA=.FALSE.,                  !  |
LEXTRAP_WATER=.FALSE.,                !  |  Prevent SODA 
LEXTRAP_NATURE=.FALSE.,               !  |  from being too fancy
LWATERTG2=.TRUE.,                     !  |

&NAM_OBS

  
NOBSTYPE = 8                 ! number of different obs. variables (up to 9)
CFILE_FORMAT_OBS="NC    "    ! daily obs. files on NETCDF file format (/!\ don't forget the '    ' ) 
COBS_M = 'B1','B2','B3','B4','B5','B6','B7','SCF'             ! Names of MODIS bands and Snow cover fraction variables in observation file. (/!\ same length as NOBSTYPE), other possible values : 'DEP', 'R51', R52', 'R53', 'R54'
NNCO = 1,1,1,1,1,1,1,1       ! select which variables to assimilate among COBS_M (/!\ same length as NOBSTYPE)
XERROBS_M = 0.00071, 0.00046, 0.00056, 0.00056, 0.002, 0.0015, 0.00078, 0.05 ! default obs.error *variances* for MODIS bands (charrois PhD manuscript pp 104.,140.), last one is a percentage of value for SCF.
XERROBS_FACTOR_M = 1,1,1,1,1,1,1,1 ! If necessary multiply the prescribed errors by some factors

&NAM_VAR

NVAR=8                     ! number of different model assimilation variables (up to 9)
CVAR_M='PB1','PB2','PB3','PB4','PB5','PB6','PB7','PSB' ! model variables (7 MODIS spectral bands + bulk SWE), other possible values : 'DEP', 'R51', R52', 'R53', 'R54'
NNCV = 1,1,1,1,1,1,1,1   ! select which variables to assimilate among CVAR_M
XTAUSCF ! value for the tau parameter of the depletion curve used to retrieve model SCF from bulk SWE (default=4)
XCEILSCF ! value for the ceil SWE of the depletion curve (default=20mm)

&NAM_ENS

NENS = 1         ! number of ensemble members (overwritten by snowtools_git argument --nmembers)

&NAM_DIAG_ISBAN

LSPECMOD = .TRUE.  ! activation of MODIS spectral bands output in PREP, mandatory for assimilation
LPROBANDS = .TRUE. ! mandatory too for MODIS assimilation

&NAM_DIAG_SURFN

LRAD_BUDGET = .TRUE.

&NAM_WRITE_DIAG_SURFn

LRESETCUMUL = .TRUE.
LSNOWDIMNC = .TRUE. ! mandatory + activate layer/bands dimensions in PRO
CSELECT = 'SPECMOD' ! add MODIS bands to PRO file

&NAM_IO_OFFLINE

LFIX_OUTPUT = .TRUE. !(default : .FALSE.) : force hours of output in PRO at 00h+n*timestep instead of timestart+ n*timestep (/!\ possible edge effects on cumulated diags)

Practical details

Execution of an assimilation experiment

The whole assimilation experiment (gathering the input files from the archive, performing the simulation, storing the output) is performed with vortex, through a single call to s2m thanks to vortex ( see Run_a_SURFEX-Crocus_experiment_with_vortex).
New useful arguments to this command are described below.

Twin experiments/synthetical assimilation

Twin experiments/synthetical obsevations assimilation are performed as follow :
- run a first openloop experiment with a fixed ESCROC configuration (E2) or E1 with/without a prescribed set of members, and prescribed assimilation dates
- disguise the PREP files into synthetical observation files : straighforward for reflectances (just renaming), computing SCF from SWE using depletion curve (see in SURFEX code snow_depletion_pf.F90)
- run a second experiment assimilating the synthetical observations with the same escroc members as for the first one (thanks to the archived configuration file, see below)

Compilation

SURFEX must be compiled twice because :
- OFFLINE, PGD and PREP executables are needed in NOMPI/O2 (case sequential ensemble applications of Specific_compilations_(beaufix_or_prolix_SOPRANO_old_compilers))
- SODA executable is needed in MPI/O2 (case MPI parallel applications (big domains, deterministic application) of Specific_compilations_(beaufix_or_prolix_SOPRANO_old_compilers))

Place the corresponding symbolic links in a separate exe_SODA repertory that you will specify to s2m command via -s argument.

local testing of SODA

SODA is the executable performing the assimilation. Provided a set of background PREP files and an observation, it produces a set of analyzed PREP files.
It is possible to test the performance of this algorithm locally, (without the use of vortex, snowtoools_git etc.)
For that, simply execute SODA in a repertory where all files are given (Namelist, PGD, PREP files, observations, etc.)
For more details, ask for support.

Other required changes

Namelist

Forcing files

Spinup files

  • mandatory
  • /!\ V8.0 files are not compatible with V8.1, but it is possible to upgrade it (ask for support).

New files

Assimilation configuration file

  • mandatory
  • named s2m_<your_region>.ini
  • write down your data assimilation dates (see attached example)
  • some additional information on the experiment are appended to it during the run. It is then archived (see below)
  • For twin experiments and traceability : With ESCROC E1* ensemble, you can prescribe the members you'd like to run, otherwise they will be randomly drawn (and written down in the configuration file)
    ex : membersId = 505, 402, 705

Observation files

  • daily files named obs_<your_sensor>_your_region_yyyymmddhh.nc
    ex : obs_MODIS_grandes_rousses_20341231.nc
  • NETCDF format
  • same geometry as PREP/PGD (see attached example)
  • for synthetical observations, <your_sensor> is free to define.

Particle Filter Sample Files

  • Output from the assimilation sequence.
  • One file per assimilation date, named PART_YYYYMMDDHH.txt (see attached example, distributed assim with 187pts and 3 members)
  • FORMAT : (DISTRIBUTED assimilation, assimilation per grid point): one line per grid point, then for each line, ids of the replicated members on the corresponding point, separated by spaces
    (SEMI-DISTRIBUTED assimilation, global assimilation) : only one line, ids of the replicated members, separated by spaces

Simulation framework

Simulation is performed on beaufix-hendrix through an s2m command (see added options below).
Vortex requires a strict file storing and naming. The following lines are detailing it.

Forcing files

  • stored in a vortex path on hendrix :
    <yourhome>/vortex/safran/<region_id>/<xpid_forcing>/mbxxxx/meteo/
    - region_id is the safran id of the region (for ex. 12 for Grandes-Rousses)
    - xpid_forcing is a user-defined name (usually the name of the experiment that generated the forcings), given to s2m via -f option (see below)

Spinup files

  • named PGD_<region_name>.nc and PREP_<starting_date>.nc
    - region_name is the safran name of the region (for ex. grandes_rousses for Grandes-Rousses)
  • stored in a vortex path on hendrix (xxx is "pgd" and "prep" respectively):
    <yourhome>/vortex/s2m/<region_id>/spinup/<xxx>/

Assimilation Configuration file

  • Stored on beaufix home.

Observation files

  • stored in a vortex path on hendrix :
    <yourhome>/vortex/s2m/<region_id>/obs/<your_sensor>/
  • for synthetical observations : do the same.

Simulation outputs storing

If the simulation has succeded :
  • all files are deleted from beaufix
  • PREP and PRO files are stored on hendrix :
    <your_home>/vortex/s2m/<region_id>/<xpid>/<mbxxxx>/<xxx>
    - xpid is specified through s2m -o option, see below
    - xxx is bg, an or pro for backgroud PREP, analysis PREP and PRO files respectively
  • Assimilation configuration file (useful for twin experiments and traceability) is stored in <your_home>/vortex/s2m/<region_id>/conf/
  • Base namelist is also stored in <your_home>/vortex/s2m/<region_id>/conf/ (name namelist.surfex.foo)
  • PF sample files are stored in <your_home>/vortex/s2m/<region_id>/workSODA/ (name PART_YYYYMMDDHH.txt.foo)
  • For post-processing and dev, PREP files and the configuration file can also be fetched to sxcen (in /cnrm/cen/users/NO_SAVE/...), which has no backup and limited space (see the options below)

New s2m options/modifications

- w option is useless
- o xpid : output repertory on hendrix
--escroc E1Tartes or E1noTartes : Escroc big ensembles with Tartes only (1944 members) or no Tartes (the rest). nmembers will be randomly drawn from this ensemble between each assimilation date
--crampon your_path_to_assimilation_configuration_file : activate CRAMPON and give the path to your conf file.
--nforcing : numbers of different forcings to use
- f xpid_forcing: xpid for your forcing files on hendrix
--openloop : activate openloop sequence (no assimilation but output at each assimilation date)
--walltime : estimate for execution time on beaufix
--writesx yourpath_to_NO_SAVE_on_sxcen.cnrm: fetch output data directly to a vortex path on sxcen NO_SAVE (/cnrm/cen/users/NO_SAVE/***id***/vortex/)
--sensor your_sensor: specify the name of the sensor used to generate the observations (default :MODIS), or of your synthetical obs.