Changeset 4411 for palm/trunk
- Timestamp:
- Feb 18, 2020 2:28:02 PM (5 years ago)
- Location:
- palm/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/.palm.iofiles
r4400 r4411 85 85 PARTICLE_DATA* out:lnpe * $base_data/$run_identifier/OUTPUT _prt_dat 86 86 # 87 WTM_OUTPUT_DATA* out:tr * $base_data/$run_identifier/MONITORING _wtm 87 #WTM_OUTPUT_DATA* out:tr * $base_data/$run_identifier/MONITORING _wtm 88 DATA_1D_TS_WTM_NETCDF* out:tr * $fast_io_catalog/$run_identifier/OUTPUT _wtm nc -
palm/trunk/SCRIPTS/palmrungui
r4405 r4411 25 25 # ----------------- 26 26 # $Id$ 27 # Added new features: individual tag for submitted runs, automatic finding of 28 # configuration, start of palmbuild from GUI 29 # 30 # 4405 2020-02-12 19:11:11Z maronga 27 31 # Major revisions: New layout. Merged with palm job manager (palm_jm). 28 32 # Minor revisions: Misc. bugs fixed. … … 127 131 self.load_jobs() 128 132 133 # look up configuration files and add to combo box 134 135 self.group_execution.findChild(QtGui.QComboBox,"combo_configuration").addItem("") 136 137 for files in os.listdir(palm_dir): 138 if files.startswith(".palm.config"): 139 tmpstring = filter(None,files.split(".palm.config."))[0] 140 self.group_execution.findChild(QtGui.QComboBox,"combo_configuration").addItem(tmpstring) 141 129 142 commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline") 130 143 commandline.setText("") … … 154 167 155 168 169 156 170 157 171 QtGui.QApplication.processEvents() … … 166 180 167 181 # Check for empty line 168 palmrunline_save = palmrunline ;182 palmrunline_save = palmrunline 169 183 if (userline != ""): 170 184 palmrunline = "%s %s" % (palmrunline,userline) … … 174 188 self.tabWidget.setEnabled(False) 175 189 self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 190 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(False) 176 191 self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...") 177 192 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmrun in xterm...") … … 195 210 196 211 mString = "xterm %s" % (palmrunline) 197 palmrun.start(mString) ;212 palmrun.start(mString) 198 213 199 214 if( palmrun.waitForStarted() is False ): … … 201 216 202 217 # Wait until palmrun has finished or wait for 200 minutes 203 palmrun.waitForFinished(3600000) ;218 palmrun.waitForFinished(3600000) 204 219 205 220 # Jobs has been submitted or aborted. Continuing... … … 207 222 filename = "%s/.palmrungui.history" % (palm_dir) 208 223 tmstamp = strftime("%Y/%m/%d %H:%M") 224 tag = str(self.groupBox.findChild(QtGui.QLineEdit,"line_tag").text()) 209 225 210 226 file = open(filename,"a") 211 s = "%s %s \n" % (tmstamp,history_line)227 s = "%s %s (%s)\n" % (tmstamp,history_line,tag) 212 228 file.write(s) 213 229 file.close() … … 216 232 self.tabWidget.setEnabled(True) 217 233 self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 218 self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("Start palmrun") 219 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save); 234 self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("palmrun") 235 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save) 236 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 220 237 221 238 # Reload recent jobs … … 223 240 224 241 242 243 # starts xterm with palmbuild commandline 244 ####################################### 245 def startpalmbuild(self): 246 palmbuildline = 'palmbuild -c ' + str(self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").currentText()) 247 248 # Disable the main window 249 self.tabWidget.setEnabled(False) 250 self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 251 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(False) 252 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmbuild in xterm...") 253 254 # Wait until all commands have been executed (ugly) ? 255 #for i in range(0,21): 256 # qApp->processEvents() 257 258 # Start xterm as QProcess 259 palmbuild = QProcess() 260 palmbuild.setProcessChannelMode(QProcess.MergedChannels) # mergedChannels 261 palmbuild.setWorkingDirectory(palm_dir) 262 263 geomet = self.frameGeometry() 264 265 posx = geomet.x()+geomet.width() 266 posy = geomet.y() 267 268 s = " -title \"Executing palmbuild...\" -fa \"Monospace\" -fs 11 -geometry \"80x38+%d+%d\" -e \"" % (posx,posy) 269 palmbuildline = "%s%s;echo -n '--> Press enter to continue...';read yesno\"</dev/stdin" % (s, palmbuildline.replace("\"","\'")) 270 271 mString = "xterm %s" % (palmbuildline) 272 palmbuild.start(mString) 273 274 if( palmbuild.waitForStarted() is False ): 275 return 276 277 # Wait until palmbuild has finished or wait for 200 minutes 278 palmbuild.waitForFinished(3600000) 279 280 281 282 # Enable main window again 283 self.tabWidget.setEnabled(True) 284 self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 285 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 286 287 # Reload recent jobs 288 self.recent_jobs(50) 289 225 290 # loads recent jobs 226 291 ###################################### … … 235 300 history = file.readlines() 236 301 tmphistory = list() 237 file.close(); 238 j = 0; 302 tmptag = list() 303 file.close() 304 j = 0 239 305 240 306 list_jobname = self.group_history.findChild(QtGui.QListWidget,"list_jobname") … … 247 313 timestamp = history[i][:16] 248 314 listitem = history[i][17:len(history[i])-1] 315 tagitem = listitem 249 316 matchitems = list_jobname.findItems(listitem, QtCore.Qt.MatchExactly) 250 317 … … 252 319 listitem = filter(None,listitem.split(" -r"))[1] 253 320 listitem = filter(None,listitem.split(" -"))[0] 254 listitem = listitem.replace(" ",""); 255 list_jobname.addItem(listitem); 256 s = "%s (%s)" % (listitem,timestamp) 257 tmphistory.append(s); 321 listitem = listitem.replace(" ","") 322 list_jobname.addItem(listitem) 323 s = "%s: %s" % (timestamp,listitem) 324 tmphistory.append(s) 325 326 327 tagitem = filter(None,tagitem.split(" ("))[1] 328 tagitem = tagitem.replace(")","") 329 if ( len(tagitem) == 0 ): 330 s = "Tag: empty" 331 else: 332 s = "Tag: %s" % (tagitem) 333 tmptag.append(s) 258 334 count = count +1 335 259 336 j = j+1 260 337 … … 264 341 265 342 # Send to list 266 list_jobname.clear() ;343 list_jobname.clear() 267 344 268 345 i=0 269 346 while i<len(tmphistory): 270 list_jobname.addItem(tmphistory[i]); 347 list_jobname.addItem(tmphistory[i]) 348 list_jobname.item(i).setToolTip(tmptag[i]) 271 349 i = i+1 272 350 … … 291 369 filename = str(list_jobname.currentItem().text()) 292 370 293 timestamp = filename[ len(filename)-17:][:16]294 jobname = filename[ :len(filename) - 19];295 371 timestamp = filename[:16] 372 jobname = filename[18:] 373 296 374 itemint = list_jobname.currentRow() 297 375 … … 301 379 302 380 # Set selected item to jobname 303 list_jobname.item(itemint).setSelected(True) ;381 list_jobname.item(itemint).setSelected(True) 304 382 305 383 # Set selected item to jobname in "available jobs" list 306 384 item2int = self.list_jobs.findItems(jobname,QtCore.Qt.MatchCaseSensitive) 307 self.list_jobs.setCurrentItem(item2int[0]) 385 386 if ( item2int != [] ): 387 self.list_jobs.setCurrentItem(item2int[0]) 308 388 self.update_input() 389 309 390 310 391 fileDir = "%s/.palmrungui.history" % (palm_dir) … … 312 393 history = file.readlines() 313 394 tmphistory = list() 314 file.close() ;395 file.close() 315 396 316 397 i = len(history) … … 319 400 listitem = filter(None,listitem.split(" -r"))[1] 320 401 listitem = filter(None,listitem.split(" -"))[0] 321 listitem = listitem.replace(" ","") ;402 listitem = listitem.replace(" ","") 322 403 323 404 # Select command line with correct timestamp and jobname … … 326 407 palmrunline = palmrunline[17:] 327 408 palmrunline = palmrunline[:len(palmrunline)-1] 328 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline); 329 self.setup_gui(palmrunline); 330 self.list_jobname.item(itemint).setSelected(True); 409 palmrunline = filter(None,palmrunline.split("("))[0] 410 self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline) 411 412 413 tag = history[i-1].split('\n')[0] 414 tag = filter(None,tag.split("("))[1] 415 tag = tag.replace(")","") 416 417 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setText(tag) 418 self.setup_gui(palmrunline) 419 self.list_jobname.item(itemint).setSelected(True) 331 420 332 421 return … … 389 478 self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 390 479 self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True) 480 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 391 481 392 482 elif ( param[0] == ""): … … 396 486 self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False) 397 487 self.group_advanced.setEnabled(False) 488 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 398 489 self.delete_commandline("r") 399 490 self.change_commandline("a","remove") … … 504 595 self.button_start.setEnabled(True) 505 596 self.action_save.setEnabled(True) 597 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 506 598 507 599 # Change in any other parameter … … 528 620 ################################################################################### 529 621 def change_lineinput(self): 530 if ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit, "line_host") ): 531 tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_host").text() 532 self.change_commandline("c",tmptext) 622 if ( self.sender() == self.group_execution.findChild(QtGui.QComboBox, "combo_configuration") ): 623 tmptext = self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").currentText() 624 if tmptext.isEmpty(): 625 self.change_commandline("c"," ") 626 self.group_execution.findChild(QtGui.QPushButton,'button_palmbuild').setEnabled(False) 627 else: 628 self.change_commandline("c",tmptext) 629 self.group_execution.findChild(QtGui.QPushButton,'button_palmbuild').setEnabled(True) 533 630 534 631 elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_q")): … … 819 916 820 917 elif ( parameter == "c"): 821 self.group_execution.findChild(QtGui.QLineEdit,"line_host").setText(options) 822 918 tmpindex = self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").findText(options,QtCore.Qt.MatchExactly) 919 if tmpindex != -1: 920 self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").setCurrentIndex(tmpindex) 921 else: 922 self.group_execution.findChild(QtGui.QComboBox, "combo_configuration").setCurrentIndex(0) 823 923 elif ( parameter == "q"): 824 924 self.group_execution.findChild(QtGui.QLineEdit,"line_q").setText(options) … … 975 1075 self.group_advanced.setEnabled(False) 976 1076 self.check_advanced.setEnabled(False) 1077 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(False) 977 1078 978 1079 else: … … 982 1083 self.group_execution.findChild(QtGui.QComboBox, "drop_job").setEnabled(True) 983 1084 self.group_advanced.setEnabled(True) 1085 self.groupBox.findChild(QtGui.QLineEdit,"line_tag").setEnabled(True) 984 1086 985 1087 self.tabWidget.setCurrentIndex(0) … … 1053 1155 1054 1156 list_of_files = os.listdir(job_dir) 1055 1157 1158 1056 1159 for i in range(0,len(list_of_files)): 1057 1160 tmp_file = job_dir + "/" + list_of_files[i] 1058 1161 1059 1162 if ( os.path.isdir(tmp_file) ): 1060 self.list_jobs.addItem(str(list_of_files[i])) 1163 self.list_jobs.addItem(str(list_of_files[i])) 1164 1061 1165 1062 1166 … … 1310 1414 selection = self.list_output.selectedItems() 1311 1415 1312 print("test")1313 1416 if ( len(selection) != 0 ): 1314 1417 -
palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
r4405 r4411 160 160 </property> 161 161 </widget> 162 <widget class="QLineEdit" name="line_tag"> 163 <property name="enabled"> 164 <bool>false</bool> 165 </property> 166 <property name="geometry"> 167 <rect> 168 <x>430</x> 169 <y>20</y> 170 <width>351</width> 171 <height>20</height> 172 </rect> 173 </property> 174 <property name="text"> 175 <string/> 176 </property> 177 </widget> 178 <widget class="QLabel" name="label_22"> 179 <property name="geometry"> 180 <rect> 181 <x>340</x> 182 <y>20</y> 183 <width>81</width> 184 <height>21</height> 185 </rect> 186 </property> 187 <property name="text"> 188 <string>Custom tag:</string> 189 </property> 190 <property name="alignment"> 191 <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set> 192 </property> 193 </widget> 162 194 </widget> 163 195 <widget class="QTabWidget" name="tabWidget"> … … 219 251 <rect> 220 252 <x>310</x> 221 <y> 80</y>253 <y>50</y> 222 254 <width>111</width> 223 255 <height>21</height> … … 235 267 <rect> 236 268 <x>230</x> 237 <y> 75</y>269 <y>50</y> 238 270 <width>71</width> 239 271 <height>21</height> … … 257 289 </property> 258 290 <property name="text"> 259 <string />291 <string>10240</string> 260 292 </property> 261 293 </widget> … … 286 318 </property> 287 319 <property name="text"> 288 <string />320 <string>100</string> 289 321 </property> 290 322 </widget> … … 360 392 </property> 361 393 <property name="text"> 362 <string />394 <string>432000</string> 363 395 </property> 364 396 </widget> … … 380 412 <property name="alignment"> 381 413 <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set> 382 </property>383 </widget>384 <widget class="QLineEdit" name="line_host">385 <property name="geometry">386 <rect>387 <x>100</x>388 <y>80</y>389 <width>101</width>390 <height>20</height>391 </rect>392 </property>393 <property name="text">394 <string/>395 414 </property> 396 415 </widget> … … 501 520 <property name="geometry"> 502 521 <rect> 503 <x> 100</x>504 <y>5 0</y>505 <width> 251</width>506 <height>2 5</height>522 <x>60</x> 523 <y>55</y> 524 <width>191</width> 525 <height>21</height> 507 526 </rect> 508 527 </property> … … 529 548 <item> 530 549 <property name="text"> 531 <string>Initial run (coupled atmosphere ocean)</string>550 <string>Initial run (coupled)</string> 532 551 </property> 533 552 </item> 534 553 <item> 535 554 <property name="text"> 536 <string>Restart run (coupled atmosphere ocean)</string>555 <string>Restart run (coupled)</string> 537 556 </property> 538 557 </item> … … 566 585 <property name="geometry"> 567 586 <rect> 568 <x> 0</x>587 <x>10</x> 569 588 <y>55</y> 570 <width> 91</width>589 <width>41</width> 571 590 <height>16</height> 572 591 </rect> … … 621 640 <property name="scaledContents"> 622 641 <bool>true</bool> 642 </property> 643 </widget> 644 <widget class="QPushButton" name="button_palmbuild"> 645 <property name="geometry"> 646 <rect> 647 <x>310</x> 648 <y>80</y> 649 <width>111</width> 650 <height>21</height> 651 </rect> 652 </property> 653 <property name="text"> 654 <string>(re-)build</string> 655 </property> 656 </widget> 657 <widget class="QComboBox" name="combo_configuration"> 658 <property name="geometry"> 659 <rect> 660 <x>100</x> 661 <y>80</y> 662 <width>201</width> 663 <height>21</height> 664 </rect> 623 665 </property> 624 666 </widget> … … 1484 1526 <tabstops> 1485 1527 <tabstop>drop_job</tabstop> 1486 <tabstop>line_host</tabstop>1487 1528 <tabstop>line_q</tabstop> 1488 1529 <tabstop>line_pe</tabstop> … … 1557 1598 <hints> 1558 1599 <hint type="sourcelabel"> 1559 <x>2 38</x>1560 <y> 406</y>1600 <x>202</x> 1601 <y>515</y> 1561 1602 </hint> 1562 1603 <hint type="destinationlabel"> … … 1573 1614 <hints> 1574 1615 <hint type="sourcelabel"> 1575 <x>2 76</x>1576 <y> 406</y>1616 <x>240</x> 1617 <y>515</y> 1577 1618 </hint> 1578 1619 <hint type="destinationlabel"> … … 1589 1630 <hints> 1590 1631 <hint type="sourcelabel"> 1591 <x> 78</x>1592 <y> 514</y>1632 <x>82</x> 1633 <y>630</y> 1593 1634 </hint> 1594 1635 <hint type="destinationlabel"> … … 1605 1646 <hints> 1606 1647 <hint type="sourcelabel"> 1607 <x>8 2</x>1608 <y> 534</y>1648 <x>86</x> 1649 <y>650</y> 1609 1650 </hint> 1610 1651 <hint type="destinationlabel"> … … 1621 1662 <hints> 1622 1663 <hint type="sourcelabel"> 1623 <x>6 3</x>1624 <y> 554</y>1664 <x>67</x> 1665 <y>670</y> 1625 1666 </hint> 1626 1667 <hint type="destinationlabel"> … … 1727 1768 </connection> 1728 1769 <connection> 1729 <sender>line_host</sender>1730 <signal>textEdited(QString)</signal>1731 <receiver>MainWindow</receiver>1732 <slot>change_lineinput()</slot>1733 <hints>1734 <hint type="sourcelabel">1735 <x>169</x>1736 <y>421</y>1737 </hint>1738 <hint type="destinationlabel">1739 <x>26</x>1740 <y>362</y>1741 </hint>1742 </hints>1743 </connection>1744 <connection>1745 1770 <sender>line_pe</sender> 1746 1771 <signal>textEdited(QString)</signal> … … 1749 1774 <hints> 1750 1775 <hint type="sourcelabel"> 1751 <x>1 66</x>1752 <y> 446</y>1776 <x>170</x> 1777 <y>570</y> 1753 1778 </hint> 1754 1779 <hint type="destinationlabel"> … … 1765 1790 <hints> 1766 1791 <hint type="sourcelabel"> 1767 <x>1 89</x>1768 <y> 471</y>1792 <x>193</x> 1793 <y>595</y> 1769 1794 </hint> 1770 1795 <hint type="destinationlabel"> … … 1781 1806 <hints> 1782 1807 <hint type="sourcelabel"> 1783 <x> 398</x>1784 <y> 422</y>1808 <x>402</x> 1809 <y>515</y> 1785 1810 </hint> 1786 1811 <hint type="destinationlabel"> … … 1797 1822 <hints> 1798 1823 <hint type="sourcelabel"> 1799 <x>42 1</x>1800 <y> 471</y>1824 <x>425</x> 1825 <y>595</y> 1801 1826 </hint> 1802 1827 <hint type="destinationlabel"> … … 1813 1838 <hints> 1814 1839 <hint type="sourcelabel"> 1815 <x> 396</x>1816 <y> 447</y>1840 <x>400</x> 1841 <y>570</y> 1817 1842 </hint> 1818 1843 <hint type="destinationlabel"> … … 2053 2078 <hints> 2054 2079 <hint type="sourcelabel"> 2055 <x>18 1</x>2056 <y> 352</y>2080 <x>185</x> 2081 <y>485</y> 2057 2082 </hint> 2058 2083 <hint type="destinationlabel"> … … 2085 2110 <hints> 2086 2111 <hint type="sourcelabel"> 2087 <x>27 2</x>2088 <y> 572</y>2112 <x>276</x> 2113 <y>690</y> 2089 2114 </hint> 2090 2115 <hint type="destinationlabel"> … … 2117 2142 <hints> 2118 2143 <hint type="sourcelabel"> 2119 <x>17 4</x>2120 <y> 592</y>2144 <x>178</x> 2145 <y>710</y> 2121 2146 </hint> 2122 2147 <hint type="destinationlabel"> … … 2149 2174 <hints> 2150 2175 <hint type="sourcelabel"> 2151 <x> 762</x>2152 <y> 687</y>2176 <x>692</x> 2177 <y>710</y> 2153 2178 </hint> 2154 2179 <hint type="destinationlabel"> … … 2165 2190 <hints> 2166 2191 <hint type="sourcelabel"> 2167 <x> 622</x>2168 <y> 687</y>2192 <x>552</x> 2193 <y>710</y> 2169 2194 </hint> 2170 2195 <hint type="destinationlabel"> … … 2181 2206 <hints> 2182 2207 <hint type="sourcelabel"> 2183 <x>9 62</x>2184 <y>4 12</y>2208 <x>932</x> 2209 <y>452</y> 2185 2210 </hint> 2186 2211 <hint type="destinationlabel"> … … 2267 2292 <x>1182</x> 2268 2293 <y>495</y> 2294 </hint> 2295 </hints> 2296 </connection> 2297 <connection> 2298 <sender>button_start</sender> 2299 <signal>clicked()</signal> 2300 <receiver>MainWindow</receiver> 2301 <slot>startpalmbuild()</slot> 2302 <hints> 2303 <hint type="sourcelabel"> 2304 <x>106</x> 2305 <y>756</y> 2306 </hint> 2307 <hint type="destinationlabel"> 2308 <x>-3</x> 2309 <y>672</y> 2310 </hint> 2311 </hints> 2312 </connection> 2313 <connection> 2314 <sender>button_palmbuild</sender> 2315 <signal>clicked()</signal> 2316 <receiver>MainWindow</receiver> 2317 <slot>startpalmbuild()</slot> 2318 <hints> 2319 <hint type="sourcelabel"> 2320 <x>342</x> 2321 <y>552</y> 2322 </hint> 2323 <hint type="destinationlabel"> 2324 <x>1182</x> 2325 <y>748</y> 2326 </hint> 2327 </hints> 2328 </connection> 2329 <connection> 2330 <sender>combo_configuration</sender> 2331 <signal>currentIndexChanged(QString)</signal> 2332 <receiver>MainWindow</receiver> 2333 <slot>change_lineinput()</slot> 2334 <hints> 2335 <hint type="sourcelabel"> 2336 <x>134</x> 2337 <y>547</y> 2338 </hint> 2339 <hint type="destinationlabel"> 2340 <x>1183</x> 2341 <y>538</y> 2269 2342 </hint> 2270 2343 </hints> … … 2298 2371 <slot>openmenuoutput()</slot> 2299 2372 <slot>openmenumonitoring()</slot> 2373 <slot>startpalmbuild()</slot> 2300 2374 </slots> 2301 2375 </ui> -
palm/trunk/SOURCE/Makefile
r4400 r4411 25 25 # ----------------- 26 26 # $Id$ 27 # Added output routines for WTM 28 # 29 # 4400 2020-02-10 20:32:41Z suehring 27 30 # Add dependency for data-output module 28 31 # … … 1292 1295 basic_constants_and_equations_mod.o \ 1293 1296 cpulog_mod.o \ 1297 data_output_module.o \ 1294 1298 mod_kinds.o \ 1295 1299 modules.o -
palm/trunk/SOURCE/module_interface.f90
r4407 r4411 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output routines for WTM 28 ! 29 ! 4407 2020-02-13 20:31:44Z knoop 27 30 ! Changed program_debug_output_unit to 9 in dom_init call 28 31 ! … … 514 517 ONLY: wtm_parin, & 515 518 wtm_check_parameters, & 519 wtm_init, & 516 520 wtm_init_arrays, & 517 wtm_init ,&521 wtm_init_output, & 518 522 wtm_actions, & 519 523 wtm_rrd_global, & … … 1121 1125 !-- Define module-specific output quantities 1122 1126 IF ( virtual_measurement ) CALL vm_init_output 1127 IF ( wind_turbine ) CALL wtm_init_output 1123 1128 ! 1124 1129 !-- Leave output-definition state -
palm/trunk/SOURCE/wind_turbine_model_mod.f90
r4360 r4411 8 8 ! version. 9 9 ! 10 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY 10 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANYr 11 11 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 12 12 ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added output in NetCDF format using DOM (only netcdf4-parallel is supported). 29 ! Old ASCII output is still available at the moment. 30 ! 31 ! 4360 2020-01-07 11:25:50Z suehring 28 32 ! Introduction of wall_flags_total_0, which currently sets bits based on static 29 33 ! topography information used in wall_flags_static_0 … … 111 115 ONLY: coupling_char, & 112 116 debug_output, & 113 dt_3d, dz, message_string, simulated_time,&114 wind_turbine, initializing_actions 117 dt_3d, dz, end_time, message_string, time_since_reference_point,& 118 wind_turbine, initializing_actions, origin_date_time 115 119 116 120 USE cpulog, & 117 121 ONLY: cpu_log, log_point_s 118 122 123 USE data_output_module 124 119 125 USE grid_variables, & 120 126 ONLY: ddx, dx, ddy, dy … … 133 139 PRIVATE 134 140 141 142 143 CHARACTER(LEN=100) :: variable_name !< name of output variable 144 CHARACTER(LEN=30) :: nc_filename 145 135 146 ! 136 147 !-- Variables specified in the namelist wind_turbine_par … … 139 150 INTEGER(iwp) :: nturbines = 1 !< number of turbines 140 151 152 153 154 REAL(wp), DIMENSION(:), POINTER :: output_values_1d_pointer !< pointer for 2d output array 155 REAL(wp), POINTER :: output_values_0d_pointer !< pointer for 2d output array 156 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: output_values_1d_target !< pointer for 2d output array 157 REAL(wp), TARGET :: output_values_0d_target !< pointer for 2d output array 158 141 159 LOGICAL :: pitch_control = .FALSE. !< switch for use of pitch controller 142 160 LOGICAL :: speed_control = .FALSE. !< switch for use of speed controller 143 161 LOGICAL :: yaw_control = .FALSE. !< switch for use of yaw controller 144 162 LOGICAL :: tl_cor = .FALSE. !< switch for use of tip loss correct. 145 163 164 LOGICAL :: initial_write_coordinates = .FALSE. 165 166 REAL(wp) :: dt_wtm = 1.0_wp 167 146 168 REAL(wp) :: segment_length = 1.0_wp !< length of the segments, the rotor area is divided into 147 169 !< (in tangential direction, as factor of MIN(dx,dy,dz)) … … 151 173 REAL(wp) :: tilt = 0.0_wp !< vertical tilt of the rotor [degree] ( positive = backwards ) 152 174 175 153 176 REAL(wp), DIMENSION(1:100) :: dtow = 0.0_wp !< tower diameter [m] 154 REAL(wp), DIMENSION(1:100) :: omega_rot = 0.9_wp !< inital or constant rotor speed [rad/s]177 REAL(wp), DIMENSION(1:100), TARGET :: omega_rot = 0.9_wp !< inital or constant rotor speed [rad/s] 155 178 REAL(wp), DIMENSION(1:100) :: phi_yaw = 0.0_wp !< yaw angle [degree] ( clockwise, 0 = facing west ) 156 179 REAL(wp), DIMENSION(1:100) :: pitch_add = 0.0_wp !< constant pitch angle … … 384 407 END INTERFACE wtm_check_parameters 385 408 409 INTERFACE wtm_data_output 410 MODULE PROCEDURE wtm_data_output 411 END INTERFACE wtm_data_output 412 386 413 INTERFACE wtm_init_arrays 387 414 MODULE PROCEDURE wtm_init_arrays … … 392 419 END INTERFACE wtm_init 393 420 421 INTERFACE wtm_init_output 422 MODULE PROCEDURE wtm_init_output 423 END INTERFACE wtm_init_output 424 394 425 INTERFACE wtm_actions 395 426 MODULE PROCEDURE wtm_actions … … 409 440 wtm_parin, & 410 441 wtm_check_parameters, & 442 wtm_data_output, & 411 443 wtm_init_arrays, & 444 wtm_init_output, & 412 445 wtm_init, & 413 446 wtm_actions, & … … 878 911 IMPLICIT NONE 879 912 913 914 880 915 INTEGER(iwp) :: i !< running index 881 916 INTEGER(iwp) :: j !< running index 882 917 INTEGER(iwp) :: k !< running index 883 918 919 884 920 ! 885 921 !-- Help variables for the smearing function … … 1255 1291 CALL wtm_read_blade_tables 1256 1292 1293 1294 1295 1296 1257 1297 IF ( debug_output ) CALL debug_message( 'wtm_init', 'end' ) 1258 1298 … … 1260 1300 1261 1301 1302 1303 SUBROUTINE wtm_init_output 1304 1305 1306 INTEGER(iwp) :: ntimesteps !< number of timesteps defined in NetCDF output file 1307 INTEGER(iwp) :: ntimesteps_max = 80000 !< number of maximum timesteps defined in NetCDF output file 1308 INTEGER(iwp) :: return_value !< returned status value of called function 1309 1310 INTEGER(iwp) :: n !< running index 1311 1312 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ndim !< dummy to write dimension 1313 1314 1315 ! 1316 !-- Create NetCDF output file 1317 nc_filename = 'DATA_1D_TS_WTM_NETCDF' // TRIM( coupling_char ) 1318 return_value = dom_def_file( nc_filename, 'netcdf4-parallel' ) 1319 1320 ntimesteps = MIN( CEILING( & 1321 ( end_time - MAX( time_turbine_on, time_since_reference_point )& 1322 ) / MAX( 0.1_wp, dt_wtm ) ), ntimesteps_max ) 1323 1324 1325 ! 1326 !-- Define dimensions in output file 1327 ALLOCATE( ndim(1:nturbines) ) 1328 DO n = 1, nturbines 1329 ndim(n) = n 1330 ENDDO 1331 return_value = dom_def_dim( nc_filename, & 1332 dimension_name = 'turbine', & 1333 output_type = 'int32', & 1334 bounds = (/1_iwp, nturbines/), & 1335 values_int32 = ndim ) 1336 DEALLOCATE( ndim ) 1337 1338 1339 ! 1340 !-- time 1341 return_value = dom_def_dim( nc_filename, & 1342 dimension_name = 'time', & 1343 output_type = 'real32', & 1344 bounds = (/1_iwp, ntimesteps/), & 1345 values_realwp = (/0.0_wp/) ) 1346 1347 1348 ! 1349 !-- x 1350 variable_name = 'x' 1351 return_value = dom_def_var( nc_filename, & 1352 variable_name = variable_name, & 1353 dimension_names = (/'turbine'/), & 1354 output_type = 'real32' ) 1355 ! 1356 !-- y 1357 variable_name = 'y' 1358 return_value = dom_def_var( nc_filename, & 1359 variable_name = variable_name, & 1360 dimension_names = (/'turbine'/), & 1361 output_type = 'real32' ) 1362 1363 variable_name = 'z' 1364 return_value = dom_def_var( nc_filename, & 1365 variable_name = variable_name, & 1366 dimension_names = (/'turbine'/), & 1367 output_type = 'real32' ) 1368 1369 1370 return_value = dom_def_att( nc_filename, & 1371 variable_name = 'time', & 1372 attribute_name = 'units', & 1373 value = 'seconds since ' // origin_date_time ) 1374 1375 return_value = dom_def_att( nc_filename, & 1376 variable_name = 'x', & 1377 attribute_name = 'units', & 1378 value = 'm' ) 1379 1380 return_value = dom_def_att( nc_filename, & 1381 variable_name = 'y', & 1382 attribute_name = 'units', & 1383 value = 'm' ) 1384 1385 return_value = dom_def_att( nc_filename, & 1386 variable_name = 'z', & 1387 attribute_name = 'units', & 1388 value = 'm' ) 1389 1390 return_value = dom_def_att( nc_filename, & 1391 variable_name = 'x', & 1392 attribute_name = 'long_name', & 1393 value = 'x location of rotor center' ) 1394 1395 return_value = dom_def_att( nc_filename, & 1396 variable_name = 'y', & 1397 attribute_name = 'long_name', & 1398 value = 'y location of rotor center' ) 1399 1400 return_value = dom_def_att( nc_filename, & 1401 variable_name = 'z', & 1402 attribute_name = 'long_name', & 1403 value = 'z location of rotor center' ) 1404 1405 1406 return_value = dom_def_att( nc_filename, & 1407 variable_name = 'turbine_name', & 1408 attribute_name = 'long_name', & 1409 value = 'turbine name') 1410 1411 return_value = dom_def_att( nc_filename, & 1412 variable_name = 'time', & 1413 attribute_name = 'standard_name', & 1414 value = 'time') 1415 1416 return_value = dom_def_att( nc_filename, & 1417 variable_name = 'time', & 1418 attribute_name = 'axis', & 1419 value = 'T') 1420 1421 return_value = dom_def_att( nc_filename, & 1422 variable_name = 'x', & 1423 attribute_name = 'axis', & 1424 value = 'X' ) 1425 1426 return_value = dom_def_att( nc_filename, & 1427 variable_name = 'y', & 1428 attribute_name = 'axis', & 1429 value = 'Y' ) 1430 1431 1432 variable_name = 'rotor_speed' 1433 return_value = dom_def_var( nc_filename, & 1434 variable_name = variable_name, & 1435 dimension_names = (/ 'turbine', 'time' /), & 1436 output_type = 'real32' ) 1437 1438 return_value = dom_def_att( nc_filename, & 1439 variable_name = variable_name, & 1440 attribute_name = 'units', & 1441 value = 'rad/s' ) 1442 1443 variable_name = 'generator_speed' 1444 return_value = dom_def_var( nc_filename, & 1445 variable_name = variable_name, & 1446 dimension_names = (/ 'turbine', 'time' /), & 1447 output_type = 'real32' ) 1448 1449 return_value = dom_def_att( nc_filename, & 1450 variable_name = variable_name, & 1451 attribute_name = 'units', & 1452 value = 'rad/s' ) 1453 1454 1455 variable_name = 'generator_torque' 1456 return_value = dom_def_var( nc_filename, & 1457 variable_name = variable_name, & 1458 dimension_names = (/ 'turbine', 'time' /), & 1459 output_type = 'real32' ) 1460 1461 return_value = dom_def_att( nc_filename, & 1462 variable_name = variable_name, & 1463 attribute_name = 'units', & 1464 value = 'Nm' ) 1465 1466 variable_name = 'rotor_torque' 1467 return_value = dom_def_var( nc_filename, & 1468 variable_name = variable_name, & 1469 dimension_names = (/ 'turbine', 'time' /), & 1470 output_type = 'real32' ) 1471 1472 return_value = dom_def_att( nc_filename, & 1473 variable_name = variable_name, & 1474 attribute_name = 'units', & 1475 value = 'Nm' ) 1476 1477 variable_name = 'pitch_angle' 1478 return_value = dom_def_var( nc_filename, & 1479 variable_name = variable_name, & 1480 dimension_names = (/ 'turbine', 'time' /), & 1481 output_type = 'real32' ) 1482 1483 return_value = dom_def_att( nc_filename, & 1484 variable_name = variable_name, & 1485 attribute_name = 'units', & 1486 value = 'degrees' ) 1487 1488 variable_name = 'generator_power' 1489 return_value = dom_def_var( nc_filename, & 1490 variable_name = variable_name, & 1491 dimension_names = (/ 'turbine', 'time' /), & 1492 output_type = 'real32' ) 1493 1494 return_value = dom_def_att( nc_filename, & 1495 variable_name = variable_name, & 1496 attribute_name = 'units', & 1497 value = 'W' ) 1498 1499 variable_name = 'rotor_power' 1500 return_value = dom_def_var( nc_filename, & 1501 variable_name = variable_name, & 1502 dimension_names = (/ 'turbine', 'time' /), & 1503 output_type = 'real32' ) 1504 1505 return_value = dom_def_att( nc_filename, & 1506 variable_name = variable_name, & 1507 attribute_name = 'units', & 1508 value = 'W' ) 1509 1510 variable_name = 'rotor_thrust' 1511 return_value = dom_def_var( nc_filename, & 1512 variable_name = variable_name, & 1513 dimension_names = (/ 'turbine', 'time' /), & 1514 output_type = 'real32' ) 1515 1516 return_value = dom_def_att( nc_filename, & 1517 variable_name = variable_name, & 1518 attribute_name = 'units', & 1519 value = 'N' ) 1520 1521 1522 variable_name = 'wind_direction' 1523 return_value = dom_def_var( nc_filename, & 1524 variable_name = variable_name, & 1525 dimension_names = (/ 'turbine', 'time' /), & 1526 output_type = 'real32' ) 1527 1528 return_value = dom_def_att( nc_filename, & 1529 variable_name = variable_name, & 1530 attribute_name = 'units', & 1531 value = 'degrees' ) 1532 1533 variable_name = 'yaw_angle' 1534 return_value = dom_def_var( nc_filename, & 1535 variable_name = variable_name, & 1536 dimension_names = (/ 'turbine', 'time' /), & 1537 output_type = 'real32' ) 1538 1539 return_value = dom_def_att( nc_filename, & 1540 variable_name = variable_name, & 1541 attribute_name = 'units', & 1542 value = 'degrees' ) 1543 1544 END SUBROUTINE 1545 1262 1546 !------------------------------------------------------------------------------! 1263 1547 ! Description: … … 1595 1879 INTEGER(iwp) :: ring !< 1596 1880 INTEGER(iwp) :: ii, jj, kk !< 1597 1881 1598 1882 REAL(wp) :: flag !< flag to mask topography grid points 1599 1883 REAL(wp) :: sin_rot, cos_rot !< … … 1604 1888 1605 1889 REAL(wp) :: dist_u_3d, dist_v_3d, dist_w_3d !< smearing distances 1606 1890 1607 1891 1608 1892 ! … … 1619 1903 1620 1904 1621 IF ( simulated_time>= time_turbine_on ) THEN1905 IF ( time_since_reference_point >= time_turbine_on ) THEN 1622 1906 1623 1907 ! … … 2399 2683 ENDIF 2400 2684 2685 2686 2687 2401 2688 DO inot = 1, nturbines 2402 2689 2690 2691 2403 2692 IF ( myid == 0 ) THEN 2404 2693 IF ( openfile_turb_mod(400+inot)%opened ) THEN 2405 WRITE ( 400+inot, 106 ) simulated_time, omega_rot(inot), &2694 WRITE ( 400+inot, 106 ) time_since_reference_point, omega_rot(inot), & 2406 2695 omega_gen(inot), torque_gen_old(inot), & 2407 2696 torque_total(inot), pitch_add(inot), & … … 2419 2708 turbine_id ), FORM='FORMATTED' ) 2420 2709 WRITE ( 400+inot, 105 ) inot 2421 WRITE ( 400+inot, 106 ) simulated_time, omega_rot(inot), &2710 WRITE ( 400+inot, 106 ) time_since_reference_point, omega_rot(inot), & 2422 2711 omega_gen(inot), torque_gen_old(inot), & 2423 2712 torque_total(inot), pitch_add(inot), & … … 2434 2723 ENDDO !-- end of loop over turbines 2435 2724 2436 ENDIF 2437 2725 2726 2727 ENDIF 2728 2729 2730 ! 2731 !-- NetCDF output, should be moved 2732 CALL wtm_data_output 2733 2438 2734 CALL cpu_log( log_point_s(61), 'wtm_forces', 'stop' ) 2439 2735 … … 2449 2745 F12.1,1X,F12.1,4X,F7.2,4X,F7.2) 2450 2746 2451 2747 2748 2452 2749 END SUBROUTINE wtm_forces 2453 2750 … … 2692 2989 ! 2693 2990 !-- Apply the x-component of the force to the u-component of the flow: 2694 IF ( simulated_time>= time_turbine_on ) THEN2991 IF ( time_since_reference_point >= time_turbine_on ) THEN 2695 2992 DO i = nxlg, nxrg 2696 2993 DO j = nysg, nyng … … 2715 3012 ! 2716 3013 !-- Apply the y-component of the force to the v-component of the flow: 2717 IF ( simulated_time>= time_turbine_on ) THEN3014 IF ( time_since_reference_point >= time_turbine_on ) THEN 2718 3015 DO i = nxlg, nxrg 2719 3016 DO j = nysg, nyng … … 2735 3032 ! 2736 3033 !-- Apply the z-component of the force to the w-component of the flow: 2737 IF ( simulated_time>= time_turbine_on ) THEN3034 IF ( time_since_reference_point >= time_turbine_on ) THEN 2738 3035 DO i = nxlg, nxrg 2739 3036 DO j = nysg, nyng … … 2781 3078 ! 2782 3079 !-- Apply the x-component of the force to the u-component of the flow: 2783 IF ( simulated_time>= time_turbine_on ) THEN3080 IF ( time_since_reference_point >= time_turbine_on ) THEN 2784 3081 DO k = nzb+1, MAXVAL(k_hub) + MAXVAL(k_smear) 2785 3082 ! … … 2799 3096 ! 2800 3097 !-- Apply the y-component of the force to the v-component of the flow: 2801 IF ( simulated_time>= time_turbine_on ) THEN3098 IF ( time_since_reference_point >= time_turbine_on ) THEN 2802 3099 DO k = nzb+1, MAXVAL(k_hub) + MAXVAL(k_smear) 2803 3100 tend_nac_y = 0.5_wp * nac_cd_surf(k,j,i) * & … … 2815 3112 ! 2816 3113 !-- Apply the z-component of the force to the w-component of the flow: 2817 IF ( simulated_time>= time_turbine_on ) THEN3114 IF ( time_since_reference_point >= time_turbine_on ) THEN 2818 3115 DO k = nzb+1, MAXVAL(k_hub) + MAXVAL(k_smear) 2819 3116 tend(k,j,i) = tend(k,j,i) - rot_tend_z(k,j,i) & … … 2832 3129 END SUBROUTINE wtm_actions_ij 2833 3130 3131 3132 SUBROUTINE wtm_data_output 3133 3134 3135 INTEGER(iwp) :: t_ind = 0 !< time index 3136 3137 INTEGER(iwp) :: return_value !< returned status value of called function 3138 3139 ! 3140 !-- At the first call of this routine write the spatial coordinates. 3141 IF ( .NOT. initial_write_coordinates ) THEN 3142 ALLOCATE ( output_values_1d_target(1:nturbines) ) 3143 output_values_1d_target = rcx(1:nturbines) 3144 output_values_1d_pointer => output_values_1d_target 3145 return_value = dom_write_var( nc_filename, & 3146 'x', & 3147 values_realwp_1d = output_values_1d_pointer, & 3148 bounds_start = (/1/), & 3149 bounds_end = (/nturbines/) ) 3150 3151 output_values_1d_target = rcy(1:nturbines) 3152 output_values_1d_pointer => output_values_1d_target 3153 return_value = dom_write_var( nc_filename, & 3154 'y', & 3155 values_realwp_1d = output_values_1d_pointer, & 3156 bounds_start = (/1/), & 3157 bounds_end = (/nturbines/) ) 3158 3159 output_values_1d_target = rcz(1:nturbines) 3160 output_values_1d_pointer => output_values_1d_target 3161 return_value = dom_write_var( nc_filename, & 3162 'z', & 3163 values_realwp_1d = output_values_1d_pointer, & 3164 bounds_start = (/1/), & 3165 bounds_end = (/nturbines/) ) 3166 3167 initial_write_coordinates = .TRUE. 3168 DEALLOCATE ( output_values_1d_target ) 3169 ENDIF 3170 3171 t_ind = t_ind + 1 3172 3173 ALLOCATE ( output_values_1d_target(1:nturbines) ) 3174 output_values_1d_target = omega_rot(:) 3175 output_values_1d_pointer => output_values_1d_target 3176 3177 return_value = dom_write_var( nc_filename, & 3178 'rotor_speed', & 3179 values_realwp_1d = output_values_1d_pointer, & 3180 bounds_start = (/1, t_ind/), & 3181 bounds_end = (/nturbines, t_ind /) ) 3182 3183 output_values_1d_target = omega_gen(:) 3184 output_values_1d_pointer => output_values_1d_target 3185 return_value = dom_write_var( nc_filename, & 3186 'generator_speed', & 3187 values_realwp_1d = output_values_1d_pointer, & 3188 bounds_start = (/1, t_ind/), & 3189 bounds_end = (/nturbines, t_ind /) ) 3190 3191 output_values_1d_target = torque_gen_old(:) 3192 output_values_1d_pointer => output_values_1d_target 3193 3194 return_value = dom_write_var( nc_filename, & 3195 'generator_torque', & 3196 values_realwp_1d = output_values_1d_pointer, & 3197 bounds_start = (/1, t_ind/), & 3198 bounds_end = (/nturbines, t_ind /) ) 3199 3200 output_values_1d_target = torque_total(:) 3201 output_values_1d_pointer => output_values_1d_target 3202 3203 return_value = dom_write_var( nc_filename, & 3204 'rotor_torque', & 3205 values_realwp_1d = output_values_1d_pointer, & 3206 bounds_start = (/1, t_ind/), & 3207 bounds_end = (/nturbines, t_ind /) ) 3208 3209 output_values_1d_target = pitch_add(:) 3210 output_values_1d_pointer => output_values_1d_target 3211 3212 return_value = dom_write_var( nc_filename, & 3213 'pitch_angle', & 3214 values_realwp_1d = output_values_1d_pointer, & 3215 bounds_start = (/1, t_ind/), & 3216 bounds_end = (/nturbines, t_ind /) ) 3217 3218 output_values_1d_target = torque_gen_old(:)*omega_gen(:)*gen_eff 3219 output_values_1d_pointer => output_values_1d_target 3220 3221 return_value = dom_write_var( nc_filename, & 3222 'generator_power', & 3223 values_realwp_1d = output_values_1d_pointer, & 3224 bounds_start = (/1, t_ind/), & 3225 bounds_end = (/nturbines, t_ind /) ) 3226 3227 DO inot = 1, nturbines 3228 output_values_1d_target(inot) = torque_total(inot)*omega_rot(inot)*air_dens 3229 ENDDO 3230 output_values_1d_pointer => output_values_1d_target 3231 3232 return_value = dom_write_var( nc_filename, & 3233 'rotor_power', & 3234 values_realwp_1d = output_values_1d_pointer, & 3235 bounds_start = (/1, t_ind/), & 3236 bounds_end = (/nturbines, t_ind /) ) 3237 3238 output_values_1d_target = thrust_rotor(:) 3239 output_values_1d_pointer => output_values_1d_target 3240 3241 return_value = dom_write_var( nc_filename, & 3242 'rotor_thrust', & 3243 values_realwp_1d = output_values_1d_pointer, & 3244 bounds_start = (/1, t_ind/), & 3245 bounds_end = (/nturbines, t_ind /) ) 3246 3247 output_values_1d_target = wdir(:)*180.0_wp/pi 3248 output_values_1d_pointer => output_values_1d_target 3249 3250 return_value = dom_write_var( nc_filename, & 3251 'wind_direction', & 3252 values_realwp_1d = output_values_1d_pointer, & 3253 bounds_start = (/1, t_ind/), & 3254 bounds_end = (/nturbines, t_ind /) ) 3255 3256 output_values_1d_target = (phi_yaw(:))*180.0_wp/pi 3257 output_values_1d_pointer => output_values_1d_target 3258 3259 return_value = dom_write_var( nc_filename, & 3260 'yaw_angle', & 3261 values_realwp_1d = output_values_1d_pointer, & 3262 bounds_start = (/1, t_ind/), & 3263 bounds_end = (/nturbines, t_ind /) ) 3264 3265 output_values_0d_target = time_since_reference_point 3266 output_values_0d_pointer => output_values_0d_target 3267 3268 return_value = dom_write_var( nc_filename, & 3269 'time', & 3270 values_realwp_0d = output_values_0d_pointer, & 3271 bounds_start = (/t_ind/), & 3272 bounds_end = (/t_ind/) ) 3273 3274 DEALLOCATE ( output_values_1d_target ) 3275 3276 3277 END SUBROUTINE wtm_data_output 3278 2834 3279 END MODULE wind_turbine_model_mod
Note: See TracChangeset
for help on using the changeset viewer.