FV3 Bundle
fv_io_nlm.F90
Go to the documentation of this file.
1 !***********************************************************************
2 !* GNU General Public License *
3 !* This file is a part of fvGFS. *
4 !* *
5 !* fvGFS is free software; you can redistribute it and/or modify it *
6 !* and are expected to follow the terms of the GNU General Public *
7 !* License as published by the Free Software Foundation; either *
8 !* version 2 of the License, or (at your option) any later version. *
9 !* *
10 !* fvGFS is distributed in the hope that it will be useful, but *
11 !* WITHOUT ANY WARRANTY; without even the implied warranty of *
12 !* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
13 !* General Public License for more details. *
14 !* *
15 !* For the full text of the GNU General Public License, *
16 !* write to: Free Software Foundation, Inc., *
17 !* 675 Mass Ave, Cambridge, MA 02139, USA. *
18 !* or see: http://www.gnu.org/licenses/gpl.html *
19 !***********************************************************************
20 !!!NOTE: Merging in the seasonal forecast initialization code
21 !!!! has proven problematic in the past, since many conflicts
22 !!!! occur. Leaving this for now --- lmh 10aug15
23 
25 
26  !<OVERVIEW>
27  ! Restart facilities for FV core
28  !</OVERVIEW>
29  !<DESCRIPTION>
30  ! This module writes and reads restart files for the FV core. Additionally
31  ! it provides setup and calls routines necessary to provide a complete restart
32  ! for the model.
33  !</DESCRIPTION>
34 
35  use fms_mod, only: file_exist
43  use mpp_mod, only: mpp_error, fatal, note, warning, mpp_root_pe, &
44  mpp_sync, mpp_pe, mpp_declare_pelist
45  use mpp_domains_mod, only: domain2d, east, west, north, center, south, corner, &
47  mpp_get_layout, mpp_get_ntile_count, &
49  use tracer_manager_mod, only: tr_get_tracer_names=>get_tracer_names, &
53  use field_manager_mod, only: model_atmos
54  use external_sst_nlm_mod, only: sst_ncep, sst_anom, use_ncep_sst
56  use fv_eta_nlm_mod, only: set_eta
57 
58  use fv_mp_nlm_mod, only: ng, mp_gather, is_master
59  use fms_io_mod, only: set_domain
60 
61  implicit none
62  private
63 
68 
69  logical :: module_is_initialized = .false.
70 
71  integer ::grid_xtdimid, grid_ytdimid, haloid, pfullid !For writing BCs
73 
74 contains
75 
76  !#####################################################################
77  ! <SUBROUTINE NAME="fv_io_init">
78  !
79  ! <DESCRIPTION>
80  ! Initialize the fv core restart facilities
81  ! </DESCRIPTION>
82  !
83  subroutine fv_io_init()
85  end subroutine fv_io_init
86  ! </SUBROUTINE> NAME="fv_io_init"
87 
88 
89  !#####################################################################
90  ! <SUBROUTINE NAME="fv_io_exit">
91  !
92  ! <DESCRIPTION>
93  ! Close the fv core restart facilities
94  ! </DESCRIPTION>
95  !
96  subroutine fv_io_exit
98  end subroutine fv_io_exit
99  ! </SUBROUTINE> NAME="fv_io_exit"
100 
101 
102 
103  !#####################################################################
104  ! <SUBROUTINE NAME="fv_io_read_restart">
105  !
106  ! <DESCRIPTION>
107  ! Write the fv core restart quantities
108  ! </DESCRIPTION>
109  subroutine fv_io_read_restart(fv_domain,Atm)
110  type(domain2d), intent(inout) :: fv_domain
111  type(fv_atmos_type), intent(inout) :: atm(:)
112 
113  character(len=64) :: fname, tracer_name
114  character(len=6) :: stile_name
115  integer :: isc, iec, jsc, jec, n, nt, nk, ntracers
116  integer :: ntileme
117  integer :: ks, ntiles
118  real :: ptop
119 
120  character(len=128) :: tracer_longname, tracer_units
121 
122  ntileme = size(atm(:)) ! This will need mods for more than 1 tile per pe
123 
124  call restore_state(atm(1)%Fv_restart)
125 
126  if ( use_ncep_sst .or. atm(1)%flagstruct%nudge .or. atm(1)%flagstruct%ncep_ic ) then
127  call mpp_error(note, 'READING FROM SST_RESTART DISABLED')
128  !call restore_state(Atm(1)%SST_restart)
129  endif
130 
131 ! fix for single tile runs where you need fv_core.res.nc and fv_core.res.tile1.nc
132  ntiles = mpp_get_ntile_count(fv_domain)
133  if(ntiles == 1 .and. .not. atm(1)%neststruct%nested) then
134  stile_name = '.tile1'
135  else
136  stile_name = ''
137  endif
138 
139  do n = 1, ntileme
140  call restore_state(atm(n)%Fv_tile_restart)
141 
142 !--- restore data for fv_tracer - if it exists
143  fname = 'INPUT/fv_tracer.res'//trim(stile_name)//'.nc'
144  if (file_exist(fname)) then
145  call restore_state(atm(n)%Tra_restart)
146  else
147  call mpp_error(note,'==> Warning from fv_read_restart: Expected file '//trim(fname)//' does not exist')
148  endif
149 
150 !--- restore data for surface winds - if it exists
151  fname = 'INPUT/fv_srf_wnd.res'//trim(stile_name)//'.nc'
152  if (file_exist(fname)) then
153  call restore_state(atm(n)%Rsf_restart)
154  atm(n)%flagstruct%srf_init = .true.
155  else
156  call mpp_error(note,'==> Warning from fv_read_restart: Expected file '//trim(fname)//' does not exist')
157  atm(n)%flagstruct%srf_init = .false.
158  endif
159 
160  if ( atm(n)%flagstruct%fv_land ) then
161 !--- restore data for mg_drag - if it exists
162  fname = 'INPUT/mg_drag.res'//trim(stile_name)//'.nc'
163  if (file_exist(fname)) then
164  call restore_state(atm(n)%Mg_restart)
165  else
166  call mpp_error(note,'==> Warning from fv_read_restart: Expected file '//trim(fname)//' does not exist')
167  endif
168 !--- restore data for fv_land - if it exists
169  fname = 'INPUT/fv_land.res'//trim(stile_name)//'.nc'
170  if (file_exist(fname)) then
171  call restore_state(atm(n)%Lnd_restart)
172  else
173  call mpp_error(note,'==> Warning from fv_read_restart: Expected file '//trim(fname)//' does not exist')
174  endif
175  endif
176 
177  end do
178 
179  return
180 
181  end subroutine fv_io_read_restart
182  ! </SUBROUTINE> NAME="fv_io_read_restart"
183  !#####################################################################
184 
185 
186  subroutine fv_io_read_tracers(fv_domain,Atm)
187  type(domain2d), intent(inout) :: fv_domain
188  type(fv_atmos_type), intent(inout) :: atm(:)
189  integer :: n, ntracers, ntprog, nt, isc, iec, jsc, jec, id_restart
190  character(len=6) :: stile_name
191  character(len=64):: fname, tracer_name
192  type(restart_file_type) :: tra_restart_r
193  integer :: ntiles
194 
195  n = 1
196  isc = atm(n)%bd%isc
197  iec = atm(n)%bd%iec
198  jsc = atm(n)%bd%jsc
199  jec = atm(n)%bd%jec
200  call get_number_tracers(model_atmos, num_tracers=ntracers, num_prog=ntprog)
201 
202 ! fix for single tile runs where you need fv_core.res.nc and fv_core.res.tile1.nc
203  ntiles = mpp_get_ntile_count(fv_domain)
204  if(ntiles == 1 .and. .not. atm(1)%neststruct%nested) then
205  stile_name = '.tile1'
206  else
207  stile_name = ''
208  endif
209 
210  fname = 'fv_tracer.res'//trim(stile_name)//'.nc'
211  do nt = 2, ntprog
212  call get_tracer_names(model_atmos, nt, tracer_name)
213  call set_tracer_profile (model_atmos, nt, atm(n)%q(isc:iec,jsc:jec,:,nt) )
214  id_restart = register_restart_field(tra_restart_r, fname, tracer_name, atm(n)%q(:,:,:,nt), &
215  domain=fv_domain, mandatory=.false., tile_count=n)
216  enddo
217  do nt = ntprog+1, ntracers
218  call get_tracer_names(model_atmos, nt, tracer_name)
219  call set_tracer_profile (model_atmos, nt, atm(n)%qdiag(isc:iec,jsc:jec,:,nt) )
220  id_restart = register_restart_field(tra_restart_r, fname, tracer_name, atm(n)%qdiag(:,:,:,nt), &
221  domain=fv_domain, mandatory=.false., tile_count=n)
222  enddo
223  if (file_exist('INPUT'//trim(fname))) then
224  call restore_state(tra_restart_r)
225  call free_restart_type(tra_restart_r)
226  else
227  call mpp_error(note,'==> Warning from fv_io_read_tracers: Expected file '//trim(fname)//' does not exist')
228  endif
229 
230  return
231 
232  end subroutine fv_io_read_tracers
233 
234 
235  subroutine remap_restart(fv_domain,Atm)
237 
238  type(domain2d), intent(inout) :: fv_domain
239  type(fv_atmos_type), intent(inout) :: atm(:)
240 
241  character(len=64) :: fname, tracer_name
242  character(len=6) :: stile_name
243  integer :: isc, iec, jsc, jec, n, nt, nk, ntracers, ntprog, ntdiag
244  integer :: isd, ied, jsd, jed
245  integer :: ntiles
246  type(restart_file_type) :: fv_restart_r, fv_tile_restart_r, tra_restart_r
247  integer :: id_restart
248 
249 !
250 !-------------------------------------------------------------------------
251  real, allocatable:: ak_r(:), bk_r(:)
252  real, allocatable:: u_r(:,:,:), v_r(:,:,:), pt_r(:,:,:), delp_r(:,:,:)
253  real, allocatable:: w_r(:,:,:), delz_r(:,:,:), ze0_r(:,:,:)
254  real, allocatable:: q_r(:,:,:,:), qdiag_r(:,:,:,:)
255 !-------------------------------------------------------------------------
256  integer npz, npz_rst, ng
257 
258  npz = atm(1)%npz ! run time z dimension
259  npz_rst = atm(1)%flagstruct%npz_rst ! restart z dimension
260  isc = atm(1)%bd%isc; iec = atm(1)%bd%iec; jsc = atm(1)%bd%jsc; jec = atm(1)%bd%jec
261  ng = atm(1)%ng
262 
263  isd = isc - ng; ied = iec + ng
264  jsd = jsc - ng; jed = jec + ng
265 
266 
267 ! call get_number_tracers(MODEL_ATMOS, num_tracers=ntracers)
268  ntprog = size(atm(1)%q,4) ! Temporary until we get tracer manager integrated
269  ntdiag = size(atm(1)%qdiag,4)
270  ntracers = ntprog+ntdiag
271 
272 ! ntileMe = size(Atm(:)) ! This will have to be modified for mult tiles per PE
273 
274 
275 ! Allocate arrays for reading old restart file:
276  allocate ( ak_r(npz_rst+1) )
277  allocate ( bk_r(npz_rst+1) )
278 
279  allocate ( u_r(isc:iec, jsc:jec+1,npz_rst) )
280  allocate ( v_r(isc:iec+1,jsc:jec ,npz_rst) )
281 
282  allocate ( pt_r(isc:iec, jsc:jec, npz_rst) )
283  allocate ( delp_r(isc:iec, jsc:jec, npz_rst) )
284  allocate ( q_r(isc:iec, jsc:jec, npz_rst, ntprog) )
285  allocate (qdiag_r(isc:iec, jsc:jec, npz_rst, ntprog+1:ntracers) )
286 
287  if ( (.not.atm(1)%flagstruct%hydrostatic) .and. (.not.atm(1)%flagstruct%make_nh) ) then
288  allocate ( w_r(isc:iec, jsc:jec, npz_rst) )
289  allocate ( delz_r(isc:iec, jsc:jec, npz_rst) )
290  if ( atm(1)%flagstruct%hybrid_z ) &
291  allocate ( ze0_r(isc:iec, jsc:jec, npz_rst+1) )
292  endif
293 
294  fname = 'fv_core.res.nc'
295  id_restart = register_restart_field(fv_restart_r, fname, 'ak', ak_r(:), no_domain=.true.)
296  id_restart = register_restart_field(fv_restart_r, fname, 'bk', bk_r(:), no_domain=.true.)
297  call restore_state(fv_restart_r)
298  call free_restart_type(fv_restart_r)
299 
300 ! fix for single tile runs where you need fv_core.res.nc and fv_core.res.tile1.nc
301  ntiles = mpp_get_ntile_count(fv_domain)
302  if(ntiles == 1 .and. .not. atm(1)%neststruct%nested) then
303  stile_name = '.tile1'
304  else
305  stile_name = ''
306  endif
307 
308 ! do n = 1, ntileMe
309  n = 1
310  fname = 'fv_core.res'//trim(stile_name)//'.nc'
311  id_restart = register_restart_field(fv_tile_restart_r, fname, 'u', u_r, &
312  domain=fv_domain, position=north,tile_count=n)
313  id_restart = register_restart_field(fv_tile_restart_r, fname, 'v', v_r, &
314  domain=fv_domain, position=east,tile_count=n)
315  if (.not.atm(n)%flagstruct%hydrostatic) then
316  id_restart = register_restart_field(fv_tile_restart_r, fname, 'W', w_r, &
317  domain=fv_domain, mandatory=.false., tile_count=n)
318  id_restart = register_restart_field(fv_tile_restart_r, fname, 'DZ', delz_r, &
319  domain=fv_domain, mandatory=.false., tile_count=n)
320  if ( atm(n)%flagstruct%hybrid_z ) then
321  id_restart = register_restart_field(fv_tile_restart_r, fname, 'ZE0', ze0_r, &
322  domain=fv_domain, mandatory=.false., tile_count=n)
323  endif
324  endif
325  id_restart = register_restart_field(fv_tile_restart_r, fname, 'T', pt_r, &
326  domain=fv_domain, tile_count=n)
327  id_restart = register_restart_field(fv_tile_restart_r, fname, 'delp', delp_r, &
328  domain=fv_domain, tile_count=n)
329  id_restart = register_restart_field(fv_tile_restart_r, fname, 'phis', atm(n)%phis, &
330  domain=fv_domain, tile_count=n)
331  call restore_state(fv_tile_restart_r)
332  call free_restart_type(fv_tile_restart_r)
333  fname = 'INPUT/fv_srf_wnd.res'//trim(stile_name)//'.nc'
334  if (file_exist(fname)) then
335  call restore_state(atm(n)%Rsf_restart)
336  atm(n)%flagstruct%srf_init = .true.
337  else
338  call mpp_error(note,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
339  atm(n)%flagstruct%srf_init = .false.
340  endif
341 
342  if ( atm(n)%flagstruct%fv_land ) then
343 !--- restore data for mg_drag - if it exists
344  fname = 'INPUT/mg_drag.res'//trim(stile_name)//'.nc'
345  if (file_exist(fname)) then
346  call restore_state(atm(n)%Mg_restart)
347  else
348  call mpp_error(note,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
349  endif
350 !--- restore data for fv_land - if it exists
351  fname = 'INPUT/fv_land.res'//trim(stile_name)//'.nc'
352  if (file_exist(fname)) then
353  call restore_state(atm(n)%Lnd_restart)
354  else
355  call mpp_error(note,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
356  endif
357  endif
358 
359  fname = 'fv_tracer.res'//trim(stile_name)//'.nc'
360  if (file_exist('INPUT'//trim(fname))) then
361  do nt = 1, ntprog
362  call get_tracer_names(model_atmos, nt, tracer_name)
363  call set_tracer_profile (model_atmos, nt, q_r(isc:iec,jsc:jec,:,nt) )
364  id_restart = register_restart_field(tra_restart_r, fname, tracer_name, q_r(:,:,:,nt), &
365  domain=fv_domain, mandatory=.false., tile_count=n)
366  enddo
367  do nt = ntprog+1, ntracers
368  call get_tracer_names(model_atmos, nt, tracer_name)
369  call set_tracer_profile (model_atmos, nt, qdiag_r(isc:iec,jsc:jec,:,nt) )
370  id_restart = register_restart_field(tra_restart_r, fname, tracer_name, qdiag_r(:,:,:,nt), &
371  domain=fv_domain, mandatory=.false., tile_count=n)
372  enddo
373  call restore_state(tra_restart_r)
374  call free_restart_type(tra_restart_r)
375  else
376  call mpp_error(note,'==> Warning from remap_restart: Expected file '//trim(fname)//' does not exist')
377  endif
378 
379  call rst_remap(npz_rst, npz, isc, iec, jsc, jec, isd, ied, jsd, jed, ntracers, ntprog, &
380  delp_r, u_r, v_r, w_r, delz_r, pt_r, q_r, qdiag_r,&
381  atm(n)%delp, atm(n)%u, atm(n)%v, atm(n)%w, atm(n)%delz, atm(n)%pt, atm(n)%q, &
382  atm(n)%qdiag, ak_r, bk_r, atm(n)%ptop, atm(n)%ak, atm(n)%bk, &
383  atm(n)%flagstruct%hydrostatic, atm(n)%flagstruct%make_nh, atm(n)%domain, &
384  atm(n)%gridstruct%square_domain)
385  !end do
386 
387  deallocate( ak_r )
388  deallocate( bk_r )
389  deallocate( u_r )
390  deallocate( v_r )
391  deallocate( pt_r )
392  deallocate( delp_r )
393  deallocate( q_r )
394  deallocate( qdiag_r )
395 
396  if ( (.not.atm(1)%flagstruct%hydrostatic) .and. (.not.atm(1)%flagstruct%make_nh) ) then
397  deallocate ( w_r )
398  deallocate ( delz_r )
399  if ( atm(1)%flagstruct%hybrid_z ) deallocate ( ze0_r )
400  endif
401 
402  end subroutine remap_restart
403 
404 
405  !#####################################################################
406  ! <SUBROUTINE NAME="fv_io_register_nudge_restart">
407  !
408  ! <DESCRIPTION>
409  ! register restart nudge field to be written out to restart file.
410  ! </DESCRIPTION>
411  subroutine fv_io_register_nudge_restart(Atm)
412  type(fv_atmos_type), intent(inout) :: atm(:)
413  character(len=64) :: fname
414  integer :: id_restart
415 
416 ! use_ncep_sst may not be initialized at this point?
417  call mpp_error(note, 'READING FROM SST_restart DISABLED')
418 !!$ if ( use_ncep_sst .or. Atm(1)%nudge .or. Atm(1)%ncep_ic ) then
419 !!$ fname = 'sst_ncep.res.nc'
420 !!$ id_restart = register_restart_field(Atm(1)%SST_restart, fname, 'sst_ncep', sst_ncep)
421 !!$ id_restart = register_restart_field(Atm(1)%SST_restart, fname, 'sst_anom', sst_anom)
422 !!$ endif
423 
424  end subroutine fv_io_register_nudge_restart
425  ! </SUBROUTINE> NAME="fv_io_register_nudge_restart"
426 
427 
428  !#####################################################################
429  ! <SUBROUTINE NAME="fv_io_register_restart">
430  !
431  ! <DESCRIPTION>
432  ! register restart field to be written out to restart file.
433  ! </DESCRIPTION>
434  subroutine fv_io_register_restart(fv_domain,Atm)
435  type(domain2d), intent(inout) :: fv_domain
436  type(fv_atmos_type), intent(inout) :: atm(:)
437 
438  character(len=64) :: fname, tracer_name
439  character(len=6) :: gn, stile_name
440  integer :: id_restart
441  integer :: n, nt, ntracers, ntprog, ntdiag, ntileme, ntiles
442 
443  ntileme = size(atm(:))
444  ntprog = size(atm(1)%q,4)
445  ntdiag = size(atm(1)%qdiag,4)
446  ntracers = ntprog+ntdiag
447 
448 !--- set the 'nestXX' appendix for all files using fms_io
449  if (atm(1)%grid_number > 1) then
450  write(gn,'(A4, I2.2)') "nest", atm(1)%grid_number
451  else
452  gn = ''
453  end if
454  call set_filename_appendix(gn)
455 
456 !--- fix for single tile runs where you need fv_core.res.nc and fv_core.res.tile1.nc
457  ntiles = mpp_get_ntile_count(fv_domain)
458  if(ntiles == 1 .and. .not. atm(1)%neststruct%nested) then
459  stile_name = '.tile1'
460  else
461  stile_name = ''
462  endif
463 
464 ! use_ncep_sst may not be initialized at this point?
465 #ifndef DYCORE_SOLO
466  call mpp_error(note, 'READING FROM SST_RESTART DISABLED')
467 !!$ if ( use_ncep_sst .or. Atm(1)%flagstruct%nudge .or. Atm(1)%flagstruct%ncep_ic ) then
468 !!$ fname = 'sst_ncep'//trim(gn)//'.res.nc'
469 !!$ id_restart = register_restart_field(Atm(1)%SST_restart, fname, 'sst_ncep', sst_ncep)
470 !!$ id_restart = register_restart_field(Atm(1)%SST_restart, fname, 'sst_anom', sst_anom)
471 !!$ endif
472 #endif
473 
474  fname = 'fv_core.res.nc'
475  id_restart = register_restart_field(atm(1)%Fv_restart, fname, 'ak', atm(1)%ak(:), no_domain=.true.)
476  id_restart = register_restart_field(atm(1)%Fv_restart, fname, 'bk', atm(1)%bk(:), no_domain=.true.)
477 
478  do n = 1, ntileme
479  fname = 'fv_core.res'//trim(stile_name)//'.nc'
480  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'u', atm(n)%u, &
481  domain=fv_domain, position=north,tile_count=n)
482  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'v', atm(n)%v, &
483  domain=fv_domain, position=east,tile_count=n)
484  if (.not.atm(n)%flagstruct%hydrostatic) then
485  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'W', atm(n)%w, &
486  domain=fv_domain, mandatory=.false., tile_count=n)
487  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'DZ', atm(n)%delz, &
488  domain=fv_domain, mandatory=.false., tile_count=n)
489  if ( atm(n)%flagstruct%hybrid_z ) then
490  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'ZE0', atm(n)%ze0, &
491  domain=fv_domain, mandatory=.false., tile_count=n)
492  endif
493  endif
494  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'T', atm(n)%pt, &
495  domain=fv_domain, tile_count=n)
496  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'delp', atm(n)%delp, &
497  domain=fv_domain, tile_count=n)
498  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'phis', atm(n)%phis, &
499  domain=fv_domain, tile_count=n)
500 
501  !--- include agrid winds in restarts for use in data assimilation
502  if (atm(n)%flagstruct%agrid_vel_rst) then
503  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'ua', atm(n)%ua, &
504  domain=fv_domain, tile_count=n, mandatory=.false.)
505  id_restart = register_restart_field(atm(n)%Fv_tile_restart, fname, 'va', atm(n)%va, &
506  domain=fv_domain, tile_count=n, mandatory=.false.)
507  endif
508 
509  fname = 'fv_srf_wnd.res'//trim(stile_name)//'.nc'
510  id_restart = register_restart_field(atm(n)%Rsf_restart, fname, 'u_srf', atm(n)%u_srf, &
511  domain=fv_domain, tile_count=n)
512  id_restart = register_restart_field(atm(n)%Rsf_restart, fname, 'v_srf', atm(n)%v_srf, &
513  domain=fv_domain, tile_count=n)
514 #ifdef SIM_PHYS
515  id_restart = register_restart_field(rsf_restart(n), fname, 'ts', atm(n)%ts, &
516  domain=fv_domain, tile_count=n)
517 #endif
518 
519  if ( atm(n)%flagstruct%fv_land ) then
520  !-------------------------------------------------------------------------------------------------
521  ! Optional terrain deviation (sgh) and land fraction (oro)
522  fname = 'mg_drag.res'//trim(stile_name)//'.nc'
523  id_restart = register_restart_field(atm(n)%Mg_restart, fname, 'ghprime', atm(n)%sgh, &
524  domain=fv_domain, tile_count=n)
525 
526  fname = 'fv_land.res'//trim(stile_name)//'.nc'
527  id_restart = register_restart_field(atm(n)%Lnd_restart, fname, 'oro', atm(n)%oro, &
528  domain=fv_domain, tile_count=n)
529  endif
530 
531  fname = 'fv_tracer.res'//trim(stile_name)//'.nc'
532  do nt = 1, ntprog
533  call get_tracer_names(model_atmos, nt, tracer_name)
534  ! set all tracers to an initial profile value
535  call set_tracer_profile (model_atmos, nt, atm(n)%q(:,:,:,nt) )
536  id_restart = register_restart_field(atm(n)%Tra_restart, fname, tracer_name, atm(n)%q(:,:,:,nt), &
537  domain=fv_domain, mandatory=.false., tile_count=n)
538  enddo
539  do nt = ntprog+1, ntracers
540  call get_tracer_names(model_atmos, nt, tracer_name)
541  ! set all tracers to an initial profile value
542  call set_tracer_profile (model_atmos, nt, atm(n)%qdiag(:,:,:,nt) )
543  id_restart = register_restart_field(atm(n)%Tra_restart, fname, tracer_name, atm(n)%qdiag(:,:,:,nt), &
544  domain=fv_domain, mandatory=.false., tile_count=n)
545  enddo
546 
547  enddo
548 
549  end subroutine fv_io_register_restart
550  ! </SUBROUTINE> NAME="fv_io_register_restart"
551 
552 
553 
554  !#####################################################################
555  ! <SUBROUTINE NAME="fv_io_write_restart">
556  !
557  ! <DESCRIPTION>
558  ! Write the fv core restart quantities
559  ! </DESCRIPTION>
560  subroutine fv_io_write_restart(Atm, grids_on_this_pe, timestamp)
562  type(fv_atmos_type), intent(inout) :: atm(:)
563  logical, intent(IN) :: grids_on_this_pe(:)
564  character(len=*), optional, intent(in) :: timestamp
565  integer :: n, ntileme
566 
567  ntileme = size(atm(:)) ! This will need mods for more than 1 tile per pe
568 
569  if ( use_ncep_sst .or. atm(1)%flagstruct%nudge .or. atm(1)%flagstruct%ncep_ic ) then
570  call mpp_error(note, 'READING FROM SST_RESTART DISABLED')
571  !call save_restart(Atm(1)%SST_restart, timestamp)
572  endif
573 
574  do n = 1, ntileme
575  if (.not. grids_on_this_pe(n)) cycle
576 
577  if ( (use_ncep_sst .or. atm(n)%flagstruct%nudge) .and. .not. atm(n)%gridstruct%nested ) then
578  call save_restart(atm(n)%SST_restart, timestamp)
579  endif
580 
581  call save_restart(atm(n)%Fv_restart, timestamp)
582  call save_restart(atm(n)%Fv_tile_restart, timestamp)
583  call save_restart(atm(n)%Rsf_restart, timestamp)
584 
585  if ( atm(n)%flagstruct%fv_land ) then
586  call save_restart(atm(n)%Mg_restart, timestamp)
587  call save_restart(atm(n)%Lnd_restart, timestamp)
588  endif
589 
590  call save_restart(atm(n)%Tra_restart, timestamp)
591 
592  end do
593 
594  end subroutine fv_io_write_restart
595 
596  subroutine register_bcs_2d(Atm, BCfile_ne, BCfile_sw, fname_ne, fname_sw, &
597  var_name, var, var_bc, istag, jstag)
598  type(fv_atmos_type), intent(in) :: Atm
599  type(restart_file_type), intent(inout) :: BCfile_ne, BCfile_sw
600  character(len=120), intent(in) :: fname_ne, fname_sw
601  character(len=*), intent(in) :: var_name
602  real, dimension(:,:), intent(in), optional :: var
603  type(fv_nest_BC_type_3D), intent(in), optional :: var_bc
604  integer, intent(in), optional :: istag, jstag
605 
606  integer :: npx, npy, i_stag, j_stag
607  integer :: is, ie, js, je, isd, ied, jsd, jed, n
608  integer :: x_halo, y_halo, x_halo_ns, id_restart
609  integer :: layout(2), global_size(2), indices(4)
610  integer, allocatable, dimension(:) :: x1_pelist, y1_pelist
611  integer, allocatable, dimension(:) :: x2_pelist, y2_pelist
612  logical :: is_root_pe
613 
614  i_stag = 0
615  j_stag = 0
616  if (present(istag)) i_stag = i_stag
617  if (present(jstag)) j_stag = j_stag
618  call mpp_get_global_domain(atm%domain, xsize = npx, ysize = npy, position=corner )
619  call mpp_get_data_domain(atm%domain, isd, ied, jsd, jed )
620  call mpp_get_compute_domain(atm%domain, is, ie, js, je )
621  call mpp_get_layout(atm%domain, layout)
622  allocate (x1_pelist(layout(1)))
623  allocate (y1_pelist(layout(2)))
624  allocate (x2_pelist(layout(1)))
625  allocate (y2_pelist(layout(2)))
626  x_halo = is-isd
627  y_halo = js-jsd
628 ! define west and east pelist
629  do n = 1,layout(2)
630  y1_pelist(n)=mpp_root_pe()+layout(1)*n-1
631  y2_pelist(n)=mpp_root_pe()+layout(1)*(n-1)
632  enddo
633 ! define south and north pelist
634  do n = 1,layout(1)
635  x1_pelist(n)=mpp_root_pe()+layout(1)*(layout(2)-1)+(n-1)
636  x2_pelist(n)=mpp_root_pe()+(n-1)
637  enddo
638 ! declare the pelists inside of mpp (creates the MPI communicator)
639  call mpp_declare_pelist(x1_pelist)
640  call mpp_declare_pelist(x2_pelist)
641  call mpp_declare_pelist(y1_pelist)
642  call mpp_declare_pelist(y2_pelist)
643 
644 !EAST & WEST
645 !set defaults for west/east halo regions
646  indices(1) = 1
647  indices(2) = x_halo
648  indices(3) = jsd
649  indices(4) = jed+j_stag
650  global_size(1) = x_halo
651  global_size(2) = npy-1+2*y_halo+j_stag
652 
653 !define west root_pe
654  is_root_pe = .false.
655  if (is.eq.1 .and. js.eq.1) is_root_pe = .true.
656 !register west halo data in t1
657  if (present(var_bc)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
658  trim(var_name)//'_west_t1', &
659  var_bc%west_t1, &
660  indices, global_size, y2_pelist, &
661  is_root_pe, jshift=y_halo)
662 !register west prognostic halo data
663  if (present(var)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
664  trim(var_name)//'_west', &
665  var, indices, global_size, &
666  y2_pelist, is_root_pe, jshift=y_halo)
667 
668 !define east root_pe
669  is_root_pe = .false.
670  if (ie.eq.npx-1 .and. je.eq.npy-1) is_root_pe = .true.
671 !register east halo data in t1
672  if (present(var_bc)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
673  trim(var_name)//'_east_t1', &
674  var_bc%east_t1, &
675  indices, global_size, y1_pelist, &
676  is_root_pe, jshift=y_halo)
677 
678 !reset indices for prognostic variables in the east halo
679  indices(1) = ied-x_halo+1+i_stag
680  indices(2) = ied+i_stag
681 !register east prognostic halo data
682  if (present(var)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
683  trim(var_name)//'_east', &
684  var, indices, global_size, &
685  y1_pelist, is_root_pe, jshift=y_halo, &
686  x_halo=(size(var,1)-x_halo), ishift=-(ie+i_stag))
687 
688 !NORTH & SOUTH
689 !set defaults for north/south halo regions
690  indices(1) = isd
691  indices(2) = ied+i_stag
692  indices(3) = 1
693  indices(4) = y_halo
694  global_size(1) = npx-1+i_stag
695  global_size(2) = y_halo
696 !modify starts and ends for certain pes
697  if (is.eq.1) indices(1) = is
698  if (ie.eq.npx-1) indices(2) = ie+i_stag
699  x_halo_ns = 0
700  if (is.eq.1) x_halo_ns=x_halo
701 
702 !define south root_pe
703  is_root_pe = .false.
704  if (is.eq.1 .and. js.eq.1) is_root_pe = .true.
705 !register south halo data in t1
706  if (present(var_bc)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
707  trim(var_name)//'_south_t1', &
708  var_bc%south_t1, &
709  indices, global_size, x2_pelist, &
710  is_root_pe, x_halo=x_halo_ns)
711 !register south prognostic halo data
712  if (present(var)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
713  trim(var_name)//'_south', &
714  var, indices, global_size, &
715  x2_pelist, is_root_pe, x_halo=x_halo_ns)
716 
717 !define north root_pe
718  is_root_pe = .false.
719  if (ie.eq.npx-1 .and. je.eq.npy-1) is_root_pe = .true.
720 !register north halo data in t1
721  if (present(var_bc)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
722  trim(var_name)//'_north_t1', &
723  var_bc%north_t1, &
724  indices, global_size, x1_pelist, &
725  is_root_pe, x_halo=x_halo_ns)
726 
727 !reset indices for prognostic variables in the north halo
728  indices(3) = jed-y_halo+1+j_stag
729  indices(4) = jed+j_stag
730 !register north prognostic halo data
731  if (present(var)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
732  trim(var_name)//'_north', &
733  var, indices, global_size, &
734  x1_pelist, is_root_pe, x_halo=x_halo_ns, &
735  y_halo=(size(var,2)-y_halo), jshift=-(je+j_stag))
736 
737  end subroutine register_bcs_2d
738 
739 
740  subroutine register_bcs_3d(Atm, BCfile_ne, BCfile_sw, fname_ne, fname_sw, &
741  var_name, var, var_bc, istag, jstag, mandatory)
742  type(fv_atmos_type), intent(in) :: Atm
743  type(restart_file_type), intent(inout) :: BCfile_ne, BCfile_sw
744  character(len=120), intent(in) :: fname_ne, fname_sw
745  character(len=*), intent(in) :: var_name
746  real, dimension(:,:,:), intent(in), optional :: var
747  type(fv_nest_BC_type_3D), intent(in), optional :: var_bc
748  integer, intent(in), optional :: istag, jstag
749  logical, intent(IN), optional :: mandatory
750 
751  integer :: npx, npy, i_stag, j_stag
752  integer :: is, ie, js, je, isd, ied, jsd, jed, n
753  integer :: x_halo, y_halo, x_halo_ns, id_restart
754  integer :: layout(2), global_size(3), indices(4)
755  integer, allocatable, dimension(:) :: x1_pelist, y1_pelist
756  integer, allocatable, dimension(:) :: x2_pelist, y2_pelist
757  logical :: is_root_pe
758 
759  i_stag = 0
760  j_stag = 0
761  if (present(istag)) i_stag = istag
762  if (present(jstag)) j_stag = jstag
763  call mpp_get_global_domain(atm%domain, xsize = npx, ysize = npy, position=corner )
764  call mpp_get_data_domain(atm%domain, isd, ied, jsd, jed )
765  call mpp_get_compute_domain(atm%domain, is, ie, js, je )
766  call mpp_get_layout(atm%domain, layout)
767  allocate (x1_pelist(layout(1)))
768  allocate (y1_pelist(layout(2)))
769  allocate (x2_pelist(layout(1)))
770  allocate (y2_pelist(layout(2)))
771  x_halo = is-isd
772  y_halo = js-jsd
773 ! define west and east pelist
774  do n = 1,layout(2)
775  y1_pelist(n)=mpp_root_pe()+layout(1)*n-1
776  y2_pelist(n)=mpp_root_pe()+layout(1)*(n-1)
777  enddo
778 ! define south and north pelist
779  do n = 1,layout(1)
780  x1_pelist(n)=mpp_root_pe()+layout(1)*(layout(2)-1)+(n-1)
781  x2_pelist(n)=mpp_root_pe()+(n-1)
782  enddo
783 ! declare the pelists inside of mpp (creates the MPI communicator)
784  call mpp_declare_pelist(x1_pelist)
785  call mpp_declare_pelist(x2_pelist)
786  call mpp_declare_pelist(y1_pelist)
787  call mpp_declare_pelist(y2_pelist)
788 
789 !EAST & WEST
790 !set defaults for west/east halo regions
791  indices(1) = 1
792  indices(2) = x_halo
793  indices(3) = jsd
794  indices(4) = jed + j_stag
795  global_size(1) = x_halo
796  global_size(2) = npy-1+2*y_halo + j_stag
797  global_size(3) = atm%npz
798 
799 !define west root_pe
800  is_root_pe = .false.
801  if (is.eq.1 .and. js.eq.1) is_root_pe = .true.
802 !register west halo data in t1
803  if (present(var_bc)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
804  trim(var_name)//'_west_t1', &
805  var_bc%west_t1, &
806  indices, global_size, y2_pelist, &
807  is_root_pe, jshift=y_halo, mandatory=mandatory)
808 !register west prognostic halo data
809  if (present(var)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
810  trim(var_name)//'_west', &
811  var, indices, global_size, &
812  y2_pelist, is_root_pe, jshift=y_halo, mandatory=mandatory)
813 
814 !define east root_pe
815  is_root_pe = .false.
816  if (ie.eq.npx-1 .and. je.eq.npy-1) is_root_pe = .true.
817 !register east halo data in t1
818  if (present(var_bc)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
819  trim(var_name)//'_east_t1', &
820  var_bc%east_t1, &
821  indices, global_size, y1_pelist, &
822  is_root_pe, jshift=y_halo, mandatory=mandatory)
823 
824 !reset indices for prognostic variables in the east halo
825  indices(1) = ied-x_halo+1+i_stag
826  indices(2) = ied+i_stag
827 !register east prognostic halo data
828  if (present(var)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
829  trim(var_name)//'_east', &
830  var, indices, global_size, &
831  y1_pelist, is_root_pe, jshift=y_halo, &
832  x_halo=(size(var,1)-x_halo), ishift=-(ie+i_stag), mandatory=mandatory)
833 
834 !NORTH & SOUTH
835 !set defaults for north/south halo regions
836  indices(1) = isd
837  indices(2) = ied+i_stag
838  indices(3) = 1
839  indices(4) = y_halo
840  global_size(1) = npx-1+i_stag
841  global_size(2) = y_halo
842  global_size(3) = atm%npz
843 !modify starts and ends for certain pes
844  if (is.eq.1) indices(1) = is
845  if (ie.eq.npx-1) indices(2) = ie+i_stag
846  x_halo_ns = 0
847  if (is.eq.1) x_halo_ns=x_halo
848 
849 !define south root_pe
850  is_root_pe = .false.
851  if (is.eq.1 .and. js.eq.1) is_root_pe = .true.
852 !register south halo data in t1
853  if (present(var_bc)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
854  trim(var_name)//'_south_t1', &
855  var_bc%south_t1, &
856  indices, global_size, x2_pelist, &
857  is_root_pe, x_halo=x_halo_ns, mandatory=mandatory)
858 !register south prognostic halo data
859  if (present(var)) id_restart = register_restart_field(bcfile_sw, trim(fname_sw), &
860  trim(var_name)//'_south', &
861  var, indices, global_size, &
862  x2_pelist, is_root_pe, x_halo=x_halo_ns, mandatory=mandatory)
863 
864 !define north root_pe
865  is_root_pe = .false.
866  if (ie.eq.npx-1 .and. je.eq.npy-1) is_root_pe = .true.
867 !register north halo data in t1
868  if (present(var_bc)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
869  trim(var_name)//'_north_t1', &
870  var_bc%north_t1, &
871  indices, global_size, x1_pelist, &
872  is_root_pe, x_halo=x_halo_ns, mandatory=mandatory)
873 
874 !reset indices for prognostic variables in the north halo
875  indices(3) = jed-y_halo+1+j_stag
876  indices(4) = jed+j_stag
877 !register north prognostic halo data
878  if (present(var)) id_restart = register_restart_field(bcfile_ne, trim(fname_ne), &
879  trim(var_name)//'_north', &
880  var, indices, global_size, &
881  x1_pelist, is_root_pe, x_halo=x_halo_ns, &
882  y_halo=(size(var,2)-y_halo), jshift=-(je+j_stag), mandatory=mandatory)
883 
884  end subroutine register_bcs_3d
885 
886 
887  ! </SUBROUTINE> NAME="fv_io_regsiter_restart_BCs"
888  !#####################################################################
889 
890  subroutine fv_io_register_restart_bcs(Atm)
891  type(fv_atmos_type), intent(inout) :: atm
892 
893  integer :: n, ntracers, ntprog, ntdiag
894  character(len=120) :: tname, fname_ne, fname_sw
895 
896  fname_ne = 'fv_BC_ne.res.nc'
897  fname_sw = 'fv_BC_sw.res.nc'
898 
899  ntprog=size(atm%q,4)
900  ntdiag=size(atm%qdiag,4)
901  ntracers=ntprog+ntdiag
902 
903  call set_domain(atm%domain)
904 
905  call register_bcs_2d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
906  fname_ne, fname_sw, 'phis', var=atm%phis)
907  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
908  fname_ne, fname_sw, 'delp', atm%delp, atm%neststruct%delp_BC)
909  do n=1,ntprog
910  call get_tracer_names(model_atmos, n, tname)
911  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
912  fname_ne, fname_sw, trim(tname), atm%q(:,:,:,n), atm%neststruct%q_BC(n), mandatory=.false.)
913  enddo
914  do n=ntprog+1,ntracers
915  call get_tracer_names(model_atmos, n, tname)
916  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
917  fname_ne, fname_sw, trim(tname), var=atm%qdiag(:,:,:,n), mandatory=.false.)
918  enddo
919 #ifndef SW_DYNAMICS
920  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
921  fname_ne, fname_sw, 'pt', atm%pt, atm%neststruct%pt_BC)
922  if ((.not.atm%flagstruct%hydrostatic) .and. (.not.atm%flagstruct%make_nh)) then
923  if (is_master()) print*, 'fv_io_register_restart_BCs: REGISTERING NH BCs', atm%flagstruct%hydrostatic, atm%flagstruct%make_nh
924  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
925  fname_ne, fname_sw, 'w', atm%w, atm%neststruct%w_BC, mandatory=.false.)
926  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
927  fname_ne, fname_sw, 'delz', atm%delz, atm%neststruct%delz_BC, mandatory=.false.)
928  endif
929 #ifdef USE_COND
930  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
931  fname_ne, fname_sw,'q_con', var_bc=atm%neststruct%q_con_BC, mandatory=.false.)
932 #ifdef MOIST_CAPPA
933  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
934  fname_ne, fname_sw, 'cappa', var_bc=atm%neststruct%cappa_BC, mandatory=.false.)
935 #endif
936 #endif
937 #endif
938  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
939  fname_ne, fname_sw, 'u', atm%u, atm%neststruct%u_BC, jstag=1)
940  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
941  fname_ne, fname_sw, 'v', atm%v, atm%neststruct%v_BC, istag=1)
942  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
943  fname_ne, fname_sw, 'uc', var_bc=atm%neststruct%uc_BC, istag=1)
944  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
945  fname_ne, fname_sw, 'vc', var_bc=atm%neststruct%vc_BC, jstag=1)
946  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
947  fname_ne, fname_sw, 'divg', var_bc=atm%neststruct%divg_BC, istag=1,jstag=1, mandatory=.false.)
948  atm%neststruct%divg_BC%initialized = field_exist(fname_ne, 'divg_north_t1', atm%domain)
949 
950 
951  return
952  end subroutine fv_io_register_restart_bcs
953 
954 
955  subroutine fv_io_register_restart_bcs_nh(Atm)
956  type(fv_atmos_type), intent(inout) :: atm
957 
958  integer :: n
959  character(len=120) :: tname, fname_ne, fname_sw
960 
961  fname_ne = 'fv_BC_ne.res.nc'
962  fname_sw = 'fv_BC_sw.res.nc'
963 
964  call set_domain(atm%domain)
965 
966  if (is_master()) print*, 'fv_io_register_restart_BCs_NH: REGISTERING NH BCs', atm%flagstruct%hydrostatic, atm%flagstruct%make_nh
967 #ifndef SW_DYNAMICS
968  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
969  fname_ne, fname_sw, 'w', atm%w, atm%neststruct%w_BC)
970  call register_bcs_3d(atm, atm%neststruct%BCfile_ne, atm%neststruct%BCfile_sw, &
971  fname_ne, fname_sw, 'delz', atm%delz, atm%neststruct%delz_BC)
972 #endif
973 
974  return
975  end subroutine fv_io_register_restart_bcs_nh
976 
977 
978  subroutine fv_io_write_bcs(Atm, timestamp)
979  type(fv_atmos_type), intent(inout) :: atm
980  character(len=*), intent(in), optional :: timestamp
981 
982  call save_restart_border(atm%neststruct%BCfile_ne, timestamp)
983  call save_restart_border(atm%neststruct%BCfile_sw, timestamp)
984 
985  return
986  end subroutine fv_io_write_bcs
987 
988 
989  subroutine fv_io_read_bcs(Atm)
990  type(fv_atmos_type), intent(inout) :: atm
991 
992  call restore_state_border(atm%neststruct%BCfile_ne)
993  call restore_state_border(atm%neststruct%BCfile_sw)
994 
995  return
996  end subroutine fv_io_read_bcs
997 
998 end module fv_io_nlm_mod
Definition: fms.F90:20
integer grid_ytstagdimid
Definition: fv_io_nlm.F90:72
integer grid_xtstagdimid
Definition: fv_io_nlm.F90:72
integer grid_ytdimid
Definition: fv_io_nlm.F90:71
subroutine, public set_domain(Domain2)
Definition: fms_io.F90:7401
integer, parameter, public model_atmos
subroutine, public fv_io_register_restart(fv_domain, Atm)
Definition: fv_io_nlm.F90:435
subroutine, public free_restart_type(fileObj)
Definition: fms_io.F90:1413
subroutine register_bcs_2d(Atm, BCfile_ne, BCfile_sw, fname_ne, fname_sw, var_name, var, var_bc, istag, jstag)
Definition: fv_io_nlm.F90:598
integer grid_xtdimid
Definition: fv_io_nlm.F90:71
integer pfullid
Definition: fv_io_nlm.F90:71
subroutine, public fv_io_register_restart_bcs_nh(Atm)
Definition: fv_io_nlm.F90:956
subroutine, public fv_io_read_restart(fv_domain, Atm)
Definition: fv_io_nlm.F90:110
subroutine, public set_eta(km, ks, ptop, ak, bk)
Definition: fv_eta_nlm.F90:392
subroutine, public fv_io_register_restart_bcs(Atm)
Definition: fv_io_nlm.F90:891
subroutine, public get_number_tracers(model, num_tracers, num_prog, num_diag, num_family)
Definition: mpp.F90:39
subroutine, public fv_io_init()
Definition: fv_io_nlm.F90:84
subroutine, public set_filename_appendix(string_in)
Definition: fms_io.F90:8366
int field_exist(const char *file, const char *name)
Definition: read_mosaic.c:69
subroutine, public set_tracer_profile(model, n, tracer, err_msg)
integer, parameter, public ng
subroutine, public nullify_domain()
Definition: fms_io.F90:7421
subroutine, public rst_remap(km, kn, is, ie, js, je, isd, ied, jsd, jed, nq, ntp, delp_r, u_r, v_r, w_r, delz_r, pt_r, q_r, qdiag_r, delp, u, v, w, delz, pt, q, qdiag, ak_r, bk_r, ptop, ak, bk, hydrostatic, make_nh, domain, square_domain)
subroutine, public save_restart_border(fileObj, time_stamp, directory)
Definition: fms_io.F90:3354
subroutine, public fv_io_read_bcs(Atm)
Definition: fv_io_nlm.F90:990
subroutine, public fv_io_register_nudge_restart(Atm)
Definition: fv_io_nlm.F90:412
subroutine, public restore_state_border(fileObj, directory, nonfatal_missing_files)
Definition: fms_io.F90:3644
subroutine, public fv_io_exit
Definition: fv_io_nlm.F90:97
subroutine, public fv_io_write_bcs(Atm, timestamp)
Definition: fv_io_nlm.F90:979
subroutine register_bcs_3d(Atm, BCfile_ne, BCfile_sw, fname_ne, fname_sw, var_name, var, var_bc, istag, jstag, mandatory)
Definition: fv_io_nlm.F90:742
subroutine, public fms_io_exit()
Definition: fms_io.F90:750
logical module_is_initialized
Definition: fv_io_nlm.F90:69
subroutine, public get_tile_string(str_out, str_in, tile, str2_in)
Definition: fms_io.F90:7735
subroutine, public get_tracer_names(model, n, name, longname, units, err_msg)
subroutine, public fv_io_read_tracers(fv_domain, Atm)
Definition: fv_io_nlm.F90:187
integer haloid
Definition: fv_io_nlm.F90:71
subroutine, public fv_io_write_restart(Atm, grids_on_this_pe, timestamp)
Definition: fv_io_nlm.F90:561
subroutine, public get_instance_filename(name_in, name_out)
Definition: fms_io.F90:8379
subroutine, public remap_restart(fv_domain, Atm)
Definition: fv_io_nlm.F90:236
logical function, public field_exist(file_name, field_name, domain, no_domain)
Definition: fms_io.F90:8298
integer oneid
Definition: fv_io_nlm.F90:72
subroutine, public save_restart(fileObj, time_stamp, directory, append, time_level)
Definition: fms_io.F90:2467