source: tags/libIGCM_v2.2/libIGCM_post/IGCM_Patch_20140206_ncks_ncra.ksh

Last change on this file was 981, checked in by aclsce, 10 years ago

Modified to use OASIS-MCT as coupler (now it is a library, no executable to launch).
Added a patch to treat Oasis-MCT output files.

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Marie-Alice Foujols
5# Contact: Marie-Alice.Foujols__at__ipsl.jussieu.fr
6# $Revision:: 397                                      $ Revision of last commit
7# $Author:: sdipsl                                     $ Author of last commit
8# $Date:: 2010-12-08 14:38:46 +0100 (Wed, 08 Dec 2010) $ 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_20140206_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       rm -f ${PREFIX}_*_cpl_*.nc
32
33       for file in S*lmdz.x*.nc C*lmdz.x*.nc
34       do
35           [[ ${CPL_OkDay}   = "y" ]] && IGCM_sys_ncks -A ${file} ${PREFIX}_1D_cpl_atm.nc  > /dev/null 2>&1
36           [[ ${CPL_OkMonth} = "y" ]] && IGCM_sys_ncra -A ${file} ${PREFIX}_1M_cpl_atm.nc  > /dev/null 2>&1
37       done
38       rm -f S*lmdz.x*.nc C*lmdz.x*.nc
39
40       for file in O*oceanx*.nc
41       do
42           [[ ${CPL_OkDay}   = "y" ]] && IGCM_sys_ncks -A ${file} ${PREFIX}_1D_cpl_oce.nc   > /dev/null 2>&1
43           [[ ${CPL_OkMonth} = "y" ]] && IGCM_sys_ncra -A ${file} ${PREFIX}_1M_cpl_oce.nc   > /dev/null 2>&1
44       done
45       rm -f O*oceanx*.nc
46
47     fi
48   
49    IGCM_debug_PopStack "IGCM_Patch_ncks_ncra"
50}
Note: See TracBrowser for help on using the repository browser.