# micromet的一点总结 （I）

micromet是开源的，因此我也会毫不吝啬的发给你，在这里面的说明都被我翻译成中文了，希望没有翻译错，如果需要，请你邮件：zhanglingky@126.com，并说明你的目的，谢谢！

首先要准备的数据包括3个，DEM、植被数据（这个数据插降雨是不需要的，但是模型要求任然要给出，因此只需要对DEM重分类为1即可作为fake_veg）。还有就是站点数据。下面说数据准备。

! Number of x and y cells in the computational grid.
nx = 50
ny = 35

! deltax = grid increment in x direction.  Meters.
! deltay = grid increment in y direction.  Meters.
deltax = 5000.0
deltay = 5000.0

! Location (like UTM, in meters) value of lower-left grid point.
!   xmn = value of x coordinate in center of lower left grid cell.
!     Meters.
!   ymn = value of y coordinate in center of lower left grid cell.
!     Meters.
xmn =  -571811.53424883
ymn = 4043727.467686

deltax为分辨率；xmn和ymn为asc文件左下角坐标。

! Model time step, dt.  Should be the same increment as in the input
!   data file.  In seconds.
!   One day.
dt = 86400.0
!   Six hours.
!     dt = 21600.0
!   Three hours.
!     dt = 10800.0
!   One hour.
!      dt = 3600.0

! Number of model iterations defines how many times to process.
!      max_iter = 7656
max_iter = 7670

! Define whether the precipitation adjustment factor, with units of
!   km^-1 (kind of a precipitation lapse rate, used to adjust the
!   precipitation for locations above and below the precipitation
!   observing station(s)), is to use the default monthly lapse
!   rates (= 0) or user supplied monthly lapse rates (= 1).  To use
!   user supplied lapse rates, you have to edit the user lapse rate
!   data array in micromet_code.f (subroutine get_lapse_rates).
iprecip_lapse_rate_user_flag = 1

DSET  ^micromet.gdat
TITLE SnowModel
UNDEF -9999.0
XDEF   31 LINEAR 0 0.2
YDEF   31 LINEAR 0 0.2
ZDEF    1 LEVELS 1
TDEF  319 LINEAR 01Z01oct2002 1dy
VARS    9
ta          1  0 air temperature (deg C)
rh          1  0 relative humidity (%)
u           1  0 meridional wind component (m/s)
v           1  0 zonal wind component (m/s)
wspd        1  0 wind speed (m/s)
wdir        1  0 wind direction (0-360, true N)
qsi         1  0 incoming solar radiation reaching the surface (W/m2)
qli         1  0 incoming longwave radiation reaching the surface (W/m2)
prec        1  0 precipitation (m/time_step)
ENDVARS

implicit none
integer nx,ny,nv,nt,var,xnum,ynum
parameter(nx=50,ny=35,nv=9,nt=7670,var=9,xnum=31,ynum=21)
character*16 str(9)
data str /'ta','rh','u','v','wspd','wdir','qsi','qli','prec'/
!real air(nx,ny,nv,nt)
real air(nx, ny, nt)
real tmp(nx, ny)
integer i,j,v,t
open(1,file='F:micrometmicrometmicrometoutputsoutput.gdat',form='binary',status='old')
do t=1,nt
do v=1,nv
if(v==var)then
else
end if
end do
print*, 't=',t
end do
close(2)
close(1)

5 FORMAT(50f12.6)
100 format(f12.6)

open(2,file='F:micrometmicrometmicrometoutputs'//trim(str(var))//'.txt',status='replace')
do t=1,nt
!write(2,5) ((air(i,j,var,t),i=1,nx),j=1,ny)
write(2,5) ((air(i,j,t),i=1,nx),j=1,ny)
end do
close(2)

open(3,file='F:micrometmicrometmicrometoutputs/'//trim(str(var))//'_singlepoint.dat',form='formatted',status='replace')
do t=1,nt
!write(2,100) air(xnum,ynum,var,t)
write(3,100) air(xnum,ynum,t)
end do

end

http://blog.sciencenet.cn/blog-922140-697919.html

## 相关博文

GMT+8, 2021-6-18 08:32