source: branches/publications/ORCHIDEE_gmd_2018_MICT-LEAK/src_global/utils.f90

Last change on this file was 3656, checked in by albert.jornet, 8 years ago

Refactor: new subroutine for writing carbon permafrost forcing netcdf file inside stomate_io_carbon_permafrost.
Fix: set mpi write to collective mode for stomate_io_carbon_permafrost_write. This is due to UNLIMITED dimension netcdf variable.
Fix: set output file to double precission. Before it was single precission.

File size: 1.3 KB
Line 
1!
2! Place here all those small routines that do not fit in orchidee logic yet
3!
4!
5!< $HeadURL: svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-MICT/ORCHIDEE/src_global/interpol_help.f90 $
6!< $Date: 2016-06-17 13:26:43 +0200 (Fri, 17 Jun 2016) $
7!< $Author: albert.jornet $
8!< $Revision: 3564 $
9!
10!
11MODULE utils 
12
13  ! Modules used :
14
15  USE netcdf
16  USE defprec
17  USE ioipsl_para
18
19  IMPLICIT NONE
20
21  PRIVATE
22  PUBLIC nccheck 
23  !
24CONTAINS
25  !
26!! ================================================================================================================================
27!! SUBROUTINE   : nccheck
28!!
29!>\BRIEF        Check for netcdf exit status
30!!
31!! DESCRIPTION  : Launch an orchidee error message if status variable contains a netcdf error
32!!
33!! RECENT CHANGE(S) : None
34!!
35!! REFERENCE(S) : None
36!!
37!! FLOWCHART    : None
38!! \n
39!_ ================================================================================================================================
40  SUBROUTINE nccheck(status)
41    INTEGER(i_std), INTENT (IN)         :: status
42    CHARACTER(LEN=200)                  :: mesg
43   
44    IF(status /= nf90_noerr) THEN
45     
46      WRITE(numout, *) trim(nf90_strerror(status))
47      CALL ipslerr_p(3, 'nccheck', 'Netcdf error', 'Check out_orchide_XXXX output files', 'for more information')
48    END IF 
49  END SUBROUTINE nccheck
50!
51END MODULE utils 
Note: See TracBrowser for help on using the repository browser.