Advertisement
Guest User

Untitled

a guest
Apr 9th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.79 KB | None | 0 0
  1. #!/bin/bash
  2. ### Job Name
  3. #PBS -N FEB
  4. ### Project code
  5. #PBS -A ********
  6. #PBS -l walltime=00:30:00
  7. #PBS -q economy
  8. ### Merge output and error files
  9. #PBS -j oe
  10. ### Select 6 nodes with 72 CPUs each for a total of 72 MPI processes
  11. #PBS -l select=1:ncpus=1:mpiprocs=1
  12.  
  13. #_______________________________________________________________________#
  14. #                                                                       #
  15. # Original Programmer : Taufiq Hassan                                   #
  16. # Creation Date : Mar. 15, 2019                                         #
  17. # Last Update : Apr. 9, 2019 (by Taufiq)                                #
  18. #=======================================================================#
  19. # This is a simple batch script to manupulate the GFDL AM4 output for
  20. # Nudging simulations. Here, the AM4 output is converted to NCEP T62
  21. # reananlysis format for using in the climate nudging simulations in AM4.
  22. # This script is for the month January. The same script can be used for
  23. # other months.
  24. #------------------------------------------------------------------------
  25.  
  26. # Days in months
  27. mon=(31 28 31 30 31 30 31 31 30 31 30 31)
  28. Lmon=(31 29 31 30 31 30 31 31 30 31 30 31)
  29. # Years
  30. yr=(1995 1996 1997 1998 1999 2000 2002 2002 2003 2004 2005 2006)
  31. ##
  32. source /etc/profile.d/modules.sh
  33. module load cdo
  34. module load nco
  35. rm -rf jan*
  36. cp NCEP.T62.h0361.nc jan0.nc
  37. for count in {1..9}
  38. do
  39.  echo jan$(($count-1)).nc
  40.  echo jan$count.nc
  41.  ncap2 -s 'where(date==1980010'$count')date='${yr[4]}'010'$count'' jan$(($count-1)).nc jan$count.nc
  42. done
  43. wait
  44. for count in {10..31}
  45. do
  46.  echo jan$(($count-1)).nc
  47.  echo jan$count.nc
  48.  ncap2 -s 'where(date==198001'$count')date='${yr[4]}'01'$count'' jan$(($count-1)).nc jan$count.nc
  49. done
  50. ncap2 -s 'time=time+6940' jan31.nc NCEP.T62.h0601.nc
  51. rm -rf jan*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement