source: CONFIG_DEVT/IPSLCM6.2.2_ENSEMBLES/libIGCM/libIGCM_post/IGCM_Patch_20090317_histcom__Fillvalue.ksh @ 6204

Last change on this file since 6204 was 6204, checked in by aclsce, 2 years ago

First import of IPSLCM6.2.2_work_ENSEMBLES working configuration

File size: 1.5 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Martial Mancip
5# Contact: Martial.Mancip__at__ipsl.jussieu.fr
6# $Revision:: 1206                                     $ Revision of last commit
7# $Author:: sdipsl                                     $ Author of last commit
8# $Date:: 2015-06-05 17:28:35 +0200 (Fri, 05 Jun 2015) $ Date of last commit
9# IPSL (2006)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11#
12#**************************************************************
13
14#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15# We change _Fillvalue to old missing_value    !!!!
16#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17
18function IGCM_Patch_20090317_histcom__Fillvalue {
19    IGCM_debug_PushStack "IGCM_Patch_histcom__Fillvalue" $@
20 
21    typeset file
22
23    file=t_$1
24    IGCM_sys_Mv ${1} ${file}
25    IGCM_sys_Chmod 644 ${file}
26
27    #IGCM_sys_ncrename -O --hst -a _Fillvalue,missing_value ${file}
28
29    miss=$( ncdump -h ${file} | grep _Fillvalue | head -1 | awk "-F=" '{print $2}' |  awk "-Ff" '{print $1}' )
30
31    [ ! X${miss} = X ] && IGCM_sys_ncatted -a missing_value,,c,f,${miss} ${file} 
32
33    # ------------------------------------------------------------------
34    # Test if all was right before proceeding further
35    # ------------------------------------------------------------------
36    IGCM_debug_Verif_Exit
37
38    IGCM_sys_Mv ${file} ${1}
39   
40    IGCM_debug_PopStack "IGCM_Patch_histcom__Fillvalue"
41}
Note: See TracBrowser for help on using the repository browser.