Project

General

Profile

Establishment time

Added by jiayan yang about 2 years ago

大家好:
我想给几个时刻的卫星nc文件建立一个时间轴,以便我可以做后续合并文件的处理。
这是其中以一个文件的信息。

当我使用 settaxis 和 select 时,结果好像不对.下面是我的代码:

#!/bin/bash
#mergeH8

index=0
files=[]
for i in *.nc
do
files[index]=$i
let index++ # cdo settaxis,2022-03-14,00:${a}0:00,10min $i H08_${a}.nc
#let a++
#echo $a
done

a=0
while(($a<40))
do # 从文件名里得到时间
name=${files[$a]}
time=${name#*20210720_}
time=${time%_r14*}
min=$[10#${time} % 100]
hour=$[10#$time - min]
hour=$[10#$hour / 100] # 建立时间
cdo settaxis,2021-07-20,${hour}:${min}:00,10min $i H08_${time}.nc
let a++
done
cdo select,name=tbb_14 H08*.nc TBB14-pre.nc
@

然后我使用 cdo info TBB14-pre.nc查看文件的信息

显示所有文件的 minmum mean maxmum都一样
有人可以帮我解决一下这个问题吗?万分感谢!


Replies (4)

RE: Establishment time - Added by Ralf Mueller about 2 years ago

hi!

what is your question?

RE: Establishment time - Added by jiayan yang about 2 years ago

hi Ralf:
I have solved it.Now,I want to know how can I celect gridID3 to do Data Slicing ?
你能明白我表达的意思吗?
thank you very much!

RE: Establishment time - Added by Ralf Mueller about 2 years ago

hi!

the IDs for the grids can be used together with the selgrid operator. Check the docu with

cdo -h selgrid

In your case it should look like
cdo -selgrid,3 <ifile> <ofile>

I usually use the sinfov operator for a fist inspection of a file. It shows the grids with their IDs and which variables use which grid.

hth
ralf

RE: Establishment time - Added by jiayan yang about 2 years ago

It's very nice of you!thank you!^😊

    (1-4/4)