source: CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/libIGCM/libIGCM_post/IGCM_Patch_20091116_ncks_ncra.ksh @ 5899

Last change on this file since 5899 was 5899, checked in by aclsce, 3 years ago

Modified libIGCM and configuration to run XIOS ensembles.

File size: 2.0 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Marie-Alice Foujols
5# Contact: Marie-Alice.Foujols__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 (2009)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11#
12#**************************************************************
13
14#------------------------------------------------------------
15# ncks CPL files for 1D frequency, ncra for 1M averaged files
16#------------------------------------------------------------
17
18function IGCM_Patch_20091116_ncks_ncra {
19    IGCM_debug_PushStack "IGCM_Patch_ncks_ncra" $@
20
21    CPL_OkDay=y
22    CPL_OkMonth=y
23
24    PREFIX=TEMPO
25    if [ -f FIRST_TIME_CPL ] ; then
26       echo FIRST_TIME_CPL exists
27    else
28       # create FIRST_TIME_CPL file
29       date > FIRST_TIME_CPL
30
31       #ls -l S*_out.*.nc C*_out.*.nc
32
33       rm -f ${PREFIX}_*_cpl_*.nc
34
35       for file in S*_out.*.nc C*_out.*.nc
36       do
37           [[ ${CPL_OkDay}   = "y" ]] && IGCM_sys_ncks -A ${file} ${PREFIX}_1D_cpl_atm.nc  > /dev/null 2>&1
38           [[ ${CPL_OkMonth} = "y" ]] && IGCM_sys_ncra -A ${file} ${PREFIX}_1M_cpl_atm.nc  > /dev/null 2>&1
39       done
40       rm -f S*_out.*.nc C*_out.*.nc
41
42       #ls -l O*_out.*.nc
43
44       for file in O*_out.*.nc
45       do
46           [[ ${CPL_OkDay}   = "y" ]] && IGCM_sys_ncks -A ${file} ${PREFIX}_1D_cpl_oce.nc   > /dev/null 2>&1
47           [[ ${CPL_OkMonth} = "y" ]] && IGCM_sys_ncra -A ${file} ${PREFIX}_1M_cpl_oce.nc   > /dev/null 2>&1
48       done
49       rm -f O*_out.*.nc
50
51       # ------------------------------------------------------------------
52       # Test if all was right before proceeding further
53       # ------------------------------------------------------------------
54       IGCM_debug_Verif_Exit
55
56       #ls -s ${PREFIX}_*_cpl_*.nc
57
58     fi
59   
60    IGCM_debug_PopStack "IGCM_Patch_ncks_ncra"
61}
Note: See TracBrowser for help on using the repository browser.