11 use fckit_configuration_module,
only: fckit_configuration
24 real(kind_real),
parameter ::
ubot = -2.0_kind_real
25 real(kind_real),
parameter ::
utop = 58.0_kind_real
36 type(fckit_configuration),
intent(in) :: f_conf
37 integer,
intent(in) :: length
38 type(datetime),
intent(in) :: vdate
45 character(len=length) :: fdbdir,expver,typ,validitydate,referencedate,sstep,mmb,iter
46 character(len=2*length) :: prefix
47 character(len=:),
allocatable :: str
49 type(datetime) :: rdate
50 type(duration) :: step
53 call f_conf%get_or_die(
"datadir",str)
54 call swap_name_member(f_conf, str)
56 call f_conf%get_or_die(
"exp",str)
57 call swap_name_member(f_conf, str)
59 call f_conf%get_or_die(
"type",str)
64 call f_conf%get_or_die(
"member",str)
66 lenfn = len_trim(fdbdir) + 1 + len_trim(expver) + 1 + len_trim(typ) + 1 + len_trim(mmb)
67 prefix = trim(fdbdir) //
'/' // trim(expver) //
'.' // trim(typ) //
'.' // trim(mmb)
69 lenfn = len_trim(fdbdir) + 1 + len_trim(expver) + 1 + len_trim(typ)
70 prefix = trim(fdbdir) //
'/' // trim(expver) //
'.' // trim(typ)
74 if ((typ==
'fc').or.(typ==
'ens'))
then
75 call f_conf%get_or_die(
"date",str)
77 call datetime_to_string(vdate,validitydate)
78 call datetime_create(trim(referencedate),rdate)
79 call datetime_diff(vdate,rdate,step)
80 call duration_to_string(step,sstep)
81 lenfn = lenfn+1+len_trim(referencedate)+1+len_trim(sstep)
82 genfilename = trim(prefix)//
'.'//trim(referencedate)//
'.'// trim(sstep)//
'.nc'
86 if ((typ==
'an').or.(typ==
'in'))
then
87 call datetime_to_string(vdate,validitydate)
88 lenfn = lenfn+1+len_trim(validitydate)
89 genfilename = trim(prefix)//
'.'//trim(validitydate)//
'.nc'
92 if (typ==
'krylov')
then
93 call f_conf%get_or_die(
"iteration",str)
95 call datetime_to_string(vdate,validitydate)
96 lenfn = lenfn+1+len_trim(iter)+1+len_trim(validitydate)
97 genfilename = trim(prefix)//
'.'// trim(iter)//
'.'//trim(validitydate)//
'.nc'
101 if (lenfn>length)
call abor1_ftn(
'genfilename: filename too long')
111 integer,
intent(in) :: info
114 if (info/=nf90_noerr)
call abor1_ftn(trim(nf90_strerror(info)))
124 real(kind_real),
intent(in) :: x
125 real(kind_real),
intent(in) :: y
126 real(kind_real),
intent(in) :: z
127 character(len=1),
intent(in) :: var
128 real(kind_real),
intent(out) :: res
141 call abor1_ftn(
'baroclinic_instability: cannot define q')
149 call abor1_ftn(
'baroclinic_instability: wrong variable')
160 real(kind_real),
intent(in) :: x
161 real(kind_real),
intent(in) :: y
162 real(kind_real),
intent(in) :: z
163 character(len=1),
intent(in) :: var
164 real(kind_real),
intent(out) :: res
167 real(kind_real) :: ff
177 call abor1_ftn(
'large_vortices: cannot define q')
185 call abor1_ftn(
'large_vortices: wrong variable')
real(kind_real), parameter, public pi
Pi.
real(kind_real), parameter, public domain_depth
Model depth (m)
real(kind_real), parameter, public domain_meridional
Model domain in meridional direction (m)
real(kind_real), parameter, public domain_zonal
Model domain in zonal direction (m)