= = =   L o g   2   S t e p   1 9 6   ( r e p l a c e _ f i l e _ c o n t e n t )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 "                     / /   L o c a t i o n s \ n                     p o p u l a t e D r o p d o w n ( ' h i s t o r i c a l L o c a t i o n ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e L o c a t i o n M a p ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e L o c a t i o n T S ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' h i s t o r i c a l S e t L o c a t i o n ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t L o c a t i o n M a p ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t L o c a t i o n G r a p h ' ,   d a t a . l o c a t i o n s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t S t r i p e L o c a t i o n ' ,   d a t a . l o c a t i o n s ) ; \ n \ n                     / /   V a r i a b l e s \ n                     p o p u l a t e D r o p d o w n ( ' h i s t o r i c a l V a r i a b l e ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e V a r i a b l e M a p ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e V a r i a b l e T S ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' h i s t o r i c a l S e t V a r i a b l e ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t V a r i a b l e M a p ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t V a r i a b l e G r a p h ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S t r i p e V a r i a b l e ' ,   d a t a . v a r i a b l e s ) ; \ n                     p o p u l a t e D r o p d o w n ( ' f u t u r e S e t S t r i p e V a r i a b l e ' ,   d a t a . v a r i a b l e s ) ; " 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   2 6 0   ( r e p l a c e _ f i l e _ c o n t e n t )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 "                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e C l i m a t e S t r i p e ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ c l i m a t e _ s t r i p e _ u r l   =   : i m a g e _ s t r i p e \ " ;   $ p a r a m s [ ' : i m a g e _ s t r i p e ' ]   =   t r i m ( $ i n p u t [ ' i m a g e C l i m a t e S t r i p e ' ] ) ;   } \ n                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 1 2 6 ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ s t r i p e _ s s p 1 2 6 _ u r l   =   : s t r i p e _ s s p 1 2 6 \ " ;   $ p a r a m s [ ' : s t r i p e _ s s p 1 2 6 ' ]   =   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 1 2 6 ' ] ) ;   } \ n                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 2 4 5 ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ s t r i p e _ s s p 2 4 5 _ u r l   =   : s t r i p e _ s s p 2 4 5 \ " ;   $ p a r a m s [ ' : s t r i p e _ s s p 2 4 5 ' ]   =   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 2 4 5 ' ] ) ;   } \ n                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 3 7 0 ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ s t r i p e _ s s p 3 7 0 _ u r l   =   : s t r i p e _ s s p 3 7 0 \ " ;   $ p a r a m s [ ' : s t r i p e _ s s p 3 7 0 ' ]   =   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 3 7 0 ' ] ) ;   } \ n                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 5 8 5 ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ s t r i p e _ s s p 5 8 5 _ u r l   =   : s t r i p e _ s s p 5 8 5 \ " ;   $ p a r a m s [ ' : s t r i p e _ s s p 5 8 5 ' ]   =   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 5 8 5 ' ] ) ;   } \ n                                 i f   ( i s s e t ( $ i n p u t [ ' i m a g e T i m e S e r i e s ' ] ) )   {   $ u p d a t e s [ ]   =   \ " i m a g e _ t i m e _ s e r i e s _ u r l   =   : i m a g e _ t s \ " ;   $ p a r a m s [ ' : i m a g e _ t s ' ]   =   t r i m ( $ i n p u t [ ' i m a g e T i m e S e r i e s ' ] ) ;   } " 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   2 6 6   ( r e p l a c e _ f i l e _ c o n t e n t )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 "                                 / /   I N S E R T   n e w   r e c o r d \ n                                 $ d e s c   =   i s s e t ( $ i n p u t [ ' d e s c r i p t i o n ' ] )   ?   t r i m ( $ i n p u t [ ' d e s c r i p t i o n ' ] )   :   ' ' ; \ n                                 $ i m g M a p   =   i s s e t ( $ i n p u t [ ' i m a g e C l i m a t e M a p ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e C l i m a t e M a p ' ] )   :   ' ' ; \ n                                 $ i m g M a p 2   =   i s s e t ( $ i n p u t [ ' i m a g e C l i m a t e M a p 2 ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e C l i m a t e M a p 2 ' ] )   :   ' ' ; \ n                                 $ i m g S t r i p e   =   i s s e t ( $ i n p u t [ ' i m a g e C l i m a t e S t r i p e ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e C l i m a t e S t r i p e ' ] )   :   ' ' ; \ n                                 $ i m g S t r i p e S S P 1 2 6   =   i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 1 2 6 ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 1 2 6 ' ] )   :   ' ' ; \ n                                 $ i m g S t r i p e S S P 2 4 5   =   i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 2 4 5 ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 2 4 5 ' ] )   :   ' ' ; \ n                                 $ i m g S t r i p e S S P 3 7 0   =   i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 3 7 0 ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 3 7 0 ' ] )   :   ' ' ; \ n                                 $ i m g S t r i p e S S P 5 8 5   =   i s s e t ( $ i n p u t [ ' i m a g e S t r i p e S S P 5 8 5 ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e S t r i p e S S P 5 8 5 ' ] )   :   ' ' ; \ n                                 $ i m g T S   =   i s s e t ( $ i n p u t [ ' i m a g e T i m e S e r i e s ' ] )   ?   t r i m ( $ i n p u t [ ' i m a g e T i m e S e r i e s ' ] )   :   ' ' ; \ n                                 \ n                                 $ b a s e V a l   =   ( i s s e t ( $ i n p u t [ ' g r a p h B a s e V a l u e ' ] )   & &   $ i n p u t [ ' g r a p h B a s e V a l u e ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h B a s e V a l u e ' ] )   :   n u l l ; \ n                                 $ u n c e r t a i n t y   =   ( i s s e t ( $ i n p u t [ ' g r a p h U n c e r t a i n t y ' ] )   & &   $ i n p u t [ ' g r a p h U n c e r t a i n t y ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h U n c e r t a i n t y ' ] )   :   n u l l ; \ n                                 $ s s p 1   =   ( i s s e t ( $ i n p u t [ ' g r a p h S S P 1 S l o p e ' ] )   & &   $ i n p u t [ ' g r a p h S S P 1 S l o p e ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h S S P 1 S l o p e ' ] )   :   n u l l ; \ n                                 $ s s p 2   =   ( i s s e t ( $ i n p u t [ ' g r a p h S S P 2 S l o p e ' ] )   & &   $ i n p u t [ ' g r a p h S S P 2 S l o p e ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h S S P 2 S l o p e ' ] )   :   n u l l ; \ n                                 $ s s p 3   =   ( i s s e t ( $ i n p u t [ ' g r a p h S S P 3 S l o p e ' ] )   & &   $ i n p u t [ ' g r a p h S S P 3 S l o p e ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h S S P 3 S l o p e ' ] )   :   n u l l ; \ n                                 $ s s p 5   =   ( i s s e t ( $ i n p u t [ ' g r a p h S S P 5 S l o p e ' ] )   & &   $ i n p u t [ ' g r a p h S S P 5 S l o p e ' ]   ! = =   ' ' )   ?   f l o a t v a l ( $ i n p u t [ ' g r a p h S S P 5 S l o p e ' ] )   :   n u l l ; \ n                                 $ c s v   =   i s s e t ( $ i n p u t [ ' c s v D a t a ' ] )   ?   $ i n p u t [ ' c s v D a t a ' ]   :   n u l l ; \ n \ n                                 $ s t m t I n s e r t   =   $ d b - > p r e p a r e ( \ " \ n                                         I N S E R T   I N T O   f u t u r e _ c l i m a t e   ( \ n                         
 
 < t r u n c a t e d   1 9 2 8   b y t e s > 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   6 9 9   ( r e p l a c e _ f i l e _ c o n t e n t )   = = = 
 
 I n s t r u c t i o n :   " I n c l u d e   i m a g e S t r i p e S S P 1 2 6 ,   i m a g e S t r i p e S S P 2 4 5 ,   i m a g e S t r i p e S S P 3 7 0 ,   i m a g e S t r i p e S S P 5 8 5   i n   t h e   r e t u r n e d   J S O N   s t r u c t u r e . " 
 
 R e p l a c e m e n t C o n t e n t : 
 
 "                                                 ' i m a g e C l i m a t e M a p 2 '   = >   $ p e r i o d D a t a   ?   $ p e r i o d D a t a [ ' i m a g e _ c l i m a t e _ m a p _ u r l _ 2 ' ]   :   ' ' , \ n                                                 ' i m a g e T i m e S e r i e s '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ t i m e _ s e r i e s _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ t i m e _ s e r i e s _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ t i m e _ s e r i e s _ u r l ' ]   :   ' ' ) , \ n                                                 ' i m a g e C l i m a t e S t r i p e '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ c l i m a t e _ s t r i p e _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ c l i m a t e _ s t r i p e _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ c l i m a t e _ s t r i p e _ u r l ' ]   :   ' ' ) , \ n                                                 ' i m a g e S t r i p e S S P 1 2 6 '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 1 2 6 _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 1 2 6 _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ s t r i p e _ s s p 1 2 6 _ u r l ' ]   :   ' ' ) , \ n                                                 ' i m a g e S t r i p e S S P 2 4 5 '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 2 4 5 _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 2 4 5 _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ s t r i p e _ s s p 2 4 5 _ u r l ' ]   :   ' ' ) , \ n                                                 ' i m a g e S t r i p e S S P 3 7 0 '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 3 7 0 _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 3 7 0 _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ s t r i p e _ s s p 3 7 0 _ u r l ' ]   :   ' ' ) , \ n                                                 ' i m a g e S t r i p e S S P 5 8 5 '   = >   ( $ p e r i o d D a t a   & &   ! e m p t y ( $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 5 8 5 _ u r l ' ] ) )   ?   $ p e r i o d D a t a [ ' i m a g e _ s t r i p e _ s s p 5 8 5 _ u r l ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' i m a g e _ s t r i p e _ s s p 5 8 5 _ u r l ' ]   :   ' ' ) , \ n                                                 ' g r a p h B a s e V a l u e '   = >   ( $ p e r i o d D a t a   & &   $ p e r i o d D a t a [ ' g r a p h _ b a s e _ v a l u e ' ]   ! = =   n u l l )   ?   $ p e r i o d D a t a [ ' g r a p h _ b a s e _ v a l u e ' ]   :   ( $ g l o b a l D a t a   ?   $ g l o b a l D a t a [ ' g r a p h _ b a s e _ v a l u e ' ]   :   n u l l ) , " 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   7 0 3   ( m u l t i _ r e p l a c e _ f i l e _ c o n t e n t )   = = = 
 
 I n s t r u c t i o n :   " A d d   s c e n a r i o   s t r i p e   v a r i a b l e s ,   u p d a t e   t h e   S Q L   q u e r y   t o   i n s e r t   t h e s e   c o l u m n s ,   a n d   i m p l e m e n t   C A S E   W H E N   u p d a t e s   f o r   a l l   f i e l d s   i n   s a v e _ f u t u r e . " 
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 
 
 W a r n i n g :   f o r e a c h ( )   a r g u m e n t   m u s t   b e   o f   t y p e   a r r a y | o b j e c t ,   s t r i n g   g i v e n   i n   C : \ U s e r s \ H P \ D o w n l o a d s \ c l i m a t e - s y s t e m \ c l i m a t e - s y s t e m \ s c r a t c h \ s e a r c h _ l o g 2 _ e d i t s _ t s . p h p   o n   l i n e   2 1 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 2 5   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 2 9   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 3 5   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 3 9   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 4 6   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 5 0   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   8 5 4   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   9 7 8   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   9 8 0   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   9 8 6   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = =   L o g   2   S t e p   1 1 7 4   ( w r i t e _ t o _ f i l e )   = = = 
 
 I n s t r u c t i o n :   
 
 R e p l a c e m e n t C o n t e n t : 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 