爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 11145|回复: 20

有人知道adp_to_little-r.csh 怎么用吗?

[复制链接]
发表于 2014-8-28 18:47:31 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
                  有人知道adp_to_little-r.csh 怎么用吗?谢谢

密码修改失败请联系微信:mofangbao
发表于 2014-8-28 19:17:02 | 显示全部楼层
能够把他发上来吗
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-8-28 19:52:50 | 显示全部楼层

#!/bin/csh

#        This shell converts ADP data (surface/ship and upper air)
#        into a format suitable for the little_r program.
#       USE THIS ONLY IF YOU HAVE ADP DATA ON YOUR MACHINE
#       THIS SCRIPT WILL NOT DOWNLOAD ADP DATA FOR YOU
#
#       Three types of data files are created:
#             obs:DATE             : Upper-air and surface data used as
#                                    input to little_R
#             surface_obs_r:DATE   : Surface data needed for FDDA in lillte_r
#                                    (if no FDDA will be done, these are not
#                                    needed, since they are also contained
#                                    in obs:DATE)

### DataDir MUST be the ABSOLUTE path to your data directory
set DataDir       =  home/renhehe/bin/mm5V3-7-0/LITTLE_R5/FETCH4                  

### INSFCData is both surface and ship data
set InUpperData   =  ( $DataDir/Y52853.bin )
#set InSFCData     =  ( $DataDir/Y77933.bin $DataDir/Y77939.bin )

set starting_date = 2004080100
set ending_date   = 2004083100

#        The amount of CPU time spent unpacking the entire
#        globe is embarrassing.  As much as possible, restrict the
#        bounds.

set lon_e         =  180
set lon_w         = -180
set lat_s         =  -90
set lat_n         =   90

set lon_e         =  140
set lon_w         =  110
set lat_s         =   10
set lat_n         =   35

##############################################
#        End of user modification
##############################################

set LETTERS = (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)

### Do surface data

pushd adp_sfc

#        Build the conversion routine, set the namelist up.

echo "Making code - Surface"

make -r
m4 -Dxstryy=`echo $starting_date | cut -c1-4`  \
   -Dxstrmm=`echo $starting_date | cut -c5-6`  \
   -Dxstrdd=`echo $starting_date | cut -c7-8`  \
   -Dxstrhh=`echo $starting_date | cut -c9-10` \
   -Dxendyy=`echo $ending_date | cut -c1-4`  \
   -Dxendmm=`echo $ending_date | cut -c5-6`  \
   -Dxenddd=`echo $ending_date | cut -c7-8`  \
   -Dxendhh=`echo $ending_date | cut -c9-10` \
   -Dxloe=$lon_e -Dxlow=$lon_w -Dxlas=$lat_s -Dxlan=$lat_n \
   namelist.template >! namelist.input


#        Run the program (convert data to little_r format).
#        At least a single file must exist for input.

set NUM = 1
foreach fil ( $InSFCData )
   ln -sf  $fil Data.$NUM
   @ NUM ++
   echo Data.$NUM
end

echo "Converting Surface Data"
        ( time ./adp_sfc.exe Data.* ) >&! adp_sfc_print

#       

set y = `echo $starting_date | cut -c1-4`
set m = `echo $starting_date | cut -c5-6`
set d = `echo $starting_date | cut -c7-8`
set h = `echo $starting_date | cut -c9-10`

popd


### Do upper_air data

pushd adp_upa

#        Build the conversion routine, set the namelist up.

echo "Making code - Upper-Air"

make -r
m4 -Dxstryy=`echo $starting_date | cut -c1-4`  \
   -Dxstrmm=`echo $starting_date | cut -c5-6`  \
   -Dxstrdd=`echo $starting_date | cut -c7-8`  \
   -Dxstrhh=`echo $starting_date | cut -c9-10` \
   -Dxendyy=`echo $ending_date | cut -c1-4`  \
   -Dxendmm=`echo $ending_date | cut -c5-6`  \
   -Dxenddd=`echo $ending_date | cut -c7-8`  \
   -Dxendhh=`echo $ending_date | cut -c9-10` \
   -Dxloe=$lon_e -Dxlow=$lon_w -Dxlas=$lat_s -Dxlan=$lat_n \
   namelist.template >! namelist.input

#        Run the program (convert data to little_r format).
#        At least a single file must exist for input.

set NUM = 1
foreach fil ( $InUpperData )
   ln -sf  $fil Data.$NUM
   @ NUM ++
   echo Data.$NUM
end

echo "Converting Upper-Air Data"
        ( time ./adp_upa.exe Data.* ) >&! adp_upa_print

#       

set y = `echo $starting_date | cut -c1-4`
set m = `echo $starting_date | cut -c5-6`
set d = `echo $starting_date | cut -c7-8`
set h = `echo $starting_date | cut -c9-10`

if ( -e upper-air_obs_r:${y}-${m}-${d}_${h} ) then

          foreach fil ( upper-air_obs_r:* )
            set dd = ` echo $fil | cut -c17-30 `
            set fil2 = ../adp_sfc/surface\*{$dd}
            cat $fil > obs:$dd
            cat $fil2 >> obs:$dd
          end
          rm -rf upper-air_obs_r:*
endif

popd

mv adp_sfc/surface* .
mv adp_upa/obs:* .

echo "DONE with conversion"
谢谢
密码修改失败请联系微信:mofangbao
发表于 2014-8-29 09:15:37 | 显示全部楼层
renjia 发表于 2014-8-28 19:52
#!/bin/csh

#        This shell converts ADP data (surface/ship and upper air)

我看是把adp资料转化为可同化的资料格式
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-8-29 09:49:50 | 显示全部楼层
随缘 发表于 2014-8-29 09:15
我看是把adp资料转化为可同化的资料格式

具体操作时老说出错,类似为
ifort -c -FR -convert big_endiangetsfcobs_hcl.f90   
ifort: command line error: no files specified; for help type "ifort -help"
是ifort的什么问题,我不懂,谢谢。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-8-29 09:50:19 | 显示全部楼层
随缘 发表于 2014-8-29 09:15
我看是把adp资料转化为可同化的资料格式

转化为可同化资料怎么做呢?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-8-29 09:54:00 | 显示全部楼层
随缘 发表于 2014-8-29 09:15
我看是把adp资料转化为可同化的资料格式

是不是因为下面的设置有错误:
else \
        grep Linux .tmpfile ; \
        if [ $$? = 0 ]; then echo "Compiling for Linux" ; \
                $(MAKE) target  \
                "MACH           =       DEC"  \
                "WLENGTH        =       BIT32"  \
                "FC             =       ifort"  \
                "FCFLAGS        =       -FR -pc 32  -convert big_endian" \
                "CC             =       cc"  \
                "CFLAGS         =       "  \
                "LDOPTIONS      =       "  \
                "LIBS           =       " ; \
密码修改失败请联系微信:mofangbao
发表于 2014-8-29 10:40:16 | 显示全部楼层
renjia 发表于 2014-8-29 09:49
具体操作时老说出错,类似为
ifort -c -FR -convert big_endiangetsfcobs_hcl.f90   
ifort: command l ...

big_endiangetsfcobs_hcl.f90这个文件有么?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-8-29 10:49:50 | 显示全部楼层
随缘 发表于 2014-8-29 10:40
big_endiangetsfcobs_hcl.f90这个文件有么?

有getsfcobs_hcl.f90这个文件
密码修改失败请联系微信:mofangbao
发表于 2014-8-29 11:09:09 | 显示全部楼层
renjia 发表于 2014-8-29 10:49
有getsfcobs_hcl.f90这个文件

ifort -c -FR -convert big_endiangetsfcobs_hcl.f90
好像少了个空格似的。能把makefile文件发上来一下么?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表