#!/bin/bash
#
#
cd /cpc/fews/production/NMME/source_data 
./copy_files.sh
exit
#
cd /cpc/fews/production/NMME/nmme2
./get_all_input_data.sh 2024 01
# 
#
exit
#
cd /cpc/fews/production/NMME/nmme2/scripts/skill_scores
./do_all_skill_maps.sh
#
cd /cpc/fews/production/NMME/nmme2/scripts/process_all
./do_all.sh
#
cd /cpc/fews/production/NMME/outputs/maps_seasonal
1.   Open Browser: point to URL
      https://www.cpc.ncep.noaa.gov/products/NMME/current/images/NMME_ensemble_tmpsfc_season1.png

compare maps from 10 & 11 and make sure they look almost similar with minute differences  (color schemes may vary). If totally different,
        ***  No Further Precessing. STOP ***

Once you are ok with the SST Anomaly maps, we repeat the same comparison with Precipitation and 2m Temperature.
--------------------------------------------------------------------
Manually/Visually compare our Precp anom maps with the corresponding Precip maps generated by Ginger.


12.   cd /cpc/fews/production/NMME/outputs/maps_seasonal
13.   display global_nmme_prec_anom_JanIC_Feb2024-Apr2024.png
14.   Open Browser: point to URL
      https://www.cpc.ncep.noaa.gov/products/NMME/current/images/NMME_ensemble_prate_season1.png

compare maps from 13 & 14 and make sure they look almost similar with minute differences  (color schemes may vary). If totally different,
        ***  No Further Precessing. STOP ***

Once you are ok with the Precip Anomaly maps, we repeat the same comparison with 2m Temperature.
--------------------------------------------------------------------
Manually/Visually compare our 2m Temp anom maps with the corresponding 2m temp anom maps generated by Ginger.


15.   cd /cpc/fews/production/NMME/outputs/maps_seasonal
16.   display global_nmme_tmp2m_anom_JanIC_Feb2024-Apr2024.png
17.   Browser point to URL
      https://www.cpc.ncep.noaa.gov/products/NMME/current/images/NMME_ensemble_tmp2m_season1.png

compare maps from 16 & 17 and make sure they look almost similar with minute differences  (color schemes may vary). If totally different,
        ***  No Further Precessing. STOP ***

Once you are ok with the tmp2m Anomaly maps, we repeat the same comparison we are done verification.
--------------------------------------------------------------------
Now we create probabilistic maps in png format and gis gormats

18.   cd /cpc/fews/production/NMME/nmme2/scripts/probabilistic
19.   ./do_all.sh
PS: You may need to <enter> a few times to return to prompt.
This completes the creation of probabilistic maps
-------------------------------------------------------------------
Now creat the htmls

20. cd /cpc/fews/production/NMME/nmme2/scripts/htmls
21. ./update_all_htmls.sh

After completion it returns to prompt
This completes html creation
--------------------------------------------------------------------
 Now create all the tar files

22. cd /cpc/fews/production/NMME/outputs/maps_monthly
23. ./put_files.sh

24. cd /cpc/fews/production/NMME/outputs/maps_seasonal
25.  ./put_files.sh

26. cd /cpc/fews/production/NMME/outputs/monthly_output_grids
27.  ./put_files.sh

28.  cd /cpc/fews/production/NMME/outputs/monthly_output_grids
29   ./put_files.sh

This completes the creation of tar files
--------------------------------------------------------------------
Now tranfer all the tar files to ftp or web server
Please make sure you have all the following tar files are current

binary_monthly.tar
binary_seasonal.tar
html_monthly.tar
html_seasonal.tar
htmls_probabilistic_monthly.tar
htmls_probabilistic_seasonal.tar
myanmar_monthly.tar
myanmar_seasonal.tar
plots_monthly.tar
plots_seasonal.tar
probabilistic_monthly.tar
probabilistic_seasonal.tar
ukraine_monthly.tar
ukraine_seasonal.tar
usrccl.tar
usrcc.tar

Then run the following commands

30.   cd /cpc/fews/production/NMME/tarout
31.   ./put_all_tar_files.sh

This completes transfer of all the tarfiles to their destinations
-----------------------------------------------------------------------
Data to NASA folks: login to rzdm

32.  ssh -l fews cpcrzdm
33.  cd ../ftp/International/nmme
34.  tar xf binary_monthly.tar
35.  tar xf binary_seasonal.tar
36.  exit
exit from rzdm... back to fews_prd.

37.  cd /cpc/fews/production/NMME/nmme2/scripts/data_to_nasa
38.  ./do_all.sh

You may need to several <enter> key strokes (when it pauses) to return to prompt. You may see the display of images.
----------------------------------------------------------------------
Filter near pole higher values for SST etc.

39.  cd /cpc/fews/production/NMME/inputs/filtered
40   ./do_filter.sh
----------------------------------------------------------------------
Create NMME data in CPT format

41.  cd /cpc/fews/production/NMME/nmme2/scripts/cpt_formatting
42.  ./do_all_cpt.sh

This will take about an hour or so and returns tp prompt. Places the CPT formatted data on the ftp serve:wd53vk


-------------------------------------------------------------------------------------------------
While the command 42 is running, please login to a separate linux session window. cpcwork2 with user id wd53vk/password 

						Part B

Login cpcwork2  uid:wd53vk  password:

After login:

43. ssh -l vkumar cpcrzdm
After logged in:

44. cd ../www/htdocs/products/international/nmme

make sure all the tar files are with current date and time stamp.

45. mv *.tar tardir/

rename previous month ic directory for the year 2022
46. mv decic dec2022ic

create one for 2023 (no year appended in the name)
47. mkdir decic

48.  cp * decic/   
The directories are not copied. Only the files are copied. 

Now the directories will be moved

49.  mv html_monthly  decic/

50.  mv html_seasonal  decic/

51.  mv myanmar_monthly  decic/

52.  mv myanmar_seasonal  decic/

53.  mv plots_monthly  decic/

54.  mv plots_seasonal  decic/

55.  mv probabilistic_monthly  decic/

56.  mv probabilistic_seasonal  decic/

57.  mv ukraine_monthly  decic/

58.  mv ukraine_seasonal  decic/                      ...corrected to seasonal

59.  mv usrcc  decic/

60.  mv usrccl  decic

move the tar files from the tardir to current directory.

61. mv tardir/*.tar .

Untar them in sequence.

62.  tar xf html_monthly.tar

63.  tar xf html_seasonal.tar 

64.  tar xf htmls_probabilistic_monthly.tar

65.  tar xf htmls_probabilistic_seasonal.tar

66.  tar xf myanmar_monthly.tar

67.  tar xf myanmar_seasonal.tar

68.  tar xf plots_monthy.tar

69.  tar xf plots_seasonal.tar

70.  tar xf probabilistic_monthly.tar

71.  tar xf probabilistic_seasonal.tar                ...corrected to seasonal

72.  tar xf ukraine_monthly.tar

73.  tar xf ukraine_seasonal.tar

74.  tar xf usrcc.tar

75.  tar xf usrccl.tar

Move the tar files back into tardir directory

76.  mv *.tar tardir/

This completes the update of all pages for the January 2023 initial conditions

77. exit

exits the rzdm
------------------------------------------------
