我有两个格陵兰冰盖速度的NetCDF文件,一个是2015年的文件,另一个是2016年的文件。这些文件包含网格数据,其中速度用x,y坐标绘制。但是,不包括时间维度。如何将这两个文件合并为1,其中最终文件具有时间维度?因此,我希望有一个x,y,z,t数据结构,而不是两个单独的x,y,z网格,其中时间= 2。
谢谢!
答案 0 :(得分:3)
如果文件包含相同的变量且大小相同,请尝试ncecat
ncecat -u time file1.nc file2.nc out.nc
答案 1 :(得分:2)
您可以使用ncap2向文件添加时间维度:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row p-0 m-0 m-auto justify-content-center">
<!-- first container-->
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-4 p-0 m-0 text-center p-0 d-flex flex-column" style="border:1px solid red;">
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">SNIES</h6>
<p class="card-text p-0 m-0 "></p>
<div class="card-text">12967</div>
</div>
</div>
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">Duración</h6>
<p class="card-text p-0 m-0 "> 10 periodos academicos </p>
</div>
</div>
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">Número de Créditos</h6>
<p class="card-text p-0 m-0 "> 170 </p>
</div>
</div>
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">Modalidad de Formación</h6>
<p class="card-text p-0 m-0 "> Presencial </p>
</div>
</div>
</div>
<!-- two container-->
<div class="container-2 col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 p-0 m-0 ">
<div class="row p-0 m-0">
<div class="col-12 col-sm-12 col-md-12 col-lg-6 p-0 m-0 text-center p-0 d-flex flex-column" >
<div class="d-flex borde_gris_b m-0" >
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 ">Becas</h6>
<p class="card-text p-0 m-0 "></p>
<div class="d-flex mb-1">
<div class="mr-3"> Beca Bien </div>
<div>
<p > $2,107,000 </p>
</div>
</div>
</div>
</div>
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">Valor Matrícula</h6>
<p class="card-text p-0 m-0 "> $5,696,000 </p>
</div>
</div>
<div class="d-flex borde_gris_b m-0">
<div class="h-100 flex-center flex-column w-100">
<h6 class="p-0 mx-0 mb-1 mt-0 ">Jornada</h6>
<p class="card-text p-0 m-0 "> Diurna/Nocturna </p>
</div>
</div>
</div>
</div>
</div>
</div><!-- end row -->
我建议阅读此主题以了解更多详细信息:https://sourceforge.net/p/nco/discussion/9830/thread/cee4e1ad/
完成此操作后,可以使用ncrcat命令(请参见https://linux.die.net/man/1/ncrcat)或使用cdo将它们合并在一起
ncap2 -s 'defdim("time",1);time[time]=74875.0;time@long_name="Time"; etc.etc.etc.' -O ~/nco/data/in.nc ~/foo.nc