== Introduction == Today ORCHIDEE is designed to be called by a subroutine independently on each processor. This is implemented for instance in the traditional driver (dim2_driver.f90) : [[Image(wiki:OasisDriver:Witout_OASIS.png, 350px)]] This assumes that the domain decomposition of the atmospheric model or the driver are the same. It also means that the processors which have no land point to deal with are waiting for their pairs to finish. In order to avoid these issues and generalise the coupling of ORCHIDEE with other atmospheric components the OASIS-MCT coupler can be used. In this case the atmosphere can work on any number of processors and ORCHIDEE on a distinct set of processors. This is exemplified in the driver2oasis presented below. Here the atmosphere is a single processor code which just reads some forcing file and provides that data to OASIS. But it is a model for any atmospheric model which would provide the same fields from its n processors to OASIS. [[Image(wiki:OasisDriver:With_OASIS.png, 350px)]] In the OASIS approach to coupling a number of advantages are gained : * The atmosphere can run on a different set of processors than the land surface and have its own domain decomposition. * ORCHIDEE will only execute on the processors attributed to it and only treat land surface points. * After the atmosphere has sent its data to OASIS it can continue to work on processes which do not require the input of the land surface. * In the same way, once the land surface has returned the variables needed by the atmosphere (i.e. after solving the surface energy balance) it can continue to work and prepare the next time step. == The driver for OASIS : driver2oasis.f90 == This code simulates an atmospheric model which would provide provide data for ORCHIDEE through OASIS. As the original ORCHIDEE driver (dim2_driver.f90) is outdated and inflexible it has been redeveloped here. For the moment this code only read compressed by gathering forcing files which contain a sufficient amount of meta-data (link to document). This code is aimed at running only on one processor. It should not be a limiting factor in the execution time as it only reads once the forcing and then only does some simple time interpolations. Furthermore these interpolations are done while ORCHIDEE runs, i.e. it is not blocked by an oasis_get call. == The fields which OASIS exchanges between the atmosphere and the surface == === From the atmosphere to ORCHIDEE === || '''Name''' || '''units''' || '''ID on driver side''' || '''ID on ORCHIDEE side''' || || Height of T and Q || m || ZLTQDRIV || HEIGHTTQ || || Height of wind || m || ZLUVDRIV || HEIGHTUV || || Atmospheric temperature || K || TAIRDRIV || TEMPLEV1 || || Atmospheric moisture || kg/kg || QAIRDRIV || HUMILEV1 || || Rainfall || kg/m^2/dt || RAINDRIV || RAINFALL || || Snowfall || kg/m^2/dt || SNOWDRIV || SNOWFALL || || Downward solar radiation || W/m^2 || SWDODRIV || SHOWDOWN || || Downward longwave radiation || W/m^2 || LWDODRIV || LONWDOWN || || Solar angle || ?? || SOLADRIV || SOLARANG || || Eastward atmsopheric wind || m/s || UWINDRIV || EASTWIND || || Northward wind || m/s || VWINDRIV || NORTWIND || || Surface pressure || Pa || PRESDRIV || SURFPRES || === From the surface to the atmosphere === || '''Name''' || '''units''' || '''ID on driver side''' || '''ID on ORCHIDEE side''' || || Surface evaporation || kg/m^2/dt || EVAPDRIV || TOTEVAPS || || Sensible heat flux || W/m^2 || SENSDRIV || FLUXSENS || || Latent heat flux || W/m^2 || LATEDRIV || FLUXLATE || || Diffuse freshwater flux to the oceans || m^3/dt || COASDRIV || COASTFLO || || River flux into the ocean || m^3/dt || RIVEDRIV || RIVERFLO || || Net CO2 flux || ?? || NECODRIV || FLUNECO2 || || ?? || ?? || LUCODRIV || FLULUCO2 || || Surface radiative temperature || K || TRADDRIV || TSURFRAD || || Surface temperature || K || TNEWDRIV || TSURFNEW || || Surface humidity || kg/kg || QSURDRIV || QSURFNEW || || Near Infra-red albedo || - || ANIRDRIV || ALBEDNIR || || Visible albedo || - || AVISDRIV || ALBEDVIS || || Surface emissivity || - || EMISDRIV || EMISLONW || || Surface roughness || m || ROUGDRIV || ROUGNESS || dt : is the time step used by the models. We do not expect ORCHIDEE and the atmospheric model to use different time steps. == The "main" which controls the ORCHIDEE execution : orchideeoasis.f90 == == Execution of the model coupled to the driver == As OASIS is linked into both models (driver2oasis and orchideeoasis) the execution of the coupled model is simply achieved by one mpirun command. It can have the following structure : mpirun -n $PEDRIV driver2oasis : -n $PEORCH orchideeoasis where : PEDRIV=1 and PEORCH=$(($NSLOTS-$PEDRIV)), i.e. only one processor is for the driver and all others work on ORCHIDEE. == Execution of the model coupled to WRF ==