[198] | 1 | #!/bin/ksh |
---|
| 2 | |
---|
| 3 | #************************************************************** |
---|
[257] | 4 | # Author: Marie-Alice Foujols |
---|
[373] | 5 | # Contact: Marie-Alice.Foujols__at__ipsl.jussieu.fr |
---|
| 6 | # $Revision:: $ Revision of last commit |
---|
| 7 | # $Author:: $ Author of last commit |
---|
| 8 | # $Date:: $ Date of last commit |
---|
[199] | 9 | # IPSL (2009) |
---|
[198] | 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 | |
---|
| 18 | function IGCM_Patch_20091116_ncks_ncra { |
---|
| 19 | IGCM_debug_PushStack "IGCM_Patch_ncks_ncra" $@ |
---|
| 20 | |
---|
[206] | 21 | CPL_OkDay=y |
---|
| 22 | CPL_OkMonth=y |
---|
[198] | 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 | |
---|
[397] | 31 | #ls -l S*_out.*.nc C*_out.*.nc |
---|
[198] | 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 | |
---|
[397] | 42 | #ls -l O*_out.*.nc |
---|
[198] | 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 | |
---|
[1206] | 51 | # ------------------------------------------------------------------ |
---|
| 52 | # Test if all was right before proceeding further |
---|
| 53 | # ------------------------------------------------------------------ |
---|
| 54 | IGCM_debug_Verif_Exit |
---|
| 55 | |
---|
[397] | 56 | #ls -s ${PREFIX}_*_cpl_*.nc |
---|
[198] | 57 | |
---|
| 58 | fi |
---|
| 59 | |
---|
| 60 | IGCM_debug_PopStack "IGCM_Patch_ncks_ncra" |
---|
| 61 | } |
---|