技术删除向上堆栈帧WRF -地球科学交流江南电子竞技平台江南体育网页版 最近30从www.hoelymoley.com 2023 - 07 - 07 - t17:46:37z //www.hoelymoley.com/feeds/question/7698 https://creativecommons.org/licenses/by-sa/4.0/rdf //www.hoelymoley.com/q/7698 10 技术从WRF删除向上帧 汉Zhengzu //www.hoelymoley.com/users/5214 2016 - 03 - 17 - t15:01:16z 2016 - 03 - 29 - t02:47:30z < p >我用户WRF V3.5针对气象模拟。< br >有时候,我会长期运行模型< em > < / em >。< / p > < h3 > < / h3 > < p >我尝试我将长期(e。薮猫短g 1年)。例如:< / p > < p > < / p > < pre > <代码> # # WPS名称列表。wps start_date = ' 2014 - 01 - 01 _06:00:00 end_date = ' 2014 - 01 - 31 _23:00:00 # # WRF运行期.csh文件中设置。set year = "2014" foreach strtime (010106010512 010500011012 011000011512 011500012012 012000012512 012500013012 013000020100) set smon = `echo ${strtime}|cut -c1-2` set sday = `echo ${strtime}|cut -c3-4` set shr = `echo ${strtime}|cut -c5-6` set emon = `echo ${strtime}|cut -c7-8` set eday = `echo ${strtime}|cut -c9-10` set ehr = `echo ${strtime}|cut -c11-12` &time_control run_days = 0, run_hours = 132, run_minutes = 0, run_seconds = 0, start_year = ${year},${year}, start_month = ${smon},${smon}, start_day = ${sday},${sday}, start_hour = ${shr},${shr}, start_minute = 00,00, start_second = 00,00, end_year = ${year},${year}, end_month = ${emon},${emon}, end_day = ${eday},${eday}, end_hour = ${ehr},${ehr}, end_minute = 00,00, end_second = 00,00, interval_seconds = 21600

In these short period, I set the first 12-h as the spinning period(except the start one.)

This is the schematics of the temporal modeling setup which I clipped from the Internet.

http://i12.tietuku.cn/afd906ddd823ddd6.png

Result

It generate 8 .nc file which each contain 132 frames of data.
For now, I use the The netCDF Operators(NCO) to deal with the output files.

  1. Using ncks to delete the first 12-h frames for each file separately.

  2. Using ncrcatto concat all 8 .nc files together to get one file represent the whole simulation period.

Problem

I was using this method for a while. But when the amount of files are huge, it really a dump approach.

Are there someone offering your approaches to dealing with spin-up data deletion?

My target

  • The model can generate only one file which contain all the simulation period.
  • The spin-up time can be covered by last file's frames automatically.

Update: Wish you share your approaches!

//www.hoelymoley.com/questions/7698/-/7738 # 7738 2 答案由汉族Zhengzu技术从WRF删除向上帧 汉Zhengzu //www.hoelymoley.com/users/5214 2016 - 03 - 25 - t01:00:47z 2016 - 03 - 25 - t01:00:47z < p >这是我现在的方法。李> < / p > < ol > < <强>所有wrfout-files < /强>都位于相同的路径。李李< / > < > < p >使用<强> pynco < /强>在python中循环将向上dataframe < / p > < pre > <代码>进口一滴nco =甲(fn) glob.iglob (* .nc):文件名,extname = os.path.splitext (fn) output_fn =文件名[22]+ str (int(文件名[22:24])+ 12)+ extname甲。ncks(输入= fn、输出= output_fn尺寸=时间13)< /代码> < / pre > < /李> < / ol > < p >输入显示:<代码> 2014 - 04 - 04 - _12。数控代码> < /(120帧内)< br >输出显示:<代码> wrfout_2014-04-04_00:00:00。数控代码> < /(133帧内)< / p > //www.hoelymoley.com/questions/7698/-/7750 # 7750 2 由丹尼尔回答。从WRF heydebreck技术删除向上帧数 daniel.heydebreck //www.hoelymoley.com/users/5594 2016 - 03 - 27 - t14:33:59z 2016 - 03 - 27 - t14:33:59z < p > <代码>的有一个特点- d < /代码>选项,使调用<代码> ncks > < /代码冗余。然而,它可以自NCO版本4.2.1(2012年8月)准备。< / p > < pre > <代码> ncrcat - d, 13日,132120 wrfout *总结。数控# - d昏暗,[min] [(max),[[步],[[子循环]]]]< /代码> < / pre > < p >这一特性深深隐藏在在线手册。你发现这里:< a href = " http://nco.sourceforge.net/nco.html子循环”rel =“nofollow”>nco.sourceforge.net/nco.html #子循环< / >。< / p > < p >解释:< / p > < ul > <李> 13:时间的第一步我们认为李< / > <李>(空):直到最后李< / > <李> 132:我们有一个周期的长度132步李< / > <李> 120:我们把第一个120个值(从13日开始)的每个周期< /李> < / ul > < p >如果我们写<代码> - d时间,13日0132 < /代码> = <代码> - d, 13日,0132年,1 > < /代码,我们只会得到从13日开始每隔132价值。< / p > < p >我不处理WRF输出但我们使用化学CMAQ运输模型。我们得到每小时解决每天的浓度输出文件。这些文件有25的时间步骤(0点的当前,第二天),我们需要删除其中一个)点时间步骤和附加的文件。为此,我使用<代码> ncrcat - d TSTEP, 0, 25日,24日[infiles][外部档案]> < /代码。< / p > < p >直接方法是编写一个Fortran程序。但是,我也喜欢甲的。也许你可以试试cdo (< a href = " https://code.zmaw.de/projects/cdo " rel =“nofollow”> code.zmaw.de /项目/ cdo < / >)作为替代。 However, my solution with cdo's for this task was more bulky than the NCO solution.

Baidu
map