@@ -30,57 +30,54 @@ class CMAPProcessor(GeoDataMosaicProcessor):
3030 layer_name = 'cmap'
3131 bounds = '-178.75,178.75,-88.75,88.75'
3232 title = 'CPC Merged Analysis of Precipitation, 1979/01 - {}'
33- abstract = """The CPC Merged Analysis of Precipitation ("CMAP") is a
34- technique which produces pentad and monthly analyses of global precipitation
35- in which observations from raingauges are merged with precipitation estimates
36- from several satellite-based algorithms (infrared and microwave). The analyses
37- are are on a 2.5 x 2.5 degree latitude/longitude grid and extend back to 1979.
38- These data are comparable (but should not be confused with) similarly combined
39- analyses by the Global Precipitation Climatology Project which are described in
40- Huffman et al (1997).
41-
42- It is important to note that the input data sources to make these analyses are
43- not constant throughout the period of record. For example, SSM/I (passive
44- microwave - scattering and emission) data became available in July of 1987;
45- prior to that the only microwave-derived estimates available are from the MSU
46- algorithm (Spencer 1993) which is emission-based thus precipitation estimates
47- are avaialble only over oceanic areas. Furthermore, high temporal resolution IR
48- data from geostationary satellites (every 3-hr) became available during 1986;
49- prior to that, estimates from the OPI technique (Xie and Arkin 1997) are used
50- based on OLR from polar orbiting satellites.
51-
52- The merging technique is thoroughly described in Xie and Arkin (1997). Briefly,
53- the methodology is a two-step process. First, the random error is reduced by
54- linearly combining the satellite estimates using the maximum likelihood method,
55- in which case the linear combination coefficients are inversely proportional to
56- the square of the local random error of the individual data sources. Over global
57- land areas the random error is defined for each time period and grid location
58- by comparing the data source with the raingauge analysis over the surrounding
59- area. Over oceans, the random error is defined by comparing the data sources
60- with the raingauge observations over the Pacific atolls. Bias is reduced when
61- the data sources are blended in the second step using the blending technique of
62- Reynolds (1988). Here the data output from step 1 is used to define the "shape"
63- of the precipitation field and the rain gauge data are used to constrain the
64- amplitude.
65-
66- Monthly and pentad CMAP estimates back to the 1979 are available from CPC ftp
67- server.
68-
69- References:
70-
71- Huffman, G. J. and co-authors, 1997: The Global Precipitation Climatology
72- Project (GPCP) combined data set. Bull. Amer. Meteor. Soc., 78, 5-20.
73-
74- Reynolds, R. W., 1988: A real-time global sea surface temperature analysis. J.
75- Climate, 1, 75-86.
76-
77- Spencer, R. W., 1993: Global oceanic precipitation from the MSU during 1979-91
78- and comparisons to other climatologies. J. Climate, 6, 1301-1326.
79-
80- Xie P., and P. A. Arkin, 1996: Global precipitation: a 17-year monthly analysis
81- based on gauge observations, satellite estimates, and numerical model outputs.
82- Bull. Amer. Meteor. Soc., 78, 2539-2558.
83- """
33+ abstract = (
34+ "The CPC Merged Analysis of Precipitation ('CMAP') is a technique which"
35+ " produces pentad and monthly analyses of global precipitation in which"
36+ " observations from raingauges are merged with precipitation estimates "
37+ "from several satellite-based algorithms (infrared and microwave). The "
38+ "analyses are on a 2.5 x 2.5 degree latitude/longitude grid and extend "
39+ "back to 1979.\n \n These data are comparable (but should not be confused"
40+ " with) similarly combined analyses by the Global Precipitation "
41+ "Climatology Project which are described in Huffman et al (1997).\n \n "
42+ "It is important to note that the input data sources to make these "
43+ "analyses are not constant throughout the period of record. For example"
44+ ", SSM/I (passive microwave - scattering and emission) data became "
45+ "available in July of 1987; prior to that the only microwave-derived "
46+ "estimates available are from the MSU algorithm (Spencer 1993) which is"
47+ " emission-based thus precipitation estimates are avaialble only over "
48+ " oceanic areas. Furthermore, high temporal resolution IR data from "
49+ "geostationary satellites (every 3-hr) became available during 1986;"
50+ " prior to that, estimates from the OPI technique (Xie and Arkin 1997) "
51+ "are used based on OLR from polar orbiting satellites.\n \n The merging "
52+ "technique is thoroughly described in Xie and Arkin (1997). Briefly, "
53+ "the methodology is a two-step process. First, the random error is "
54+ "reduced by linearly combining the satellite estimates using the "
55+ "maximum likelihood method, in which case the linear combination "
56+ "coefficients are inversely proportional to the square of the local "
57+ "random error of the individual data sources. Over global land areas "
58+ "the random error is defined for each time period and grid location by "
59+ "comparing the data source with the raingauge analysis over the "
60+ "surrounding area. Over oceans, the random error is defined by "
61+ "comparing the data sources with the raingauge observations over the "
62+ "Pacific atolls. Bias is reduced when the data sources are blended in "
63+ "the second step using the blending technique of Reynolds (1988). Here "
64+ "the data output from step 1 is used to define the \" shape\" of the "
65+ "precipitation field and the rain gauge data are used to constrain the "
66+ "amplitude.\n \n Monthly and pentad CMAP estimates back to the 1979 are "
67+ "available from CPC ftp server.\n \n Source: "
68+ "http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html\n \n Raw data "
69+ "file: ftp://ftp.cdc.noaa.gov/Datasets/cmap/enh/precip.mon.mean.nc"
70+ "\n \n References:\n \n Huffman, G. J. and "
71+ "co-authors, 1997: The Global Precipitation Climatology Project (GPCP) "
72+ "combined data set. Bull. Amer. Meteor. Soc., 78, 5-20.\n \n Reynolds, R."
73+ " W., 1988: A real-time global sea surface temperature analysis. J. "
74+ "Climate, 1, 75-86.\n \n Spencer, R. W., 1993: Global oceanic "
75+ "precipitation from the MSU during 1979-91 and comparisons to other "
76+ "climatologies. J. Climate, 6, 1301-1326.\n \n Xie P., and P. A. Arkin, "
77+ "1996: Global precipitation: a 17-year monthly analysis based on gauge "
78+ "observations, satellite estimates, and numerical model outputs. Bull. "
79+ "Amer. Meteor. Soc., 78, 2539-2558."
80+ )
8481
8582 def download (self , url , tmp_dir = GS_TMP_DIR , filename = None ):
8683 if not filename :
@@ -122,6 +119,7 @@ def run(self):
122119 cdf_file = self .convert (os .path .join (self .tmp_dir , ncfile ))
123120 bands = get_band_count (cdf_file )
124121 img_list = self .get_mosaic_filenames (self .layer_name )
122+ dst_files = []
125123 for band in range (1 , bands + 1 ):
126124 band_date = re .sub ('[\-\.]+' , '' , self .get_date (band ).isoformat ())
127125 img_name = '{}_{}T000000000Z.tif' .format (self .layer_name , band_date )
@@ -136,7 +134,10 @@ def run(self):
136134 os .makedirs (dst_dir )
137135 if dst_file .endswith ('.tif' ):
138136 shutil .move (os .path .join (self .tmp_dir , band_tif ), dst_file )
139- self .post_geoserver (dst_file , self .layer_name )
137+ dst_files .append (dst_file )
138+ time .sleep (RSYNC_WAIT_TIME * 2 )
139+ for dst_file in dst_files :
140+ self .post_geoserver (dst_file , self .layer_name , sleeptime = 0 )
140141
141142 if not style_exists (self .layer_name ):
142143 with open (os .path .join (script_dir ,
0 commit comments