Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ### Job Name
- #PBS -N FEB
- ### Project code
- #PBS -A ********
- #PBS -l walltime=00:30:00
- #PBS -q economy
- ### Merge output and error files
- #PBS -j oe
- ### Select 6 nodes with 72 CPUs each for a total of 72 MPI processes
- #PBS -l select=1:ncpus=1:mpiprocs=1
- #_______________________________________________________________________#
- # #
- # Original Programmer : Taufiq Hassan #
- # Creation Date : Mar. 15, 2019 #
- # Last Update : Apr. 9, 2019 (by Taufiq) #
- #=======================================================================#
- # This is a simple batch script to manupulate the GFDL AM4 output for
- # Nudging simulations. Here, the AM4 output is converted to NCEP T62
- # reananlysis format for using in the climate nudging simulations in AM4.
- # This script is for the month January. The same script can be used for
- # other months.
- #------------------------------------------------------------------------
- # Days in months
- mon=(31 28 31 30 31 30 31 31 30 31 30 31)
- Lmon=(31 29 31 30 31 30 31 31 30 31 30 31)
- # Years
- yr=(1995 1996 1997 1998 1999 2000 2002 2002 2003 2004 2005 2006)
- ##
- source /etc/profile.d/modules.sh
- module load cdo
- module load nco
- rm -rf jan*
- cp NCEP.T62.h0361.nc jan0.nc
- for count in {1..9}
- do
- echo jan$(($count-1)).nc
- echo jan$count.nc
- ncap2 -s 'where(date==1980010'$count')date='${yr[4]}'010'$count'' jan$(($count-1)).nc jan$count.nc
- done
- wait
- for count in {10..31}
- do
- echo jan$(($count-1)).nc
- echo jan$count.nc
- ncap2 -s 'where(date==198001'$count')date='${yr[4]}'01'$count'' jan$(($count-1)).nc jan$count.nc
- done
- ncap2 -s 'time=time+6940' jan31.nc NCEP.T62.h0601.nc
- rm -rf jan*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement