123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- !#######################################################################
- !
- #define TRACEBACK write (*,'("ERROR in ",a," (line",i5,")")') __FILE__, __LINE__
- #define IF_NOTOK_RETURN(action) if (status/=0) then; TRACEBACK; action; return; end if
- #define IF_ERROR_RETURN(action) if (status >0) then; TRACEBACK; action; return; end if
- !
- !#######################################################################
- module file_grib_base
- implicit none
- ! --- in/out -------------------------------
- private
- public :: levtype_sfc, levtype_hyb, levtype_land, levtype_hyb2
- public :: gridtype_ll, gridtype_gg, gridtype_sh, gridtype_red_gg
- public :: pidname, pidmax
- ! public :: pid_T
- ! public :: pid_Q
- ! public :: pid_U, pid_V, pid_W
- ! public :: pid_SP, pid_LNSP
- ! public :: pid_VO, pid_D
- ! public :: pid_Z, pid_LSM
- ! public :: pid_SR, pid_AL, pid_LSRH
- ! public :: pid_SLHF
- ! public :: pid_CLWC, pid_CIWC, pid_CC
- ! --- const ------------------------------
-
- character(len=*), parameter :: mname = 'file_grib_base'
-
-
- ! *** Type of level (Code Table 3)
-
- integer, parameter :: levtype_sfc = 1 ! ground or water surface
- integer, parameter :: levtype_hyb = 109 ! hybrid level half-level [Grib1]
- integer, parameter :: levtype_hyb_full = 110 ! hybrid level full-level [Grib1]
- integer, parameter :: levtype_hyb2 = 105 ! hybrid levels (both full or half) [Grib2]
- integer, parameter :: levtype_land = 112 ! layer below surface
-
- ! ! *** parameter identifier (Code Table 2)
- !
- ! ! o numbers
- !
- ! integer, parameter :: pid_Z = 129 ! geopotential (orography)
- ! integer, parameter :: pid_T = 130 ! temperature
- ! integer, parameter :: pid_U = 131 ! u-velocity
- ! integer, parameter :: pid_V = 132 ! v-velocity
- ! integer, parameter :: pid_Q = 133 ! specific humidity
- ! integer, parameter :: pid_SP = 134 ! surface pressure
- ! integer, parameter :: pid_W = 135 ! vertical velocity
- !
- ! integer, parameter :: pid_VO = 138 ! vorticity
- !
- ! integer, parameter :: pid_SLHF = 147 ! surface latent heat flux (W m**-2 s)
- !
- ! integer, parameter :: pid_LNSP = 152 ! ln surface pressure
- !
- ! integer, parameter :: pid_D = 155 ! divergence
- !
- ! integer, parameter :: pid_LSM = 172 ! land sea mask
- ! integer, parameter :: pid_SR = 173 ! Surface roughness m
- ! integer, parameter :: pid_AL = 174 ! Albedo (0-1)
- !
- ! integer, parameter :: pid_LSRH = 234 ! Logarithm of SR length for heat
- !
- ! integer, parameter :: pid_CLWC = 246 ! cloud liquid water content
- ! integer, parameter :: pid_CIWC = 247 ! cloud ice water content
- ! integer, parameter :: pid_CC = 248 ! cloud cover
-
- ! o maximum number
- integer, parameter :: pidmax = 260
-
- ! o names
-
- character(len=4), parameter :: pidname(pidmax) = (/ &
- 'a ','b ','c ','d ','e ','f ','g ','p008','p009','p010', &
- 'p011','p012','p013','p014','p015','p016','p017','p018','p019','p020', &
- 'p021','p022','p023','p024','p025','p026','p027','p028','p029','p030', &
- 'p031','p032','p033','p034','p035','p036','p037','p038','p039','p040', &
- 'p041','p042','p043','p044','p045','p046','p047','p048','p049','p050', &
- 'p051','p052','p053','p054','p055','p056','p057','p058','p059','p060', &
- 'p061','p062','p063','p064','p065','p066','p067','p068','p069','p070', &
- 'p071','p072','p073','p074','p075','p076','p077','p078','p079','p080', &
- 'p081','p082','p083','p084','p085','p086','p087','p088','p089','p090', &
- 'p091','p092','p093','p094','p095','p096','p097','p098','p099','p100', &
- 'p101','p102','p103','p104','p105','p106','p107','p108','p109','p110', &
- 'p111','p112','p113','p114','p115','p116','p117','p118','p119','p120', &
- 'p121','p122','p123','p124','p125','p126','p127','p128','Z ','T ', &
- 'U ','V ','Q ','SP ','W ','p136','p137','VO ','p139','p140', &
- 'SD ','LSP ','CP ','SF ','p145','SSHF','SLHF','p148','p149','p150', &
- 'p151','LNSP','p153','p154','D ','zg ','pw ','pu ','pv ','sp ', &
- 'eu ','du ','dk ','ed ','dd ','p166','T2M ','D2M ','p169','p170', &
- 'p171','LSM ','SR ','AL ','p175','SSR ','p177','p178','p179','EWSS', &
- 'NSSS','p182','p183','p184','p185','p186','p187','p188','p189','clb ', &
- 'clt ','clfs','p193','p194','p195','p196','p197','SRC ','p199','p200', &
- 'p201','p202','p203','p204','p205','p206','p207','p208','p209','p210', &
- 'p211','p212','p213','p214','p215','p216','p217','p218','p219','p220', &
- 'p221','p222','p223','p224','p225','p226','p227','p228','p229','p230', &
- 'p231','p232','p233','LSRH','p235','p236','p237','p238','p239','p240', &
- 'p241','p242','p243','p244','p245','CLWC','CIWC','CC ','cco ','ccu ', &
- 'p251','p252','p253','p254','p255','p256','p257','p258','p259','p260' /)
- ! *** data representation type (Code Table 6)
-
- integer, parameter :: gridtype_ll = 0
- integer, parameter :: gridtype_gg = 4 ! 40 in Edition 2
- integer, parameter :: gridtype_red_gg = 43
- integer, parameter :: gridtype_sh = 50
-
- end module file_grib_base
|