17 REAL,
ALLOCATABLE :: c_0(:)
18 REAL,
ALLOCATABLE :: c_d(:)
19 REAL,
ALLOCATABLE :: d_conv(:)
20 REAL,
ALLOCATABLE :: dt_cool(:)
21 REAL,
ALLOCATABLE :: ifd(:)
22 REAL,
ALLOCATABLE :: qrain(:)
23 REAL,
ALLOCATABLE :: tref(:)
24 REAL,
ALLOCATABLE :: tfinc(:)
25 REAL,
ALLOCATABLE :: w_0(:)
26 REAL,
ALLOCATABLE :: w_d(:)
27 REAL,
ALLOCATABLE :: xs(:)
28 REAL,
ALLOCATABLE :: xt(:)
29 REAL,
ALLOCATABLE :: xtts(:)
30 REAL,
ALLOCATABLE :: xu(:)
31 REAL,
ALLOCATABLE :: xv(:)
32 REAL,
ALLOCATABLE :: xz(:)
33 REAL,
ALLOCATABLE :: xzts(:)
34 REAL,
ALLOCATABLE :: z_c(:)
35 REAL,
ALLOCATABLE :: zm(:)
38 INTEGER,
PUBLIC :: IDIM_GAUS
40 INTEGER,
PUBLIC :: JDIM_GAUS
42 INTEGER,
ALLOCATABLE,
PUBLIC :: SLMSK_GAUS(:,:)
45 INTEGER,
ALLOCATABLE,
PUBLIC :: SOILSNOW_GAUS(:,:)
49 REAL,
ALLOCATABLE,
PUBLIC :: DTREF_GAUS(:,:)
52 REAL,
ALLOCATABLE,
PUBLIC :: STC_INC_GAUS(:,:,:)
118 albfcs,alffcs,vegfcs,cnpfcs,f10m, &
119 t2m,q2m,vetfcs,sotfcs,ustar,fmm,fhh, &
120 sicfcs,sihfcs,sitfcs,tprcp,srflag, &
121 swdfcs,vmnfcs,vmxfcs,slpfcs, &
122 absfcs,slcfcs,smcfcs,stcfcs,&
123 idim,jdim,lensfc,lsoil,do_nsst,nsst)
130 integer,
intent(in) :: idim, jdim, lensfc, lsoil
132 logical,
intent(in) :: do_nsst
134 real,
intent(in) :: slifcs(lensfc), tsffcs(lensfc)
135 real,
intent(in) :: snofcs(lensfc), tg3fcs(lensfc)
136 real,
intent(in) :: vegfcs(lensfc), cnpfcs(lensfc)
137 real,
intent(in) :: zorfcs(lensfc), albfcs(lensfc,4)
138 real,
intent(in) :: f10m(lensfc), alffcs(lensfc,2)
139 real,
intent(in) :: t2m(lensfc), q2m(lensfc)
140 real,
intent(in) :: vetfcs(lensfc), sotfcs(lensfc)
141 real,
intent(in) :: ustar(lensfc), fmm(lensfc)
142 real,
intent(in) :: fhh(lensfc), sicfcs(lensfc)
143 real,
intent(in) :: sihfcs(lensfc), sitfcs(lensfc)
144 real,
intent(in) :: tprcp(lensfc), srflag(lensfc)
145 real,
intent(in) :: swdfcs(lensfc), vmnfcs(lensfc)
146 real,
intent(in) :: vmxfcs(lensfc), slpfcs(lensfc)
147 real,
intent(in) :: absfcs(lensfc), slcfcs(lensfc,lsoil)
148 real,
intent(in) :: smcfcs(lensfc,lsoil), stcfcs(lensfc,lsoil)
152 character(len=3) :: rankch
153 character(len=50) :: fnbgso
155 integer :: fsize=65536, inital=0
156 integer :: header_buffer_val = 16384
157 integer :: dims_3d(3), dims_strt(3), dims_end(3)
158 integer :: dims_4d(4), dims4_strt(4), dims4_end(4)
159 integer :: error, i, ncid
160 integer :: dim_x, dim_y, dim_lsoil, dim_time
161 integer :: id_x, id_y, id_lsoil, id_time
162 integer :: id_slmsk, id_tsea, id_sheleg
163 integer :: id_alnwf, id_alvwf, id_alnsf, id_alvsf
164 integer :: id_tg3, id_zorl, id_facsf, id_facwf
165 integer :: id_vfrac, id_canopy, id_f10m, id_t2m
166 integer :: id_q2m, id_stype, id_vtype, id_uustar
167 integer :: id_ffmm, id_ffhh, id_fice, id_hice
168 integer :: id_tisfc, id_tprcp, id_srflag
169 integer :: id_snwdph, id_shdmin, id_shdmax
170 integer :: id_slope, id_snoalb, id_qrain
171 integer :: id_dt_cool, id_ifd, id_d_conv
172 integer :: id_xzts, id_xtts, id_zm, id_xz
173 integer :: id_xv, id_xu, id_xs, id_xt
174 integer :: id_w_d, id_w_0, id_c_d, id_tfinc
175 integer :: id_c_0, id_z_c, id_tref
176 integer :: id_stc, id_smc, id_slc
179 real(kind=4) :: times
180 real(kind=4),
allocatable :: lsoil_data(:), x_data(:), y_data(:)
181 real(kind=8),
allocatable :: dum2d(:,:), dum3d(:,:,:)
183 call mpi_comm_rank(mpi_comm_world, myrank, error)
185 write(rankch,
'(i3.3)') (myrank+1)
187 fnbgso =
"./fnbgso." // rankch
190 print*,
"WRITE OUTPUT SFC DATA TO: ",trim(fnbgso)
193 error = nf90_create(fnbgso, ior(nf90_netcdf4,nf90_classic_model), ncid, initialsize=inital, chunksize=fsize)
194 call
netcdf_err(error,
'CREATING FILE='//trim(fnbgso) )
197 error = nf90_def_dim(ncid,
'xaxis_1', idim, dim_x)
198 call
netcdf_err(error,
'DEFINING XAXIS DIMENSION' )
199 error = nf90_def_dim(ncid,
'yaxis_1', jdim, dim_y)
200 call
netcdf_err(error,
'DEFINING YAXIS DIMENSION' )
201 error = nf90_def_dim(ncid,
'zaxis_1', lsoil, dim_lsoil)
202 call
netcdf_err(error,
'DEFINING ZAXIS DIMENSION' )
203 error = nf90_def_dim(ncid,
'Time', 1, dim_time)
204 call
netcdf_err(error,
'DEFINING TIME DIMENSION' )
207 error = nf90_def_var(ncid,
'xaxis_1', nf90_float, dim_x, id_x)
208 call
netcdf_err(error,
'DEFINING XAXIS_1 FIELD' )
209 error = nf90_put_att(ncid, id_x,
"long_name",
"xaxis_1")
210 call
netcdf_err(error,
'DEFINING XAXIS_1 LONG NAME' )
211 error = nf90_put_att(ncid, id_x,
"units",
"none")
212 call
netcdf_err(error,
'DEFINING XAXIS_1 UNITS' )
213 error = nf90_put_att(ncid, id_x,
"cartesian_axis",
"X")
214 call
netcdf_err(error,
'WRITING XAXIS_1 FIELD' )
216 error = nf90_def_var(ncid,
'yaxis_1', nf90_float, dim_y, id_y)
217 call
netcdf_err(error,
'DEFINING YAXIS_1 FIELD' )
218 error = nf90_put_att(ncid, id_y,
"long_name",
"yaxis_1")
219 call
netcdf_err(error,
'DEFINING YAXIS_1 LONG NAME' )
220 error = nf90_put_att(ncid, id_y,
"units",
"none")
221 call
netcdf_err(error,
'DEFINING YAXIS_1 UNITS' )
222 error = nf90_put_att(ncid, id_y,
"cartesian_axis",
"Y")
223 call
netcdf_err(error,
'WRITING YAXIS_1 FIELD' )
225 error = nf90_def_var(ncid,
'zaxis_1', nf90_float, dim_lsoil, id_lsoil)
226 call
netcdf_err(error,
'DEFINING ZAXIS_1 FIELD' )
227 error = nf90_put_att(ncid, id_lsoil,
"long_name",
"zaxis_1")
228 call
netcdf_err(error,
'DEFINING ZAXIS_1 LONG NAME' )
229 error = nf90_put_att(ncid, id_lsoil,
"units",
"none")
230 call
netcdf_err(error,
'DEFINING ZAXIS_1 UNITS' )
231 error = nf90_put_att(ncid, id_lsoil,
"cartesian_axis",
"Z")
232 call
netcdf_err(error,
'WRITING ZAXIS_1 FIELD' )
234 error = nf90_def_var(ncid,
'Time', nf90_float, dim_time, id_time)
235 call
netcdf_err(error,
'DEFINING TIME FIELD' )
236 error = nf90_put_att(ncid, id_time,
"long_name",
"Time")
237 call
netcdf_err(error,
'DEFINING TIME LONG NAME' )
238 error = nf90_put_att(ncid, id_time,
"units",
"time level")
239 call
netcdf_err(error,
'DEFINING TIME UNITS' )
240 error = nf90_put_att(ncid, id_time,
"cartesian_axis",
"T")
245 dims_3d(3) = dim_time
247 error = nf90_def_var(ncid,
'slmsk', nf90_double, dims_3d, id_slmsk)
249 error = nf90_put_att(ncid, id_slmsk,
"long_name",
"slmsk")
250 call
netcdf_err(error,
'DEFINING SLMSK LONG NAME' )
251 error = nf90_put_att(ncid, id_slmsk,
"units",
"none")
252 call
netcdf_err(error,
'DEFINING SLMSK UNITS' )
254 error = nf90_def_var(ncid,
'tsea', nf90_double, dims_3d, id_tsea)
256 error = nf90_put_att(ncid, id_tsea,
"long_name",
"tsea")
257 call
netcdf_err(error,
'DEFINING TSEA LONG NAME' )
258 error = nf90_put_att(ncid, id_tsea,
"units",
"none")
259 call
netcdf_err(error,
'DEFINING TSEA UNITS' )
261 error = nf90_def_var(ncid,
'sheleg', nf90_double, dims_3d, id_sheleg)
263 error = nf90_put_att(ncid, id_sheleg,
"long_name",
"sheleg")
264 call
netcdf_err(error,
'DEFINING SHELEG LONG NAME' )
265 error = nf90_put_att(ncid, id_sheleg,
"units",
"none")
266 call
netcdf_err(error,
'DEFINING SHELEG UNITS' )
268 error = nf90_def_var(ncid,
'tg3', nf90_double, dims_3d, id_tg3)
270 error = nf90_put_att(ncid, id_tg3,
"long_name",
"tg3")
271 call
netcdf_err(error,
'DEFINING TG3 LONG NAME' )
272 error = nf90_put_att(ncid, id_tg3,
"units",
"none")
275 error = nf90_def_var(ncid,
'zorl', nf90_double, dims_3d, id_zorl)
277 error = nf90_put_att(ncid, id_zorl,
"long_name",
"zorl")
278 call
netcdf_err(error,
'DEFINING ZORL LONG NAME' )
279 error = nf90_put_att(ncid, id_zorl,
"units",
"none")
280 call
netcdf_err(error,
'DEFINING ZORL UNITS' )
282 error = nf90_def_var(ncid,
'alvsf', nf90_double, dims_3d, id_alvsf)
284 error = nf90_put_att(ncid, id_alvsf,
"long_name",
"alvsf")
285 call
netcdf_err(error,
'DEFINING ALVSF LONG NAME' )
286 error = nf90_put_att(ncid, id_alvsf,
"units",
"none")
287 call
netcdf_err(error,
'DEFINING ALVSF UNITS' )
289 error = nf90_def_var(ncid,
'alvwf', nf90_double, dims_3d, id_alvwf)
291 error = nf90_put_att(ncid, id_alvwf,
"long_name",
"alvwf")
292 call
netcdf_err(error,
'DEFINING ALVWF LONG NAME' )
293 error = nf90_put_att(ncid, id_alvwf,
"units",
"none")
294 call
netcdf_err(error,
'DEFINING ALVWF UNITS' )
296 error = nf90_def_var(ncid,
'alnsf', nf90_double, dims_3d, id_alnsf)
298 error = nf90_put_att(ncid, id_alnsf,
"long_name",
"alnsf")
299 call
netcdf_err(error,
'DEFINING ALNSF LONG NAME' )
300 error = nf90_put_att(ncid, id_alnsf,
"units",
"none")
301 call
netcdf_err(error,
'DEFINING ALNSF UNITS' )
303 error = nf90_def_var(ncid,
'alnwf', nf90_double, dims_3d, id_alnwf)
305 error = nf90_put_att(ncid, id_alnwf,
"long_name",
"alnwf")
306 call
netcdf_err(error,
'DEFINING ALNWF LONG NAME' )
307 error = nf90_put_att(ncid, id_alnwf,
"units",
"none")
308 call
netcdf_err(error,
'DEFINING ALNWF UNITS' )
310 error = nf90_def_var(ncid,
'facsf', nf90_double, dims_3d, id_facsf)
312 error = nf90_put_att(ncid, id_facsf,
"long_name",
"facsf")
313 call
netcdf_err(error,
'DEFINING FACSF LONG NAME' )
314 error = nf90_put_att(ncid, id_facsf,
"units",
"none")
315 call
netcdf_err(error,
'DEFINING FACSF UNITS' )
317 error = nf90_def_var(ncid,
'facwf', nf90_double, dims_3d, id_facwf)
319 error = nf90_put_att(ncid, id_facwf,
"long_name",
"facwf")
320 call
netcdf_err(error,
'DEFINING FACWF LONG NAME' )
321 error = nf90_put_att(ncid, id_facwf,
"units",
"none")
322 call
netcdf_err(error,
'DEFINING FACWF UNITS' )
324 error = nf90_def_var(ncid,
'vfrac', nf90_double, dims_3d, id_vfrac)
326 error = nf90_put_att(ncid, id_vfrac,
"long_name",
"vfrac")
327 call
netcdf_err(error,
'DEFINING FACWF LONG NAME' )
328 error = nf90_put_att(ncid, id_vfrac,
"units",
"none")
329 call
netcdf_err(error,
'DEFINING VFRAC UNITS' )
331 error = nf90_def_var(ncid,
'canopy', nf90_double, dims_3d, id_canopy)
333 error = nf90_put_att(ncid, id_canopy,
"long_name",
"canopy")
334 call
netcdf_err(error,
'DEFINING CANOPY LONG NAME' )
335 error = nf90_put_att(ncid, id_canopy,
"units",
"none")
336 call
netcdf_err(error,
'DEFINING CANOPY UNITS' )
338 error = nf90_def_var(ncid,
'f10m', nf90_double, dims_3d, id_f10m)
340 error = nf90_put_att(ncid, id_f10m,
"long_name",
"f10m")
341 call
netcdf_err(error,
'DEFINING F10M LONG NAME' )
342 error = nf90_put_att(ncid, id_f10m,
"units",
"none")
343 call
netcdf_err(error,
'DEFINING F10M UNITS' )
345 error = nf90_def_var(ncid,
't2m', nf90_double, dims_3d, id_t2m)
347 error = nf90_put_att(ncid, id_t2m,
"long_name",
"t2m")
348 call
netcdf_err(error,
'DEFINING T2M LONG NAME' )
349 error = nf90_put_att(ncid, id_t2m,
"units",
"none")
352 error = nf90_def_var(ncid,
'q2m', nf90_double, dims_3d, id_q2m)
354 error = nf90_put_att(ncid, id_q2m,
"long_name",
"q2m")
355 call
netcdf_err(error,
'DEFINING Q2M LONG NAME' )
356 error = nf90_put_att(ncid, id_q2m,
"units",
"none")
359 error = nf90_def_var(ncid,
'vtype', nf90_double, dims_3d, id_vtype)
361 error = nf90_put_att(ncid, id_vtype,
"long_name",
"vtype")
362 call
netcdf_err(error,
'DEFINING VTYPE LONG NAME' )
363 error = nf90_put_att(ncid, id_vtype,
"units",
"none")
364 call
netcdf_err(error,
'DEFINING VTYPE UNITS' )
366 error = nf90_def_var(ncid,
'stype', nf90_double, dims_3d, id_stype)
368 error = nf90_put_att(ncid, id_stype,
"long_name",
"stype")
369 call
netcdf_err(error,
'DEFINING STYPE LONG NAME' )
370 error = nf90_put_att(ncid, id_stype,
"units",
"none")
371 call
netcdf_err(error,
'DEFINING STYPE UNITS' )
373 error = nf90_def_var(ncid,
'uustar', nf90_double, dims_3d, id_uustar)
375 error = nf90_put_att(ncid, id_uustar,
"long_name",
"uustar")
376 call
netcdf_err(error,
'DEFINING UUSTAR LONG NAME' )
377 error = nf90_put_att(ncid, id_uustar,
"units",
"none")
378 call
netcdf_err(error,
'DEFINING UUSTAR UNITS' )
380 error = nf90_def_var(ncid,
'ffmm', nf90_double, dims_3d, id_ffmm)
382 error = nf90_put_att(ncid, id_ffmm,
"long_name",
"ffmm")
383 call
netcdf_err(error,
'DEFINING FFMM LONG NAME' )
384 error = nf90_put_att(ncid, id_ffmm,
"units",
"none")
385 call
netcdf_err(error,
'DEFINING FFMM UNITS' )
387 error = nf90_def_var(ncid,
'ffhh', nf90_double, dims_3d, id_ffhh)
389 error = nf90_put_att(ncid, id_ffhh,
"long_name",
"ffhh")
390 call
netcdf_err(error,
'DEFINING FFHH LONG NAME' )
391 error = nf90_put_att(ncid, id_ffhh,
"units",
"none")
392 call
netcdf_err(error,
'DEFINING FFHH UNITS' )
394 error = nf90_def_var(ncid,
'hice', nf90_double, dims_3d, id_hice)
396 error = nf90_put_att(ncid, id_hice,
"long_name",
"hice")
397 call
netcdf_err(error,
'DEFINING HICE LONG NAME' )
398 error = nf90_put_att(ncid, id_hice,
"units",
"none")
399 call
netcdf_err(error,
'DEFINING HICE UNITS' )
401 error = nf90_def_var(ncid,
'fice', nf90_double, dims_3d, id_fice)
403 error = nf90_put_att(ncid, id_fice,
"long_name",
"fice")
404 call
netcdf_err(error,
'DEFINING FICE LONG NAME' )
405 error = nf90_put_att(ncid, id_fice,
"units",
"none")
406 call
netcdf_err(error,
'DEFINING FICE UNITS' )
408 error = nf90_def_var(ncid,
'tisfc', nf90_double, dims_3d, id_tisfc)
410 error = nf90_put_att(ncid, id_tisfc,
"long_name",
"tisfc")
411 call
netcdf_err(error,
'DEFINING TISFC LONG NAME' )
412 error = nf90_put_att(ncid, id_tisfc,
"units",
"none")
413 call
netcdf_err(error,
'DEFINING TISFC UNITS' )
415 error = nf90_def_var(ncid,
'tprcp', nf90_double, dims_3d, id_tprcp)
417 error = nf90_put_att(ncid, id_tprcp,
"long_name",
"tprcp")
418 call
netcdf_err(error,
'DEFINING TPRCP LONG NAME' )
419 error = nf90_put_att(ncid, id_tprcp,
"units",
"none")
420 call
netcdf_err(error,
'DEFINING TPRCP UNITS' )
422 error = nf90_def_var(ncid,
'srflag', nf90_double, dims_3d, id_srflag)
424 error = nf90_put_att(ncid, id_srflag,
"long_name",
"srflag")
425 call
netcdf_err(error,
'DEFINING SRFLAG LONG NAME' )
426 error = nf90_put_att(ncid, id_srflag,
"units",
"none")
427 call
netcdf_err(error,
'DEFINING SRFLAG UNITS' )
429 error = nf90_def_var(ncid,
'snwdph', nf90_double, dims_3d, id_snwdph)
431 error = nf90_put_att(ncid, id_snwdph,
"long_name",
"snwdph")
432 call
netcdf_err(error,
'DEFINING SNWDPH LONG NAME' )
433 error = nf90_put_att(ncid, id_snwdph,
"units",
"none")
434 call
netcdf_err(error,
'DEFINING SNWDPH UNITS' )
436 error = nf90_def_var(ncid,
'shdmin', nf90_double, dims_3d, id_shdmin)
438 error = nf90_put_att(ncid, id_shdmin,
"long_name",
"shdmin")
439 call
netcdf_err(error,
'DEFINING SHDMIN LONG NAME' )
440 error = nf90_put_att(ncid, id_shdmin,
"units",
"none")
441 call
netcdf_err(error,
'DEFINING SHDMIN UNITS' )
443 error = nf90_def_var(ncid,
'shdmax', nf90_double, dims_3d, id_shdmax)
445 error = nf90_put_att(ncid, id_shdmax,
"long_name",
"shdmax")
446 call
netcdf_err(error,
'DEFINING SHDMAX LONG NAME' )
447 error = nf90_put_att(ncid, id_shdmax,
"units",
"none")
448 call
netcdf_err(error,
'DEFINING SHDMAX UNITS' )
450 error = nf90_def_var(ncid,
'slope', nf90_double, dims_3d, id_slope)
452 error = nf90_put_att(ncid, id_slope,
"long_name",
"slope")
453 call
netcdf_err(error,
'DEFINING SLOPE LONG NAME' )
454 error = nf90_put_att(ncid, id_slope,
"units",
"none")
455 call
netcdf_err(error,
'DEFINING SLOPE UNITS' )
457 error = nf90_def_var(ncid,
'snoalb', nf90_double, dims_3d, id_snoalb)
459 error = nf90_put_att(ncid, id_snoalb,
"long_name",
"snoalb")
460 call
netcdf_err(error,
'DEFINING SNOALB LONG NAME' )
461 error = nf90_put_att(ncid, id_snoalb,
"units",
"none")
462 call
netcdf_err(error,
'DEFINING SNOALB UNITS' )
464 nsst_header :
if (do_nsst)
then
467 print*,
"WRITE NSST RECORDS."
469 error = nf90_def_var(ncid,
'tref', nf90_double, dims_3d, id_tref)
471 error = nf90_put_att(ncid, id_tref,
"long_name",
"tref")
472 call
netcdf_err(error,
'DEFINING TREF LONG NAME' )
473 error = nf90_put_att(ncid, id_tref,
"units",
"none")
474 call
netcdf_err(error,
'DEFINING TREF UNITS' )
476 error = nf90_def_var(ncid,
'z_c', nf90_double, dims_3d, id_z_c)
478 error = nf90_put_att(ncid, id_z_c,
"long_name",
"z_c")
479 call
netcdf_err(error,
'DEFINING Z_C LONG NAME' )
480 error = nf90_put_att(ncid, id_z_c,
"units",
"none")
483 error = nf90_def_var(ncid,
'c_0', nf90_double, dims_3d, id_c_0)
485 error = nf90_put_att(ncid, id_c_0,
"long_name",
"c_0")
486 call
netcdf_err(error,
'DEFINING C_0 LONG NAME' )
487 error = nf90_put_att(ncid, id_c_0,
"units",
"none")
490 error = nf90_def_var(ncid,
'c_d', nf90_double, dims_3d, id_c_d)
492 error = nf90_put_att(ncid, id_c_d,
"long_name",
"c_d")
493 call
netcdf_err(error,
'DEFINING C_D LONG NAME' )
494 error = nf90_put_att(ncid, id_c_d,
"units",
"none")
497 error = nf90_def_var(ncid,
'w_0', nf90_double, dims_3d, id_w_0)
499 error = nf90_put_att(ncid, id_w_0,
"long_name",
"w_0")
500 call
netcdf_err(error,
'DEFINING W_0 LONG NAME' )
501 error = nf90_put_att(ncid, id_w_0,
"units",
"none")
504 error = nf90_def_var(ncid,
'w_d', nf90_double, dims_3d, id_w_d)
506 error = nf90_put_att(ncid, id_w_d,
"long_name",
"w_d")
507 call
netcdf_err(error,
'DEFINING W_D LONG NAME' )
508 error = nf90_put_att(ncid, id_w_d,
"units",
"none")
511 error = nf90_def_var(ncid,
'xt', nf90_double, dims_3d, id_xt)
513 error = nf90_put_att(ncid, id_xt,
"long_name",
"xt")
514 call
netcdf_err(error,
'DEFINING XT LONG NAME' )
515 error = nf90_put_att(ncid, id_xt,
"units",
"none")
518 error = nf90_def_var(ncid,
'xs', nf90_double, dims_3d, id_xs)
520 error = nf90_put_att(ncid, id_xs,
"long_name",
"xs")
521 call
netcdf_err(error,
'DEFINING XS LONG NAME' )
522 error = nf90_put_att(ncid, id_xs,
"units",
"none")
525 error = nf90_def_var(ncid,
'xu', nf90_double, dims_3d, id_xu)
527 error = nf90_put_att(ncid, id_xu,
"long_name",
"xu")
528 call
netcdf_err(error,
'DEFINING XU LONG NAME' )
529 error = nf90_put_att(ncid, id_xu,
"units",
"none")
532 error = nf90_def_var(ncid,
'xv', nf90_double, dims_3d, id_xv)
534 error = nf90_put_att(ncid, id_xv,
"long_name",
"xv")
535 call
netcdf_err(error,
'DEFINING XV LONG NAME' )
536 error = nf90_put_att(ncid, id_xv,
"units",
"none")
539 error = nf90_def_var(ncid,
'xz', nf90_double, dims_3d, id_xz)
541 error = nf90_put_att(ncid, id_xz,
"long_name",
"xz")
542 call
netcdf_err(error,
'DEFINING XZ LONG NAME' )
543 error = nf90_put_att(ncid, id_xz,
"units",
"none")
546 error = nf90_def_var(ncid,
'zm', nf90_double, dims_3d, id_zm)
548 error = nf90_put_att(ncid, id_zm,
"long_name",
"zm")
549 call
netcdf_err(error,
'DEFINING ZM LONG NAME' )
550 error = nf90_put_att(ncid, id_zm,
"units",
"none")
553 error = nf90_def_var(ncid,
'xtts', nf90_double, dims_3d, id_xtts)
555 error = nf90_put_att(ncid, id_xtts,
"long_name",
"xtts")
556 call
netcdf_err(error,
'DEFINING XTTS LONG NAME' )
557 error = nf90_put_att(ncid, id_xtts,
"units",
"none")
558 call
netcdf_err(error,
'DEFINING XTTS UNITS' )
560 error = nf90_def_var(ncid,
'xzts', nf90_double, dims_3d, id_xzts)
562 error = nf90_put_att(ncid, id_xzts,
"long_name",
"xzts")
563 call
netcdf_err(error,
'DEFINING XZTS LONG NAME' )
564 error = nf90_put_att(ncid, id_xzts,
"units",
"none")
565 call
netcdf_err(error,
'DEFINING XZTS UNITS' )
567 error = nf90_def_var(ncid,
'd_conv', nf90_double, dims_3d, id_d_conv)
569 error = nf90_put_att(ncid, id_d_conv,
"long_name",
"d_conv")
570 call
netcdf_err(error,
'DEFINING D_CONV LONG NAME' )
571 error = nf90_put_att(ncid, id_d_conv,
"units",
"none")
572 call
netcdf_err(error,
'DEFINING D_CONV UNITS' )
574 error = nf90_def_var(ncid,
'ifd', nf90_double, dims_3d, id_ifd)
576 error = nf90_put_att(ncid, id_ifd,
"long_name",
"ifd")
577 call
netcdf_err(error,
'DEFINING IFD LONG NAME' )
578 error = nf90_put_att(ncid, id_ifd,
"units",
"none")
581 error = nf90_def_var(ncid,
'dt_cool', nf90_double, dims_3d, id_dt_cool)
583 error = nf90_put_att(ncid, id_dt_cool,
"long_name",
"dt_cool")
584 call
netcdf_err(error,
'DEFINING DT_COOL LONG NAME' )
585 error = nf90_put_att(ncid, id_dt_cool,
"units",
"none")
586 call
netcdf_err(error,
'DEFINING DT_COOL UNITS' )
588 error = nf90_def_var(ncid,
'qrain', nf90_double, dims_3d, id_qrain)
590 error = nf90_put_att(ncid, id_qrain,
"long_name",
"qrain")
591 call
netcdf_err(error,
'DEFINING QRAIN LONG NAME' )
592 error = nf90_put_att(ncid, id_qrain,
"units",
"none")
593 call
netcdf_err(error,
'DEFINING QRAIN UNITS' )
595 error = nf90_def_var(ncid,
'tfinc', nf90_double, dims_3d, id_tfinc)
597 error = nf90_put_att(ncid, id_tfinc,
"long_name",
"tfinc")
598 call
netcdf_err(error,
'DEFINING TFINC LONG NAME' )
599 error = nf90_put_att(ncid, id_tfinc,
"units",
"none")
600 call
netcdf_err(error,
'DEFINING TFINC UNITS' )
606 dims_4d(3) = dim_lsoil
607 dims_4d(4) = dim_time
609 error = nf90_def_var(ncid,
'stc', nf90_double, dims_4d, id_stc)
611 error = nf90_put_att(ncid, id_stc,
"long_name",
"stc")
612 call
netcdf_err(error,
'DEFINING STC LONG NAME' )
613 error = nf90_put_att(ncid, id_stc,
"units",
"none")
616 error = nf90_def_var(ncid,
'smc', nf90_double, dims_4d, id_smc)
618 error = nf90_put_att(ncid, id_smc,
"long_name",
"smc")
619 call
netcdf_err(error,
'DEFINING SMC LONG NAME' )
620 error = nf90_put_att(ncid, id_smc,
"units",
"none")
623 error = nf90_def_var(ncid,
'slc', nf90_double, dims_4d, id_slc)
625 error = nf90_put_att(ncid, id_slc,
"long_name",
"slc")
626 call
netcdf_err(error,
'DEFINING SLC LONG NAME' )
627 error = nf90_put_att(ncid, id_slc,
"units",
"none")
630 error = nf90_enddef(ncid, header_buffer_val,4,0,4)
637 allocate(lsoil_data(lsoil))
639 lsoil_data(i) = float(i)
642 allocate(x_data(idim))
647 allocate(y_data(jdim))
652 error = nf90_put_var( ncid, id_lsoil, lsoil_data)
653 call
netcdf_err(error,
'WRITING ZAXIS RECORD' )
654 error = nf90_put_var( ncid, id_x, x_data)
655 call
netcdf_err(error,
'WRITING XAXIS RECORD' )
656 error = nf90_put_var( ncid, id_y, y_data)
657 call
netcdf_err(error,
'WRITING YAXIS RECORD' )
659 error = nf90_put_var( ncid, id_time, times)
660 call
netcdf_err(error,
'WRITING TIME RECORD' )
662 deallocate(lsoil_data, x_data, y_data)
669 allocate(dum2d(idim,jdim))
671 dum2d = reshape(slifcs, (/idim,jdim/))
672 error = nf90_put_var( ncid, id_slmsk, dum2d, dims_strt, dims_end)
673 call
netcdf_err(error,
'WRITING LANDMASK RECORD' )
675 dum2d = reshape(tsffcs, (/idim,jdim/))
676 error = nf90_put_var( ncid, id_tsea, dum2d, dims_strt, dims_end)
677 call
netcdf_err(error,
'WRITING TSEA RECORD' )
679 dum2d = reshape(snofcs, (/idim,jdim/))
680 error = nf90_put_var( ncid, id_sheleg, dum2d, dims_strt, dims_end)
681 call
netcdf_err(error,
'WRITING SHELEG RECORD' )
683 dum2d = reshape(tg3fcs, (/idim,jdim/))
684 error = nf90_put_var( ncid, id_tg3, dum2d, dims_strt, dims_end)
687 dum2d = reshape(zorfcs, (/idim,jdim/))
688 error = nf90_put_var( ncid, id_zorl, dum2d, dims_strt, dims_end)
689 call
netcdf_err(error,
'WRITING ZORL RECORD' )
691 dum2d = reshape(albfcs(:,1), (/idim,jdim/))
692 error = nf90_put_var( ncid, id_alvsf, dum2d, dims_strt, dims_end)
693 call
netcdf_err(error,
'WRITING ALVSF RECORD' )
695 dum2d = reshape(albfcs(:,2), (/idim,jdim/))
696 error = nf90_put_var( ncid, id_alvwf, dum2d, dims_strt, dims_end)
697 call
netcdf_err(error,
'WRITING ALVWF RECORD' )
699 dum2d = reshape(albfcs(:,3), (/idim,jdim/))
700 error = nf90_put_var( ncid, id_alnsf, dum2d, dims_strt, dims_end)
701 call
netcdf_err(error,
'WRITING ALNSF RECORD' )
703 dum2d = reshape(albfcs(:,4), (/idim,jdim/))
704 error = nf90_put_var( ncid, id_alnwf, dum2d, dims_strt, dims_end)
705 call
netcdf_err(error,
'WRITING ALNWF RECORD' )
707 dum2d = reshape(alffcs(:,1), (/idim,jdim/))
708 error = nf90_put_var( ncid, id_facsf, dum2d, dims_strt, dims_end)
709 call
netcdf_err(error,
'WRITING FACSF RECORD' )
711 dum2d = reshape(alffcs(:,2), (/idim,jdim/))
712 error = nf90_put_var( ncid, id_facwf, dum2d, dims_strt, dims_end)
713 call
netcdf_err(error,
'WRITING FACWF RECORD' )
715 dum2d = reshape(vegfcs, (/idim,jdim/))
716 error = nf90_put_var( ncid, id_vfrac, dum2d, dims_strt, dims_end)
717 call
netcdf_err(error,
'WRITING VFRAC RECORD' )
719 dum2d = reshape(cnpfcs, (/idim,jdim/))
720 error = nf90_put_var( ncid, id_canopy, dum2d, dims_strt, dims_end)
721 call
netcdf_err(error,
'WRITING CANOPY RECORD' )
723 dum2d = reshape(f10m, (/idim,jdim/))
724 error = nf90_put_var( ncid, id_f10m, dum2d, dims_strt, dims_end)
725 call
netcdf_err(error,
'WRITING F10M RECORD' )
727 dum2d = reshape(t2m, (/idim,jdim/))
728 error = nf90_put_var( ncid, id_t2m, dum2d, dims_strt, dims_end)
731 dum2d = reshape(q2m, (/idim,jdim/))
732 error = nf90_put_var( ncid, id_q2m, dum2d, dims_strt, dims_end)
735 dum2d = reshape(vetfcs, (/idim,jdim/))
736 error = nf90_put_var( ncid, id_vtype, dum2d, dims_strt, dims_end)
737 call
netcdf_err(error,
'WRITING VTYPE RECORD' )
739 dum2d = reshape(sotfcs, (/idim,jdim/))
740 error = nf90_put_var( ncid, id_stype, dum2d, dims_strt, dims_end)
741 call
netcdf_err(error,
'WRITING STYPE RECORD' )
743 dum2d = reshape(ustar, (/idim,jdim/))
744 error = nf90_put_var( ncid, id_uustar, dum2d, dims_strt, dims_end)
745 call
netcdf_err(error,
'WRITING UUSTAR RECORD' )
747 dum2d = reshape(fmm, (/idim,jdim/))
748 error = nf90_put_var( ncid, id_ffmm, dum2d, dims_strt, dims_end)
749 call
netcdf_err(error,
'WRITING FFMM RECORD' )
751 dum2d = reshape(fhh, (/idim,jdim/))
752 error = nf90_put_var( ncid, id_ffhh, dum2d, dims_strt, dims_end)
753 call
netcdf_err(error,
'WRITING FFHH RECORD' )
755 dum2d = reshape(sihfcs, (/idim,jdim/))
756 error = nf90_put_var( ncid, id_hice, dum2d, dims_strt, dims_end)
757 call
netcdf_err(error,
'WRITING HICE RECORD' )
759 dum2d = reshape(sicfcs, (/idim,jdim/))
760 error = nf90_put_var( ncid, id_fice, dum2d, dims_strt, dims_end)
761 call
netcdf_err(error,
'WRITING FICE RECORD' )
763 dum2d = reshape(sitfcs, (/idim,jdim/))
764 error = nf90_put_var( ncid, id_tisfc, dum2d, dims_strt, dims_end)
765 call
netcdf_err(error,
'WRITING TISFC RECORD' )
767 dum2d = reshape(tprcp, (/idim,jdim/))
768 error = nf90_put_var( ncid, id_tprcp, dum2d, dims_strt, dims_end)
769 call
netcdf_err(error,
'WRITING TPRCP RECORD' )
771 dum2d = reshape(srflag, (/idim,jdim/))
772 error = nf90_put_var( ncid, id_srflag, dum2d, dims_strt, dims_end)
773 call
netcdf_err(error,
'WRITING SRFLAG RECORD' )
775 dum2d = reshape(swdfcs, (/idim,jdim/))
776 error = nf90_put_var( ncid, id_snwdph, dum2d, dims_strt, dims_end)
777 call
netcdf_err(error,
'WRITING SNWDPH RECORD' )
779 dum2d = reshape(vmnfcs, (/idim,jdim/))
780 error = nf90_put_var( ncid, id_shdmin, dum2d, dims_strt, dims_end)
781 call
netcdf_err(error,
'WRITING SHDMIN RECORD' )
783 dum2d = reshape(vmxfcs, (/idim,jdim/))
784 error = nf90_put_var( ncid, id_shdmax, dum2d, dims_strt, dims_end)
785 call
netcdf_err(error,
'WRITING SHDMAX RECORD' )
787 dum2d = reshape(slpfcs, (/idim,jdim/))
788 error = nf90_put_var( ncid, id_slope, dum2d, dims_strt, dims_end)
789 call
netcdf_err(error,
'WRITING SLOPE RECORD' )
791 dum2d = reshape(absfcs, (/idim,jdim/))
792 error = nf90_put_var( ncid, id_snoalb, dum2d, dims_strt, dims_end)
793 call
netcdf_err(error,
'WRITING SNOALB RECORD' )
795 nsst_write :
if (do_nsst)
then
797 dum2d = reshape(nsst%tref, (/idim,jdim/))
798 error = nf90_put_var( ncid, id_tref, dum2d, dims_strt, dims_end)
799 call
netcdf_err(error,
'WRITING TREF RECORD' )
801 dum2d = reshape(nsst%z_c, (/idim,jdim/))
802 error = nf90_put_var( ncid, id_z_c, dum2d, dims_strt, dims_end)
805 dum2d = reshape(nsst%c_0, (/idim,jdim/))
806 error = nf90_put_var( ncid, id_c_0, dum2d, dims_strt, dims_end)
809 dum2d = reshape(nsst%c_d, (/idim,jdim/))
810 error = nf90_put_var( ncid, id_c_d, dum2d, dims_strt, dims_end)
813 dum2d = reshape(nsst%w_0, (/idim,jdim/))
814 error = nf90_put_var( ncid, id_w_0, dum2d, dims_strt, dims_end)
817 dum2d = reshape(nsst%w_d, (/idim,jdim/))
818 error = nf90_put_var( ncid, id_w_d, dum2d, dims_strt, dims_end)
821 dum2d = reshape(nsst%xt, (/idim,jdim/))
822 error = nf90_put_var( ncid, id_xt, dum2d, dims_strt, dims_end)
825 dum2d = reshape(nsst%xs, (/idim,jdim/))
826 error = nf90_put_var( ncid, id_xs, dum2d, dims_strt, dims_end)
829 dum2d = reshape(nsst%xu, (/idim,jdim/))
830 error = nf90_put_var( ncid, id_xu, dum2d, dims_strt, dims_end)
833 dum2d = reshape(nsst%xv, (/idim,jdim/))
834 error = nf90_put_var( ncid, id_xv, dum2d, dims_strt, dims_end)
837 dum2d = reshape(nsst%xz, (/idim,jdim/))
838 error = nf90_put_var( ncid, id_xz, dum2d, dims_strt, dims_end)
841 dum2d = reshape(nsst%zm, (/idim,jdim/))
842 error = nf90_put_var( ncid, id_zm, dum2d, dims_strt, dims_end)
845 dum2d = reshape(nsst%zm, (/idim,jdim/))
846 error = nf90_put_var( ncid, id_zm, dum2d, dims_strt, dims_end)
849 dum2d = reshape(nsst%xtts, (/idim,jdim/))
850 error = nf90_put_var( ncid, id_xtts, dum2d, dims_strt, dims_end)
851 call
netcdf_err(error,
'WRITING XTTS RECORD' )
853 dum2d = reshape(nsst%xzts, (/idim,jdim/))
854 error = nf90_put_var( ncid, id_xzts, dum2d, dims_strt, dims_end)
855 call
netcdf_err(error,
'WRITING XZTS RECORD' )
857 dum2d = reshape(nsst%d_conv, (/idim,jdim/))
858 error = nf90_put_var( ncid, id_d_conv, dum2d, dims_strt, dims_end)
859 call
netcdf_err(error,
'WRITING D_CONV RECORD' )
861 dum2d = reshape(nsst%ifd, (/idim,jdim/))
862 error = nf90_put_var( ncid, id_ifd, dum2d, dims_strt, dims_end)
865 dum2d = reshape(nsst%dt_cool, (/idim,jdim/))
866 error = nf90_put_var( ncid, id_dt_cool, dum2d, dims_strt, dims_end)
867 call
netcdf_err(error,
'WRITING DT_COOL RECORD' )
869 dum2d = reshape(nsst%qrain, (/idim,jdim/))
870 error = nf90_put_var( ncid, id_qrain, dum2d, dims_strt, dims_end)
871 call
netcdf_err(error,
'WRITING QRAIN RECORD' )
873 dum2d = reshape(nsst%tfinc, (/idim,jdim/))
874 error = nf90_put_var( ncid, id_tfinc, dum2d, dims_strt, dims_end)
875 call
netcdf_err(error,
'WRITING TFINC RECORD' )
887 allocate(dum3d(idim,jdim,lsoil))
889 dum3d = reshape(slcfcs, (/idim,jdim,lsoil/))
890 error = nf90_put_var( ncid, id_slc, dum3d, dims4_strt, dims4_end)
893 dum3d = reshape(smcfcs, (/idim,jdim,lsoil/))
894 error = nf90_put_var( ncid, id_smc, dum3d, dims4_strt, dims4_end)
897 dum3d = reshape(stcfcs, (/idim,jdim,lsoil/))
898 error = nf90_put_var( ncid, id_stc, dum3d, dims4_strt, dims4_end)
903 error = nf90_close(ncid)
921 tile_num,idim,jdim,ijdim)
927 INTEGER,
INTENT(IN) :: idim, jdim, ijdim
929 CHARACTER(LEN=5),
INTENT(OUT) :: tile_num
931 REAL,
INTENT(OUT) :: rla(ijdim),rlo(ijdim)
932 REAL,
INTENT(OUT) :: orog(ijdim),orog_uf(ijdim)
934 CHARACTER(LEN=50) :: fnorog, fngrid
935 CHARACTER(LEN=3) :: rankch
937 INTEGER :: error, ncid, ncid_orog
938 INTEGER :: i, ii, j, jj, myrank
939 INTEGER :: id_dim, id_var, nx, ny
941 REAL,
ALLOCATABLE :: dummy(:,:), geolat(:,:), geolon(:,:)
942 REAL(KIND=4),
ALLOCATABLE :: dummy4(:,:)
944 CALL mpi_comm_rank(mpi_comm_world, myrank, error)
946 WRITE(rankch,
'(I3.3)') (myrank+1)
948 fngrid =
"./fngrid." // rankch
951 print*,
"READ FV3 GRID INFO FROM: "//trim(fngrid)
953 error=nf90_open(trim(fngrid),nf90_nowrite,ncid)
954 CALL
netcdf_err(error,
'OPENING FILE: '//trim(fngrid) )
956 error=nf90_inq_dimid(ncid,
'nx', id_dim)
957 CALL
netcdf_err(error,
'ERROR READING NX ID' )
959 error=nf90_inquire_dimension(ncid,id_dim,len=nx)
962 error=nf90_inq_dimid(ncid,
'ny', id_dim)
963 CALL
netcdf_err(error,
'ERROR READING NY ID' )
965 error=nf90_inquire_dimension(ncid,id_dim,len=ny)
968 IF ((nx/2) /= idim .OR. (ny/2) /= jdim)
THEN
969 print*,
'FATAL ERROR: DIMENSIONS IN FILE: ',(nx/2),(ny/2)
970 print*,
'DO NOT MATCH GRID DIMENSIONS: ',idim,jdim
971 CALL mpi_abort(mpi_comm_world, 130, error)
974 ALLOCATE(geolon(nx+1,ny+1))
975 ALLOCATE(geolat(nx+1,ny+1))
977 error=nf90_inq_varid(ncid,
'x', id_var)
979 error=nf90_get_var(ncid, id_var, geolon)
980 CALL
netcdf_err(error,
'ERROR READING X RECORD' )
982 error=nf90_inq_varid(ncid,
'y', id_var)
984 error=nf90_get_var(ncid, id_var, geolat)
985 CALL
netcdf_err(error,
'ERROR READING Y RECORD' )
987 ALLOCATE(dummy(idim,jdim))
993 dummy(i,j) = geolon(ii,jj)
997 rlo = reshape(dummy, (/ijdim/))
1005 dummy(i,j) = geolat(ii,jj)
1009 rla = reshape(dummy, (/ijdim/))
1011 DEALLOCATE(geolat, dummy)
1013 error=nf90_inq_varid(ncid,
'tile', id_var)
1014 CALL
netcdf_err(error,
'ERROR READING TILE ID' )
1015 error=nf90_get_var(ncid, id_var, tile_num)
1016 CALL
netcdf_err(error,
'ERROR READING TILE RECORD' )
1018 error = nf90_close(ncid)
1020 fnorog =
"./fnorog." // rankch
1023 print*,
"READ FV3 OROG INFO FROM: "//trim(fnorog)
1025 error=nf90_open(trim(fnorog),nf90_nowrite,ncid_orog)
1026 CALL
netcdf_err(error,
'OPENING FILE: '//trim(fnorog) )
1028 ALLOCATE(dummy4(idim,jdim))
1030 error=nf90_inq_varid(ncid_orog,
'orog_raw', id_var)
1031 CALL
netcdf_err(error,
'ERROR READING orog_raw ID' )
1032 error=nf90_get_var(ncid_orog, id_var, dummy4)
1033 CALL
netcdf_err(error,
'ERROR READING orog_raw RECORD' )
1034 orog_uf = reshape(dummy4, (/ijdim/))
1036 error=nf90_inq_varid(ncid_orog,
'orog_filt', id_var)
1037 CALL
netcdf_err(error,
'ERROR READING orog_filt ID' )
1038 error=nf90_get_var(ncid_orog, id_var, dummy4)
1039 CALL
netcdf_err(error,
'ERROR READING orog_filt RECORD' )
1040 orog = reshape(dummy4, (/ijdim/))
1044 error = nf90_close(ncid_orog)
1060 INTEGER,
INTENT(IN) :: err
1061 CHARACTER(LEN=*),
INTENT(IN) :: string
1062 CHARACTER(LEN=80) :: errmsg
1065 IF( err == nf90_noerr )
RETURN
1066 errmsg = nf90_strerror(err)
1068 print*,
'FATAL ERROR: ', trim(string),
': ', trim(errmsg)
1070 CALL mpi_abort(mpi_comm_world, 999, iret)
1091 CHARACTER(LEN=*),
INTENT(IN) :: gsi_file
1092 CHARACTER(LEN=3),
INTENT(IN) :: file_type
1093 INTEGER,
INTENT(IN),
OPTIONAL :: lsoil
1095 INTEGER :: error, id_dim, ncid
1096 INTEGER :: id_var, j
1098 INTEGER(KIND=1),
ALLOCATABLE :: idummy(:,:)
1100 REAL(KIND=8),
ALLOCATABLE :: dummy(:,:)
1102 CHARACTER(LEN=1) :: k_ch
1103 CHARACTER(LEN=10) :: incvar
1104 CHARACTER(LEN=80) :: err_msg
1108 print*,
"READ INPUT GSI DATA FROM: "//trim(gsi_file)
1110 error=nf90_open(trim(gsi_file),nf90_nowrite,ncid)
1111 CALL
netcdf_err(error,
'OPENING FILE: '//trim(gsi_file) )
1113 error=nf90_inq_dimid(ncid,
'latitude', id_dim)
1114 CALL
netcdf_err(error,
'READING latitude ID' )
1115 error=nf90_inquire_dimension(ncid,id_dim,len=jdim_gaus)
1116 CALL
netcdf_err(error,
'READING latitude length' )
1117 jdim_gaus = jdim_gaus - 2
1119 error=nf90_inq_dimid(ncid,
'longitude', id_dim)
1120 CALL
netcdf_err(error,
'READING longitude ID' )
1121 error=nf90_inquire_dimension(ncid,id_dim,len=idim_gaus)
1122 CALL
netcdf_err(error,
'READING longitude length' )
1124 IF (file_type==
'NST')
then
1125 ALLOCATE(dummy(idim_gaus,jdim_gaus+2))
1126 ALLOCATE(dtref_gaus(idim_gaus,jdim_gaus))
1128 error=nf90_inq_varid(ncid,
"dtf", id_var)
1130 error=nf90_get_var(ncid, id_var, dummy)
1133 ALLOCATE(idummy(idim_gaus,jdim_gaus+2))
1134 ALLOCATE(slmsk_gaus(idim_gaus,jdim_gaus))
1136 error=nf90_inq_varid(ncid,
"msk", id_var)
1138 error=nf90_get_var(ncid, id_var, idummy)
1144 slmsk_gaus(:,j) = idummy(:,j+1)
1145 dtref_gaus(:,j) = dummy(:,j+1)
1148 ELSEIF (file_type==
'LND')
then
1150 ALLOCATE(dummy(idim_gaus,jdim_gaus+2))
1151 ALLOCATE(stc_inc_gaus(lsoil,idim_gaus,jdim_gaus))
1155 WRITE(k_ch,
'(I1)') k
1157 incvar =
"soilt"//k_ch//
"_inc"
1158 error=nf90_inq_varid(ncid, incvar, id_var)
1159 err_msg =
"reading "//incvar//
" ID"
1161 error=nf90_get_var(ncid, id_var, dummy)
1162 err_msg =
"reading "//incvar//
" data"
1166 stc_inc_gaus(k,:,j) = dummy(:,j+1)
1170 ALLOCATE(idummy(idim_gaus,jdim_gaus+2))
1171 ALLOCATE(soilsnow_gaus(idim_gaus,jdim_gaus))
1173 error=nf90_inq_varid(ncid,
"soilsnow_mask", id_var)
1174 CALL
netcdf_err(error,
'READING soilsnow_mask ID' )
1175 error=nf90_get_var(ncid, id_var, idummy)
1176 CALL
netcdf_err(error,
'READING soilsnow_mask' )
1181 soilsnow_gaus(:,j) = idummy(:,j+1)
1186 print *,
'WARNING: FILE_TYPE', file_type,
'not recognised.', &
1187 ', no increments read in'
1190 IF(
ALLOCATED(dummy))
DEALLOCATE(dummy)
1191 IF(
ALLOCATED(idummy))
DEALLOCATE(idummy)
1193 error = nf90_close(ncid)
1244 cvfcs,cvbfcs,cvtfcs,albfcs, &
1245 slifcs,vegfcs,cnpfcs,f10m, &
1246 vetfcs,sotfcs,alffcs, &
1248 sihfcs,sicfcs,sitfcs, &
1249 tprcp,srflag,swdfcs, &
1250 vmnfcs,vmxfcs,slcfcs, &
1251 slpfcs,absfcs,t2m,q2m,slmask, &
1252 zsoil,lsoil,lensfc,do_nsst,nsst)
1257 INTEGER,
INTENT(IN) :: lsoil, lensfc
1259 LOGICAL,
INTENT(IN) :: do_nsst
1261 REAL,
INTENT(OUT) :: cvfcs(lensfc), cvbfcs(lensfc)
1262 REAL,
INTENT(OUT) :: cvtfcs(lensfc), albfcs(lensfc,4)
1263 REAL,
INTENT(OUT) :: slifcs(lensfc), cnpfcs(lensfc)
1264 REAL,
INTENT(OUT) :: vegfcs(lensfc), f10m(lensfc)
1265 REAL,
INTENT(OUT) :: vetfcs(lensfc), sotfcs(lensfc)
1266 REAL,
INTENT(OUT) :: tsffcs(lensfc), snofcs(lensfc)
1267 REAL,
INTENT(OUT) :: tg3fcs(lensfc), zorfcs(lensfc)
1268 REAL,
INTENT(OUT) :: alffcs(lensfc,2), ustar(lensfc)
1269 REAL,
INTENT(OUT) :: fmm(lensfc), fhh(lensfc)
1270 REAL,
INTENT(OUT) :: sihfcs(lensfc), sicfcs(lensfc)
1271 REAL,
INTENT(OUT) :: sitfcs(lensfc), tprcp(lensfc)
1272 REAL,
INTENT(OUT) :: srflag(lensfc), swdfcs(lensfc)
1273 REAL,
INTENT(OUT) :: vmnfcs(lensfc), vmxfcs(lensfc)
1274 REAL,
INTENT(OUT) :: slpfcs(lensfc), absfcs(lensfc)
1275 REAL,
INTENT(OUT) :: t2m(lensfc), q2m(lensfc), slmask(lensfc)
1276 REAL,
INTENT(OUT) :: slcfcs(lensfc,lsoil)
1277 REAL,
INTENT(OUT) :: smcfcs(lensfc,lsoil)
1278 REAL,
INTENT(OUT) :: stcfcs(lensfc,lsoil)
1279 REAL(KIND=4),
INTENT(OUT) :: zsoil(lsoil)
1283 CHARACTER(LEN=50) :: fnbgsi
1284 CHARACTER(LEN=3) :: rankch
1286 INTEGER :: error, ncid, myrank
1287 INTEGER :: idim, jdim, id_dim
1288 INTEGER :: id_var, ierr
1290 REAL(KIND=8),
ALLOCATABLE :: dummy(:,:), dummy3d(:,:,:)
1292 CALL mpi_comm_rank(mpi_comm_world, myrank, error)
1294 WRITE(rankch,
'(I3.3)') (myrank+1)
1296 fnbgsi =
"./fnbgsi." // rankch
1299 print*,
"READ INPUT SFC DATA FROM: "//trim(fnbgsi)
1301 error=nf90_open(trim(fnbgsi),nf90_nowrite,ncid)
1302 CALL
netcdf_err(error,
'OPENING FILE: '//trim(fnbgsi) )
1304 error=nf90_inq_dimid(ncid,
'xaxis_1', id_dim)
1306 error=nf90_inquire_dimension(ncid,id_dim,len=idim)
1309 error=nf90_inq_dimid(ncid,
'yaxis_1', id_dim)
1311 error=nf90_inquire_dimension(ncid,id_dim,len=jdim)
1314 IF ((idim*jdim) /= lensfc)
THEN
1315 print*,
'FATAL ERROR: DIMENSIONS WRONG.'
1316 CALL mpi_abort(mpi_comm_world, 88, ierr)
1319 ALLOCATE(dummy(idim,jdim))
1321 error=nf90_inq_varid(ncid,
"tsea", id_var)
1323 error=nf90_get_var(ncid, id_var, dummy)
1325 tsffcs = reshape(dummy, (/lensfc/))
1327 error=nf90_inq_varid(ncid,
"sheleg", id_var)
1329 error=nf90_get_var(ncid, id_var, dummy)
1331 snofcs = reshape(dummy, (/lensfc/))
1333 error=nf90_inq_varid(ncid,
"tg3", id_var)
1335 error=nf90_get_var(ncid, id_var, dummy)
1337 tg3fcs = reshape(dummy, (/lensfc/))
1339 error=nf90_inq_varid(ncid,
"zorl", id_var)
1341 error=nf90_get_var(ncid, id_var, dummy)
1343 zorfcs = reshape(dummy, (/lensfc/))
1345 error=nf90_inq_varid(ncid,
"alvsf", id_var)
1347 error=nf90_get_var(ncid, id_var, dummy)
1349 albfcs(:,1) = reshape(dummy, (/lensfc/))
1351 error=nf90_inq_varid(ncid,
"alvwf", id_var)
1353 error=nf90_get_var(ncid, id_var, dummy)
1355 albfcs(:,2) = reshape(dummy, (/lensfc/))
1357 error=nf90_inq_varid(ncid,
"alnsf", id_var)
1359 error=nf90_get_var(ncid, id_var, dummy)
1361 albfcs(:,3) = reshape(dummy, (/lensfc/))
1363 error=nf90_inq_varid(ncid,
"alnwf", id_var)
1365 error=nf90_get_var(ncid, id_var, dummy)
1367 albfcs(:,4) = reshape(dummy, (/lensfc/))
1369 error=nf90_inq_varid(ncid,
"slmsk", id_var)
1371 error=nf90_get_var(ncid, id_var, dummy)
1373 slifcs = reshape(dummy, (/lensfc/))
1375 WHERE (slmask > 1.5) slmask=0.0
1377 error=nf90_inq_varid(ncid,
"canopy", id_var)
1379 error=nf90_get_var(ncid, id_var, dummy)
1381 cnpfcs = reshape(dummy, (/lensfc/))
1383 error=nf90_inq_varid(ncid,
"vfrac", id_var)
1385 error=nf90_get_var(ncid, id_var, dummy)
1387 vegfcs = reshape(dummy, (/lensfc/))
1389 error=nf90_inq_varid(ncid,
"f10m", id_var)
1391 error=nf90_get_var(ncid, id_var, dummy)
1393 f10m = reshape(dummy, (/lensfc/))
1395 error=nf90_inq_varid(ncid,
"vtype", id_var)
1397 error=nf90_get_var(ncid, id_var, dummy)
1399 vetfcs = reshape(dummy, (/lensfc/))
1401 error=nf90_inq_varid(ncid,
"stype", id_var)
1403 error=nf90_get_var(ncid, id_var, dummy)
1405 sotfcs = reshape(dummy, (/lensfc/))
1407 error=nf90_inq_varid(ncid,
"facsf", id_var)
1409 error=nf90_get_var(ncid, id_var, dummy)
1411 alffcs(:,1) = reshape(dummy, (/lensfc/))
1413 error=nf90_inq_varid(ncid,
"facwf", id_var)
1415 error=nf90_get_var(ncid, id_var, dummy)
1417 alffcs(:,2) = reshape(dummy, (/lensfc/))
1419 error=nf90_inq_varid(ncid,
"uustar", id_var)
1421 error=nf90_get_var(ncid, id_var, dummy)
1423 ustar = reshape(dummy, (/lensfc/))
1425 error=nf90_inq_varid(ncid,
"ffmm", id_var)
1427 error=nf90_get_var(ncid, id_var, dummy)
1429 fmm = reshape(dummy, (/lensfc/))
1431 error=nf90_inq_varid(ncid,
"ffhh", id_var)
1433 error=nf90_get_var(ncid, id_var, dummy)
1435 fhh = reshape(dummy, (/lensfc/))
1437 error=nf90_inq_varid(ncid,
"hice", id_var)
1439 error=nf90_get_var(ncid, id_var, dummy)
1441 sihfcs = reshape(dummy, (/lensfc/))
1443 error=nf90_inq_varid(ncid,
"fice", id_var)
1445 error=nf90_get_var(ncid, id_var, dummy)
1447 sicfcs = reshape(dummy, (/lensfc/))
1449 error=nf90_inq_varid(ncid,
"tisfc", id_var)
1451 error=nf90_get_var(ncid, id_var, dummy)
1453 sitfcs = reshape(dummy, (/lensfc/))
1455 error=nf90_inq_varid(ncid,
"tprcp", id_var)
1457 error=nf90_get_var(ncid, id_var, dummy)
1459 tprcp = reshape(dummy, (/lensfc/))
1461 error=nf90_inq_varid(ncid,
"srflag", id_var)
1463 error=nf90_get_var(ncid, id_var, dummy)
1465 srflag = reshape(dummy, (/lensfc/))
1467 error=nf90_inq_varid(ncid,
"snwdph", id_var)
1469 error=nf90_get_var(ncid, id_var, dummy)
1471 swdfcs = reshape(dummy, (/lensfc/))
1473 error=nf90_inq_varid(ncid,
"shdmin", id_var)
1475 error=nf90_get_var(ncid, id_var, dummy)
1477 vmnfcs = reshape(dummy, (/lensfc/))
1479 error=nf90_inq_varid(ncid,
"shdmax", id_var)
1481 error=nf90_get_var(ncid, id_var, dummy)
1483 vmxfcs = reshape(dummy, (/lensfc/))
1485 error=nf90_inq_varid(ncid,
"slope", id_var)
1487 error=nf90_get_var(ncid, id_var, dummy)
1489 slpfcs = reshape(dummy, (/lensfc/))
1491 error=nf90_inq_varid(ncid,
"snoalb", id_var)
1493 error=nf90_get_var(ncid, id_var, dummy)
1495 absfcs = reshape(dummy, (/lensfc/))
1497 error=nf90_inq_varid(ncid,
"t2m", id_var)
1499 error=nf90_get_var(ncid, id_var, dummy)
1501 t2m = reshape(dummy, (/lensfc/))
1503 error=nf90_inq_varid(ncid,
"q2m", id_var)
1505 error=nf90_get_var(ncid, id_var, dummy)
1507 q2m = reshape(dummy, (/lensfc/))
1509 nsst_read :
IF(do_nsst)
THEN
1512 print*,
"WILL READ NSST RECORDS."
1514 error=nf90_inq_varid(ncid,
"c_0", id_var)
1516 error=nf90_get_var(ncid, id_var, dummy)
1518 nsst%C_0 = reshape(dummy, (/lensfc/))
1520 error=nf90_inq_varid(ncid,
"c_d", id_var)
1522 error=nf90_get_var(ncid, id_var, dummy)
1524 nsst%C_D = reshape(dummy, (/lensfc/))
1526 error=nf90_inq_varid(ncid,
"d_conv", id_var)
1528 error=nf90_get_var(ncid, id_var, dummy)
1530 nsst%D_CONV = reshape(dummy, (/lensfc/))
1532 error=nf90_inq_varid(ncid,
"dt_cool", id_var)
1533 CALL
netcdf_err(error,
'READING dt_cool ID' )
1534 error=nf90_get_var(ncid, id_var, dummy)
1536 nsst%DT_COOL = reshape(dummy, (/lensfc/))
1538 error=nf90_inq_varid(ncid,
"ifd", id_var)
1540 error=nf90_get_var(ncid, id_var, dummy)
1542 nsst%IFD = reshape(dummy, (/lensfc/))
1544 error=nf90_inq_varid(ncid,
"qrain", id_var)
1546 error=nf90_get_var(ncid, id_var, dummy)
1548 nsst%QRAIN = reshape(dummy, (/lensfc/))
1550 error=nf90_inq_varid(ncid,
"tref", id_var)
1552 error=nf90_get_var(ncid, id_var, dummy)
1554 nsst%TREF = reshape(dummy, (/lensfc/))
1556 error=nf90_inq_varid(ncid,
"w_0", id_var)
1558 error=nf90_get_var(ncid, id_var, dummy)
1560 nsst%W_0 = reshape(dummy, (/lensfc/))
1562 error=nf90_inq_varid(ncid,
"w_d", id_var)
1564 error=nf90_get_var(ncid, id_var, dummy)
1566 nsst%W_D = reshape(dummy, (/lensfc/))
1568 error=nf90_inq_varid(ncid,
"xs", id_var)
1570 error=nf90_get_var(ncid, id_var, dummy)
1572 nsst%XS = reshape(dummy, (/lensfc/))
1574 error=nf90_inq_varid(ncid,
"xt", id_var)
1576 error=nf90_get_var(ncid, id_var, dummy)
1578 nsst%XT = reshape(dummy, (/lensfc/))
1580 error=nf90_inq_varid(ncid,
"xtts", id_var)
1582 error=nf90_get_var(ncid, id_var, dummy)
1584 nsst%XTTS = reshape(dummy, (/lensfc/))
1586 error=nf90_inq_varid(ncid,
"xu", id_var)
1588 error=nf90_get_var(ncid, id_var, dummy)
1590 nsst%XU = reshape(dummy, (/lensfc/))
1592 error=nf90_inq_varid(ncid,
"xv", id_var)
1594 error=nf90_get_var(ncid, id_var, dummy)
1596 nsst%XV = reshape(dummy, (/lensfc/))
1598 error=nf90_inq_varid(ncid,
"xz", id_var)
1600 error=nf90_get_var(ncid, id_var, dummy)
1602 nsst%XZ = reshape(dummy, (/lensfc/))
1604 error=nf90_inq_varid(ncid,
"xzts", id_var)
1606 error=nf90_get_var(ncid, id_var, dummy)
1608 nsst%XZTS = reshape(dummy, (/lensfc/))
1610 error=nf90_inq_varid(ncid,
"z_c", id_var)
1612 error=nf90_get_var(ncid, id_var, dummy)
1614 nsst%Z_C = reshape(dummy, (/lensfc/))
1616 error=nf90_inq_varid(ncid,
"zm", id_var)
1618 error=nf90_get_var(ncid, id_var, dummy)
1620 nsst%ZM = reshape(dummy, (/lensfc/))
1626 ALLOCATE(dummy3d(idim,jdim,lsoil))
1628 error=nf90_inq_varid(ncid,
"smc", id_var)
1630 error=nf90_get_var(ncid, id_var, dummy3d)
1632 smcfcs = reshape(dummy3d, (/lensfc,lsoil/))
1634 error=nf90_inq_varid(ncid,
"slc", id_var)
1636 error=nf90_get_var(ncid, id_var, dummy3d)
1638 slcfcs = reshape(dummy3d, (/lensfc,lsoil/))
1640 error=nf90_inq_varid(ncid,
"stc", id_var)
1642 error=nf90_get_var(ncid, id_var, dummy3d)
1644 stcfcs = reshape(dummy3d, (/lensfc,lsoil/))
1662 error = nf90_close(ncid)
1689 character(*) ,
intent(in ) :: file_sst
1690 integer ,
intent(in ) :: mon,mlat_sst,mlon_sst
1691 real,
dimension(mlat_sst) ,
intent( out) :: rlats_sst
1692 real,
dimension(mlon_sst) ,
intent( out) :: rlons_sst
1693 real,
dimension(mlon_sst,mlat_sst) ,
intent( out) :: sst
1696 integer,
parameter:: lu_sst = 21
1697 real,
parameter :: deg2rad = 3.141593/180.0
1700 logical(1),
allocatable,
dimension(:) :: lb
1704 integer :: iret,ni,nj
1705 integer :: mscan,kb1,ierr
1706 integer :: jincdir,i,iincdir,kb2,kb3,kf,kg,k,j,jf
1707 integer,
dimension(22):: jgds,kgds
1708 integer,
dimension(25):: jpds,kpds
1713 real,
allocatable,
dimension(:) :: f
1718 write(*,*)
' sstclm : ',file_sst
1719 call baopenr(lu_sst,trim(file_sst),iret)
1720 if (iret /= 0 )
then
1721 write(6,*)
'FATAL ERROR in read_tf_clm_grb: error opening sst file.'
1722 CALL mpi_abort(mpi_comm_world, 111, ierr)
1732 call getgbh(lu_sst,0,j,jpds,jgds,kg,kf,k,kpds,kgds,iret)
1741 allocate(lb(nlat_sst*nlon_sst))
1742 allocate(f(nlat_sst*nlon_sst))
1743 jf=nlat_sst*nlon_sst
1746 call getgb(lu_sst,0,jf,j,jpds,jgds,kf,k,kpds,kgds,lb,f,iret)
1748 write(6,*)
'FATAL ERROR in read_tf_clm_grb: error reading sst analysis data record.'
1750 CALL mpi_abort(mpi_comm_world, 111, ierr)
1753 if ( (nlat_sst /= mlat_sst) .or. (nlon_sst /= mlon_sst) )
then
1754 write(6,*)
'FATAL ERROR in read_rtg_org: inconsistent dimensions. mlat_sst,mlon_sst=',&
1755 mlat_sst,mlon_sst,
' -versus- nlat_sst,nlon_sst=',nlat_sst,nlon_sst
1757 CALL mpi_abort(mpi_comm_world, 111, ierr)
1763 dres = 180.0/
real(nlat_sst)
1764 ysst0 = 0.5*dres-90.0
1769 rlats_sst(j) = ysst0 +
real(j-1)*dres
1773 rlons_sst(i) = (xsst0 +
real(i-1)*dres)
1781 kb1=ibits(mscan,7,1)
1782 kb2=ibits(mscan,6,1)
1783 kb3=ibits(mscan,5,1)
1798 i=(ni+1)*kb1+(mod(k-1,ni)+1)*iincdir
1799 j=(nj+1)*(1-kb2)+jincdir*((k-1)/ni+1)
1801 j=(nj+1)*(1-kb2)+(mod(k-1,nj)+1)*jincdir
1802 i=(ni+1)*kb1+iincdir*((k-1)/nj+1)
1809 call baclose(lu_sst,iret)
1810 if (iret /= 0 )
then
1811 write(6,*)
'FATAL ERROR in read_tf_clm_grb: error closing sst file.'
1812 CALL mpi_abort(mpi_comm_world, 121, ierr)
1830 character(*) ,
intent(in ) :: file_sst
1831 integer ,
intent(out) :: mlat_sst,mlon_sst
1834 integer,
parameter:: lu_sst = 21
1837 integer :: mscan,kb1
1838 integer :: kf,kg,k,j,ierr
1839 integer,
dimension(22):: jgds,kgds
1840 integer,
dimension(25):: jpds,kpds
1845 call baopenr(lu_sst,trim(file_sst),iret)
1846 if (iret /= 0 )
then
1847 write(6,*)
'FATAL ERROR in get_tf_clm_dim: error opening sst file.'
1848 CALL mpi_abort(mpi_comm_world, 111, ierr)
1858 call getgbh(lu_sst,0,j,jpds,jgds,kg,kf,k,kpds,kgds,iret)
1863 write(*,*)
'mlat_sst, mlon_sst : ',mlat_sst, mlon_sst
1865 call baclose(lu_sst,iret)
1866 if (iret /= 0 )
then
1867 write(6,*)
'FATAL ERROR in get_tf_clm_dim: error closing sst file.'
1868 CALL mpi_abort(mpi_comm_world, 121, ierr)
1888 character (len=*),
intent(in) :: filename
1889 integer,
intent(in) :: nlat,nlon
1890 integer,
intent(in) :: itime
1891 real,
dimension(nlat),
intent(out) :: xlats
1892 real,
dimension(nlon),
intent(out) :: xlons
1893 real,
dimension(nlon,nlat),
intent(out) :: sal
1895 integer :: ncid,ntime
1897 integer,
parameter :: ndims = 3
1898 character (len = *),
parameter :: lat_name =
"latitude"
1899 character (len = *),
parameter :: lon_name =
"longitude"
1900 character (len = *),
parameter :: t_name =
"time"
1901 character (len = *),
parameter :: sal_name=
"sal"
1902 integer :: no_fill,fill_value
1903 integer :: time_varid,lon_varid, lat_varid, z_varid, sal_varid
1906 integer,
dimension(ndims) :: start,
count
1908 character (len = *),
parameter :: units =
"units"
1909 character (len = *),
parameter :: sal_units =
"psu"
1911 character (len = *),
parameter :: time_units =
"months"
1912 character (len = *),
parameter :: lat_units =
"degrees_north"
1913 character (len = *),
parameter :: lon_units =
"degrees_east"
1920 call
nc_check( nf90_open(filename, nf90_nowrite, ncid) )
1923 call
nc_check( nf90_inq_varid(ncid, t_name, time_varid) )
1924 call
nc_check( nf90_inq_varid(ncid, lat_name, lat_varid) )
1925 call
nc_check( nf90_inq_varid(ncid, lon_name, lon_varid) )
1929 call
nc_check( nf90_get_var(ncid, lat_varid, xlats) )
1930 call
nc_check( nf90_get_var(ncid, lon_varid, xlons) )
1933 call
nc_check( nf90_inq_varid(ncid, sal_name,sal_varid) )
1937 start = (/ 1, 1, itime /)
1938 count = (/ nlon, nlat, 1 /)
1942 call
nc_check( nf90_get_var(ncid, sal_varid, sal, start,
count) )
1963 character (len=*),
intent(in) :: filename
1964 integer,
intent(out) :: nlat,nlon
1966 character (len = *),
parameter :: lat_name =
"latitude"
1967 character (len = *),
parameter :: lon_name =
"longitude"
1969 integer :: latdimid,londimid
1972 call
nc_check( nf90_open(filename, nf90_nowrite, ncid) )
1975 call
nc_check( nf90_inq_dimid(ncid,lat_name,latdimid) )
1976 call
nc_check( nf90_inq_dimid(ncid,lon_name,londimid) )
1977 call
nc_check( nf90_inquire_dimension(ncid,latdimid,len=nlat) )
1978 call
nc_check( nf90_inquire_dimension(ncid,londimid,len=nlon) )
2001 integer,
intent ( in) :: status
2004 if(status /= nf90_noerr)
then
2005 print *,
'FATAL ERROR:'
2006 print *, trim(nf90_strerror(status))
2007 CALL mpi_abort(mpi_comm_world, 122, ierr)
subroutine count(slimsk, sno, ijmax)
Counts the number of model points that are snow covered land, snow-free land, open water...
subroutine, public read_lat_lon_orog(RLA, RLO, OROG, OROG_UF, TILE_NUM, IDIM, JDIM, IJDIM)
Read latitude and longitude for the cubed-sphere tile from the 'grid' file.
subroutine, public read_data(TSFFCS, SMCFCS, SNOFCS, STCFCS, TG3FCS, ZORFCS, CVFCS, CVBFCS, CVTFCS, ALBFCS, SLIFCS, VEGFCS, CNPFCS, F10M, VETFCS, SOTFCS, ALFFCS, USTAR, FMM, FHH, SIHFCS, SICFCS, SITFCS, TPRCP, SRFLAG, SWDFCS, VMNFCS, VMXFCS, SLCFCS, SLPFCS, ABSFCS, T2M, Q2M, SLMASK, ZSOIL, LSOIL, LENSFC, DO_NSST, NSST)
Read the first guess surface records and nsst records (if selected) for a single cubed-sphere tile...
subroutine nc_check(status)
Check the NetCDF status code.
subroutine netcdf_err(error)
Print the error message for a given netCDF return code.
subroutine, public get_dim_nc(filename, nlat, nlon)
Get the i/j dimensions of the data from a NetCDF file.
subroutine, public read_salclm_gfs_nc(filename, sal, xlats, xlons, nlat, nlon, itime)
Read the woa05 salinity monthly climatology file.
subroutine, public get_tf_clm_dim(file_sst, mlat_sst, mlon_sst)
Get the i/j dimensions of RTG SST climatology file.
subroutine, public write_data(slifcs, tsffcs, snofcs, tg3fcs, zorfcs, albfcs, alffcs, vegfcs, cnpfcs, f10m, t2m, q2m, vetfcs, sotfcs, ustar, fmm, fhh, sicfcs, sihfcs, sitfcs, tprcp, srflag, swdfcs, vmnfcs, vmxfcs, slpfcs, absfcs, slcfcs, smcfcs, stcfcs, idim, jdim, lensfc, lsoil, do_nsst, nsst)
Write out all surface records - and nsst records if selected - on a single cubed-sphere tile to a mod...
subroutine, public read_gsi_data(GSI_FILE, FILE_TYPE, LSOIL)
Read increment file from the GSI containing either the foundation temperature increments and mask...
This module contains routines that read and write data.
subroutine, public read_tf_clim_grb(file_sst, sst, rlats_sst, rlons_sst, mlat_sst, mlon_sst, mon)
Read a GRIB1 sst climatological analysis file.