Changeset 175 for palm/trunk/SCRIPTS
- Timestamp:
- Jul 8, 2008 8:29:06 AM (16 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/.ncl_preferences
r174 r175 1 ___Parameter list________________________________________________________________________________ 2 ___Please write your values/strings(wihtout " ") below the corresponding parameter line__________ 3 _________________________________________________________________________________________________ 4 ___parameter name____ example____________________________________default value_____________used by5 _________________________________________________________________________________________________ 1 ___Parameter list_______________________________________________________________________________________ 2 ___Please write your values/strings(wihtout " ") below the corresponding parameter line_________________ 3 ________________________________________________________________________________________________________ 4 ___parameter name__________example____________________________________default value______________used by 5 ________________________________________________________________________________________________________ 6 6 7 ___'file_ in'_________[path/name.nc; i.e. ~/.../example.nc]______default = input file______[ALL]8 input file 9 ___'format_out'______ [ncgm; ps; eps; epsi; pdf; x11]____________default = x11_____________[ALL]7 ___'file_1'________________[path/name.nc; i.e. ~/.../example.nc]______default = File in_________[ALL] 8 File in 9 ___'format_out'____________[ncgm; ps; eps; epsi; pdf; x11]____________default = x11_____________[ALL] 10 10 x11 11 ___'file_out'________ [path/name; i.e. ~/.../test]_______________default = test____________[ALL]11 ___'file_out'______________[path/name; i.e. ~/.../test]_______________default = test____________[ALL] 12 12 test 13 ___start_time_step___ [0;1;...]__________________________________default = t(0)____________[ALL]13 ___start_time_step_________[0;1;...]__________________________________default = t(0)____________[ALL] 14 14 t(0) 15 ___end_time_step_____ [1;2;...]__________________________________default = t(end)__________[ALL]15 ___end_time_step___________[1;2;...]__________________________________default = t(end)__________[ALL] 16 16 t(end) 17 ___no_columns________ [1;2;...]__________________________________default = 1_______________[ALL]17 ___no_columns______________[1;2;...]__________________________________default = 1_______________[ALL] 18 18 1 19 ___no_lines__________ [1;2;...]__________________________________default = 2_______________[ALL]19 ___no_lines________________[1;2;...]__________________________________default = 2_______________[ALL] 20 20 2 21 ___'var'_____________ [,E,dt,umax,;...]__________________________default = variables_______[ALL]21 ___'var'___________________[,E,dt,umax,;...]__________________________default = variables_______[ALL] 22 22 variables 23 ___combine___________ [0] or [1]_________________________________default = 0_______________[PR]23 ___combine_________________[0] or [1]_________________________________default = 0_______________[PR] 24 24 0 25 ___number_comb_______ [2] or [3]_________________________________default = 0_______________[PR]25 ___number_comb_____________[2] or [3]_________________________________default = 0_______________[PR] 26 26 0 27 ___'c_var'___________ [,us2,vs2,ws2,;...]________________________default = c_variables_____[PR]27 ___'c_var'_________________[,us2,vs2,ws2,;...]________________________default = c_variables_____[PR] 28 28 c_variables 29 ___dash______________ [0] or [1]_________________________________default = 0_______________[PR]29 ___dash____________________[0] or [1]_________________________________default = 0_______________[PR+SP] 30 30 0 31 ___black_____________ [0] or [1]_________________________________default = 0_______________[PR]31 ___black___________________[0] or [1]_________________________________default = 0_______________[PR+SP] 32 32 0 33 ___min_z_____________ [0;10;...]_________________________________default = 0_______________[PR]33 ___min_z___________________[0;10;...]_________________________________default = 0_______________[PR] 34 34 0 35 ___max_z_____________ [100;1000;...]_____________________________default = max(z_u)________[PR]35 ___max_z___________________[100;1000;...]_____________________________default = max(z_u)________[PR] 36 36 max(z_u) 37 ___over______________ [0] or [1]_________________________________default = 0_______________[PR+TS]37 ___over____________________[0] or [1]_________________________________default = 0_______________[PR+TS] 38 38 0 39 ___vector____________ [0] or [1]_________________________________default = 0_______________[CS]39 ___vector__________________[0] or [1]_________________________________default = 0_______________[CS] 40 40 0 41 ___'vec1'____________ [,u,;,v,;...]______________________________default = vec1____________[CS]41 ___'vec1'__________________[,u,;,v,;...]______________________________default = vec1____________[CS] 42 42 vec1 43 ___'vec2'____________ [,u,;,v,;...]______________________________default = vec2____________[CS]43 ___'vec2'__________________[,u,;,v,;...]______________________________default = vec2____________[CS] 44 44 vec2 45 __'plotvec'__________ [,u,;,v,;...]______________________________default = plotvec_________[CS]45 __'plotvec'________________[,u,;,v,;...]______________________________default = plotvec_________[CS] 46 46 plotvec 47 ___ref_mag___________ [0.1;0.02;...]_____________________________default = 0.05____________[CS]47 ___ref_mag_________________[0.1;0.02;...]_____________________________default = 0.05____________[CS] 48 48 0.05 49 ___'mode'____________ [Fill], [Line] or [Both]___________________default = Fill____________[CS]49 ___'mode'__________________[Fill], [Line] or [Both]___________________default = Fill____________[CS] 50 50 Fill 51 ___'sort'____________ [time] or [layer]__________________________default = time____________[CS]52 time 53 ___'fill_mode'_______ [AreaFill], [RasterFill] or [CellFill]_____default = AreaFill________[CS]51 ___'sort'__________________[time] or [layer]__________________________default = layer___________[CS+SP] 52 layer 53 ___'fill_mode'_____________[AreaFill], [RasterFill] or [CellFill]_____default = AreaFill________[CS] 54 54 AreaFill 55 ___shape_____________ [0] or [1]_________________________________default = 1_______________[CS]55 ___shape___________________[0] or [1]_________________________________default = 1_______________[CS] 56 56 1 57 ___xyc_______________ [0] or [1]_________________________________default = 0_______________[CS]57 ___xyc_____________________[0] or [1]_________________________________default = 0_______________[CS] 58 58 0 59 ___xzc_______________ [0] or [1]_________________________________default = 0_______________[CS]59 ___xzc_____________________[0] or [1]_________________________________default = 0_______________[CS] 60 60 0 61 ___yzc_______________ [0] or [1]_________________________________default = 0_______________[CS]61 ___yzc_____________________[0] or [1]_________________________________default = 0_______________[CS] 62 62 0 63 ___xs________________ [0,1,...]__________________________________default = x0______________[CS+PR]63 ___xs______________________[0,1,...]__________________________________default = x0______________[CS+PR] 64 64 x0 65 ___xe________________ [1;2;...]__________________________________default = xdim____________[CS+PR]65 ___xe______________________[1;2;...]__________________________________default = xdim____________[CS+PR] 66 66 xdim 67 ___ys________________ [0;1;...]__________________________________default = y0______________[CS]67 ___ys______________________[0;1;...]__________________________________default = y0______________[CS] 68 68 y0 69 ___ye________________ [1;2;...]__________________________________default = ydim____________[CS]69 ___ye______________________[1;2;...]__________________________________default = ydim____________[CS] 70 70 ydim 71 ___zs________________ [0;1;...]__________________________________default = z0______________[CS]71 ___zs______________________[0;1;...]__________________________________default = z0______________[CS] 72 72 z0 73 ___ze________________ [1;2;...]__________________________________default = zdim____________[CS]73 ___ze______________________[1;2;...]__________________________________default = zdim____________[CS] 74 74 zdim 75 ___prof3d____________ [0] or [1]_________________________________default = 0_______________[PR]75 ___prof3d__________________[0] or [1]_________________________________default = 0_______________[PR] 76 76 0 77 ___end of file ".ncl_preferences"_____________________________________________________________ 77 ___logy____________________[0] or [1]_________________________________default = 0_______________[PR+SP] 78 0 79 ___norm____________________[1;5.4;233;...]____________________________default = 1_______________[PR+SP] 80 1 81 ___no_files________________[1;2,3;...]________________________________default = 1_______________[PR] 82 1 83 ___'name_legend_1'_________[i.e. File 2]______________________________default = File 1__________[PR] 84 File 1 85 ___'file_2'________________[path/name.nc; i.e. ~/.../example.2.nc]____default = File in_________[PR] 86 File in 87 ___'name_legend_2'_________[i.e. File 2]______________________________default = File 2__________[PR] 88 File 2 89 ___'file_3'________________[path/name.nc; i.e. ~/.../example.3.nc]____default = File in_________[PR] 90 File in 91 ___'name_legend_3'_________[i.e. File 3]______________________________default = File 3__________[PR] 92 File 3 93 ___'file_4'________________[path/name.nc; i.e. ~/.../example.4.nc]____default = File in_________[PR] 94 File in 95 ___'name_legend_4'_________[i.e. File 4]______________________________default = File 4__________[PR] 96 File 4 97 ___'file_5'________________[path/name.nc; i.e. ~/.../example.5.nc]____default = File in_________[PR] 98 File in 99 ___'name_legend_5'_________[i.e. File 5]______________________________default = File 5__________[PR] 100 File 5 101 ___'file_6'________________[path/name.nc; i.e. ~/.../example.6.nc]____default = File in_________[PR] 102 File in 103 ___'name_legend_6'_________[i.e. File 6]______________________________default = File 6__________[PR] 104 File 6 105 ___'file_7'________________[path/name.nc; i.e. ~/.../example.7.nc]____default = File in_________[PR] 106 File in 107 ___'name_legend_7'_________[i.e. File 7]______________________________default = File 7__________[PR] 108 File 7 109 ___'file_8'________________[path/name.nc; i.e. ~/.../example.8.nc]____default = File in_________[PR] 110 File in 111 ___'name_legend_8'_________[i.e. File 8]______________________________default = File 8__________[PR] 112 File 8 113 ___'file_9'________________[path/name.nc; i.e. ~/.../example.9.nc]____default = File in_________[PR] 114 File in 115 ___'name_legend_9'_________[i.e. File 9]______________________________default = File 9__________[PR] 116 File 9 117 ___'file_10'_______________[path/name.nc; i.e. ~/.../example.10.nc]___default = File in_________[PR] 118 File in 119 ___'name_legend_10'________[i.e. File 10]_____________________________default = File 10_________[PR] 120 File 10 121 ___'file_11'_______________[path/name.nc; i.e. ~/.../example.11.nc]___default = File in_________[PR] 122 File in 123 ___'name_legend_11'________[i.e. File 11]_____________________________default = File 11_________[PR] 124 File 11 125 ___'file_12'_______________[path/name.nc; i.e. ~/.../example.12.nc]___default = File in_________[PR] 126 File in 127 ___'name_legend_12'________[i.e. File 12]_____________________________default = File 12_________[PR] 128 File 12 129 ___end of file ".ncl_preferences"_______________________________________________________________________ -
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r174 r175 11 11 ; *************************************************** 12 12 13 if (isfilepresent(" .ncl_preferences")) then14 parameter = asciiread(" .ncl_preferences",77,"string")13 if (isfilepresent("~/.ncl_preferences")) then 14 parameter = asciiread("~/.ncl_preferences",129,"string") 15 15 delete(parameter@_FillValue) 16 16 else 17 print(" ") 18 print("'.ncl_preferences' is not existent") 19 print(" ") 20 exit 17 if (isfilepresent("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences")) then 18 parameter = asciiread("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences",129,"string") 19 delete(parameter@_FillValue) 20 else 21 print(" ") 22 print("'.ncl_preferences' is not present in '~/palm/current_version/trunk/SRIPTS/NCL/'") 23 print(" ") 24 exit 25 end if 21 26 end if 22 27 … … 25 30 ; *************************************************** 26 31 27 if ( .not. isvar("file_ in") ) then ; path+name of input file28 if (parameter(7) .EQ. " input file") then29 print(" ") 30 print("Please provide input file 'file_in =' either in prompt or parameter_list")32 if ( .not. isvar("file_1") ) then 33 if (parameter(7) .EQ. "File in") then 34 print(" ") 35 print("Please provide 1st input file 'file_1=' either in prompt or parameter_list") 31 36 print(" ") 32 37 exit 33 38 else 34 39 file_in = parameter(7) 35 end if 36 end if 37 if ( .not. isvar("format_out") ) then ; format of output file 40 end if 41 else 42 file_in = file_1 43 end if 44 if (.not. isfilepresent(file_in)) then 45 print(" ") 46 print("Your 1st input file: '"+file_in+"' does not exist") 47 print(" ") 48 exit 49 end if 50 51 if ( .not. isvar("format_out") ) then 38 52 format_out = "x11" 39 53 if (parameter(9) .NE. "x11") then 40 54 format_out = parameter(9) 55 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 56 print(" ") 57 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 58 print(" ") 59 end if 41 60 end if 42 end if 43 if ( .not. isvar("file_out") ) then ; path+name of output file 61 else 62 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 63 print(" ") 64 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 65 print(" ") 66 end if 67 end if 68 69 if ( .not. isvar("file_out") ) then 44 70 file_out = "test" 45 71 if (parameter(11) .NE. "test") then … … 47 73 end if 48 74 end if 49 if ( .not. isvar("no_columns") ) then ; number of plots in one row75 if ( .not. isvar("no_columns") ) then 50 76 no_columns = 1 51 77 if (parameter(17) .NE. "1") then … … 53 79 end if 54 80 end if 55 if ( .not. isvar("no_lines") ) then ; number of plot-lines on one sheet81 if ( .not. isvar("no_lines") ) then 56 82 no_lines = 2 57 83 if (parameter(19) .NE. "2") then … … 59 85 end if 60 86 end if 61 if ( .not. isvar("sort") ) then ; sort of plots 62 sort = "time" 63 if (parameter(51) .NE. "time") then 87 88 if ( .not. isvar("sort") ) then 89 sort = "layer" 90 if (parameter(51) .NE. "layer") then 64 91 sort = parameter(51) 92 if (sort .NE. "time") then 93 print(" ") 94 print("Your 'sort'= "+sort+" is invalid and set to 'layer'") 95 print(" ") 96 sort = "layer" 97 end if 98 end if 99 else 100 if (sort .NE. "time" .OR. sort .NE. "layer")then 101 print(" ") 102 print("Your 'sort'= "+sort+" is invalid and set to 'layer'") 103 print(" ") 104 sort = "layer" 65 105 end if 66 106 end if 67 if ( .not. isvar("mode") ) then ; pattern of contour plots 107 108 if ( .not. isvar("mode") ) then 68 109 mode = "Fill" 69 110 if (parameter(49) .NE. "Fill") then 70 111 mode = parameter(49) 71 end if 72 end if 73 if ( .not. isvar("fill_mode") ) then ; pattern of filling 112 if (mode .NE. "Line" .AND. mode .NE. "Both")then 113 print(" ") 114 print("Your 'mode'= "+mode+" is invalid and set to 'Fill'") 115 print(" ") 116 mode = "Fill" 117 end if 118 end if 119 else 120 if (mode .NE. "Line" .AND. mode .NE. "Both")then 121 print(" ") 122 print("Your 'mode'= "+mode+" is invalid and set to 'Fill'") 123 print(" ") 124 mode = "Fill" 125 end if 126 end if 127 128 if ( .not. isvar("fill_mode") ) then 74 129 fill_mode = "AreaFill" 75 130 if (parameter(53) .NE. "AreaFill") then 76 mode = parameter(53) 131 fill_mode = parameter(53) 132 if (fill_mode .NE. "RasterFill" .AND. fill_mode .NE. "CellFill")then 133 print(" ") 134 print("Your 'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'") 135 print(" ") 136 fill_mode = "AreaFill" 137 end if 77 138 end if 78 end if 79 if ( .not. isvar("shape") ) then ; keeping of aspect ratio 139 else 140 if (fill_mode .NE. "RasterFill" .AND. fill_mode .NE. "CellFill")then 141 print(" ") 142 print("Your 'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'") 143 print(" ") 144 fill_mode = "AreaFill" 145 end if 146 end if 147 148 if ( .not. isvar("shape") ) then 80 149 shape = 1 81 150 if (parameter(55) .NE. "1") then 82 151 shape = stringtointeger(parameter(55)) 83 if (s tringtointeger(parameter(55)).NE. 0) then84 print(" ") 85 print(" Please set 'shape' to 0 or1")86 print(" ") 87 exit152 if (shape .NE. 0) then 153 print(" ") 154 print("Your 'shape'= "+shape+" is invalid and set to 1") 155 print(" ") 156 shape = 1 88 157 end if 89 end if 90 end if 91 if ( .not. isvar("var") ) then ; set output of all variables 158 end if 159 else 160 if (shape .NE. 0) then 161 print(" ") 162 print("Your 'shape'= "+shape+" is invalid and set to 1") 163 print(" ") 164 shape = 1 165 end if 166 end if 167 168 if ( .not. isvar("var") ) then 92 169 check = True 93 170 end if 94 171 95 if ( .not. isvar("xyc") ) then ; turn xy cross-section on or off172 if ( .not. isvar("xyc") ) then 96 173 xyc = 0 97 174 if (parameter(57) .NE. "0") then 98 175 xyc = stringtointeger(parameter(57)) 99 if ( stringtointeger(parameter(57)).NE. 1) then100 print(" ") 101 print(" Please set 'xyc' to 0 or 1")102 print(" ") 103 exit176 if (xyc .NE. 1) then 177 print(" ") 178 print("Your 'xyc'= "+xyc+" is invalid and set to 0") 179 print(" ") 180 xyc = 0 104 181 end if 105 182 end if 183 else 184 if (xyc .NE. 1) then 185 print(" ") 186 print("Your 'xyc'= "+xyc+" is invalid and set to 0") 187 print(" ") 188 xyc = 0 189 end if 106 190 end if 107 if ( .not. isvar("xzc") ) then ; turn xz cross-section on or off191 if ( .not. isvar("xzc") ) then 108 192 xzc = 0 109 193 if (parameter(59) .NE. "0") then 110 194 xzc = stringtointeger(parameter(59)) 111 if ( stringtointeger(parameter(59)).NE. 1) then112 print(" ") 113 print(" Please set 'xzc' to 0 or 1")114 print(" ") 115 exit195 if (xzc .NE. 1) then 196 print(" ") 197 print("Your 'xzc'= "+xzc+" is invalid and set to 0") 198 print(" ") 199 xzc = 0 116 200 end if 117 201 end if 118 end if 119 if ( .not. isvar("yzc") ) then ; turn yz cross-section on or off 202 else 203 if (xzc .NE. 1) then 204 print(" ") 205 print("Your 'xzc'= "+xzc+" is invalid and set to 0") 206 print(" ") 207 xzc = 0 208 end if 209 end if 210 if ( .not. isvar("yzc") ) then 120 211 yzc = 0 121 212 if (parameter(61) .NE. "0") then 122 213 yzc = stringtointeger(parameter(61)) 123 if ( stringtointeger(parameter(61)).NE. 1) then124 print(" ") 125 print(" Please set 'yzc' to 0 or 1")126 print(" ") 127 exit214 if (yzc .NE. 1) then 215 print(" ") 216 print("Your 'yzc'= "+yzc+" is invalid and set to 0") 217 print(" ") 218 yzc = 0 128 219 end if 129 220 end if 221 else 222 if (yzc .NE. 1) then 223 print(" ") 224 print("Your 'yzc'= "+yzc+" is invalid and set to 0") 225 print(" ") 226 yzc = 0 227 end if 130 228 end if 131 229 … … 160 258 end if 161 259 end if 162 if ( .not. isvar("vector") ) then ; sort of plots260 if ( .not. isvar("vector") ) then 163 261 vector = 0 164 262 if (parameter(39) .NE. "0") then … … 172 270 end if 173 271 end if 174 if ( .not. isvar("ref_mag") ) then ; sort of plots272 if ( .not. isvar("ref_mag") ) then 175 273 ref_mag = 0.05 176 274 if (parameter(47) .NE. "0.05") then … … 272 370 cs_res@gsnYAxisIrregular2Linear = True 273 371 274 if( shape .eq. 1 ) then ; keep the shape372 if( shape .eq. 1 ) then 275 373 cs_res@gsnShape = True 276 374 end if … … 296 394 cs_resP = True 297 395 cs_resP@txString = f@title 298 cs_resP@txFuncCode = "~" ; necessary for title396 cs_resP@txFuncCode = "~" 299 397 cs_resP@txFontHeightF = .02 300 398 … … 304 402 cs_res@gsnSpreadColors = True 305 403 cs_res@cnFillMode = fill_mode 306 cs_res@lbOrientation = "Vertical" ; vertical label bar404 cs_res@lbOrientation = "Vertical" 307 405 cs_res@cnLinesOn = False 308 406 cs_res@cnLineLabelsOn = False … … 313 411 cs_res@gsnSpreadColors = True 314 412 cs_res@cnFillMode = fill_mode 315 cs_res@lbOrientation = "Vertical" ; vertical label bar413 cs_res@lbOrientation = "Vertical" 316 414 cs_res@cnLinesOn = True 317 415 cs_res@cnLineLabelsOn = True … … 450 548 451 549 print(" ") 452 print("Output from "+t_all(start_time_step)/3600+"h = "+t_all(start_time_step)+"s => index = "+start_time_step)453 print(" till "+t_all(end_time_step)/3600+"h = "+t_all(end_time_step)+"s => index = "+end_time_step)550 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) 551 print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) 454 552 print(" ") 455 553 … … 735 833 end if 736 834 737 if ( .not. isvar("zs") ) then ; start of z-coordinate range835 if ( .not. isvar("zs") ) then 738 836 zs = 0 739 837 if (parameter(71) .NE. "z0") then … … 1283 1381 end do 1284 1382 1285 if (n o_var.EQ. 0) then1383 if (n .EQ. 0) then 1286 1384 print(" ") 1287 print("Please select a variable 'var=' or use the default value") 1288 print(" ") 1289 print("Your selection '"+var+"' does not exist on the input file") 1385 print("The variables 'var=°"+var+"°' do not exist on your input file") 1290 1386 print(" ") 1291 1387 exit -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r174 r175 9 9 ; *************************************************** 10 10 11 if (isfilepresent(" .ncl_preferences")) then12 parameter = asciiread(" .ncl_preferences",77,"string")11 if (isfilepresent("~/.ncl_preferences")) then 12 parameter = asciiread("~/.ncl_preferences",129,"string") 13 13 delete(parameter@_FillValue) 14 14 else 15 print(" ") 16 print("'.ncl_preferences' is not existent") 17 print(" ") 18 exit 15 if (isfilepresent("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences")) then 16 parameter = asciiread("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences",129,"string") 17 delete(parameter@_FillValue) 18 else 19 print(" ") 20 print("'.ncl_preferences' is not present in '~/palm/current_version/trunk/SRIPTS/NCL/'") 21 print(" ") 22 exit 23 end if 19 24 end if 20 25 … … 22 27 ; set up default parameter values and strings if not assigned in prompt or parameter list 23 28 ; *************************************************** 29 30 if ( .not. isvar("no_files") ) then 31 no_files = 1 32 if (parameter(81) .NE. "1") then 33 no_files = stringtointeger(parameter(81)) 34 if (no_files .LT. 1 .OR. no_files .GT. 12) then 35 print(" ") 36 print("Please assign 'no_files' between 1 and 12") 37 print(" ") 38 exit 39 end if 40 end if 41 else 42 if (no_files .LT. 1 .OR. no_files .GT. 12) then 43 print(" ") 44 print("Please assign 'no_files' between 1 and 12") 45 print(" ") 46 exit 47 end if 48 end if 49 50 file_in = new(no_files,string) 24 51 25 if ( .not. isvar("file_ in") ) then ; path+name of input file26 if (parameter(7) .EQ. " input file") then27 print(" ") 28 print("Please provide input file 'file_in =' either in prompt or parameter_list")52 if ( .not. isvar("file_1") ) then 53 if (parameter(7) .EQ. "File in") then 54 print(" ") 55 print("Please provide 1st input file 'file_1=' either in prompt or parameter_list") 29 56 print(" ") 30 57 exit 31 58 else 32 file_in = parameter(7) 33 end if 59 file_in(0) = parameter(7) 60 end if 61 else 62 file_in(0) = file_1 34 63 end if 35 if ( .not. isvar("format_out") ) then ; format of output file 64 if (.not. isfilepresent(file_in(0))) then 65 print(" ") 66 print("Your 1st input file: '"+file_in(0)+"' does not exist") 67 print(" ") 68 exit 69 end if 70 71 if (no_files .GT. 1) then 72 if (.not. isvar("file_2"))then 73 file_in(1) = parameter(85) 74 if (file_in(1) .EQ. "File in") 75 print(" ") 76 print("Please provide 2nd input file 'file_2=' either in prompt or parameter_list or change 'no_files' to 1") 77 print(" ") 78 exit 79 end if 80 else 81 file_in(1) = file_2 82 end if 83 if (.not. isfilepresent(file_in(1))) then 84 print(" ") 85 print("Your 2nd input file: '"+file_in(1)+"' does not exist") 86 print(" ") 87 exit 88 end if 89 end if 90 if (no_files .GT. 2) then 91 if (.not. isvar("file_3"))then 92 file_in(2) = parameter(89) 93 if (file_in(2) .EQ. "File in") 94 print(" ") 95 print("Please provide 3rd input file 'file_3=' either in prompt or parameter_list or change 'no_files' to 2") 96 print(" ") 97 exit 98 end if 99 else 100 file_in(2) = file_3 101 end if 102 if (.not. isfilepresent(file_in(2))) then 103 print(" ") 104 print("Your 3rd input file: '"+file_in(2)+"' does not exist") 105 print(" ") 106 exit 107 end if 108 end if 109 if (no_files .GT. 3) then 110 if (.not. isvar("file_4"))then 111 file_in(3) = parameter(93) 112 if (file_in(3) .EQ. "File in") 113 print(" ") 114 print("Please provide 4th input file 'file_4=' either in prompt or parameter_list or change 'no_files' to 3") 115 print(" ") 116 exit 117 end if 118 else 119 file_in(3) = file_4 120 end if 121 if (.not. isfilepresent(file_in(3))) then 122 print(" ") 123 print("Your 4th input file: '"+file_in(3)+"' does not exist") 124 print(" ") 125 exit 126 end if 127 end if 128 if (no_files .GT. 4) then 129 if (.not. isvar("file_5"))then 130 file_in(4) = parameter(97) 131 if (file_in(4) .EQ. "File in") 132 print(" ") 133 print("Please provide 5th input file 'file_5=' either in prompt or parameter_list or change 'no_files' to 4") 134 print(" ") 135 exit 136 end if 137 else 138 file_in(4) = file_5 139 end if 140 if (.not. isfilepresent(file_in(4))) then 141 print(" ") 142 print("Your 5th input file: '"+file_in(4)+"' does not exist") 143 print(" ") 144 exit 145 end if 146 end if 147 if (no_files .GT. 5) then 148 if (.not. isvar("file_6"))then 149 file_in(5) = parameter(101) 150 if (file_in(5) .EQ. "File in") 151 print(" ") 152 print("Please provide 6th input file 'file_6=' either in prompt or parameter_list or change 'no_files' to 5") 153 print(" ") 154 exit 155 end if 156 else 157 file_in(5) = file_6 158 end if 159 if (.not. isfilepresent(file_in(5))) then 160 print(" ") 161 print("Your 6th input file: '"+file_in(5)+"' does not exist") 162 print(" ") 163 exit 164 end if 165 end if 166 if (no_files .GT. 6) then 167 if (.not. isvar("file_7"))then 168 file_in(6) = parameter(105) 169 if (file_in(6) .EQ. "File in") 170 print(" ") 171 print("Please provide 7th input file 'file_7=' either in prompt or parameter_list or change 'no_files' to 6") 172 print(" ") 173 exit 174 end if 175 else 176 file_in(6) = file_7 177 end if 178 if (.not. isfilepresent(file_in(6))) then 179 print(" ") 180 print("Your 7th input file: '"+file_in(6)+"' does not exist") 181 print(" ") 182 exit 183 end if 184 end if 185 if (no_files .GT. 7) then 186 if (.not. isvar("file_8"))then 187 file_in(7) = parameter(109) 188 if (file_in(7) .EQ. "File in") 189 print(" ") 190 print("Please provide 8th input file 'file_8=' either in prompt or parameter_list or change 'no_files' to 7") 191 print(" ") 192 exit 193 end if 194 else 195 file_in(7) = file_8 196 end if 197 if (.not. isfilepresent(file_in(7))) then 198 print(" ") 199 print("Your 8th input file: '"+file_in(7)+"' does not exist") 200 print(" ") 201 exit 202 end if 203 end if 204 if (no_files .GT. 8) then 205 if (.not. isvar("file_9"))then 206 file_in(8) = parameter(113) 207 if (file_in(8) .EQ. "File in") 208 print(" ") 209 print("Please provide 9th input file 'file_9=' either in prompt or parameter_list or change 'no_files' to 8") 210 print(" ") 211 exit 212 end if 213 else 214 file_in(8) = file_9 215 end if 216 if (.not. isfilepresent(file_in(8))) then 217 print(" ") 218 print("Your 9th input file: '"+file_in(8)+"' does not exist") 219 print(" ") 220 exit 221 end if 222 end if 223 if (no_files .GT. 9) then 224 if (.not. isvar("file_10"))then 225 file_in(9) = parameter(117) 226 if (file_in(9) .EQ. "File in") 227 print(" ") 228 print("Please provide 10th input file 'file_10=' either in prompt or parameter_list or change 'no_files' to 9") 229 print(" ") 230 exit 231 end if 232 else 233 file_in(9) = file_10 234 end if 235 if (.not. isfilepresent(file_in(9))) then 236 print(" ") 237 print("Your 10th input file: '"+file_in(9)+"' does not exist") 238 print(" ") 239 exit 240 end if 241 end if 242 if (no_files .GT. 10) then 243 if (.not. isvar("file_11"))then 244 file_in(10) = parameter(121) 245 if (file_in(10) .EQ. "File in") 246 print(" ") 247 print("Please provide 11th input file 'file_11=' either in prompt or parameter_list or change 'no_files' to 10") 248 print(" ") 249 exit 250 end if 251 else 252 file_in(10) = file_11 253 end if 254 if (.not. isfilepresent(file_in(10))) then 255 print(" ") 256 print("Your 11th input file: '"+file_in(10)+"' does not exist") 257 print(" ") 258 exit 259 end if 260 end if 261 if (no_files .GT. 11) then 262 if (.not. isvar("file_12"))then 263 file_in(11) = parameter(125) 264 if (file_in(11) .EQ. "File in") 265 print(" ") 266 print("Please provide 12th input file 'file_12=' either in prompt or parameter_list or change 'no_files' to 11") 267 print(" ") 268 exit 269 end if 270 else 271 file_in(11) = file_12 272 end if 273 if (.not. isfilepresent(file_in(11))) then 274 print(" ") 275 print("Your 12th input file: '"+file_in(11)+"' does not exist") 276 print(" ") 277 exit 278 end if 279 end if 280 281 if ( .not. isvar("format_out") ) then 36 282 format_out = "x11" 37 283 if (parameter(9) .NE. "x11") then 38 284 format_out = parameter(9) 285 if (format_out .NE. "x11" .OR. format_out .NE. "pdf" .OR. format_out .NE. "eps" .OR. format_out .NE. "ps" .OR. format_out .NE. "epsi" .OR. format_out .NE. "ncgm")then 286 print(" ") 287 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 288 print(" ") 289 end if 39 290 end if 291 else 292 if (format_out .NE. "x11" .OR. format_out .NE. "pdf" .OR. format_out .NE. "eps" .OR. format_out .NE. "ps" .OR. format_out .NE. "epsi" .OR. format_out .NE. "ncgm")then 293 print(" ") 294 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 295 print(" ") 296 end if 40 297 end if 41 if ( .not. isvar("file_out") ) then ; path+name of output file 298 299 if ( .not. isvar("file_out") ) then 42 300 file_out = "test" 43 301 if (parameter(11) .NE. "test_ts") then … … 45 303 end if 46 304 end if 47 if ( .not. isvar("no_columns") ) then ; number of plots in one row305 if ( .not. isvar("no_columns") ) then 48 306 no_columns = 1 49 307 if (parameter(17) .NE. "1") then … … 63 321 if (stringtointeger(parameter(23)) .NE. 1) then 64 322 print(" ") 65 print("Please set 'combine' to 0 or 1") 66 print(" ") 67 exit 68 end if 69 end if 323 print("Your 'combine'= "+combine+" is invalid and set to 0") 324 print(" ") 325 combine = 0 326 else 327 if (no_files .GT. 1) then 328 print(" ") 329 print("If you have more than one input file you cannot combine variables: combine is set to 0") 330 print(" ") 331 combine = 0 332 end if 333 end if 334 end if 335 else 336 if (combine .NE. 0 .AND. combine .NE. 1)then 337 print(" ") 338 print("Your 'combine'= "+combine+" is invalid and set to 0") 339 print(" ") 340 combine = 0 341 end if 342 if (no_files .GT. 1) then 343 combine = 0 344 print(" ") 345 print("If you have more than one input file you cannot combine variables: combine is set to 0") 346 print(" ") 347 end if 70 348 end if 349 71 350 if (combine .EQ. 1) then 72 351 if( .not. isvar("c_var") ) then … … 81 360 end if 82 361 end if 362 83 363 if ( .not. isvar("black") ) then ; color of lines 84 364 black = 0 … … 87 367 if (stringtointeger(parameter(31)) .NE. 1) then 88 368 print(" ") 89 print("Please set 'black' to 0 or 1") 90 print(" ") 91 exit 92 end if 369 print("Your 'black'= "+black+" is invalid and set to 0") 370 print(" ") 371 black = 0 372 end if 373 end if 374 else 375 if (black .NE. 0 .AND. black .NE. 1)then 376 print(" ") 377 print("Your 'black'= "+black+" is invalid and set to 0") 378 print(" ") 379 black = 0 93 380 end if 94 381 end if 95 if ( .not. isvar("dash") ) then ; pattern of lines 382 383 if ( .not. isvar("dash") ) then 96 384 dash = 0 97 385 if (parameter(29) .NE. "0") then … … 99 387 if (stringtointeger(parameter(29)) .NE. 1) then 100 388 print(" ") 101 print(" Please set 'dash' to 0 or 1")102 print(" ") 103 exit389 print("Your 'dash'= "+dash+" is invalid and set to 0") 390 print(" ") 391 dash = 0 104 392 end if 105 393 end if 394 else 395 if (dash .NE. 0 .AND. dash .NE. 1)then 396 print(" ") 397 print("Your 'dash'= "+dash+" is invalid and set to 0") 398 print(" ") 399 dash = 0 400 end if 106 401 end if 402 107 403 if ( .not. isvar("over") ) then ; switches overlaying plots on 108 404 over = 0 … … 111 407 if (stringtointeger(parameter(37)) .NE. 1) then 112 408 print(" ") 113 print("Please set 'over' to 0 or 1") 114 print(" ") 115 exit 409 print("Your 'over'= "+over+" is invalid and set to 0") 410 print(" ") 411 over = 0 412 else 413 if (no_files .GT. 1) then 414 over = 0 415 print(" ") 416 print("If you have more than one input file you cannot overlay variables: over is set to 0") 417 print(" ") 418 end if 116 419 end if 420 end if 421 else 422 if (over .NE. 0 .AND. over .NE. 1)then 423 print(" ") 424 print("Your 'over'= "+over+" is invalid and set to 0") 425 print(" ") 426 over = 0 117 427 end if 118 428 end if … … 129 439 end if 130 440 end if 441 else 442 if (prof3d .NE. 0 .AND. prof3d .NE. 1)then 443 print(" ") 444 print("Your 'prof3d'= "+prof3d+" is invalid; please set 'prof3d' to 0 or 1") 445 print(" ") 446 exit 447 end if 131 448 end if 132 449 450 if (.not. isvar("logy"))then 451 logy = 0 452 if (stringtointeger(parameter(77)) .NE. 0) then 453 logy = stringtointeger(parameter(77)) 454 if (stringtointeger(parameter(77)) .NE. 1) then 455 print(" ") 456 print("Your 'logy'= "+logy+" is invalid and set to 0") 457 print(" ") 458 logy = 0 459 end if 460 end if 461 else 462 if (logy .NE. 0 .AND. logy .NE. 1)then 463 print(" ") 464 print("Your 'logy'= "+logy+" is invalid and set to 0") 465 print(" ") 466 logy = 0 467 end if 468 end if 469 470 if ( .not. isvar("norm") ) then 471 norm = 1.0 472 if (parameter(79) .NE. "1") then 473 norm = stringtofloat(parameter(79)) 474 if (stringtofloat(parameter(79)) .EQ. 0) then 475 print(" ") 476 print("You cannot normalise with 0, 'norm' is set to 1") 477 print(" ") 478 norm = 1.0 479 end if 480 end if 481 else 482 if (norm .EQ. 0) then 483 print(" ") 484 print("You cannot normalise with 0, 'norm' is set to 1") 485 print(" ") 486 norm = 1.0 487 end if 488 end if 489 133 490 ; *************************************************** 134 491 ; open input file 135 492 ; *************************************************** 136 493 137 f=addfile( file_in,"r") 138 494 do nof=0,no_files-1 495 496 f=addfile( file_in(nof),"r") 497 139 498 vNam = getfilevarnames(f) 499 if (nof .EQ. 0)then 500 vNam0=vNam 501 end if 502 if (nof .NE. 0)then 503 if (dim0 .NE. dim)then 504 print(" ") 505 print("Your Input files does not contain the same variables") 506 print(" ") 507 exit 508 else 509 do i=0,dim0-1 510 if (vNam0(i) .NE. vNam(i))then 511 print(" ") 512 print("Your Input files does not contain the same variables") 513 print(" ") 514 exit 515 end if 516 end do 517 end if 518 end if 519 nof=nof+1 140 520 print(" ") 141 print("Variable on netCDF file: " + vNam)521 print("Variable in input file "+nof+": " + vNam) 142 522 print(" ") 523 nof=nof-1 143 524 dim = dimsizes(vNam) 525 dim0=dim 144 526 145 527 if (dim .EQ. 0) then … … 149 531 end if 150 532 533 ;-----------------------------------------------------below steps only for first file -> nof=0 534 if (nof .EQ. 0) then 535 536 plot = new(dim,graphic) 537 plot_ = new(dim,graphic) 538 if (no_files .GT. 1) then 539 multi_plot = new((/no_files,dim/),graphic) 540 max_nof = new((/no_files,dim/),float) 541 min_nof = new((/no_files,dim/),float) 542 name = new((/no_files,dim/),string) 543 unit_ = new((/no_files,dim/),string) 544 end if 545 151 546 if (prof3d .EQ. 0) then 152 547 153 548 do varn = dim-1,0,1 154 549 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then … … 156 551 continue 157 552 end if 158 if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_")) 553 if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_"))then 159 554 z_u = f->$vNam(varn+1)$ 160 555 break … … 274 669 continue 275 670 end if 276 if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_")) 671 if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_"))then 277 672 z_w = f->$vNam(varn+1)$ 278 673 break … … 452 847 453 848 if (zu .EQ. 0 .AND. zw .EQ. 0) then 849 co=0 454 850 do varn=0,dim-1 455 851 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then … … 466 862 end if 467 863 end if 468 if (check) 864 if (check)then 865 co=co+1 469 866 z = f->$vNam(varn+1)$ 470 867 dimz = dimsizes(z) … … 472 869 end if 473 870 end do 871 if (co .EQ. 0) then 872 print(" ") 873 print("The variables 'var=°"+var+"°' do not exist on your input file") 874 print(" ") 875 exit 876 end if 474 877 end if 878 475 879 if (isvar("z_u") ) then 476 880 dimz = dimsizes(z_u) … … 484 888 485 889 do varn = dim-1,0,1 486 if (vNam(varn) .EQ. "zu_3d") 890 if (vNam(varn) .EQ. "zu_3d")then 487 891 z_u = f->zu_3d 488 892 dimz = dimsizes(z_u) 489 893 else 490 if (vNam(varn) .EQ. "zw_3d") 894 if (vNam(varn) .EQ. "zw_3d")then 491 895 z_w = f->zw_3d 492 896 dimz = dimsizes(z_w) … … 501 905 delta_t=t_all(nt-1)/nt 502 906 907 503 908 ; **************************************************** 504 909 ; start of time step and different types of mistakes that could be done 505 910 ; **************************************************** 506 911 507 912 if ( .not. isvar("start_time_step") ) then 508 913 start_time_step=t_all(0)/3600 509 914 if (parameter(13) .NE. "t(0)") then 510 if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600) 915 if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600)then 511 916 print(" ") 512 917 print("'start_time_step' = "+ parameter(13) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") … … 516 921 exit 517 922 end if 518 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600) 923 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600)then 519 924 print(" ") 520 925 print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") … … 524 929 end if 525 930 else 526 if (start_time_step .GT. t_all(nt-1)/3600) 931 if (start_time_step .GT. t_all(nt-1)/3600)then 527 932 print(" ") 528 933 print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") … … 532 937 exit 533 938 end if 534 if (start_time_step .LT. t_all(0)/3600) 939 if (start_time_step .LT. t_all(0)/3600)then 535 940 print(" ") 536 941 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") … … 540 945 end if 541 946 start_time_step = start_time_step*3600 542 ;if (start_time_step .GE. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then 543 ; st=0 544 ;end if 947 545 948 do i=0,nt-1 546 949 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then … … 557 960 end_time_step = t_all(nt-1)/3600 558 961 if (parameter(15) .NE. "t(end)") then 559 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600) 962 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600)then 560 963 print(" ") 561 964 print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") … … 565 968 exit 566 969 end if 567 if (stringtodouble(parameter(15)) .LT. start_time_step/3600) 970 if (stringtodouble(parameter(15)) .LT. start_time_step/3600)then 568 971 print(" ") 569 972 print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+start_time_step/3600+"h") … … 576 979 end if 577 980 else 578 if (end_time_step .GT. t_all(nt-1)/3600) 981 if (end_time_step .GT. t_all(nt-1)/3600)then 579 982 print(" ") 580 983 print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") … … 584 987 exit 585 988 end if 586 if (end_time_step .LT. start_time_step/3600) 989 if (end_time_step .LT. start_time_step/3600)then 587 990 print(" ") 588 991 print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") … … 594 997 end if 595 998 end_time_step = end_time_step*3600 596 ;if (end_time_step .GE. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then 597 ; et=1 598 ;end if 999 599 1000 do i=0,nt-1 600 1001 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then … … 608 1009 delete(end_time_step) 609 1010 end_time_step=round(et,3) 1011 1012 print(" ") 1013 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) 1014 print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) 1015 print(" ") 610 1016 611 1017 ; **************************************************** … … 615 1021 legend_label=new(nt,double) 616 1022 do p=start_time_step,end_time_step 617 legend_label(p-start_time_step)=t_all(p) 1023 if (t_all(p)/3600 .LT. 1) then 1024 legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,2,True) 1025 else 1026 legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,0,True) 1027 end if 618 1028 end do 619 1029 620 1030 np = end_time_step-start_time_step+1 621 if ( black .eq. 0 ) then622 res=True623 res@xyLineColors = ispan(2,237,235/np)624 end if625 1031 626 1032 ; *************************************************** … … 628 1034 ; *************************************************** 629 1035 1036 res = True 630 1037 res@gsnDraw = False 631 1038 res@gsnFrame = False … … 648 1055 res@pmLegendOrthogonalPosF = -1.0 649 1056 res@pmLegendWidthF = 0.12 650 res@pmLegendHeightF = 0. 31057 res@pmLegendHeightF = 0.04*(end_time_step-start_time_step+1) 651 1058 res@lgLabelFontHeightF = .02 652 1059 res@txFontHeightF = 0.02 653 1060 res@tiXAxisFontHeightF = 0.02 654 1061 res@tiYAxisFontHeightF = 0.02 655 res@tiXAxisString = " " 656 res@tiYAxisString = "Height [z]" 657 1062 res@tiXAxisString = " " 1063 if ( black .eq. 0 ) then 1064 res@xyLineColors = ispan(2,237,235/np) 1065 end if 1066 if (norm .EQ. 1)then 1067 res@tiYAxisString = "Height [m]" 1068 else 1069 res@tiYAxisString = "Height / "+norm+" [m]" 1070 end if 1071 1072 if (logy .EQ. 1) then 1073 res@trYLog = True 1074 end if 1075 658 1076 if ( dash .eq. 0 ) then 659 res@xyMonoDashPattern = True 1077 res@xyMonoDashPattern = True 1078 else 1079 if (no_files .GT. 1) 1080 res@xyMonoDashPattern = True 1081 print(" ") 1082 print("If you use more than one file, patterns for different timesteps cannot be used") 1083 print(" ") 1084 end if 660 1085 end if 661 1086 … … 670 1095 ; *************************************************** 671 1096 672 plot = new(dim,graphic)673 plot_ = new(dim,graphic)674 675 1097 if (combine .EQ. 1) then 676 1098 if ( .not. isvar("number_comb") ) then … … 702 1124 wks=gsn_open_wks(format_out,file_out) 703 1125 gsn_define_colormap(wks,"rainbow+white") 704 1126 1127 ; *************************************************** 1128 ; set up minimum and maximum height 1129 ; *************************************************** 1130 1131 if (logy .EQ. 1)then 1132 if (.not. isvar("min_z"))then 1133 if (isvar("z_u"))then 1134 min_z=z_u(1) 1135 else 1136 min_z=z_w(1) 1137 end if 1138 if (stringtofloat(parameter(33)) .NE. z_u(1) .OR. stringtofloat(parameter(33)) .NE. z_w(1)) then 1139 if (stringtofloat(parameter(33)) .EQ. 0) then 1140 if (isvar("z_u"))then 1141 min_z=z_u(1) 1142 else 1143 min_z=z_w(1) 1144 end if 1145 else 1146 if (stringtofloat(parameter(33)) .GE. max(z_u) ) then 1147 print(" ") 1148 print("Minimum of height ('min_z'="+stringtofloat(parameter(33))+") is greater than available heights (="+max(z_u)+")") 1149 print(" ") 1150 exit 1151 end if 1152 if (stringtofloat(parameter(33)) .LT. z_u(1)) then 1153 print(" ") 1154 print("Begin height 'min_z' at least at level k=1 (="+z_u(1)+"m) due to the logarithmic scale of the y-axis") 1155 print(" ") 1156 exit 1157 end if 1158 min_z=stringtofloat(parameter(33)) 1159 end if 1160 end if 1161 else 1162 if (min_z .GE. max(z_u) ) then 1163 print(" ") 1164 print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")") 1165 print(" ") 1166 exit 1167 end if 1168 if (min_z .LT. z_u(1) ) then 1169 print(" ") 1170 print("Begin height 'min_z' at least at level k=1 (="+z_u(1)+"m) due to the logarithmic scale of the y-axis") 1171 print(" ") 1172 exit 1173 end if 1174 end if 1175 else 1176 if (.not. isvar("min_z"))then 1177 min_z=0.0 1178 if (stringtofloat(parameter(33)) .NE. 0) then 1179 if (stringtofloat(parameter(33)) .GE. max(z_u) ) then 1180 print(" ") 1181 print("Minimum of height ('min_z'="+stringtofloat(parameter(33))+") is greater than available heights (="+max(z_u)+")") 1182 print(" ") 1183 exit 1184 end if 1185 if (stringtofloat(parameter(33)) .LT. 0 ) then 1186 print(" ") 1187 print("Begin minimum of height 'min_z' with 0") 1188 print(" ") 1189 exit 1190 end if 1191 min_z=stringtofloat(parameter(33)) 1192 end if 1193 else 1194 if (min_z .GE. max(z_u) ) then 1195 print(" ") 1196 print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")") 1197 print(" ") 1198 exit 1199 end if 1200 if (min_z .LT. 0 ) then 1201 print(" ") 1202 print("Begin minimum of height 'min_z' with 0") 1203 print(" ") 1204 exit 1205 end if 1206 end if 1207 end if 1208 1209 if (.not. isvar("max_z"))then 1210 max_z=max(z_u) 1211 if ((parameter(35)) .NE. "max(z_u)") then 1212 if (stringtofloat(parameter(35)) .GE. max(z_u) ) then 1213 print(" ") 1214 print("Maximum of height ('max_z'="+parameter(35)+") is greater than available heights (="+max(z_u)+")") 1215 print(" ") 1216 exit 1217 end if 1218 if (stringtofloat(parameter(35)) .LE. 0 ) then 1219 print(" ") 1220 print("Maximum of height 'max_z' should be at least 1") 1221 print(" ") 1222 exit 1223 end if 1224 max_z=stringtofloat(parameter(35)) 1225 end if 1226 else 1227 if (max_z .GE. max(z_u) ) then 1228 print(" ") 1229 print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_u)+")") 1230 print(" ") 1231 exit 1232 end if 1233 if (max_z .LE. 0 ) then 1234 print(" ") 1235 print("Maximum of height 'max_z' should be at least 1") 1236 print(" ") 1237 exit 1238 end if 1239 end if 1240 1241 min_z=min_z/norm 1242 max_z=max_z/norm 1243 1244 ; *************************************************** 1245 ; read data and create plots 1246 ; *************************************************** 1247 1248 do ti = start_time_step, end_time_step 1249 if( t_all(ti) .lt. 10^36) then 1250 start_time_step = ti 1251 break 1252 end if 1253 end do 1254 1255 if (logy .EQ. 1) then 1256 data = new((/dim,(end_time_step-start_time_step)+1,dimz-1/),float) 1257 data_0 = new((/(end_time_step-start_time_step)+1,dimz-1/),float) 1258 data_0 = 0.1 1259 t = new((/(end_time_step-start_time_step)+1,dimz-1/),float) 1260 t = 0.0 1261 unit = new(dim,string) 1262 if (isvar("z_u"))then 1263 if (typeof(z_u) .EQ. "double")then 1264 z_v = new((/dim,dimz/),double) 1265 z_ = new((/dim,dimz-1/),double) 1266 else 1267 if (typeof(z_u) .EQ. "float")then 1268 z_v = new((/dim,dimz/),float) 1269 z_ = new((/dim,dimz-1/),float) 1270 end if 1271 end if 1272 else 1273 if (isvar("z_w"))then 1274 if (typeof(z_w) .EQ. "double")then 1275 z_v = new((/dim,dimz/),double) 1276 z_ = new((/dim,dimz-1/),double) 1277 else 1278 if (typeof(z_w) .EQ. "float")then 1279 z_v = new((/dim,dimz/),float) 1280 z_ = new((/dim,dimz-1/),float) 1281 end if 1282 end if 1283 end if 1284 end if 1285 else 1286 data = new((/dim,(end_time_step-start_time_step)+1,dimz/),float) 1287 data_0 = new((/(end_time_step-start_time_step)+1,dimz/),float) 1288 data_0 = 0.0 1289 t = new((/(end_time_step-start_time_step)+1,dimz/),float) 1290 t = 0.0 1291 unit = new(dim,string) 1292 if (isvar("z_u"))then 1293 if (typeof(z_u) .EQ. "double")then 1294 z_v = new((/dim,dimz/),double) 1295 z_ = new((/dim,dimz/),double) 1296 else 1297 if (typeof(z_u) .EQ. "float")then 1298 z_v = new((/dim,dimz/),float) 1299 z_ = new((/dim,dimz/),float) 1300 end if 1301 end if 1302 else 1303 if (isvar("z_w"))then 1304 if (typeof(z_w) .EQ. "double")then 1305 z_v = new((/dim,dimz/),double) 1306 z_ = new((/dim,dimz/),double) 1307 else 1308 if (typeof(z_w) .EQ. "float")then 1309 z_v = new((/dim,dimz/),float) 1310 z_ = new((/dim,dimz/),float) 1311 end if 1312 end if 1313 end if 1314 end if 1315 end if 1316 1317 end if 1318 ;------------------------------------------------------ above steps only for first file 1319 705 1320 ; *************************************************** 706 1321 ; indicate plot number … … 712 1327 n = 0 713 1328 end if 714 715 ; ***************************************************716 ; set up minimum and maximum height717 ; ***************************************************718 719 if (.not. isvar("min_z"))720 min_z=0721 if (stringtointeger(parameter(33)) .NE. 0) then722 if (stringtointeger(parameter(33)) .GE. max(z_u) ) then723 print(" ")724 print("Minimum of height ('min_z'="+stringtointeger(parameter(33))+") is greater than available heights (="+max(z_u)+")")725 print(" ")726 exit727 end if728 if (stringtointeger(parameter(33)) .LT. 0 ) then729 print(" ")730 print("Begin minimum of height 'min_z' with 0")731 print(" ")732 exit733 end if734 min_z=stringtointeger(parameter(33))735 end if736 else737 if (min_z .GE. max(z_u) ) then738 print(" ")739 print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")")740 print(" ")741 exit742 end if743 if (min_z .LT. 0 ) then744 print(" ")745 print("Begin minimum of height 'min_z' with 0")746 print(" ")747 exit748 end if749 end if750 751 if (.not. isvar("max_z"))752 max_z=max(z_u)753 if ((parameter(35)) .NE. "max(z_u)") then754 if (stringtofloat(parameter(35)) .GE. max(z_u) ) then755 print(" ")756 print("Maximum of height ('max_z'="+parameter(35)+") is greater than available heights (="+max(z_u)+")")757 print(" ")758 exit759 end if760 if (stringtointeger(parameter(35)) .LE. 0 ) then761 print(" ")762 print("Maximum of height 'max_z' should be at least 1")763 print(" ")764 exit765 end if766 max_z=stringtointeger(parameter(35))767 end if768 else769 if (max_z .GE. max(z_pr) ) then770 print(" ")771 print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_u)+")")772 print(" ")773 exit774 end if775 if (max_z .LE. 0 ) then776 print(" ")777 print("Maximum of height 'max_z' should be at least 1")778 print(" ")779 exit780 end if781 end if782 783 ; ***************************************************784 ; read data and create plots785 ; ***************************************************786 787 do ti = start_time_step, end_time_step788 if( t_all(ti) .lt. 10^36) then789 start_time_step = ti790 break791 end if792 end do793 794 data = new((/dim,(end_time_step-start_time_step)+1,dimz/),float)795 data_0 = new((/(end_time_step-start_time_step)+1,dimz/),float)796 data_0 = 0.0797 t = new((/(end_time_step-start_time_step)+1,dimz/),float)798 t = 0.0799 unit = new(dim,string)800 z_v = new((/dim,dimz/),double)801 1329 802 1330 if (over .EQ. 1) then … … 976 1504 if (combine .EQ. 1) then 977 1505 com=isStrSubset(c_var,","+vNam(varn)+"," ) 978 if (com) 1506 if (com) then 979 1507 if (prof3d .EQ. 0) then 980 1508 temp = f->$vNam(varn)$ 981 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) 1509 if (logy .EQ. 1) then 1510 data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) 1511 else 1512 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) 1513 end if 982 1514 else 983 do i=0,dimz-1 984 do j=start_time_step,end_time_step 985 temp= f->$vNam(varn)$(j,i,:,:) 986 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1515 if (logy .EQ. 1) then 1516 do i=1,dimz-1 1517 do j=start_time_step,end_time_step 1518 temp= f->$vNam(varn)$(j,i,:,:) 1519 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1520 end do 987 1521 end do 988 end do 1522 else 1523 do i=0,dimz-1 1524 do j=start_time_step,end_time_step 1525 temp= f->$vNam(varn)$(j,i,:,:) 1526 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1527 end do 1528 end do 1529 end if 989 1530 print(" ") 990 1531 print("Variable for combine '"+vNam(varn)+"' is read") … … 1006 1547 if(check) then 1007 1548 1549 if (isStrSubset(vNam(varn),"_0" ))then 1550 print(" ") 1551 print("If you have Outputs of statistic regions you cannot overlay variables; 'over' is set to 0") 1552 print(" ") 1553 over = 0 1554 end if 1555 1008 1556 count_var=count_var+1 1009 1557 … … 1011 1559 temp = f->$vNam(varn)$ 1012 1560 else 1013 do i=0,dimz-1 1014 do j=start_time_step,end_time_step 1015 temp = f->$vNam(varn)$(j,i,:,:) 1016 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1561 if (logy .EQ. 1) then 1562 do i=1,dimz-1 1563 do j=start_time_step,end_time_step 1564 temp= f->$vNam(varn)$(j,i,:,:) 1565 data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1566 end do 1017 1567 end do 1018 end do 1568 else 1569 do i=0,dimz-1 1570 do j=start_time_step,end_time_step 1571 temp= f->$vNam(varn)$(j,i,:,:) 1572 data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1573 end do 1574 end do 1575 end if 1019 1576 print(" ") 1020 1577 print("Variable '"+vNam(varn)+"' is read") … … 1026 1583 1027 1584 if (prof3d .EQ. 0) then 1028 z = f->$vNam(varn+1)$ 1029 unit(varn) = temp@units 1030 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) 1585 if (logy .EQ. 1) then 1586 z = f->$vNam(varn+1)$(1:dimz-1) 1587 unit(varn) = temp@units 1588 data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) 1589 else 1590 z = f->$vNam(varn+1)$ 1591 unit(varn) = temp@units 1592 data(varn,:,:) = temp(start_time_step:end_time_step,:) 1593 end if 1031 1594 else 1032 1595 do i=0,b-1 1033 if (isStrSubset( a(i),"zu_3d" )) 1596 if (isStrSubset( a(i),"zu_3d" ))then 1034 1597 z_v(varn,:) = z_u 1035 z = z_v(varn,:) 1036 else 1037 if (isStrSubset( a(i),"zw_3d" )) 1598 if (logy .EQ. 1) then 1599 z = z_v(varn,1:dimz-1) 1600 else 1601 z = z_v(varn,:) 1602 end if 1603 else 1604 if (isStrSubset( a(i),"zw_3d" ))then 1038 1605 z_v(varn,:) = z_w 1039 z = z_v(varn,:) 1606 if (logy .EQ. 1) then 1607 z = z_v(varn,1:dimz-1) 1608 else 1609 z = z_v(varn,:) 1610 end if 1040 1611 end if 1041 1612 end if 1042 1613 end do 1043 1614 end if 1615 1616 if (data(varn,0,0) .GT. 1.E35) then 1617 data(varn,0,:) = data(varn,1,:) 1618 end if 1619 if (nof .EQ. 0) then 1620 z_(n,:)=z/norm 1621 z = z_(n,:) 1622 else 1623 z=z/norm 1624 end if 1625 1044 1626 if (over .EQ. 0) then 1627 res@xyDashPattern = nof 1045 1628 res@gsnLeftString = vNam(varn) 1046 1629 res@gsnRightString = unit(varn) … … 1064 1647 else 1065 1648 res@trXMaxF = xe 1066 end if 1649 end if 1067 1650 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1068 1651 end if … … 1073 1656 if (over .EQ. 1) then 1074 1657 res@xyDashPattern = 0 1075 plot_u = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1658 plot_u = gsn_csm_xy(wks,data(varn,:,:),z,res) 1076 1659 else 1077 1660 res@gsnLeftString = vNam(varn) … … 1095 1678 res@trXMaxF = xe 1096 1679 end if 1097 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1680 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1098 1681 end if 1099 1682 end if … … 1103 1686 if (over .EQ. 1) then 1104 1687 res@xyDashPattern = 1 1105 plot_v = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1688 plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res) 1106 1689 else 1107 1690 res@gsnLeftString = vNam(varn) … … 1125 1708 res@trXMaxF = xe 1126 1709 end if 1127 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1710 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1128 1711 end if 1129 1712 end if … … 1133 1716 if (over .EQ. 1) then 1134 1717 res@xyDashPattern = 2 1135 plot_w = gsn_csm_xy(wks,data(varn,:,:),z _w,res)1718 plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res) 1136 1719 else 1137 1720 res@gsnLeftString = vNam(varn) … … 1155 1738 res@trXMaxF = xe 1156 1739 end if 1157 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)1740 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1158 1741 end if 1159 1742 end if … … 1164 1747 if (over .EQ. 1) then 1165 1748 res@xyDashPattern = 0 1166 plot_pt = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1749 plot_pt = gsn_csm_xy(wks,data(varn,:,:),z,res) 1167 1750 else 1168 1751 res@gsnLeftString = vNam(varn) … … 1186 1769 res@trXMaxF = xe 1187 1770 end if 1188 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1771 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1189 1772 end if 1190 1773 end if … … 1194 1777 if (over .EQ. 1) then 1195 1778 res@xyDashPattern = 1 1196 plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1779 plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z,res) 1197 1780 else 1198 1781 res@gsnLeftString = vNam(varn) … … 1216 1799 res@trXMaxF = xe 1217 1800 end if 1218 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1801 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1219 1802 end if 1220 1803 end if … … 1224 1807 if (over .EQ. 1) then 1225 1808 res@xyDashPattern = 2 1226 plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1809 plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z,res) 1227 1810 else 1228 1811 res@gsnLeftString = vNam(varn) … … 1246 1829 res@trXMaxF = xe 1247 1830 end if 1248 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1831 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1249 1832 end if 1250 1833 end if … … 1255 1838 if (over .EQ. 1) then 1256 1839 res@xyDashPattern = 0 1257 plot_q = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1840 plot_q = gsn_csm_xy(wks,data(varn,:,:),z,res) 1258 1841 else 1259 1842 res@gsnLeftString = vNam(varn) … … 1277 1860 res@trXMaxF = xe 1278 1861 end if 1279 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1862 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1280 1863 end if 1281 1864 end if … … 1285 1868 if (over .EQ. 1) then 1286 1869 res@xyDashPattern = 1 1287 plot_qv = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1870 plot_qv = gsn_csm_xy(wks,data(varn,:,:),z,res) 1288 1871 else 1289 1872 res@gsnLeftString = vNam(varn) … … 1307 1890 res@trXMaxF = xe 1308 1891 end if 1309 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1892 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1310 1893 end if 1311 1894 end if … … 1315 1898 if (over .EQ. 1) then 1316 1899 res@xyDashPattern = 2 1317 plot_ql = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1900 plot_ql = gsn_csm_xy(wks,data(varn,:,:),z,res) 1318 1901 else 1319 1902 res@gsnLeftString = vNam(varn) … … 1337 1920 res@trXMaxF = xe 1338 1921 end if 1339 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1922 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1340 1923 end if 1341 1924 end if … … 1346 1929 if (over .EQ. 1) then 1347 1930 res@xyDashPattern = 0 1348 plot_e = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1931 plot_e = gsn_csm_xy(wks,data(varn,:,:),z,res) 1349 1932 else 1350 1933 res@gsnLeftString = vNam(varn) … … 1368 1951 res@trXMaxF = xe 1369 1952 end if 1370 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1953 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1371 1954 end if 1372 1955 end if … … 1376 1959 if (over .EQ. 1) then 1377 1960 res@xyDashPattern = 1 1378 plot_es = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1961 plot_es = gsn_csm_xy(wks,data(varn,:,:),z,res) 1379 1962 else 1380 1963 res@gsnLeftString = vNam(varn) … … 1398 1981 res@trXMaxF = xe 1399 1982 end if 1400 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1983 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1401 1984 end if 1402 1985 end if … … 1407 1990 if (over .EQ. 1) then 1408 1991 res@xyDashPattern = 0 1409 plot_km = gsn_csm_xy(wks,data(varn,:,:),z _u,res)1992 plot_km = gsn_csm_xy(wks,data(varn,:,:),z,res) 1410 1993 else 1411 1994 res@gsnLeftString = vNam(varn) … … 1429 2012 res@trXMaxF = xe 1430 2013 end if 1431 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2014 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1432 2015 end if 1433 2016 end if … … 1437 2020 if (over .EQ. 1) then 1438 2021 res@xyDashPattern = 1 1439 plot_kh = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2022 plot_kh = gsn_csm_xy(wks,data(varn,:,:),z,res) 1440 2023 else 1441 2024 res@gsnLeftString = vNam(varn) … … 1459 2042 res@trXMaxF = xe 1460 2043 end if 1461 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2044 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1462 2045 end if 1463 2046 end if … … 1468 2051 if (over .EQ. 1) then 1469 2052 res@xyDashPattern = 0 1470 plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2053 plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z,res) 1471 2054 else 1472 2055 res@gsnLeftString = vNam(varn) … … 1490 2073 res@trXMaxF = xe 1491 2074 end if 1492 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2075 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1493 2076 end if 1494 2077 end if … … 1498 2081 if (over .EQ. 1) then 1499 2082 res@xyDashPattern = 1 1500 plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2083 plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z,res) 1501 2084 else 1502 2085 res@gsnLeftString = vNam(varn) … … 1520 2103 res@trXMaxF = xe 1521 2104 end if 1522 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2105 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1523 2106 end if 1524 2107 end if … … 1528 2111 if (over .EQ. 1) then 1529 2112 res@xyDashPattern = 2 1530 plot_wu = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2113 plot_wu = gsn_csm_xy(wks,data(varn,:,:),z,res) 1531 2114 else 1532 2115 res@gsnLeftString = vNam(varn) … … 1550 2133 res@trXMaxF = xe 1551 2134 end if 1552 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2135 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1553 2136 end if 1554 2137 end if … … 1559 2142 if (over .EQ. 1) then 1560 2143 res@xyDashPattern = 0 1561 plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2144 plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z,res) 1562 2145 else 1563 2146 res@gsnLeftString = vNam(varn) … … 1581 2164 res@trXMaxF = xe 1582 2165 end if 1583 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2166 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1584 2167 end if 1585 2168 end if … … 1589 2172 if (over .EQ. 1) then 1590 2173 res@xyDashPattern = 1 1591 plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2174 plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z,res) 1592 2175 else 1593 2176 res@gsnLeftString = vNam(varn) … … 1611 2194 res@trXMaxF = xe 1612 2195 end if 1613 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2196 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1614 2197 end if 1615 2198 end if … … 1619 2202 if (over .EQ. 1) then 1620 2203 res@xyDashPattern = 2 1621 plot_wv = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2204 plot_wv = gsn_csm_xy(wks,data(varn,:,:),z,res) 1622 2205 else 1623 2206 res@gsnLeftString = vNam(varn) … … 1641 2224 res@trXMaxF = xe 1642 2225 end if 1643 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2226 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1644 2227 end if 1645 2228 end if … … 1650 2233 if (over .EQ. 1) then 1651 2234 res@xyDashPattern = 0 1652 plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2235 plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z,res) 1653 2236 else 1654 2237 res@gsnLeftString = vNam(varn) … … 1672 2255 res@trXMaxF = xe 1673 2256 end if 1674 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2257 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1675 2258 end if 1676 2259 end if … … 1680 2263 if (over .EQ. 1) then 1681 2264 res@xyDashPattern = 1 1682 plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2265 plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z,res) 1683 2266 else 1684 2267 res@gsnLeftString = vNam(varn) … … 1702 2285 res@trXMaxF = xe 1703 2286 end if 1704 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2287 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1705 2288 end if 1706 2289 end if … … 1710 2293 if (over .EQ. 1) then 1711 2294 res@xyDashPattern = 2 1712 plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2295 plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z,res) 1713 2296 else 1714 2297 res@gsnLeftString = vNam(varn) … … 1732 2315 res@trXMaxF = xe 1733 2316 end if 1734 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2317 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1735 2318 end if 1736 2319 end if … … 1741 2324 if (over .EQ. 1) then 1742 2325 res@xyDashPattern = 0 1743 plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2326 plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z,res) 1744 2327 else 1745 2328 res@gsnLeftString = vNam(varn) … … 1763 2346 res@trXMaxF = xe 1764 2347 end if 1765 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2348 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1766 2349 end if 1767 2350 end if … … 1771 2354 if (over .EQ. 1) then 1772 2355 res@xyDashPattern = 1 1773 plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2356 plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z,res) 1774 2357 else 1775 2358 res@gsnLeftString = vNam(varn) … … 1793 2376 res@trXMaxF = xe 1794 2377 end if 1795 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2378 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1796 2379 end if 1797 2380 end if … … 1802 2385 if (over .EQ. 1) then 1803 2386 res@xyDashPattern = 0 1804 plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2387 plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z,res) 1805 2388 else 1806 2389 res@gsnLeftString = vNam(varn) … … 1824 2407 res@trXMaxF = xe 1825 2408 end if 1826 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2409 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1827 2410 end if 1828 2411 end if … … 1832 2415 if (over .EQ. 1) then 1833 2416 res@xyDashPattern = 1 1834 plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2417 plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z,res) 1835 2418 else 1836 2419 res@gsnLeftString = vNam(varn) … … 1854 2437 res@trXMaxF = xe 1855 2438 end if 1856 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2439 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1857 2440 end if 1858 2441 end if … … 1862 2445 if (over .EQ. 1) then 1863 2446 res@xyDashPattern = 2 1864 plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2447 plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z,res) 1865 2448 else 1866 2449 res@gsnLeftString = vNam(varn) … … 1884 2467 res@trXMaxF = xe 1885 2468 end if 1886 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2469 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1887 2470 end if 1888 2471 end if … … 1893 2476 if (over .EQ. 1) then 1894 2477 res@xyDashPattern = 0 1895 plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2478 plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z,res) 1896 2479 else 1897 2480 res@gsnLeftString = vNam(varn) … … 1915 2498 res@trXMaxF = xe 1916 2499 end if 1917 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2500 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1918 2501 end if 1919 2502 end if … … 1923 2506 if (over .EQ. 1) then 1924 2507 res@xyDashPattern = 1 1925 plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2508 plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z,res) 1926 2509 else 1927 2510 res@gsnLeftString = vNam(varn) … … 1945 2528 res@trXMaxF = xe 1946 2529 end if 1947 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2530 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1948 2531 end if 1949 2532 end if … … 1953 2536 if (over .EQ. 1) then 1954 2537 res@xyDashPattern = 2 1955 plot_wq = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2538 plot_wq = gsn_csm_xy(wks,data(varn,:,:),z,res) 1956 2539 else 1957 2540 res@gsnLeftString = vNam(varn) … … 1975 2558 res@trXMaxF = xe 1976 2559 end if 1977 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2560 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 1978 2561 end if 1979 2562 end if … … 1984 2567 if (over .EQ. 1) then 1985 2568 res@xyDashPattern = 0 1986 plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2569 plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z,res) 1987 2570 else 1988 2571 res@gsnLeftString = vNam(varn) … … 2006 2589 res@trXMaxF = xe 2007 2590 end if 2008 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2591 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2009 2592 end if 2010 2593 end if … … 2014 2597 if (over .EQ. 1) then 2015 2598 res@xyDashPattern = 1 2016 plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2599 plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z,res) 2017 2600 else 2018 2601 res@gsnLeftString = vNam(varn) … … 2036 2619 res@trXMaxF = xe 2037 2620 end if 2038 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2621 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2039 2622 end if 2040 2623 end if … … 2044 2627 if (over .EQ. 1) then 2045 2628 res@xyDashPattern = 2 2046 plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2629 plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z,res) 2047 2630 else 2048 2631 res@gsnLeftString = vNam(varn) … … 2066 2649 res@trXMaxF = xe 2067 2650 end if 2068 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2651 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2069 2652 end if 2070 2653 end if … … 2075 2658 if (over .EQ. 1) then 2076 2659 res@xyDashPattern = 0 2077 plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2660 plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z,res) 2078 2661 else 2079 2662 res@gsnLeftString = vNam(varn) … … 2097 2680 res@trXMaxF = xe 2098 2681 end if 2099 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2682 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2100 2683 end if 2101 2684 end if … … 2105 2688 if (over .EQ. 1) then 2106 2689 res@xyDashPattern = 1 2107 plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2690 plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z,res) 2108 2691 else 2109 2692 res@gsnLeftString = vNam(varn) … … 2127 2710 res@trXMaxF = xe 2128 2711 end if 2129 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2712 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2130 2713 end if 2131 2714 end if … … 2135 2718 if (over .EQ. 1) then 2136 2719 res@xyDashPattern = 2 2137 plot_ws = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2720 plot_ws = gsn_csm_xy(wks,data(varn,:,:),z,res) 2138 2721 else 2139 2722 res@gsnLeftString = vNam(varn) … … 2157 2740 res@trXMaxF = xe 2158 2741 end if 2159 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2742 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2160 2743 end if 2161 2744 end if … … 2166 2749 if (over .EQ. 1) then 2167 2750 res@xyDashPattern = 0 2168 plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2751 plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z,res) 2169 2752 else 2170 2753 res@gsnLeftString = vNam(varn) … … 2188 2771 res@trXMaxF = xe 2189 2772 end if 2190 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2773 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2191 2774 end if 2192 2775 end if … … 2196 2779 if (over .EQ. 1) then 2197 2780 res@xyDashPattern = 1 2198 plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2781 plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z,res) 2199 2782 else 2200 2783 res@gsnLeftString = vNam(varn) … … 2218 2801 res@trXMaxF = xe 2219 2802 end if 2220 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2803 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2221 2804 end if 2222 2805 end if … … 2226 2809 if (over .EQ. 1) then 2227 2810 res@xyDashPattern = 2 2228 plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2811 plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z,res) 2229 2812 else 2230 2813 res@gsnLeftString = vNam(varn) … … 2248 2831 res@trXMaxF = xe 2249 2832 end if 2250 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2833 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2251 2834 end if 2252 2835 end if … … 2257 2840 if (over .EQ. 1) then 2258 2841 res@xyDashPattern = 0 2259 plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2842 plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z,res) 2260 2843 else 2261 2844 res@gsnLeftString = vNam(varn) … … 2279 2862 res@trXMaxF = xe 2280 2863 end if 2281 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2864 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2282 2865 end if 2283 2866 end if … … 2287 2870 if (over .EQ. 1) then 2288 2871 res@xyDashPattern = 1 2289 plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2872 plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z,res) 2290 2873 else 2291 2874 res@gsnLeftString = vNam(varn) … … 2309 2892 res@trXMaxF = xe 2310 2893 end if 2311 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2894 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2312 2895 end if 2313 2896 end if … … 2317 2900 if (over .EQ. 1) then 2318 2901 res@xyDashPattern = 2 2319 plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2902 plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z,res) 2320 2903 else 2321 2904 res@gsnLeftString = vNam(varn) … … 2339 2922 res@trXMaxF = xe 2340 2923 end if 2341 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2924 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2342 2925 end if 2343 2926 end if … … 2348 2931 if (over .EQ. 1) then 2349 2932 res@xyDashPattern = 0 2350 plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2933 plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z,res) 2351 2934 else 2352 2935 res@gsnLeftString = vNam(varn) … … 2370 2953 res@trXMaxF = xe 2371 2954 end if 2372 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2955 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2373 2956 end if 2374 2957 end if … … 2378 2961 if (over .EQ. 1) then 2379 2962 res@xyDashPattern = 1 2380 plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2963 plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z,res) 2381 2964 else 2382 2965 res@gsnLeftString = vNam(varn) … … 2400 2983 res@trXMaxF = xe 2401 2984 end if 2402 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)2985 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2403 2986 end if 2404 2987 end if … … 2408 2991 if (over .EQ. 1) then 2409 2992 res@xyDashPattern = 2 2410 plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z _w,res)2993 plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z,res) 2411 2994 else 2412 2995 res@gsnLeftString = vNam(varn) … … 2430 3013 res@trXMaxF = xe 2431 3014 end if 2432 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3015 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2433 3016 end if 2434 3017 end if 3018 if (no_files .GT. 1) then 3019 multi_plot(nof,n)=plot(n) 3020 max_nof(nof,n)=max(data(varn,:,:)) 3021 min_nof(nof,n)=min(data(varn,:,:)) 3022 name(nof,n) =vNam(varn) 3023 unit_(nof,n) =unit(varn) 3024 end if 2435 3025 if (over .EQ. 0) then 2436 3026 n=n+1 … … 2442 3032 end if 2443 3033 end do 3034 if (no_files .GT. 1) then 3035 delete(vNam) 3036 end if 3037 end do 3038 3039 if (count_var .EQ. 0) then 3040 print(" ") 3041 print("The variables 'var=°"+var+"°' do not exist on your input file") 3042 print(" ") 3043 exit 3044 end if 3045 3046 if (no_files .GT. 1) then 3047 multi_legend=new(12,string) 3048 string_len=new(12,integer) 3049 multi_dash=new(no_files,string) 3050 if (.not. isvar("name_legend_1")) 3051 multi_legend(0)=" "+parameter(83) 3052 else 3053 multi_legend(0)=" "+name_legend_1 3054 end if 3055 string_len(0)=strlen(multi_legend(0)) 3056 if (.not. isvar("name_legend_2")) 3057 multi_legend(1)=" "+parameter(87) 3058 else 3059 multi_legend(1)=" "+name_legend_2 3060 end if 3061 string_len(1)=strlen(multi_legend(1)) 3062 if (.not. isvar("name_legend_3")) 3063 multi_legend(2)=" "+parameter(91) 3064 else 3065 multi_legend(2)=" "+name_legend_3 3066 end if 3067 string_len(2)=strlen(multi_legend(2)) 3068 if (.not. isvar("name_legend_4")) 3069 multi_legend(3)=" "+parameter(95) 3070 else 3071 multi_legend(3)=" "+name_legend_4 3072 end if 3073 string_len(3)=strlen(multi_legend(3)) 3074 if (.not. isvar("name_legend_5")) 3075 multi_legend(4)=" "+parameter(99) 3076 else 3077 multi_legend(4)=" "+name_legend_5 3078 end if 3079 string_len(4)=strlen(multi_legend(4)) 3080 if (.not. isvar("name_legend_6")) 3081 multi_legend(5)=" "+parameter(103) 3082 else 3083 multi_legend(5)=" "+name_legend_6 3084 end if 3085 string_len(5)=strlen(multi_legend(5)) 3086 if (.not. isvar("name_legend_7")) 3087 multi_legend(6)=" "+parameter(107) 3088 else 3089 multi_legend(6)=" "+name_legend_7 3090 end if 3091 string_len(6)=strlen(multi_legend(6)) 3092 if (.not. isvar("name_legend_8")) 3093 multi_legend(7)=" "+parameter(111) 3094 else 3095 multi_legend(7)=" "+name_legend_8 3096 end if 3097 string_len(7)=strlen(multi_legend(7)) 3098 if (.not. isvar("name_legend_9")) 3099 multi_legend(8)=" "+parameter(115) 3100 else 3101 multi_legend(8)=" "+name_legend_9 3102 end if 3103 string_len(8)=strlen(multi_legend(8)) 3104 if (.not. isvar("name_legend_10")) 3105 multi_legend(9)=" "+parameter(119) 3106 else 3107 multi_legend(9)=" "+name_legend_10 3108 end if 3109 string_len(9)=strlen(multi_legend(9)) 3110 if (.not. isvar("name_legend_11")) 3111 multi_legend(10)=" "+parameter(123) 3112 else 3113 multi_legend(10)=" "+name_legend_11 3114 end if 3115 string_len(10)=strlen(multi_legend(10)) 3116 if (.not. isvar("name_legend_12")) 3117 multi_legend(11)=" "+parameter(127) 3118 else 3119 multi_legend(11)=" "+name_legend_12 3120 end if 3121 string_len(11)=strlen(multi_legend(11)) 3122 do ml=1,no_files 3123 multi_dash(ml-1)=ml-1 3124 end do 3125 delete(plot) 3126 plot = new(dim,graphic) 3127 do pl=0,n-1 3128 plot0 = new(1,graphic) 3129 res@trXMinF = min(min_nof(:,pl)) 3130 res@trXMaxF = max(max_nof(:,pl)) 3131 res@gsnLeftString = name(0,pl) 3132 res@gsnRightString = unit_(0,pl) 3133 3134 plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res) 3135 3136 ; *************************************************** 3137 ; legend for combined plot 3138 ; *************************************************** 3139 3140 lgres = True 3141 lgMonoDashIndex = False 3142 lgres@lgLabelFont = "helvetica" 3143 lgres@lgLabelFontHeightF = .2 3144 lgres@vpWidthF = max(string_len)*0.012 3145 lgres@vpHeightF = 0.04*no_files 3146 lgres@lgDashIndexes = multi_dash(no_files-1:0) 3147 lbid = gsn_create_legend(wks,no_files,multi_legend(no_files-1:0),lgres) 3148 3149 amres = True 3150 amres@amParallelPosF = max(string_len)*0.01+0.78 3151 amres@amOrthogonalPosF = -0.0315*no_files+0.431 3152 annoid1 = gsn_add_annotation(plot0,lbid,amres) 3153 3154 do plo=0,no_files-1 3155 overlay(plot0,multi_plot(plo,pl)) 3156 plot(pl)=plot0 3157 end do 3158 delete(plot0) 3159 end do 3160 end if 2444 3161 2445 3162 if (count_var .EQ. 0) then … … 2527 3244 end if 2528 3245 2529 if (check) 2530 2531 if (prof3d .EQ. 1) then 2532 2533 end if 2534 3246 if (check)then 3247 2535 3248 if (prof3d .EQ. 0) then 2536 z = f->$vNam(varn+1)$ 2537 else 2538 z = z_v(varn,:) 2539 end if 3249 if (logy .EQ. 1) then 3250 z = f->$vNam(varn+1)$(1:dimz-1) 3251 else 3252 z = f->$vNam(varn+1)$ 3253 end if 3254 else 3255 do i=0,b-1 3256 if (isStrSubset( a(i),"zu_3d" ))then 3257 z_v(varn,:) = z_u 3258 if (logy .EQ. 1) then 3259 z = z_v(varn,1:dimz-1) 3260 else 3261 z = z_v(varn,:) 3262 end if 3263 else 3264 if (isStrSubset( a(i),"zw_3d" ))then 3265 z_v(varn,:) = z_w 3266 if (logy .EQ. 1) then 3267 z = z_v(varn,1:dimz-1) 3268 else 3269 z = z_v(varn,:) 3270 end if 3271 end if 3272 end if 3273 end do 3274 end if 3275 3276 z=z/norm 2540 3277 2541 3278 res@gsnLeftString = vNam(varn) … … 2584 3321 else 2585 3322 res@trXMaxF = xe 2586 end if 2587 if (vNam(varn) .EQ. "w") then 2588 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) 2589 else 2590 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 2591 end if 3323 end if 3324 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2592 3325 2593 3326 ; *************************************************** … … 2641 3374 end if 2642 3375 2643 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)3376 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2644 3377 2645 3378 ; *************************************************** … … 2692 3425 end if 2693 3426 2694 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)3427 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2695 3428 2696 3429 ; *************************************************** … … 2744 3477 end if 2745 3478 2746 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)3479 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2747 3480 2748 3481 ; *************************************************** … … 2795 3528 end if 2796 3529 2797 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _u,res)3530 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2798 3531 2799 3532 ; *************************************************** … … 2847 3580 end if 2848 3581 2849 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3582 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2850 3583 2851 3584 ; *************************************************** … … 2898 3631 end if 2899 3632 2900 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3633 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2901 3634 2902 3635 ; *************************************************** … … 2949 3682 end if 2950 3683 2951 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3684 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 2952 3685 2953 3686 ; *************************************************** … … 3000 3733 end if 3001 3734 3002 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3735 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3003 3736 3004 3737 ; *************************************************** … … 3051 3784 end if 3052 3785 3053 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3786 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3054 3787 3055 3788 ; *************************************************** … … 3102 3835 end if 3103 3836 3104 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3837 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3105 3838 3106 3839 ; *************************************************** … … 3153 3886 end if 3154 3887 3155 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3888 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3156 3889 3157 3890 ; *************************************************** … … 3204 3937 end if 3205 3938 3206 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3939 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3207 3940 3208 3941 ; *************************************************** … … 3255 3988 end if 3256 3989 3257 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)3990 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3258 3991 3259 3992 ; *************************************************** … … 3307 4040 end if 3308 4041 3309 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)4042 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3310 4043 3311 4044 ; *************************************************** … … 3359 4092 end if 3360 4093 3361 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z _w,res)4094 plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 3362 4095 3363 4096 ; *************************************************** … … 3414 4147 if (.not. isvar("var")) then 3415 4148 if (parameter(21) .NE. "variables") then 3416 var=parameter(21) 4149 var=parameter(21) 3417 4150 check = isStrSubset( var,","+vNam(varn)+"," ) 3418 4151 end if … … 3421 4154 end if 3422 4155 3423 if (check) 3424 4156 if (check)then 4157 3425 4158 if (prof3d .EQ. 0) then 3426 z = f->$vNam(varn+1)$ 3427 else 3428 z = z_v(varn,:) 3429 end if 3430 4159 if (logy .EQ. 1) then 4160 z = f->$vNam(varn+1)$(1:dimz-1) 4161 else 4162 z = f->$vNam(varn+1)$ 4163 end if 4164 else 4165 do i=0,b-1 4166 if (isStrSubset( a(i),"zu_3d" ))then 4167 z_v(varn,:) = z_u 4168 if (logy .EQ. 1) then 4169 z = z_v(varn,1:dimz-1) 4170 else 4171 z = z_v(varn,:) 4172 end if 4173 else 4174 if (isStrSubset( a(i),"zw_3d" ))then 4175 z_v(varn,:) = z_w 4176 if (logy .EQ. 1) then 4177 z = z_v(varn,1:dimz-1) 4178 else 4179 z = z_v(varn,:) 4180 end if 4181 end if 4182 end if 4183 end do 4184 end if 4185 4186 z=z/norm 4187 3431 4188 com=isStrSubset( c_var,","+vNam(varn)+"," ) 3432 4189 3433 if (com) 4190 if (com)then 3434 4191 co = co+1 3435 4192 if (n_o .EQ. 1) then 3436 res@xyDashPattern = 1 3437 4193 res@xyDashPattern = 1 3438 4194 else 3439 4195 if (n_o .EQ. 2) then … … 3441 4197 else 3442 4198 res@xyDashPattern = 0 3443 res@gsnLeftString = c_var4199 res@gsnLeftString = "Combined Plot of "+c_var 3444 4200 res@gsnRightString = unit(varn) 3445 4201 if (.not. isvar("xs")) then … … 3478 4234 overlay(plot_o(0),plot_o(1)) 3479 4235 else 3480 print("'c_var' is not conform with existing variables on the input file") 4236 if (.not. isvar("var") .AND. parameter(21) .EQ. "variables") then 4237 print(" ") 4238 print("'c_var'(= "+c_var+") is not conform with existing variables on the input file") 4239 print(" ") 4240 else 4241 print(" ") 4242 print("'c_var'(= "+c_var+") must include two variables of the general plots ('var' = "+var+")") 4243 print(" ") 4244 end if 3481 4245 end if 3482 4246 end if … … 3486 4250 overlay(plot_o(0),plot_o(2)) 3487 4251 else 3488 print("'c_var' is not conform with existing variables on the input file") 4252 if (.not. isvar("var") .AND. parameter(21) .EQ. "variables") then 4253 print(" ") 4254 print("'c_var'(= "+c_var+") is not conform with existing variables on the input file") 4255 print(" ") 4256 else 4257 print(" ") 4258 print("'c_var'(= "+c_var+") must include three variables of the general plots ('var' = "+var+")") 4259 print(" ") 4260 end if 3489 4261 end if 3490 4262 end if … … 3522 4294 3523 4295 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 3524 gsn_panel(wks,plot_ (0:n-1),(/n,1/),resP)4296 gsn_panel(wks,plot_,(/n,1/),resP) 3525 4297 else 3526 4298 do i = 0,n-1, no_lines*no_columns -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r174 r175 10 10 ; *************************************************** 11 11 12 if (isfilepresent(" .ncl_preferences")) then13 parameter = asciiread(" .ncl_preferences",77,"string")12 if (isfilepresent("~/.ncl_preferences")) then 13 parameter = asciiread("~/.ncl_preferences",129,"string") 14 14 delete(parameter@_FillValue) 15 15 else 16 print(" ") 17 print("'.ncl_preferences' is not existent") 18 print(" ") 19 exit 16 if (isfilepresent("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences")) then 17 parameter = asciiread("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences",129,"string") 18 delete(parameter@_FillValue) 19 else 20 print(" ") 21 print("'.ncl_preferences' is not present in '~/palm/current_version/trunk/SRIPTS/NCL/'") 22 print(" ") 23 exit 24 end if 20 25 end if 21 26 … … 24 29 ; *************************************************** 25 30 26 if ( .not. isvar("file_ in") ) then ; path+name of input file27 if (parameter(7) .EQ. " input file") then28 print(" ") 29 print("Please provide input file 'file_in =' either in prompt or parameter_list")31 if ( .not. isvar("file_1") ) then 32 if (parameter(7) .EQ. "File in") then 33 print(" ") 34 print("Please provide 1st input file 'file_1=' either in prompt or parameter_list") 30 35 print(" ") 31 36 exit 32 37 else 33 38 file_in = parameter(7) 34 end if 35 end if 36 if ( .not. isvar("format_out") ) then ; format of output file 39 end if 40 else 41 file_in = file_1 42 end if 43 if (.not. isfilepresent(file_in)) then 44 print(" ") 45 print("Your 1st input file: '"+file_in+"' does not exist") 46 print(" ") 47 exit 48 end if 49 50 if ( .not. isvar("format_out") ) then 37 51 format_out = "x11" 38 52 if (parameter(9) .NE. "x11") then 39 53 format_out = parameter(9) 54 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 55 print(" ") 56 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 57 print(" ") 58 end if 40 59 end if 41 end if 60 else 61 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 62 print(" ") 63 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 64 print(" ") 65 end if 66 end if 67 42 68 if ( .not. isvar("file_out") ) then ; path+name of output file 43 69 file_out = "test" … … 46 72 end if 47 73 end if 74 48 75 if ( .not. isvar("no_columns") ) then ; number of plots in one row 49 76 no_columns = 1 … … 52 79 end if 53 80 end if 81 54 82 if ( .not. isvar("no_lines") ) then ; number of plot-lines on one sheet 55 83 no_lines = 2 … … 58 86 end if 59 87 end if 88 60 89 if ( .not. isvar("var") ) then ; variable name 61 90 check = True 62 91 end if 92 63 93 if ( .not. isvar("over") ) then ; switches overlaying plots on 64 94 over = 0 … … 67 97 if (stringtointeger(parameter(37)) .NE. 1) then 68 98 print(" ") 69 print(" Please set 'over' to 0 or 1")70 print(" ") 71 exit99 print("Your 'over'= "+over+" is invalid and set to 0") 100 print(" ") 101 over = 0 72 102 end if 73 103 end if 74 end if 75 104 else 105 if (over .NE. 0 .AND. over .NE. 1)then 106 print(" ") 107 print("Your 'over'= "+over+" is invalid and set to 0") 108 print(" ") 109 over = 0 110 end if 111 end if 112 76 113 ; *************************************************** 77 114 ; open input file … … 220 257 delete(end_time_step) 221 258 end_time_step=round(et,3) 259 260 print(" ") 261 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) 262 print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) 263 print(" ") 222 264 223 265 t = f->time(start_time_step:end_time_step) … … 477 519 if (count_var .EQ. 0) then 478 520 print(" ") 479 print("Please select a variable 'var=' or use the default value") 480 print(" ") 481 print("Your selection '"+var+"' does not exist on the input file") 521 print("The variables 'var=°"+var+"°' do not exist on your input file") 482 522 print(" ") 483 523 exit 484 end if 524 end if 485 525 486 526 do varn = dim-1,0,1 … … 500 540 501 541 if(check) then 542 543 if (isStrSubset(vNam(varn),"_0" ))then 544 print(" ") 545 print("If you have Outputs of statistic regions you cannot overlay variables; 'over' is set to 0") 546 print(" ") 547 over = 0 548 end if 502 549 503 550 if (over .EQ. 1) then
Note: See TracChangeset
for help on using the changeset viewer.