Ignore:
Timestamp:
Aug 28, 2008 12:15:13 PM (16 years ago)
Author:
letzel
Message:
  • NCL scripts in trunk/SCRIPTS/NCL updated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/cross_sections.ncl

    r190 r194  
    88; load ncl_preferences.ncl
    99;***************************************************
    10    
     10
     11function which_script()
     12local script
     13begin
     14   script="cross_section"
     15   return(script)
     16end
     17       
    1118if (isfilepresent("~/ncl_preferences.ncl")) then
    1219   loadscript("~/ncl_preferences.ncl")
     
    2128   end if
    2229end if
    23    
     30
    2431begin
    25 
    26    if (cross_sections .NE. 1 .OR. profiles .NE. 0 .OR. timeseries .NE. 0 .OR. spectra .NE. 0)then
    27       print(" ")
    28       print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")
    29       print(" ")
    30       print("Set 'cross_sections' equal 1 and the other variables equal 0")
    31       print(" ")
    32       exit
    33    end if
    3432
    3533   ; ***************************************************
     
    916914         check = True
    917915      end if 
    918    
    919       if (var .NE. "all") then
    920          check = isStrSubset( var,","+vNam(varn)+"," )
    921       end if 
    922916
    923917      if(check) then
    924 
     918     
    925919         no_var=no_var+1
    926920
     
    965959   var_input=new(no_var,string)
    966960   numb=0
     961   no_var=0
     962   
    967963   do varn=dim-1,0,1   
    968964   
     
    977973         check = True
    978974      end if 
    979    
    980       if (var .NE. "all") then
    981          check = isStrSubset( var,","+vNam(varn)+"," )
    982       end if 
    983975
    984976      if(check) then     
     
    986978         numb=numb+1     
    987979      end if
     980                 
     981      if (var .NE. "all") then
     982         check = isStrSubset( var,","+vNam(varn)+"," )
     983      end if
     984     
     985      if (check) then
     986         no_var = no_var+1
     987      end if
    988988     
    989989   end do
     
    10001000      if (v1 .EQ. 0)then
    10011001         print(" ")
    1002          print("Component 1 for the vector-plot ('vec1') must be one of the input varibles:")
     1002         print("Component 1 for the vector-plot ('vec1') must be one of the varibles on the input file:")
    10031003         print("- "+var_input)
    10041004         print("be sure to have one comma berfore and after the variable")
     
    10091009      if (v2 .EQ. 0)then
    10101010         print(" ")
    1011          print("Component 2 for the vector-plot ('vec2') must be one of the input varibles:")
     1011         print("Component 2 for the vector-plot ('vec2') must be one of the varibles on the input file:")
    10121012         print("- "+var_input)
    10131013         print("be sure to have one comma berfore and after the variable")
     
    10241024   gsn_define_colormap(wks_ps,"rainbow+white")
    10251025
    1026    plot=new((/no_time*no_layer*no_var*2/),graphic)
     1026   plot=new((/no_time*no_layer*no_var/),graphic)
    10271027 
    10281028   page = 0
     
    10991099                 
    11001100                  if ( sort .eq. "time" ) then
    1101                      if ( data&z(lo) .eq. -1 ) then
    1102                         level = "-average"
     1101                     if ( data&z(lo) .eq. -1)then
     1102                        if (delta_z .EQ. -1) then
     1103                           level = "-average"
     1104                        else
     1105                           level = "=" + data&z(lo) + "m"
     1106                        end if
    11031107                     else
    11041108                        level = "=" + data&z(lo) + "m"
     
    11221126                 
    11231127                  if ( sort .eq. "layer" ) then
    1124                      if ( data&z(li) .eq. -1 ) then
    1125                         level = "-average"
     1128                     if (data&z(li) .eq. -1) then
     1129                        if (delta_z .EQ. -1) then
     1130                           level = "-average"
     1131                        else
     1132                           level = "=" + data&z(li) + "m"
     1133                        end if
    11261134                     else
    11271135                        level = "=" + data&z(li) + "m"
     
    12671275   ; merge plots onto one page
    12681276   ; ***************************************************
    1269 
     1277   
    12701278   if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec")then
    12711279      if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then
     
    12911299      else
    12921300         do np = 0,no_layer*no_time*no_var-1,no_lines*no_columns   
    1293             if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 
     1301            if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then
    12941302               gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_lines,no_columns/),cs_resP)
    12951303            else
Note: See TracChangeset for help on using the changeset viewer.