puma_restart_test 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/csh
  2. # Perform restart test by comparing the restart file of a two-month
  3. # contiguous run with a monthly restarted run (argument = executable)
  4. unset noclobber
  5. rm -f puma_restart
  6. rm -f Abort_Message
  7. rm -f ONE*
  8. rm -f TWO*
  9. # 1. modify namelist to create a two months run
  10. sed -i -e 's/KICK.*/KICK=0/' puma_namelist
  11. sed -i -e 's/NGUI.*/NGUI=0/' puma_namelist
  12. sed -i -e 's/NMONTHS.*/NMONTHS=2/' puma_namelist
  13. # 2. start first run
  14. echo "Executing two months contiguous run"
  15. time $1 32 5
  16. mv puma_diag ONE_DIAG.001
  17. mv puma_status ONE_REST
  18. # 3. modify namelist to create a month run
  19. sed -i -e 's/NMONTHS.*/NMONTHS=1/' puma_namelist
  20. echo "Executing 1st. month"
  21. time $1 32 5
  22. mv puma_diag TWO_DIAG.001
  23. mv puma_status puma_restart
  24. echo "Executing 2nd. month from restart"
  25. time $1 32 5
  26. mv puma_diag TWO_DIAG.002
  27. mv puma_status TWO_REST
  28. # 4. compare restart files - should be identical
  29. diff ONE_REST TWO_REST
  30. if ($? == 0) echo "Restart test passed OK"