wiki:Documentation/Drivers

Version 11 (modified by xnwang, 7 months ago) (diff)

--

Created by X. Wang in 02/2021 and Updated in 03/2021

1. Drivers for interpolating forcing data in ORCHIDEE

We have two drivers available, src_driver/dim2driver and src_driver/orchideedriver. We would like to have only one standard driver for ORCHIDEE in the end.

1.1 the old driver (src_driver/dim2driver)

This driver assumes that scalar variables (Tair,Qair,Psurf,Wind) are instantaneous values at the timestamp, while flux variables (Rainf,Snowf, SWdown, LWdown) are mean values over the interval ending at the timestamp. This driver also requires that the first value of the annual files corresponds to 00UTC+dt_forcing (for instance 03UTC for a 3hourly forcing), and that the last value is for Dec 31st at 24UTC = 00UTC on Jan 1st of the following year. Your files must be prepared accordingly.

  • Cell-method time attribute:
    • The time attributes are optional but recommended, so the files can also be used by the new driver.
    • This time attributes should be "time: instantaneous" for the scalars (Tair,Qair,Psurf,Wind), and "time: mean(end)" for the fluxes (Rainf,Snowf, SWdown, LWdown). If the physical definitions of your forcing variables do not fit this scheme, then you should avoid using this forcing with dim2driver, unless you manage to adapt your files to these constraints.
  • SPRED_PREC: By default, we spread the precipitation over half the forcing time step (1.5h and 3h respectively for 3-hourly and 6-hourly files).

1.2 the new driver (src_driver/orchideedriver.f90)

This driver is expected to be more flexible and to deal with any temporal structure of the forcing datasets, provided the required attributes are inserted in the forcing files. This document Description_Forcing_Files.pdf provides details of how forcing files need to be prepared. It addresses in particular the issues one may face when the fluxes are averaged and scalar variables are instantaneous. The driver needs to take this into account,otherwise the diurnal cycle can be misplaced. Some data providers have different conventions for representing averaged fluxes, and such information is important to know.

  • cell_methods time attribute: you need to add a time attribute to each variable, e.g. "time: instantaneous" our "time: mean(end)", further details in Description_Forcing_Files.pdf. The new driver can work with forcing files of various cell methods, while the old driver works with specific forcing data (CRU).

  • SPRED_PREC: In the driver files precipitation is the accumulated value over the time step of the driver file (e.g. 6 hours). In ORCHIDEE it needs to be decided whether over which time period (in seconds) this precip will come down. Short periods make rain storms, long periods make drizzel. In the new driver, we have SPRED_PREC_SEC in PARAM/run.def with a relative small value, ie., 3600 (ie., 1hour) by default.
  • restart file: The new driver does not need the restart file in the orchideedriver.card, while the old driver does have restart file in the orchidee_ol.card.

The structure and the organisation of the new driver code is quite different from the older driver. While the older driver has the main code dim2_driver.f90 by calling readdim2.f90, the main code of new driver is orchideedriver.f90 by calling globgrd.f90, forcing_tools.f90, forcingdaily_tools etc.

  • The organisation and the structure of orchideedriver.f90 are improved compared to dim2_driver.f90, with more comments in the codes.
  • forcing_tools.f90: deals with forcing files, open, interpolation, writing. The most important routines of foring_tools are forcing_open and forcing_getvalues.

  • globgrd.f90: manage the spatial grid of the forcing. It can either read a file containing the grid information, as is the case for WRF forcing, or obtain the grid from the forcing files.

1.3 Previous discussion and recent efforts about the new driver

A long discussion on the differences between the two drivers (dated in 2016) can be found on https://forge.ipsl.jussieu.fr/orchidee/wiki/Branches/Driver_Improvements.

The work on the new driver has been picked up since July 2020 by X. W. A short report summarizes the first part of this efforts and can be found on https://forge.ipsl.jussieu.fr/orchidee/attachment/wiki/Documentation/Forcings/nouveau_driver_doc.2.pdf.

Recent progress on the integraton of new driver in the trunk, updated in March 2021:

  • the recent version of new driver is included in the trunk. This is committed in r7082.
  • fixed a bug when using the forcing file of coarse resolution: corresponding to the ticket https://forge.ipsl.jussieu.fr/orchidee/ticket/575
  • in order to use new driver for spinup and fg1trans as well, modified src_driver/forcing_tools.f90, libIGCM/libIGCM_config/libIGCM_config.ksh, run.def and orchideedriver.driver etc. These changes are committed into r7082.
  • in order to prepare the forcing file when using the new driver, added a new script AddYears? in TOOLS/newdriver for ORCHIDEE. This is committed in r7112.
  • in order to faciliate users, created necessary forcing files for using new driver and added them into the IGCM repository
  • in order to be consistent with the recent version of FG2, created FG2nd configuration files for using the new driver. Updated all the configuration files (spinup analystique, fg1trans, fg2, fg8) in the recent version of trunk by using the new driver. After testing them for a few years, these updates are committed in r7119 of trunk. Fixed the ticket http://forge.ipsl.jussieu.fr/orchidee/ticket/730
  • identified that the old and the new drivers have the reversed order of latitude when writing the restart file

Useful information for the users of the new driver:

1) The new driver need the forcing files of previous, current, and next year.

Suppose that we have forcing files over 1901-1910, we need forcing files for 1900 and 1911 when using the new driver. The script AddYears? is to prepare for such forcing files.

  • Most recent forcing files now have extra forcing files in the default IGCM repository: the users do not need run this script, or modify the data path in .card. Running a simulation with new driver will be the same as the old one, since the good configuration files .card are already included in the experiment folder.
  • If a user need older version of forcing files, he/she may need to: a) run the script AddYears? firstly, b) then modify the forcing path in the orchideedriver.card by using the right path to the forcing files before launching simulation.c) be careful about the calendar type for different forcing files. This script has been tested with CRUJRA (two deg and half deg of of recent version), WFDEI, CRU-NCEP (two deg and one deg).

2) The number of MPI is 63 in the config.card by default if using WFDEI 0.5 degree, and it is 31 if using CRU 2degree. So the users should choose the right forcing files for their simulation firstly, and then use a good MPI number.

3) in PARAM/orchidee.def: if we use forcing file of coarse resolution, it would be better to set RIVER_ROUTING = n to avoid possible routing errors.

4) The users need update also libIGCM (if they did not do so) before running the new driver.

A few more things probably need to do:

  • to make sure of the complete integration of the new driver in the recent version of trunk (libIGCM, script)
  • to test the new driver in the recent version of trunk by running spinup analytic, fg1trans and fg3
  • to discuss if we would like to do more comprehensive comparisons of the simulation results from the new and the old driver
  • if yes, need decide some strategy of the comparisons, ie., which parameters to evaluate (gpp, evaporation, lai and others), which statistics, using some observations for comparison or not etc