Changes between Version 11 and Version 12 of DevelopmentActivities/OasisDriver


Ignore:
Timestamp:
2014-06-17T11:26:50+02:00 (10 years ago)
Author:
jpolcher
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopmentActivities/OasisDriver

    v11 v12  
    22== Introduction == 
    33 
    4 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) : 
     4Today ORCHIDEE is designed to be called by a subroutine independently on each processor. This is implemented for instance in the traditional off-line driver (dim2_driver.f90) : 
    55 
    66[[Image(wiki:OasisDriver:Witout_OASIS.png, 350px)]] 
    77 
    8 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 the others to finish. 
     8This assumes that the domain decomposition of the atmospheric model (or the driver) and ORCHIDEE are the same. It also means that the processors which have no land point to deal with are waiting for the others to finish. 
    99 
    1010In 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 driver (driver2oasis.f90) which mimics the atmosphere, is a single processor code which just reads some forcing files and provides that data to OASIS. It is a prototype for any atmospheric model which would send the same fields from its n processors to OASIS. 
     
    1212[[Image(wiki:OasisDriver:With_OASIS.png, 350px)]] 
    1313 
    14 In the OASIS approach to coupling a number of advantages are gained : 
     14In the OASIS approach to coupling, a number of advantages are gained : 
    1515 
    1616* The atmosphere can run on a different set of processors than the land surface and have its own domain decomposition. 
     
    2222* 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. 
    2323 
    24 * The land surface model is an independent executable which has its own restart mechanism and history system and can thus be developed independently from the atmospheric component. 
     24* The land surface model is an independent executable which has its own restart mechanism and history system and can thus be developed in a more autonomous way. 
    2525 
    2626== The driver for OASIS : driver2oasis.f90 == 
     
    3232For the moment this code only reads compressed by gathering forcing files which contain a sufficient amount of meta-data ([attachment:Description_Forcing_Files.pdf]). 
    3333 
    34 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. 
     34The code is designed to run 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. 
    3535 
    3636== The fields which OASIS exchanges between the atmosphere and the surface == 
     
    7878The main, in the FORTRAN sense is very similar to the intersurf.f90 which as been used up to now. The main difference is that it obtains the atmospheric data by issuing the needed OASIS_get calls. It will perform the following actions : 
    7979 
    80 * Set-up the domain decomposition of the grid it has been given. 
     80* Read the grid description in a netCDF file. 
     81 
     82* Set-up the domain decomposition for the grid. 
    8183 
    8284* Set-up the restart and history mechanisms. 
     
    8688* Call sechiba_main 
    8789 
    88 * Send to the atmosphere the flux computed 
     90* Send to the atmosphere (or the driver) the computed fluxes. 
    8991 
    9092* Write to the history files 
     
    9496== Configuration of this ORCHIDEE version == 
    9597 
    96 As OASIS does not provide a mechanism to exchange time and grid descriptions between two coupled models some extra information needed to be added to the run.def. Obviously the coupling mechanism itself also needs to be documented in the namcouple of OASIS. 
     98As OASIS does not provide a mechanism to exchange time and grid descriptions between two coupled models, some extra information needed to be added to the run.def and read from other files. Obviously the coupling mechanism itself also needs to be documented in the namcouple of OASIS. 
    9799 
    98100=== Added information in the run.def === 
    99101 
    100 * The information on the length of the simulation which has always been used in the run.def is insufficient to ensure that the driver and ORCHIDEE run over the same period. In order to solve this the run.def now needs to include a start and an end date for the simulation. The two keywords are (The dates provided need to be in the ISO format and be exact (include hour, minutes and seconds).) : 
     102* The information on the length of the simulation which has been provided previously in run.def is insufficient to ensure that the driver and ORCHIDEE run over the same period. In order to solve this the run.def now needs to include a start and an end date for the simulation. The two keywords are (The dates provided need to be in the ISO format and be exact (include hour, minutes and seconds).) : 
    101103  - START_DATE = 1990-01-01 0:0:0  
    102104  - END_DATE = 1990-03-01 0:0:0  
     
    106108  - TIME_STEP = 900 
    107109 
    108 * In the same way, the distribution of the average rainfall provided by the forcing over the finer time stepping of the model is given in seconds : 
     110* In the same way, the distribution of the average rainfall, provided by the forcing, over the finer time stepping of the model is given in seconds : 
    109111  -  SPRED_PREC_SEC = 3600 
    110112 
    111 * As the time interval to be simulated the more than one forcing file might be needed. Thus the option which names the forcing file accepts a list of files : 
     113* The time interval to be simulated can cover more than one forcing file. Thus the option which names the forcing file accepts a list of files : 
    112114  - FORCING_FILE =  WFDEI_CRU_2008.nc WFDEI_CRU_2009.nc 
    113115 
     
    121123=== The grid description file === 
    122124 
    123 The grid file is generated by the driver2oasis or by the atmospheric model. In the case of an off-line simulation this file is generated in an initialisation call (driver2oasis -init) based on the forcing file. The program will read the forcing file, compute the land/ocean mask and other ancillary information. We will ensure that orchideeoasis.f90 (the main program for ORCHIDEE) will be able to read also grid description files of all atmospheric models it is coupled to. WRF will be the first case implemented. 
     125The grid file (in netCDF format) is generated by the driver2oasis or by the atmospheric model. In the case of an off-line simulation this file is generated in an initialisation call (driver2oasis -init) based on the forcing file. The program will read the forcing file, compute the land/ocean mask and other ancillary information.  
     126 
     127We will ensure that orchideeoasis.f90 (the main program for ORCHIDEE) will be able to read also grid description files of other atmospheric models it is coupled to. WRF will be the first case implemented. 
    124128 
    125129This file needs to provide the following information to ORCHIDEE : 
     
    159163== Execution of the model coupled to the driver == 
    160164 
    161 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 : 
     165As OASIS-MCT 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 : 
    162166 
    163167mpirun -n $PEDRIV driver2oasis : -n $PEORCH orchideeoasis 
    164168 
    165 where : PEDRIV=1 and PEORCH=$(($NSLOTS-$PEDRIV)), i.e. only one processor is for the driver and all others work on ORCHIDEE. 
     169where : PEDRIV=1 and PEORCH=$(($NSLOTS-$PEDRIV)), i.e. only one processor is dedicated to the driver and all others work on ORCHIDEE. 
    166170 
    167171In the execution directory the 3 configuration files presented above need to be present :