New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
2019WP/HPC-11_Mirek_Andrejczuk_IO_with_XIOS (diff) – NEMO

Changes between Version 2 and Version 3 of 2019WP/HPC-11_Mirek_Andrejczuk_IO_with_XIOS


Ignore:
Timestamp:
2019-12-05T16:46:26+01:00 (4 years ago)
Author:
smasson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2019WP/HPC-11_Mirek_Andrejczuk_IO_with_XIOS

    v2 v3  
    3434== Review 
    3535 
    36 {{{#!box help 
    37 [[Include(wiki:Developers/DevProcess#review)]] 
    38 }}} 
     36Some years ago, when we created iom.F90, the idea was to be able to use different IO libraries as transparently as possible... 
     37 
     38This was still the case in NEMO 3.6. 
     39In that version, you could find 3 different IO libraries: nf90, ioipsl and dimg. 
     40the choice between theses libraries was done in iom_def.F90 (lines 30 to 37) 
     41https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/releases/release-3.6/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90 [[BR]] 
     42 
     43  
     44The iom routines where therefore organized in a 2 stages modules. 
     45 
     46- The first stage is iom.F90 that contains all public subroutines, prepare all the IO work but do the IO work. 
     47All the idea was iom.F90 is the common interface for all IO libraries. 
     48https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/releases/release-3.4/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90 
     49 
     50 - The second stage is called by iom.F90 subroutines and consist in 3 different IO routines 
     51https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/releases/release-3.6/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90 
     52https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/releases/release-3.6/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90 
     53https://forge.ipsl.jussieu.fr/nemo/browser/NEMO/releases/release-3.6/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90 
     54 
     55 
     56The fork toward the different libraries was done in iom.F90, with case statements.  
     57See for example iom_rstput interface in this version of iom.F90 (from line 1046)  
     58 
     59We think that the use of xios to read/write restarts should try follow this same logic.  
     60 -> reintroduce case in iom to be able to switch from native netcdf (nf90) to xios library [[BR]] 
     61 -> Ideally, the use of xios for restarts should not be visible somewhere else, no? [[BR]] 
     62 -> once the interface is done it is directly usable for all restarts [[BR]] 
     63 
     64We know that the reality is more complex that this simple description and developing such interface wont be so easy… 
     65We think a good stating point is to follow what is done for nf90 restarts that are performed in 2 steps: 
     66 1) 1 time step before restart: define all the restart file using a specific context (so xios_context_initialize and xios_close_context_definition cand be done anytime)[[BR]] 
     67 2) fill the file when is it restart time step. 
     68 
     69 
     70Sebastien and Clement