SCALE-RM
mod_land_vars.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  use scale_debug
21  use scale_tracer
23  !-----------------------------------------------------------------------------
24  implicit none
25  private
26  !-----------------------------------------------------------------------------
27  !
28  !++ Public procedure
29  !
30  public :: land_vars_setup
31  public :: land_vars_restart_read
32  public :: land_vars_restart_write
33  public :: land_vars_history
34  public :: land_vars_monitor
35  public :: land_vars_check
36 
37  public :: land_vars_restart_create
38  public :: land_vars_restart_open
40  public :: land_vars_restart_enddef
41  public :: land_vars_restart_close
42 
43  public :: convert_ws2vwc
44 
45  !-----------------------------------------------------------------------------
46  !
47  !++ Public parameters & variables
48  !
49  logical, public :: land_restart_output = .false.
50 
51  character(len=H_LONG), public :: land_restart_in_basename = ''
52  logical, public :: land_restart_in_aggregate
53  logical, public :: land_restart_in_postfix_timelabel = .false.
54  character(len=H_LONG), public :: land_restart_out_basename = ''
55  logical, public :: land_restart_out_aggregate
56  logical, public :: land_restart_out_postfix_timelabel = .true.
57  character(len=H_MID), public :: land_restart_out_title = 'LAND restart'
58  character(len=H_SHORT), public :: land_restart_out_dtype = 'DEFAULT'
59 
60  ! prognostic variables
61  real(rp), public, allocatable :: land_temp (:,:,:)
62  real(rp), public, allocatable :: land_water (:,:,:)
63  real(rp), public, allocatable :: land_ice (:,:,:)
64  real(rp), public, allocatable :: land_sfc_temp (:,:)
65  real(rp), public, allocatable :: land_sfc_albedo(:,:,:,:)
66 
67  ! for snow model
68  real(rp), public, allocatable :: snow_sfc_temp (:,:)
69  real(rp), public, allocatable :: snow_swe (:,:)
70  real(rp), public, allocatable :: snow_depth (:,:)
71  real(rp), public, allocatable :: snow_dzero (:,:)
72  real(rp), public, allocatable :: snow_nosnowsec(:,:)
73 
74  ! tendency variables
75  real(rp), public, allocatable :: land_temp_t (:,:,:)
76  real(rp), public, allocatable :: land_water_t(:,:,:)
77  real(rp), public, allocatable :: land_ice_t (:,:,:)
78 
79  ! surface flux for land
80  real(rp), public, allocatable :: land_sflx_gh (:,:)
81  real(rp), public, allocatable :: land_sflx_water(:,:)
82  real(rp), public, allocatable :: land_sflx_engi (:,:)
83 
84  ! surface flux for atmosphere
85  real(rp), public, allocatable :: land_sflx_mw (:,:)
86  real(rp), public, allocatable :: land_sflx_mu (:,:)
87  real(rp), public, allocatable :: land_sflx_mv (:,:)
88  real(rp), public, allocatable :: land_sflx_sh (:,:)
89  real(rp), public, allocatable :: land_sflx_lh (:,:)
90  real(rp), public, allocatable :: land_sflx_qtrc(:,:,:)
91  real(rp), public, allocatable :: land_u10 (:,:)
92  real(rp), public, allocatable :: land_v10 (:,:)
93  real(rp), public, allocatable :: land_t2 (:,:)
94  real(rp), public, allocatable :: land_q2 (:,:)
95  real(rp), public, allocatable, target :: land_ustar(:,:)
96  real(rp), public, allocatable, target :: land_tstar(:,:)
97  real(rp), public, allocatable, target :: land_qstar(:,:)
98  real(rp), public, allocatable, target :: land_wstar(:,:)
99  real(rp), public, allocatable, target :: land_rlmo (:,:)
100  real(rp), public, pointer :: soil_ustar(:,:)
101  real(rp), public, pointer :: soil_tstar(:,:)
102  real(rp), public, pointer :: soil_qstar(:,:)
103  real(rp), public, pointer :: soil_wstar(:,:)
104  real(rp), public, pointer :: soil_rlmo (:,:)
105  real(rp), public, allocatable :: snow_ustar(:,:)
106  real(rp), public, allocatable :: snow_tstar(:,:)
107  real(rp), public, allocatable :: snow_qstar(:,:)
108  real(rp), public, allocatable :: snow_wstar(:,:)
109  real(rp), public, allocatable :: snow_rlmo (:,:)
110 
111  real(rp), public, allocatable :: land_runoff (:,:)
112  real(rp), public, allocatable :: land_runoff_engi(:,:)
113 
114 
115  ! recieved atmospheric variables
116  real(rp), public, allocatable :: atmos_temp (:,:)
117  real(rp), public, allocatable :: atmos_pres (:,:)
118  real(rp), public, allocatable :: atmos_w (:,:)
119  real(rp), public, allocatable :: atmos_u (:,:)
120  real(rp), public, allocatable :: atmos_v (:,:)
121  real(rp), public, allocatable :: atmos_dens (:,:)
122  real(rp), public, allocatable :: atmos_qv (:,:)
123  real(rp), public, allocatable :: atmos_pbl (:,:)
124  real(rp), public, allocatable :: atmos_sfc_dens (:,:)
125  real(rp), public, allocatable :: atmos_sfc_pres (:,:)
126  real(rp), public, allocatable :: atmos_sflx_rad_dn(:,:,:,:)
127  real(rp), public, allocatable :: atmos_cossza (:,:)
128  real(rp), public, allocatable :: atmos_sflx_water (:,:)
129  real(rp), public, allocatable :: atmos_sflx_engi (:,:)
130 
131 
132  logical, public :: snow_flag
133 
134 
135  real(rp), public, allocatable :: land_property(:,:,:)
136 
137  character(len=H_LONG), public :: land_property_in_filename = ''
138 
139  integer, public, parameter :: land_property_nmax = 11
140  integer, public, parameter :: i_waterlimit = 1 ! maximum soil moisture [m3/m3]
141  integer, public, parameter :: i_watercritical = 2 ! critical soil moisture [m3/m3]
142  integer, public, parameter :: i_stomataresist = 3 ! stomata resistance [1/s]
143  integer, public, parameter :: i_thermalcond = 4 ! thermal conductivity for soil [W/K/m]
144  integer, public, parameter :: i_heatcapacity = 5 ! heat capacity for soil [J/K/m3]
145  integer, public, parameter :: i_waterdiff = 6 ! moisture diffusivity in the soil [m2/s]
146  integer, public, parameter :: i_alblw = 7 ! surface albedo for long wave [1]
147  integer, public, parameter :: i_albsw = 8 ! surface albedo for short wave [1]
148  integer, public, parameter :: i_z0m = 9 ! roughness length for momemtum [m]
149  integer, public, parameter :: i_z0h = 10 ! roughness length for heat [m]
150  integer, public, parameter :: i_z0e = 11 ! roughness length for vapor [m]
151 
152  !-----------------------------------------------------------------------------
153  !
154  !++ Private procedure
155  !
156  private :: land_param_read
157 
158  !-----------------------------------------------------------------------------
159  !
160  !++ Private parameters & variables
161  !
162  logical, private :: land_vars_checkrange = .false.
163 
164  ! index of the prognostic variables
165  integer, private, parameter :: vmax = 16
166  integer, private, parameter :: i_temp = 1
167  integer, private, parameter :: i_water = 2
168  integer, private, parameter :: i_ice = 3
169  integer, private, parameter :: i_waterds = 4
170  integer, private, parameter :: i_sfc_temp = 5
171  integer, private, parameter :: i_sfc_alb_ir_dir = 6
172  integer, private, parameter :: i_sfc_alb_ir_dif = 7
173  integer, private, parameter :: i_sfc_alb_nir_dir = 8
174  integer, private, parameter :: i_sfc_alb_nir_dif = 9
175  integer, private, parameter :: i_sfc_alb_vis_dir = 10
176  integer, private, parameter :: i_sfc_alb_vis_dif = 11
177  integer, private, parameter :: i_snow_sfc_temp = 12
178  integer, private, parameter :: i_snow_swe = 13
179  integer, private, parameter :: i_snow_depth = 14
180  integer, private, parameter :: i_snow_dzero = 15
181  integer, private, parameter :: i_snow_nosnowsec = 16
182 
183  character(len=H_SHORT), private :: var_name(vmax)
184  character(len=H_MID), private :: var_desc(vmax)
185  character(len=H_MID), private :: var_stdn(vmax)
186  character(len=H_SHORT), private :: var_unit(vmax)
187  integer, private :: var_id(vmax)
188  integer, private :: restart_fid = -1 ! file ID
189 
190  data var_name / 'LAND_TEMP', &
191  'LAND_WATER', &
192  'LAND_ICE', &
193  'LAND_DSAT', &
194  'LAND_SFC_TEMP', &
195  'LAND_SFC_ALB_IR_dir', &
196  'LAND_SFC_ALB_IR_dif', &
197  'LAND_SFC_ALB_NIR_dir', &
198  'LAND_SFC_ALB_NIR_dif', &
199  'LAND_SFC_ALB_VIS_dir', &
200  'LAND_SFC_ALB_VIS_dif', &
201  'LAND_SNOW_SFC_TEMP', &
202  'LAND_SNOW_SWE', &
203  'LAND_SNOW_Depth', &
204  'LAND_SNOW_Dzero', &
205  'LAND_SNOW_nosnowsec' /
206 
207  data var_desc / 'temperature at each soil layer', &
208  'moisture at each soil layer', &
209  'ice at each soil layer', &
210  'degree of saturation at each soil layer', &
211  'land surface skin temperature', &
212  'land surface albedo for IR (direct)', &
213  'land surface albedo for IR (diffuse)', &
214  'land surface albedo for NIR (direct)', &
215  'land surface albedo for NIR (diffuse)', &
216  'land surface albedo for VIS (direct)', &
217  'land surface albedo for VIS (diffuse)', &
218  'Snow surface temperature', &
219  'Snow water equivalent', &
220  'Snow depth', &
221  'Snow depth at melting point', &
222  'Time duration without snow' /
223 
224  data var_stdn / 'soil_temperature', &
225  'volume_fraction_of_condensed_water_in_soil', &
226  '', &
227  'volume_fraction_of_condensed_water_in_soil_at_field_capacity', &
228  'surface_temperature_where_land', &
229  '', &
230  '', &
231  '', &
232  '', &
233  '', &
234  '', &
235  '', &
236  '', &
237  '', &
238  '', &
239  '' /
240 
241  data var_unit / 'K', &
242  'm3/m3', &
243  'm3/m3', &
244  '1', &
245  'K', &
246  '1', &
247  '1', &
248  '1', &
249  '1', &
250  '1', &
251  '1', &
252  'K', &
253  'kg/m2', &
254  'm', &
255  'm', &
256  's' /
257 
258  real(rp), private, allocatable :: land_property_table(:,:)
259 
260  logical, private :: land_restart_in_check_coordinates = .true.
261 
262  ! for monitor
263  integer, parameter :: im_temp = 1
264  integer, parameter :: im_water = 2
265  integer, parameter :: im_ice = 3
266  integer, parameter :: im_sfc = 4
267  integer, parameter :: im_roff = 5
268  integer, parameter :: im_masflx = 6
269  integer, parameter :: im_engi = 7
270  integer, parameter :: im_w_engi = 8
271  integer, parameter :: im_i_engi = 9
272  integer, parameter :: im_engsfc_gh = 10
273  integer, parameter :: im_engsfc_ei = 11
274  integer, parameter :: im_roff_ei = 12
275  integer, parameter :: im_engflx = 13
276  integer, parameter :: im_max = 13
277  integer, private :: monit_id(im_max)
278 
279  !-----------------------------------------------------------------------------
280 contains
281  !-----------------------------------------------------------------------------
283  subroutine land_vars_setup
284  use scale_prc, only: &
285  prc_abort
286  use scale_const, only: &
287  undef => const_undef
288  use scale_comm_cartesc, only: &
289  comm_vars8, &
290  comm_wait
291  use scale_landuse, only: &
295  use mod_land_admin, only: &
296  snow_type
297  use scale_monitor, only: &
299  implicit none
300 
301  namelist / param_land_vars / &
305  land_restart_in_check_coordinates, &
312  land_vars_checkrange
313 
314  integer :: ierr
315  integer :: i, j, iv, p
316  !---------------------------------------------------------------------------
317 
318  log_newline
319  log_info("LAND_vars_setup",*) 'Setup'
320 
321  select case ( snow_type )
322  case ( 'NONE', 'OFF' )
323  snow_flag = .false.
324  case default
325  snow_flag = .true.
326  end select
327 
328  allocate( land_temp(lkmax,lia,lja) )
329  allocate( land_water(lkmax,lia,lja) )
330  allocate( land_ice(lkmax,lia,lja) )
331  allocate( land_sfc_temp(lia,lja) )
333 
334  land_temp(:,:,:) = undef
335  land_water(:,:,:) = undef
336  land_ice(:,:,:) = undef
337  land_sfc_temp(:,:) = undef
338  land_sfc_albedo(:,:,:,:) = undef
339 
340  if ( snow_flag ) then
341  allocate( snow_sfc_temp(lia,lja) )
342  allocate( snow_swe(lia,lja) )
343  allocate( snow_depth(lia,lja) )
344  allocate( snow_dzero(lia,lja) )
345  allocate( snow_nosnowsec(lia,lja) )
346  snow_sfc_temp(:,:) = undef
347  snow_swe(:,:) = undef
348  snow_depth(:,:) = undef
349  snow_dzero(:,:) = undef
350  snow_nosnowsec(:,:) = undef
351  end if
352 
353  allocate( land_temp_t(lkmax,lia,lja) )
354  allocate( land_water_t(lkmax,lia,lja) )
355  allocate( land_ice_t(lkmax,lia,lja) )
356  land_temp_t(:,:,:) = undef
357  land_water_t(:,:,:) = undef
358  land_ice_t(:,:,:) = undef
359 
360  allocate( land_sflx_gh(lia,lja) )
361  allocate( land_sflx_water(lia,lja) )
362  allocate( land_sflx_engi(lia,lja) )
363  land_sflx_gh(:,:) = undef
364  land_sflx_water(:,:) = undef
365  land_sflx_engi(:,:) = undef
366 
367  allocate( land_runoff(lia,lja) )
368  allocate( land_runoff_engi(lia,lja) )
369  land_runoff(:,:) = undef
370  land_runoff_engi(:,:) = undef
371 
372  allocate( land_sflx_mw(lia,lja) )
373  allocate( land_sflx_mu(lia,lja) )
374  allocate( land_sflx_mv(lia,lja) )
375  allocate( land_sflx_sh(lia,lja) )
376  allocate( land_sflx_lh(lia,lja) )
377  allocate( land_sflx_qtrc(lia,lja,qa) )
378  land_sflx_mw(:,:) = undef
379  land_sflx_mu(:,:) = undef
380  land_sflx_mv(:,:) = undef
381  land_sflx_sh(:,:) = undef
382  land_sflx_lh(:,:) = undef
383  land_sflx_qtrc(:,:,:) = undef
384 
385  allocate( land_u10(lia,lja) )
386  allocate( land_v10(lia,lja) )
387  allocate( land_t2(lia,lja) )
388  allocate( land_q2(lia,lja) )
389  land_u10(:,:) = undef
390  land_v10(:,:) = undef
391  land_t2(:,:) = undef
392  land_q2(:,:) = undef
393 
394  allocate( land_ustar(lia,lja) )
395  allocate( land_tstar(lia,lja) )
396  allocate( land_qstar(lia,lja) )
397  allocate( land_wstar(lia,lja) )
398  allocate( land_rlmo(lia,lja) )
399  land_ustar(:,:) = undef
400  land_tstar(:,:) = undef
401  land_qstar(:,:) = undef
402  land_wstar(:,:) = undef
403  land_rlmo(:,:) = undef
404  if ( snow_flag ) then
405  allocate( soil_ustar(lia,lja) )
406  allocate( soil_tstar(lia,lja) )
407  allocate( soil_qstar(lia,lja) )
408  allocate( soil_wstar(lia,lja) )
409  allocate( soil_rlmo(lia,lja) )
410  soil_ustar(:,:) = undef
411  soil_tstar(:,:) = undef
412  soil_qstar(:,:) = undef
413  soil_wstar(:,:) = undef
414  soil_rlmo(:,:) = undef
415  else
421  end if
422  if ( snow_flag ) then
423  allocate( snow_ustar(lia,lja) )
424  allocate( snow_tstar(lia,lja) )
425  allocate( snow_qstar(lia,lja) )
426  allocate( snow_wstar(lia,lja) )
427  allocate( snow_rlmo(lia,lja) )
428  snow_ustar(:,:) = undef
429  snow_tstar(:,:) = undef
430  snow_qstar(:,:) = undef
431  snow_wstar(:,:) = undef
432  snow_rlmo(:,:) = undef
433  end if
434 
435  allocate( atmos_temp(lia,lja) )
436  allocate( atmos_pres(lia,lja) )
437  allocate( atmos_w(lia,lja) )
438  allocate( atmos_u(lia,lja) )
439  allocate( atmos_v(lia,lja) )
440  allocate( atmos_dens(lia,lja) )
441  allocate( atmos_qv(lia,lja) )
442  allocate( atmos_pbl(lia,lja) )
443  allocate( atmos_sfc_dens(lia,lja) )
444  allocate( atmos_sfc_pres(lia,lja) )
446  allocate( atmos_cossza(lia,lja) )
447  allocate( atmos_sflx_water(lia,lja) )
448  allocate( atmos_sflx_engi(lia,lja) )
449  atmos_temp(:,:) = undef
450  atmos_pres(:,:) = undef
451  atmos_w(:,:) = undef
452  atmos_u(:,:) = undef
453  atmos_v(:,:) = undef
454  atmos_dens(:,:) = undef
455  atmos_qv(:,:) = undef
456  atmos_pbl(:,:) = undef
457  atmos_sfc_dens(:,:) = undef
458  atmos_sfc_pres(:,:) = undef
459  atmos_sflx_rad_dn(:,:,:,:) = undef
460  atmos_cossza(:,:) = undef
461  atmos_sflx_water(:,:) = undef
462  atmos_sflx_engi(:,:) = undef
463 
464  !--- read namelist
465  rewind(io_fid_conf)
466  read(io_fid_conf,nml=param_land_vars,iostat=ierr)
467  if( ierr < 0 ) then !--- missing
468  log_info("LAND_vars_setup",*) 'Not found namelist. Default used.'
469  elseif( ierr > 0 ) then !--- fatal error
470  log_error("LAND_vars_setup",*) 'Not appropriate names in namelist PARAM_LAND_VARS. Check!'
471  call prc_abort
472  endif
473  log_nml(param_land_vars)
474 
475  log_newline
476  log_info("LAND_vars_setup",*) 'List of prognostic variables (LAND) '
477  log_info_cont('(1x,A,A24,A,A48,A,A12,A)') &
478  ' |', 'VARNAME ','|', &
479  'DESCRIPTION ', '[', 'UNIT ', ']'
480  do iv = 1, vmax
481  log_info_cont('(1x,A,I3,A,A24,A,A48,A,A12,A)') &
482  'NO.',iv,'|',var_name(iv),'|',var_desc(iv),'[',var_unit(iv),']'
483  enddo
484 
485  log_newline
486  if ( land_restart_in_basename /= '' ) then
487  log_info("LAND_vars_setup",*) 'Restart input? : YES, file = ', trim(land_restart_in_basename)
488  log_info("LAND_vars_setup",*) 'Add timelabel? : ', land_restart_in_postfix_timelabel
489  else
490  log_info("LAND_vars_setup",*) 'Restart input? : NO'
491  endif
492  if ( land_restart_output &
493  .AND. land_restart_out_basename /= '' ) then
494  log_info("LAND_vars_setup",*) 'Restart output? : YES, file = ', trim(land_restart_out_basename)
495  log_info("LAND_vars_setup",*) 'Add timelabel? : ', land_restart_out_postfix_timelabel
496  else
497  log_info("LAND_vars_setup",*) 'Restart output? : NO'
498  land_restart_output = .false.
499  endif
500 
501  ! Read land property table
502  allocate( land_property_table(landuse_pft_nmin:landuse_pft_nmax,land_property_nmax) )
503  land_property_table(:,:) = undef
504 
505  call land_param_read
506 
507  ! Apply land property to 2D map
509 
510  ! tentative, mosaic is off
511  do p = 1, land_property_nmax
512  do j = ljs, lje
513  do i = lis, lie
514  land_property(i,j,p) = land_property_table( landuse_index_pft(i,j,1), p )
515  enddo
516  enddo
517  enddo
518 
519  do p = 1, land_property_nmax
520  call comm_vars8( land_property(:,:,p), p )
521  enddo
522  do p = 1, land_property_nmax
523  call comm_wait ( land_property(:,:,p), p )
524  enddo
525 
526  ! monitor
527  call monitor_reg( 'LND_TEMP', 'land temperature', 'K m3', & ! (in)
528  monit_id(im_temp), & ! (out)
529  dim_type='LXY', is_tendency=.false. ) ! (in)
530  call monitor_reg( 'LND_WATER', 'land water', 'kg', & ! (in)
531  monit_id(im_water), & ! (out)
532  dim_type='LXY', is_tendency=.false. ) ! (in)
533  call monitor_reg( 'LND_ICE', 'land ice', 'kg', & ! (in)
534  monit_id(im_ice), & ! (out)
535  dim_type='LXY', is_tendency=.false. ) ! (in)
536  call monitor_reg( 'LND_MASSFC', 'SFC water flux', 'kg', & ! (in)
537  monit_id(im_sfc), & ! (out)
538  dim_type='XY', is_tendency=.true. ) ! (in)
539  call monitor_reg( 'LND_ROFF', 'runoff water', 'kg', & ! (in)
540  monit_id(im_roff), & ! (out)
541  dim_type='XY', is_tendency=.true. ) ! (in)
542  call monitor_reg( 'LND_MASFLX', 'total mass change', 'kg', & ! (in)
543  monit_id(im_masflx), & ! (out)
544  dim_type='XY', is_tendency=.true. ) ! (in)
545  call monitor_reg( 'LND_ENGI', 'total internal energy', 'J', & ! (in)
546  monit_id(im_engi), & ! (out)
547  dim_type='LXY', is_tendency=.false. ) ! (in)
548  call monitor_reg( 'LND_WTR_ENGI', 'water internal energy', 'J', & ! (in)
549  monit_id(im_w_engi), & ! (out)
550  dim_type='LXY', is_tendency=.false. ) ! (in)
551  call monitor_reg( 'LND_ICE_ENGI', 'ice internal energy', 'J', & ! (in)
552  monit_id(im_i_engi), & ! (out)
553  dim_type='LXY', is_tendency=.false. ) ! (in)
554  call monitor_reg( 'LND_ENGSFC_GH', 'SFC ground heat flux', 'J', & ! (in)
555  monit_id(im_engsfc_gh), & ! (out)
556  dim_type='XY', is_tendency=.true. ) ! (in)
557  call monitor_reg( 'LND_ENGSFC_EI', 'SFC internal energy flux', 'J', & ! (in)
558  monit_id(im_engsfc_ei), & ! (out)
559  dim_type='XY', is_tendency=.true. ) ! (in)
560  call monitor_reg( 'LND_ROFF_EI', 'internal energy of runoff water', 'J', & ! (in)
561  monit_id(im_roff_ei), & ! (out)
562  dim_type='XY', is_tendency=.true. ) ! (in)
563  call monitor_reg( 'LND_ENGFLX', 'total internal energy change', 'J', & ! (in)
564  monit_id(im_engflx), & ! (out)
565  dim_type='XY', is_tendency=.true. ) ! (in)
566 
567  return
568  end subroutine land_vars_setup
569 
570  !-----------------------------------------------------------------------------
572  subroutine land_vars_restart_open
573  use scale_time, only: &
575  use scale_file_cartesc, only: &
577  file_cartesc_check_coordinates
578  use mod_land_admin, only: &
579  land_do
580  implicit none
581 
582  character(len=19) :: timelabel
583  character(len=H_LONG) :: basename
584  !---------------------------------------------------------------------------
585 
586  log_newline
587  log_info("LAND_vars_restart_open",*) 'Open restart file (LAND) '
588 
589  if ( land_do .and. land_restart_in_basename /= '' ) then
590 
592  call time_gettimelabel( timelabel )
593  basename = trim(land_restart_in_basename)//'_'//trim(timelabel)
594  else
595  basename = trim(land_restart_in_basename)
596  endif
597 
598  log_info("LAND_vars_restart_open",*) 'basename: ', trim(basename)
599 
600  call file_cartesc_open( basename, restart_fid, aggregate=land_restart_in_aggregate )
601 
602  if ( land_restart_in_check_coordinates ) then
603  call file_cartesc_check_coordinates( restart_fid, land=.true. )
604  end if
605 
606  else
607  log_info("LAND_vars_restart_open",*) 'restart file for land is not specified.'
608  endif
609 
610  return
611  end subroutine land_vars_restart_open
612 
613  !-----------------------------------------------------------------------------
615  subroutine land_vars_restart_read
616  use scale_prc, only: &
617  prc_abort
618  use scale_file, only: &
620  use scale_file_cartesc, only: &
621  file_cartesc_read, &
623  implicit none
624  !---------------------------------------------------------------------------
625 
626  if ( restart_fid /= -1 ) then
627  log_newline
628  log_info("LAND_vars_restart_read",*) 'Read from restart file (LAND) '
629 
630  call file_cartesc_read( restart_fid, var_name(i_temp), 'LXY', & ! [IN]
631  land_temp(:,:,:) ) ! [OUT]
632  call file_cartesc_read( restart_fid, var_name(i_water), 'LXY', & ! [IN]
633  land_water(:,:,:) ) ! [OUT]
634  call file_cartesc_read( restart_fid, var_name(i_ice), 'LXY', & ! [IN]
635  land_ice(:,:,:), & ! [OUT]
636  allow_missing = .true. ) ! [IN]
637  call file_cartesc_read( restart_fid, var_name(i_sfc_temp), 'XY', & ! [IN]
638  land_sfc_temp(:,:) ) ! [OUT]
639  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dir), 'XY', & ! [IN]
640  land_sfc_albedo(:,:,i_r_direct ,i_r_ir ) ) ! [OUT]
641  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_ir_dif), 'XY', & ! [IN]
642  land_sfc_albedo(:,:,i_r_diffuse,i_r_ir ) ) ! [OUT]
643  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dir), 'XY', & ! [IN]
644  land_sfc_albedo(:,:,i_r_direct ,i_r_nir) ) ! [OUT]
645  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_nir_dif), 'XY', & ! [IN]
646  land_sfc_albedo(:,:,i_r_diffuse,i_r_nir) ) ! [OUT]
647  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dir), 'XY', & ! [IN]
648  land_sfc_albedo(:,:,i_r_direct ,i_r_vis) ) ! [OUT]
649  call file_cartesc_read( restart_fid, var_name(i_sfc_alb_vis_dif), 'XY', & ! [IN]
650  land_sfc_albedo(:,:,i_r_diffuse,i_r_vis) ) ! [OUT]
651 
652  if ( snow_flag ) then
653  call file_cartesc_read( restart_fid, var_name(i_snow_sfc_temp), 'XY', & ! [OUT]
654  snow_sfc_temp(:,:) ) ! [IN]
655  call file_cartesc_read( restart_fid, var_name(i_snow_swe), 'XY', & ! [OUT]
656  snow_swe(:,:) ) ! [IN]
657  call file_cartesc_read( restart_fid, var_name(i_snow_depth), 'XY', & ! [OUT]
658  snow_depth(:,:) ) ! [IN]
659  call file_cartesc_read( restart_fid, var_name(i_snow_dzero), 'XY', & ! [OUT]
660  snow_dzero(:,:) ) ! [IN]
661  call file_cartesc_read( restart_fid, var_name(i_snow_nosnowsec), 'XY', & ! [OUT]
662  snow_nosnowsec(:,:) ) ! [IN]
663  end if
664 
665  if( file_get_aggregate(restart_fid) ) call file_cartesc_flush( restart_fid ) ! commit all pending read requests
666 
667  call land_vars_check( force = .true. )
668  else
669  log_error("LAND_vars_restart_read",*) 'invalid restart file ID for land.'
670  call prc_abort
671  endif
672 
673  return
674  end subroutine land_vars_restart_read
675 
676  !-----------------------------------------------------------------------------
678  subroutine land_vars_history
679  use scale_file_history, only: &
680  file_history_in
681  use scale_atmos_hydrometeor, only: &
682  i_qv
683  implicit none
684 
685  real(rp) :: land_waterds(lkmax,lia,lja)
686  integer :: k, i, j
687  !---------------------------------------------------------------------------
688 
689  call prof_rapstart('LND_History', 1)
690 
691 
692  call file_history_in( land_temp(:,:,:), var_name(i_temp), var_desc(i_temp), var_unit(i_temp), dim_type='LXY', standard_name=var_stdn(i_temp) )
693  call file_history_in( land_water(:,:,:), var_name(i_water), var_desc(i_water), var_unit(i_water), dim_type='LXY', standard_name=var_stdn(i_water) )
694  call file_history_in( land_ice(:,:,:), var_name(i_ice), var_desc(i_ice), var_unit(i_ice), dim_type='LXY', standard_name=var_stdn(i_ice) )
695  do j = ljs, lje
696  do i = lis, lie
697  do k = 1, lkmax
698  land_waterds(k,i,j) = land_water(k,i,j) / land_property(i,j,i_waterlimit)
699  end do
700  end do
701  end do
702  call file_history_in( land_waterds(:,:,:), var_name(i_waterds), var_desc(i_waterds), var_unit(i_waterds), dim_type='LXY', fill_halo=.true., standard_name=var_stdn(i_waterds) )
703 
704 
705  call file_history_in( land_sfc_temp(:,:), var_name(i_sfc_temp), &
706  var_desc(i_sfc_temp), var_unit(i_sfc_temp), standard_name=var_stdn(i_sfc_temp) )
707  call file_history_in( land_sfc_albedo(:,:,i_r_direct ,i_r_ir ), var_name(i_sfc_alb_ir_dir), &
708  var_desc(i_sfc_alb_ir_dir), var_unit(i_sfc_alb_ir_dir), standard_name=var_stdn(i_sfc_alb_ir_dir) )
709  call file_history_in( land_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), var_name(i_sfc_alb_ir_dif), &
710  var_desc(i_sfc_alb_ir_dif), var_unit(i_sfc_alb_ir_dif), standard_name=var_stdn(i_sfc_alb_ir_dif) )
711  call file_history_in( land_sfc_albedo(:,:,i_r_direct ,i_r_nir), var_name(i_sfc_alb_nir_dir), &
712  var_desc(i_sfc_alb_nir_dir), var_unit(i_sfc_alb_nir_dir), standard_name=var_stdn(i_sfc_alb_nir_dir) )
713  call file_history_in( land_sfc_albedo(:,:,i_r_diffuse,i_r_nir), var_name(i_sfc_alb_nir_dif), &
714  var_desc(i_sfc_alb_nir_dif), var_unit(i_sfc_alb_nir_dif), standard_name=var_stdn(i_sfc_alb_nir_dif) )
715  call file_history_in( land_sfc_albedo(:,:,i_r_direct ,i_r_vis), var_name(i_sfc_alb_vis_dir), &
716  var_desc(i_sfc_alb_vis_dir), var_unit(i_sfc_alb_vis_dir), standard_name=var_stdn(i_sfc_alb_vis_dir) )
717  call file_history_in( land_sfc_albedo(:,:,i_r_diffuse,i_r_vis), var_name(i_sfc_alb_vis_dif), &
718  var_desc(i_sfc_alb_vis_dif), var_unit(i_sfc_alb_vis_dif), standard_name=var_stdn(i_sfc_alb_vis_dif) )
719  if ( snow_flag ) then
720  ! snow model
721  call file_history_in( snow_sfc_temp(:,:), var_name(i_snow_sfc_temp), &
722  var_desc(i_snow_sfc_temp), var_unit(i_snow_sfc_temp), standard_name=var_stdn(i_snow_sfc_temp) )
723  call file_history_in( snow_swe(:,:), var_name(i_snow_swe), &
724  var_desc(i_snow_swe), var_unit(i_snow_swe), standard_name=var_stdn(i_snow_swe) )
725  call file_history_in( snow_depth(:,:), var_name(i_snow_depth), &
726  var_desc(i_snow_depth), var_unit(i_snow_depth), standard_name=var_stdn(i_snow_depth) )
727  call file_history_in( snow_dzero(:,:), var_name(i_snow_dzero), &
728  var_desc(i_snow_dzero), var_unit(i_snow_dzero), standard_name=var_stdn(i_snow_dzero) )
729  call file_history_in( snow_nosnowsec(:,:), var_name(i_snow_nosnowsec), &
730  var_desc(i_snow_nosnowsec), var_unit(i_snow_nosnowsec), standard_name=var_stdn(i_snow_nosnowsec) )
731  end if
732 
733  call file_history_in( land_sflx_gh(:,:), 'LAND_SFLX_GH', &
734  'land subsurface heat flux (downward)', 'J/m2/s' )
735  call file_history_in( land_sflx_water(:,:), 'LAND_SFLX_water', &
736  'land surface water mass flux (downward)', 'kg/m2/s' )
737  call file_history_in( land_sflx_engi(:,:), 'LAND_SFLX_ENGI', &
738  'land surface internal energy flux (downward)', 'kg/m2/s' )
739 
740  call file_history_in( land_runoff(:,:), 'LAND_RUNOFF', &
741  'runoff water', 'kg/m2/s' )
742  call file_history_in( land_runoff_engi(:,:), 'LAND_RUNOFF_ENGI', &
743  'internal energy of runoff water', 'J/m2/s' )
744 
745  call file_history_in( land_sflx_mw(:,:), 'LAND_SFLX_MW', &
746  'land surface w-momentum flux (upward)', 'kg/m2/s' )
747  call file_history_in( land_sflx_mu(:,:), 'LAND_SFLX_MU', &
748  'land surface u-momentum flux (upward)', 'kg/m2/s' )
749  call file_history_in( land_sflx_mv(:,:), 'LAND_SFLX_MV', &
750  'land surface v-momentum flux (upward)', 'kg/m2/s' )
751  call file_history_in( land_sflx_sh(:,:), 'LAND_SFLX_SH', &
752  'land surface sensible heat flux (upward)', 'J/m2/s' )
753  call file_history_in( land_sflx_lh(:,:), 'LAND_SFLX_LH', &
754  'land surface latent heat flux (upward)', 'J/m2/s' )
755  if ( i_qv > 0 ) &
756  call file_history_in( land_sflx_qtrc(:,:,i_qv), 'LAND_SFLX_evap', &
757  'land surface water vapor flux (upward)', 'kg/m2/s' )
758 
759  call file_history_in( land_u10(:,:), 'LAND_U10', &
760  'land 10m x-wind', 'm/s' )
761  call file_history_in( land_v10(:,:), 'LAND_V10', &
762  'land 10m y-wind', 'm/s' )
763  call file_history_in( land_t2(:,:), 'LAND_T2', &
764  'land 2m temperature', 'K' )
765  call file_history_in( land_q2(:,:), 'LAND_Q2', &
766  'land 2m specific humidity', 'kg/kg' )
767 
768  call file_history_in( land_ustar(:,:), 'LAND_Ustar', &
769  'land friction velocity', 'm/s' )
770  call file_history_in( land_tstar(:,:), 'LAND_Tstar', &
771  'land temperature scale', 'K' )
772  call file_history_in( land_qstar(:,:), 'LAND_Qstar', &
773  'land moisture scale', 'kg/kg' )
774  call file_history_in( land_wstar(:,:), 'LAND_Wstar', &
775  'land convective velocity scale', 'm/s' )
776  call file_history_in( land_rlmo(:,:), 'LAND_RLmo', &
777  'land inversed Obukhov length', '1/m' )
778  if ( snow_flag ) then
779  ! soil
780  call file_history_in( soil_ustar(:,:), 'SOIL_Ustar', &
781  'soil friction velocity', 'm/s' )
782  call file_history_in( soil_tstar(:,:), 'SOIL_Tstar', &
783  'soil temperature scale', 'K' )
784  call file_history_in( soil_qstar(:,:), 'SOIL_Qstar', &
785  'soil moisture scale', 'kg/kg' )
786  call file_history_in( soil_wstar(:,:), 'SOIL_Wstar', &
787  'soil convective velocity scale', 'm/s' )
788  call file_history_in( soil_rlmo(:,:), 'SOIL_RLmo', &
789  'soil inversed Obukhov length', '1/m' )
790  ! snow pack
791  call file_history_in( snow_ustar(:,:), 'SNOW_Ustar', &
792  'snow friction velocity', 'm/s' )
793  call file_history_in( snow_tstar(:,:), 'SNOW_Tstar', &
794  'snow temperature scale', 'K' )
795  call file_history_in( snow_qstar(:,:), 'SNOW_Qstar', &
796  'snow moisture scale', 'kg/kg' )
797  call file_history_in( snow_wstar(:,:), 'SNOW_Wstar', &
798  'snow convective velocity scale', 'm/s' )
799  call file_history_in( snow_rlmo(:,:), 'SNOW_RLmo', &
800  'snow inversed Obukhov length', '1/m' )
801  end if
802 
803  call prof_rapend ('LND_History', 1)
804 
805  return
806  end subroutine land_vars_history
807 
808  !-----------------------------------------------------------------------------
810  subroutine land_vars_monitor
811  use scale_const, only: &
812  dwatr => const_dwatr, &
813  dice => const_dice
814  use scale_atmos_hydrometeor, only: &
815  cv_water, &
816  cv_ice, &
817  lhf
818  use scale_monitor, only: &
819  monitor_put
820  implicit none
821 
822  real(rp) :: work3d(lka,lia,lja)
823  real(rp) :: work2d(lia,lja)
824 
825  integer :: k, i, j
826  !---------------------------------------------------------------------------
827 
828  call monitor_put( monit_id(im_temp), land_temp(:,:,:) )
829  if ( monit_id(im_water) > 0 ) then
830  !$omp parallel do
831  do j = ljs, lje
832  do i = lis, lie
833  do k = lks, lke
834  work3d(k,i,j) = land_water(k,i,j) * dwatr
835  end do
836  end do
837  end do
838  call monitor_put( monit_id(im_water), work3d(:,:,:) )
839  end if
840  if ( monit_id(im_ice) > 0 ) then
841  !$omp parallel do
842  do j = ljs, lje
843  do i = lis, lie
844  do k = lks, lke
845  work3d(k,i,j) = land_ice(k,i,j) * dice
846  end do
847  end do
848  end do
849  call monitor_put( monit_id(im_ice), work3d(:,:,:) )
850  end if
851 
852 
853  ! mass budget
854  call monitor_put( monit_id(im_sfc), land_sflx_water(:,:) )
855  call monitor_put( monit_id(im_roff), land_runoff(:,:) )
856  if ( monit_id(im_masflx) > 0 ) then
857  !$omp parallel do
858  do j = ljs, lje
859  do i = lis, lie
860  work2d(i,j) = land_sflx_water(i,j) - land_runoff(i,j)
861  end do
862  end do
863  call monitor_put( monit_id(im_masflx), work2d(:,:) )
864  end if
865 
866  ! energy budget
867  if ( monit_id(im_engi) > 0 ) then
868  !$omp parallel do
869  do j = ljs, lje
870  do i = lis, lie
871  do k = lks, lke
872  work3d(k,i,j) = ( land_property(i,j,i_heatcapacity) * ( 1.0_rp - land_property(i,j,i_waterlimit) ) & ! soil particles
873  + cv_water * dwatr * land_water(k,i,j) & ! land water
874  + cv_ice * dice * land_ice(k,i,j) & ! land ice
875  ) * land_temp(k,i,j) &
876  - lhf * dice * land_ice(k,i,j)
877  end do
878  end do
879  end do
880  call monitor_put( monit_id(im_engi), work3d(:,:,:) )
881  end if
882  if ( monit_id(im_w_engi) > 0 ) then
883  !$omp parallel do
884  do j = ljs, lje
885  do i = lis, lie
886  do k = lks, lke
887  work3d(k,i,j) = cv_water * dwatr * land_water(k,i,j) * land_temp(k,i,j)
888  end do
889  end do
890  end do
891  call monitor_put( monit_id(im_w_engi), work3d(:,:,:) )
892  end if
893  if ( monit_id(im_i_engi) > 0 ) then
894  !$omp parallel do
895  do j = ljs, lje
896  do i = lis, lie
897  do k = lks, lke
898  work3d(k,i,j) = ( cv_ice * land_temp(k,i,j) - lhf ) * dice * land_ice(k,i,j)
899  end do
900  end do
901  end do
902  call monitor_put( monit_id(im_i_engi), work3d(:,:,:) )
903  end if
904 
905 
906  call monitor_put( monit_id(im_engsfc_gh), land_sflx_gh(:,:) )
907  call monitor_put( monit_id(im_engsfc_ei), land_sflx_engi(:,:) )
908  call monitor_put( monit_id(im_roff_ei), land_runoff_engi(:,:) )
909  if ( monit_id(im_engflx) > 0 ) then
910  !$omp parallel do
911  do j = ljs, lje
912  do i = lis, lie
913  work2d(i,j) = land_sflx_gh(i,j) + land_sflx_engi(i,j) &
914  - land_runoff_engi(i,j)
915  end do
916  end do
917  call monitor_put( monit_id(im_engflx), work2d(:,:) )
918  end if
919 
920 
921  return
922  end subroutine land_vars_monitor
923 
924  !-----------------------------------------------------------------------------
926  subroutine land_vars_check( force )
927  use scale_statistics, only: &
929  statistics_total
930  use scale_land_grid_cartesc_real, only: &
935  use scale_landuse, only: &
937  implicit none
938  logical, intent(in), optional :: force
939  logical :: check
940  !---------------------------------------------------------------------------
941 
942  if ( present(force) ) then
943  check = force
944  else
945  check = land_vars_checkrange
946  end if
947 
948  if ( check ) then
949  call valcheck( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
950  land_temp(:,:,:), 0.0_rp, 1000.0_rp, &
951  var_name(i_temp), __file__, __line__, &
952  mask = landuse_exists_land(:,:) )
953  call valcheck( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
954  land_water(:,:,:), 0.0_rp, 1.0_rp, &
955  var_name(i_water), __file__, __line__, &
956  mask = landuse_exists_land(:,:) )
957  call valcheck( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
958  land_ice(:,:,:), 0.0_rp, 1.0_rp, &
959  var_name(i_ice), __file__, __line__, &
960  mask = landuse_exists_land(:,:) )
961  call valcheck( lia, lis, lie, lja, ljs, lje, &
962  land_sfc_temp(:,:), 0.0_rp, 1000.0_rp, &
963  var_name(i_sfc_temp), __file__, __line__, &
964  mask = landuse_exists_land(:,:) )
965  call valcheck( lia, lis, lie, lja, ljs, lje, &
966  land_sfc_albedo(:,:,i_r_direct ,i_r_ir ), 0.0_rp, 2.0_rp, &
967  var_name(i_sfc_alb_ir_dir ), __file__, __line__, &
968  mask = landuse_exists_land(:,:) )
969  call valcheck( lia, lis, lie, lja, ljs, lje, &
970  land_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), 0.0_rp, 2.0_rp, &
971  var_name(i_sfc_alb_ir_dif ), __file__, __line__, &
972  mask = landuse_exists_land(:,:) )
973  call valcheck( lia, lis, lie, lja, ljs, lje, &
974  land_sfc_albedo(:,:,i_r_direct ,i_r_nir), 0.0_rp, 2.0_rp, &
975  var_name(i_sfc_alb_nir_dir), __file__, __line__, &
976  mask = landuse_exists_land(:,:) )
977  call valcheck( lia, lis, lie, lja, ljs, lje, &
978  land_sfc_albedo(:,:,i_r_diffuse,i_r_nir), 0.0_rp, 2.0_rp, &
979  var_name(i_sfc_alb_nir_dif), __file__, __line__, &
980  mask = landuse_exists_land(:,:) )
981  call valcheck( lia, lis, lie, lja, ljs, lje, &
982  land_sfc_albedo(:,:,i_r_direct ,i_r_vis), 0.0_rp, 2.0_rp, &
983  var_name(i_sfc_alb_vis_dir), __file__, __line__, &
984  mask = landuse_exists_land(:,:) )
985  call valcheck( lia, lis, lie, lja, ljs, lje, &
986  land_sfc_albedo(:,:,i_r_diffuse,i_r_vis), 0.0_rp, 2.0_rp, &
987  var_name(i_sfc_alb_vis_dif), __file__, __line__, &
988  mask = landuse_exists_land(:,:) )
989 
990  if ( snow_flag ) then
991  call valcheck( lia, lis, lie, lja, ljs, lje, &
992  snow_sfc_temp(:,:), 0.0_rp, 1000.0_rp, &
993  var_name(i_snow_sfc_temp), __file__, __line__, &
994  mask = landuse_exists_land(:,:) )
995  call valcheck( lia, lis, lie, lja, ljs, lje, &
996  snow_swe(:,:), 0.0_rp, 1000.0_rp, &
997  var_name(i_snow_swe), __file__, __line__, &
998  mask = landuse_exists_land(:,:) )
999  call valcheck( lia, lis, lie, lja, ljs, lje, &
1000  snow_depth(:,:), 0.0_rp, 1000.0_rp, &
1001  var_name(i_snow_depth), __file__, __line__, &
1002  mask = landuse_exists_land(:,:) )
1003 
1004  call valcheck( lia, lis, lie, lja, ljs, lje, &
1005  snow_dzero(:,:), 0.0_rp, 1000.0_rp, &
1006  var_name(i_snow_dzero), __file__, __line__, &
1007  mask = landuse_exists_land(:,:) )
1008  endif
1009 
1010  end if
1011 
1012  if ( present(force) ) then
1013  check = force
1014  else
1016  end if
1017 
1018  if ( check ) then
1019 
1020  ! 3D
1021  call statistics_total( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
1022  land_temp(:,:,:), var_name(i_temp), & ! (in)
1023  land_grid_cartesc_real_vol(:,:,:), & ! (in)
1025  call statistics_total( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
1026  land_water(:,:,:), var_name(i_water), & ! (in)
1027  land_grid_cartesc_real_vol(:,:,:), & ! (in)
1029  call statistics_total( lka, lks, lke, lia, lis, lie, lja, ljs, lje, &
1030  land_ice(:,:,:), var_name(i_ice), & ! (in)
1031  land_grid_cartesc_real_vol(:,:,:), & ! (in)
1033 
1034  ! 2D
1035  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1036  land_sfc_temp(:,:), var_name(i_sfc_temp), & ! [IN]
1037  land_grid_cartesc_real_area(:,:), & ! [IN]
1039  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1040  land_sfc_albedo(:,:,i_r_direct ,i_r_ir ), var_name(i_sfc_alb_ir_dir), & ! [IN]
1041  land_grid_cartesc_real_area(:,:), & ! [IN]
1043  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1044  land_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), var_name(i_sfc_alb_ir_dif), & ! [IN]
1045  land_grid_cartesc_real_area(:,:), & ! [IN]
1047  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1048  land_sfc_albedo(:,:,i_r_direct ,i_r_nir), var_name(i_sfc_alb_nir_dir), & ! [IN]
1049  land_grid_cartesc_real_area(:,:), & ! [IN]
1051  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1052  land_sfc_albedo(:,:,i_r_diffuse,i_r_nir), var_name(i_sfc_alb_nir_dif), & ! [IN]
1053  land_grid_cartesc_real_area(:,:), & ! [IN]
1055  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1056  land_sfc_albedo(:,:,i_r_direct ,i_r_vis), var_name(i_sfc_alb_vis_dir), & ! [IN]
1057  land_grid_cartesc_real_area(:,:), & ! [IN]
1059  call statistics_total( lia, lis, lie, lja, ljs, lje, & ! [IN]
1060  land_sfc_albedo(:,:,i_r_diffuse,i_r_vis), var_name(i_sfc_alb_vis_dif), & ! [IN]
1061  land_grid_cartesc_real_area(:,:), & ! [IN]
1063 
1064  if ( snow_flag ) then
1065  call statistics_total( lia, lis, lie, lja, ljs, lje, &
1066  snow_sfc_temp(:,:), var_name(i_snow_sfc_temp), & ! (in)
1067  land_grid_cartesc_real_area(:,:), & ! (in)
1069  call statistics_total( lia, lis, lie, lja, ljs, lje, &
1070  snow_swe(:,:), var_name(i_snow_swe), & ! (in)
1071  land_grid_cartesc_real_area(:,:), & ! (in)
1073  call statistics_total( lia, lis, lie, lja, ljs, lje, &
1074  snow_depth(:,:), var_name(i_snow_depth), & ! (in)
1075  land_grid_cartesc_real_area(:,:), & ! (in)
1077  call statistics_total( lia, lis, lie, lja, ljs, lje, &
1078  snow_dzero(:,:), var_name(i_snow_dzero), & ! (in)
1079  land_grid_cartesc_real_area(:,:), & ! (in)
1081  call statistics_total( lia, lis, lie, lja, ljs, lje, &
1082  snow_nosnowsec(:,:), var_name(i_snow_nosnowsec), & ! (in)
1083  land_grid_cartesc_real_area(:,:), & ! (in)
1085  end if
1086 
1087  endif
1088 
1089  return
1090  end subroutine land_vars_check
1091 
1092  !-----------------------------------------------------------------------------
1094  subroutine land_param_read
1095  use scale_prc, only: &
1096  prc_abort
1097  use scale_landuse, only: &
1098  landuse_pft_nmin, &
1100  implicit none
1101 
1102  integer :: index
1103  character(len=H_MID) :: description
1104  real(rp) :: strgmax ! Water Limit [0-1]
1105  real(rp) :: strgcrt ! Water Critical [0-1]
1106  real(rp) :: rstoma ! Stomata Resistance [0-1]
1107  real(rp) :: tcs ! Thermal Conductivity [W m-1 K-1]
1108  real(rp) :: hcs ! Dencity x Heat Capacity [J m-3 K-1]
1109  real(rp) :: dfw ! Water Diffusivity [m2 s-1]
1110  real(rp) :: alblw ! Albedo Long Wave [0-1]
1111  real(rp) :: albsw ! Albedo Short Wave [0-1]
1112  real(rp) :: z0m ! Z0 for momentum [m]
1113  real(rp) :: z0h ! Z0 for heat [m]
1114  real(rp) :: z0e ! Z0 for vapor [m]
1115 
1116  namelist / param_land_property / &
1118 
1119  namelist / param_land_data / &
1120  index, &
1121  description, &
1122  strgmax, &
1123  strgcrt, &
1124  rstoma, &
1125  tcs, &
1126  hcs, &
1127  dfw, &
1128  alblw, &
1129  albsw, &
1130  z0m, &
1131  z0h, &
1132  z0e
1133 
1134  integer :: n
1135  integer :: ierr
1136 
1137  integer :: io_fid_land_property
1138  !---------------------------------------------------------------------------
1139 
1140  !--- read namelist
1141  rewind(io_fid_conf)
1142  read(io_fid_conf,nml=param_land_property,iostat=ierr)
1143  if( ierr < 0 ) then !--- missing
1144  log_info("LAND_param_read",*) 'Not found namelist. Default used.'
1145  elseif( ierr > 0 ) then !--- fatal error
1146  log_error("LAND_param_read",*) 'Not appropriate names in namelist PARAM_LAND_PROPERTY. Check!'
1147  call prc_abort
1148  endif
1149  log_nml(param_land_property)
1150 
1151  if( land_property_in_filename /= '' ) then
1152  !--- Open land parameter file
1153  io_fid_land_property = io_get_available_fid()
1154  open( io_fid_land_property, &
1155  file = trim(land_property_in_filename), &
1156  form = 'formatted', &
1157  status = 'old', &
1158  iostat = ierr )
1159 
1160  if ( ierr /= 0 ) then
1161  log_error("LAND_param_read",*) 'Failed to open land parameter file! :', &
1163  call prc_abort
1164  else
1165  log_newline
1166  log_info("LAND_param_read",*) 'Properties for each plant functional type (PFT)'
1167  log_info_cont('(12(1x,A))') ' PFT DESCRIPTION', &
1168  'Max Stg', &
1169  'CRT Stg', &
1170  'Stm.Res', &
1171  'T condu', &
1172  'H capac', &
1173  'DFC Wat', &
1174  'LW ALB', &
1175  'SW ALB', &
1176  ' Z0(m)', &
1177  ' Z0(h)', &
1178  ' Z0(e)'
1179 
1180  !--- read namelist
1181  rewind(io_fid_land_property)
1182 
1184  ! default value
1185  albsw = 0.2_rp
1186  strgmax = 0.2_rp
1187  strgcrt = 0.1_rp
1188  rstoma = 50.0_rp
1189  tcs = 1.0_rp
1190  hcs = 2.e+6_rp
1191  dfw = 1.e-6_rp
1192  alblw = 0.04_rp
1193  albsw = 0.22_rp
1194  z0m = 0.1_rp
1195  z0h = -1.0_rp
1196  z0e = -1.0_rp
1197 
1198  read(io_fid_land_property,nml=param_land_data,iostat=ierr)
1199  if ( ierr < 0 ) then !--- no more data
1200  exit
1201  elseif( ierr > 0 ) then !--- fatal error
1202  log_error("LAND_param_read",*) 'Not appropriate names in namelist PARAM_LAND_DATA. Check!'
1203  call prc_abort
1204  endif
1205 
1206  if( z0h < 0.0_rp ) then
1207  z0h = z0m / 7.4_rp ! defined by Garratt and Francey (1978)
1208  endif
1209  if( z0e < 0.0_rp ) then
1210  z0e = z0m / 7.4_rp ! defined by Garratt and Francey (1978)
1211  endif
1212 
1213  land_property_table(index,i_waterlimit ) = strgmax
1214  land_property_table(index,i_watercritical) = strgcrt
1215  land_property_table(index,i_stomataresist) = rstoma
1216  land_property_table(index,i_thermalcond ) = tcs
1217  land_property_table(index,i_heatcapacity ) = hcs
1218  land_property_table(index,i_waterdiff ) = dfw
1219  land_property_table(index,i_alblw ) = alblw
1220  land_property_table(index,i_albsw ) = albsw
1221  land_property_table(index,i_z0m ) = z0m
1222  land_property_table(index,i_z0h ) = z0h
1223  land_property_table(index,i_z0e ) = z0e
1224 
1225  log_info_cont('(1x,A4,I4.3,1x,A32,4(1x,F7.3),2(1x,ES7.1),5(1x,F6.3))') &
1226  'IDX=', index, &
1227  trim(description), &
1228  strgmax, &
1229  strgcrt, &
1230  rstoma, &
1231  tcs, &
1232  hcs, &
1233  dfw, &
1234  alblw, &
1235  albsw, &
1236  z0m, &
1237  z0h, &
1238  z0e
1239  enddo
1240 
1241  end if
1242 
1243  close( io_fid_land_property )
1244 
1245  endif
1246 
1247  return
1248  end subroutine land_param_read
1249 
1250  !-----------------------------------------------------------------------------
1252  function convert_ws2vwc( WS, critical ) result( VWC )
1253  implicit none
1254 
1255  real(rp), intent(in) :: ws(lia,lja) ! water saturation [fraction]
1256  logical, intent(in) :: critical ! is I_WaterCritical used?
1257 
1258  real(rp) :: vwc(lia,lja) ! volumetric water content [m3/m3]
1259 
1260  ! work
1261  integer :: i, j, num
1262  !---------------------------------------------------------------------------
1263 
1264  if( critical ) then
1265  num = i_watercritical
1266  else
1267  num = i_waterlimit
1268  end if
1269 
1270  do j = ljs, lje
1271  do i = lis, lie
1272  vwc(i,j) = max( min( ws(i,j)*land_property(i,j,num), land_property(i,j,num) ), 0.0_rp )
1273  end do
1274  end do
1275 
1276  return
1277  end function convert_ws2vwc
1278 
1279  !-----------------------------------------------------------------------------
1281  subroutine land_vars_restart_create
1282  use scale_time, only: &
1284  use scale_file_cartesc, only: &
1286  use mod_land_admin, only: &
1287  land_do
1288  implicit none
1289 
1290  character(len=19) :: timelabel
1291  character(len=H_LONG) :: basename
1292  !---------------------------------------------------------------------------
1293 
1294  if ( land_do .and. land_restart_out_basename /= '' ) then
1295 
1296  log_newline
1297  log_info("LAND_vars_restart_create",*) 'Create restart file (LAND) '
1298 
1300  call time_gettimelabel( timelabel )
1301  basename = trim(land_restart_out_basename)//'_'//trim(timelabel)
1302  else
1303  basename = trim(land_restart_out_basename)
1304  endif
1305 
1306  log_info("LAND_vars_restart_create",*) 'basename: ', trim(basename)
1307 
1308  call file_cartesc_create( &
1309  basename, land_restart_out_title, land_restart_out_dtype, & ! [IN]
1310  restart_fid, & ! [OUT]
1311  aggregate=land_restart_out_aggregate ) ! [IN]
1312 
1313  endif
1314 
1315  return
1316  end subroutine land_vars_restart_create
1317 
1318  !-----------------------------------------------------------------------------
1320  subroutine land_vars_restart_enddef
1321  use scale_file_cartesc, only: &
1323  implicit none
1324 
1325  if ( restart_fid /= -1 ) then
1326  call file_cartesc_enddef( restart_fid ) ! [IN]
1327  endif
1328 
1329  return
1330  end subroutine land_vars_restart_enddef
1331 
1332  !-----------------------------------------------------------------------------
1334  subroutine land_vars_restart_close
1335  use scale_file_cartesc, only: &
1337  implicit none
1338  !---------------------------------------------------------------------------
1339 
1340  if ( restart_fid /= -1 ) then
1341  log_newline
1342  log_info("LAND_vars_restart_close",*) 'Close restart file (LAND) '
1343 
1344  call file_cartesc_close( restart_fid ) ! [IN]
1345 
1346  restart_fid = -1
1347  endif
1348 
1349  return
1350  end subroutine land_vars_restart_close
1351 
1352  !-----------------------------------------------------------------------------
1354  subroutine land_vars_restart_def_var
1355  use scale_file_cartesc, only: &
1357  implicit none
1358  integer :: i
1359  !---------------------------------------------------------------------------
1360 
1361  if ( restart_fid /= -1 ) then
1362 
1363  do i = i_temp, i_ice
1364  call file_cartesc_def_var( restart_fid, & ! [IN]
1365  var_name(i), var_desc(i), var_unit(i), & ! [IN]
1366  'LXY', land_restart_out_dtype, & ! [IN]
1367  var_id(i), & ! [OUT]
1368  standard_name=var_stdn(i) ) ! [IN]
1369  end do
1370  do i = i_sfc_temp, i_sfc_alb_vis_dif
1371  call file_cartesc_def_var( restart_fid, & ! [IN]
1372  var_name(i), var_desc(i), var_unit(i), & ! [IN]
1373  'XY', land_restart_out_dtype, & ! [IN]
1374  var_id(i), & ! [OUT]
1375  standard_name=var_stdn(i) ) ! [IN]
1376  end do
1377 
1378  if ( snow_flag ) then
1379  do i = i_snow_sfc_temp, i_snow_nosnowsec
1380  call file_cartesc_def_var( restart_fid, & ! [IN]
1381  var_name(i), var_desc(i), var_unit(i), & ! [IN]
1382  'XY', land_restart_out_dtype, & ! [IN]
1383  var_id(i), & ! [OUT]
1384  standard_name=var_stdn(i) ) ! [IN]
1385  end do
1386  end if
1387 
1388  endif
1389 
1390  return
1391  end subroutine land_vars_restart_def_var
1392 
1393  !-----------------------------------------------------------------------------
1395  subroutine land_vars_restart_write
1396  use scale_file_cartesc, only: &
1397  file_cartesc_write_var
1398  implicit none
1399  !---------------------------------------------------------------------------
1400 
1401  if ( restart_fid /= -1 ) then
1402 
1403  call land_vars_check( force = .true. )
1404 
1405  call file_cartesc_write_var( restart_fid, var_id(i_temp), & ! [IN]
1406  land_temp(:,:,:), & ! [IN]
1407  var_name(i_temp), 'LXY', fill_halo=.true. ) ! [IN]
1408  call file_cartesc_write_var( restart_fid, var_id(i_water), & ! [IN]
1409  land_water(:,:,:), & ! [IN]
1410  var_name(i_water), 'LXY', fill_halo=.true. ) ! [IN]
1411  call file_cartesc_write_var( restart_fid, var_id(i_ice), & ! [IN]
1412  land_ice(:,:,:), & ! [IN]
1413  var_name(i_ice), 'LXY', fill_halo=.true. ) ! [IN]
1414  call file_cartesc_write_var( restart_fid, var_id(i_sfc_temp), & ! [IN]
1415  land_sfc_temp(:,:), & ! [IN]
1416  var_name(i_sfc_temp), 'XY', fill_halo=.true. ) ! [IN]
1417  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dir), & ! [IN]
1418  land_sfc_albedo(:,:,i_r_direct ,i_r_ir ), & ! [IN]
1419  var_name(i_sfc_alb_ir_dir), 'XY', fill_halo=.true. ) ! [IN]
1420  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_ir_dif), & ! [IN]
1421  land_sfc_albedo(:,:,i_r_diffuse,i_r_ir ), & ! [IN]
1422  var_name(i_sfc_alb_ir_dif), 'XY', fill_halo=.true. ) ! [IN]
1423  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dir), & ! [IN]
1424  land_sfc_albedo(:,:,i_r_direct ,i_r_nir), & ! [IN]
1425  var_name(i_sfc_alb_nir_dir), 'XY', fill_halo=.true. ) ! [IN]
1426  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_nir_dif), & ! [IN]
1427  land_sfc_albedo(:,:,i_r_diffuse,i_r_nir), & ! [IN]
1428  var_name(i_sfc_alb_nir_dif), 'XY', fill_halo=.true. ) ! [IN]
1429  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dir), & ! [IN]
1430  land_sfc_albedo(:,:,i_r_direct ,i_r_vis), & ! [IN]
1431  var_name(i_sfc_alb_vis_dir), 'XY', fill_halo=.true. ) ! [IN]
1432  call file_cartesc_write_var( restart_fid, var_id(i_sfc_alb_vis_dif), & ! [IN]
1433  land_sfc_albedo(:,:,i_r_diffuse,i_r_vis), & ! [IN]
1434  var_name(i_sfc_alb_vis_dif), 'XY', fill_halo=.true. ) ! [IN]
1435 
1436  if ( snow_flag ) then
1437  call file_cartesc_write_var( restart_fid, var_id(i_snow_sfc_temp), snow_sfc_temp(:,:), &
1438  var_name(i_snow_sfc_temp), 'XY', fill_halo=.true. )
1439  call file_cartesc_write_var( restart_fid, var_id(i_snow_swe), snow_swe(:,:), &
1440  var_name(i_snow_swe), 'XY', fill_halo=.true. )
1441  call file_cartesc_write_var( restart_fid, var_id(i_snow_depth), snow_depth(:,:), &
1442  var_name(i_snow_depth), 'XY', fill_halo=.true. )
1443  call file_cartesc_write_var( restart_fid, var_id(i_snow_dzero), snow_dzero(:,:), &
1444  var_name(i_snow_dzero), 'XY', fill_halo=.true. )
1445  call file_cartesc_write_var( restart_fid, var_id(i_snow_nosnowsec), snow_nosnowsec(:,:), &
1446  var_name(i_snow_nosnowsec), 'XY', fill_halo=.true. )
1447  end if
1448 
1449  endif
1450 
1451  return
1452  end subroutine land_vars_restart_write
1453 
1454 end module mod_land_vars
mod_land_vars::land_restart_out_basename
character(len=h_long), public land_restart_out_basename
Basename of the output file.
Definition: mod_land_vars.F90:54
scale_cpl_sfc_index::n_rad_dir
integer, parameter, public n_rad_dir
Definition: scale_cpl_sfc_index.F90:36
scale_statistics
module Statistics
Definition: scale_statistics.F90:11
mod_land_vars::land_temp
real(rp), dimension(:,:,:), allocatable, public land_temp
temperature of each soil layer [K]
Definition: mod_land_vars.F90:61
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_cpl_sfc_index::i_r_direct
integer, parameter, public i_r_direct
Definition: scale_cpl_sfc_index.F90:37
mod_land_vars::atmos_sfc_pres
real(rp), dimension(:,:), allocatable, public atmos_sfc_pres
Definition: mod_land_vars.F90:125
mod_land_vars::atmos_temp
real(rp), dimension(:,:), allocatable, public atmos_temp
Definition: mod_land_vars.F90:116
mod_land_vars::snow_sfc_temp
real(rp), dimension(:,:), allocatable, public snow_sfc_temp
snow surface temperature [K]
Definition: mod_land_vars.F90:68
scale_land_grid_cartesc_index::ljs
integer, public ljs
Definition: scale_land_grid_cartesC_index.F90:45
mod_land_vars::atmos_qv
real(rp), dimension(:,:), allocatable, public atmos_qv
Definition: mod_land_vars.F90:122
scale_tracer::qa
integer, public qa
Definition: scale_tracer.F90:34
mod_land_vars::i_stomataresist
integer, parameter, public i_stomataresist
Definition: mod_land_vars.F90:142
scale_land_grid_cartesc_index::lia
integer, public lia
Definition: scale_land_grid_cartesC_index.F90:37
mod_land_vars::land_sflx_mu
real(rp), dimension(:,:), allocatable, public land_sflx_mu
land surface u-momentum flux [kg/m2/s]
Definition: mod_land_vars.F90:86
scale_land_grid_cartesc_index::lja
integer, public lja
Definition: scale_land_grid_cartesC_index.F90:38
scale_file_cartesc::file_cartesc_enddef
subroutine, public file_cartesc_enddef(fid)
Exit netCDF file define mode.
Definition: scale_file_cartesC.F90:943
mod_land_vars::land_tstar
real(rp), dimension(:,:), allocatable, target, public land_tstar
temperature scale [K]
Definition: mod_land_vars.F90:96
scale_file_cartesc::file_cartesc_def_var
subroutine, public file_cartesc_def_var(fid, varname, desc, unit, dim_type, datatype, vid, standard_name, timeintv, nsteps, cell_measures)
Define a variable to file.
Definition: scale_file_cartesC.F90:3307
mod_land_vars::land_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public land_sfc_albedo
land surface albedo (direct/diffuse,IR/near-IR/VIS) (0-1)
Definition: mod_land_vars.F90:65
scale_cpl_sfc_index::i_r_diffuse
integer, parameter, public i_r_diffuse
Definition: scale_cpl_sfc_index.F90:38
mod_land_vars::land_sflx_engi
real(rp), dimension(:,:), allocatable, public land_sflx_engi
land surface internal energy flux [J/m2/s]
Definition: mod_land_vars.F90:82
mod_land_vars::land_vars_history
subroutine, public land_vars_history
History output set for land variables.
Definition: mod_land_vars.F90:679
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_land_vars::i_alblw
integer, parameter, public i_alblw
Definition: mod_land_vars.F90:146
mod_land_vars::i_albsw
integer, parameter, public i_albsw
Definition: mod_land_vars.F90:147
mod_land_vars::atmos_w
real(rp), dimension(:,:), allocatable, public atmos_w
Definition: mod_land_vars.F90:118
mod_land_vars::soil_ustar
real(rp), dimension(:,:), pointer, public soil_ustar
Definition: mod_land_vars.F90:100
mod_land_vars::land_water_t
real(rp), dimension(:,:,:), allocatable, public land_water_t
tendency of LAND_WATER
Definition: mod_land_vars.F90:76
scale_land_grid_cartesc_index::lkmax
integer, public lkmax
Definition: scale_land_grid_cartesC_index.F90:32
mod_land_vars::land_water
real(rp), dimension(:,:,:), allocatable, public land_water
moisture of each soil layer [m3/m3]
Definition: mod_land_vars.F90:62
mod_land_vars::land_runoff
real(rp), dimension(:,:), allocatable, public land_runoff
runoff of the land water [kg/m2/s]
Definition: mod_land_vars.F90:111
scale_cpl_sfc_index::i_r_ir
integer, parameter, public i_r_ir
Definition: scale_cpl_sfc_index.F90:29
mod_land_vars::atmos_u
real(rp), dimension(:,:), allocatable, public atmos_u
Definition: mod_land_vars.F90:119
scale_land_grid_cartesc_index::lje
integer, public lje
Definition: scale_land_grid_cartesC_index.F90:46
scale_prof::prof_rapstart
subroutine, public prof_rapstart(rapname_base, level, disable_barrier)
Start raptime.
Definition: scale_prof.F90:159
mod_land_vars::land_vars_restart_def_var
subroutine, public land_vars_restart_def_var
Define land variables in restart file.
Definition: mod_land_vars.F90:1355
scale_atmos_hydrometeor
module atmosphere / hydrometeor
Definition: scale_atmos_hydrometeor.F90:12
mod_land_vars::land_restart_out_title
character(len=h_mid), public land_restart_out_title
Title of the output file.
Definition: mod_land_vars.F90:57
mod_land_vars::land_restart_in_aggregate
logical, public land_restart_in_aggregate
Switch to use aggregate file.
Definition: mod_land_vars.F90:52
mod_land_vars::land_sflx_mv
real(rp), dimension(:,:), allocatable, public land_sflx_mv
land surface v-momentum flux [kg/m2/s]
Definition: mod_land_vars.F90:87
mod_land_vars::i_waterdiff
integer, parameter, public i_waterdiff
Definition: mod_land_vars.F90:145
mod_land_vars::atmos_cossza
real(rp), dimension(:,:), allocatable, public atmos_cossza
Definition: mod_land_vars.F90:127
scale_land_grid_cartesc_real::land_grid_cartesc_real_totarea
real(rp), public land_grid_cartesc_real_totarea
total area
Definition: scale_land_grid_cartesC_real.F90:36
mod_land_vars::i_z0m
integer, parameter, public i_z0m
Definition: mod_land_vars.F90:148
mod_land_vars::atmos_sflx_rad_dn
real(rp), dimension(:,:,:,:), allocatable, public atmos_sflx_rad_dn
Definition: mod_land_vars.F90:126
mod_land_vars::land_ice_t
real(rp), dimension(:,:,:), allocatable, public land_ice_t
tendency of LAND_ICE
Definition: mod_land_vars.F90:77
scale_io::io_get_available_fid
integer function, public io_get_available_fid()
search & get available file ID
Definition: scale_io.F90:321
mod_land_vars::snow_wstar
real(rp), dimension(:,:), allocatable, public snow_wstar
Definition: mod_land_vars.F90:108
scale_landuse::landuse_exists_land
logical, dimension(:,:), allocatable, public landuse_exists_land
land calculation flag
Definition: scale_landuse.F90:50
mod_land_vars::atmos_sflx_water
real(rp), dimension(:,:), allocatable, public atmos_sflx_water
Definition: mod_land_vars.F90:128
mod_land_vars::soil_rlmo
real(rp), dimension(:,:), pointer, public soil_rlmo
Definition: mod_land_vars.F90:104
scale_file_history
module file_history
Definition: scale_file_history.F90:15
mod_land_admin::snow_type
character(len=h_short), public snow_type
Definition: mod_land_admin.F90:38
mod_land_vars::land_rlmo
real(rp), dimension(:,:), allocatable, target, public land_rlmo
inversed Obukhov length [1/m]
Definition: mod_land_vars.F90:99
mod_land_vars::land_vars_monitor
subroutine, public land_vars_monitor
monitor output
Definition: mod_land_vars.F90:811
scale_file
module file
Definition: scale_file.F90:15
scale_land_grid_cartesc_real::land_grid_cartesc_real_totvol
real(rp), public land_grid_cartesc_real_totvol
total volume
Definition: scale_land_grid_cartesC_real.F90:38
mod_land_vars::snow_tstar
real(rp), dimension(:,:), allocatable, public snow_tstar
Definition: mod_land_vars.F90:106
mod_land_vars::soil_tstar
real(rp), dimension(:,:), pointer, public soil_tstar
Definition: mod_land_vars.F90:101
scale_land_grid_cartesc_index
module land / grid / cartesianC / index
Definition: scale_land_grid_cartesC_index.F90:11
mod_land_vars::land_sflx_gh
real(rp), dimension(:,:), allocatable, public land_sflx_gh
land surface heat flux [J/m2/s]
Definition: mod_land_vars.F90:80
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_land_vars::land_sflx_mw
real(rp), dimension(:,:), allocatable, public land_sflx_mw
land surface w-momentum flux [kg/m2/s]
Definition: mod_land_vars.F90:85
mod_land_vars::atmos_pres
real(rp), dimension(:,:), allocatable, public atmos_pres
Definition: mod_land_vars.F90:117
mod_land_vars::land_vars_restart_write
subroutine, public land_vars_restart_write
Write land variables to restart file.
Definition: mod_land_vars.F90:1396
mod_land_vars::land_vars_restart_close
subroutine, public land_vars_restart_close
Close restart file.
Definition: mod_land_vars.F90:1335
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
mod_land_vars::land_restart_out_postfix_timelabel
logical, public land_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
Definition: mod_land_vars.F90:56
scale_io
module STDIO
Definition: scale_io.F90:10
scale_cpl_sfc_index::i_r_nir
integer, parameter, public i_r_nir
Definition: scale_cpl_sfc_index.F90:30
mod_land_vars::soil_wstar
real(rp), dimension(:,:), pointer, public soil_wstar
Definition: mod_land_vars.F90:103
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:44
scale_const
module CONSTANT
Definition: scale_const.F90:11
mod_land_vars::land_sflx_sh
real(rp), dimension(:,:), allocatable, public land_sflx_sh
land surface sensible heat flux [J/m2/s]
Definition: mod_land_vars.F90:88
mod_land_vars::land_wstar
real(rp), dimension(:,:), allocatable, target, public land_wstar
convective velocity scale [m/s]
Definition: mod_land_vars.F90:98
mod_land_vars::land_ustar
real(rp), dimension(:,:), allocatable, target, public land_ustar
friction velocity [m/s]
Definition: mod_land_vars.F90:95
mod_land_admin
module Land admin
Definition: mod_land_admin.F90:11
scale_debug::check
subroutine, public check(current_line, v)
Undefined value checker.
Definition: scale_debug.F90:56
mod_land_vars::land_property_in_filename
character(len=h_long), public land_property_in_filename
the file of land parameter table
Definition: mod_land_vars.F90:137
mod_land_vars::land_property
real(rp), dimension(:,:,:), allocatable, public land_property
land surface property
Definition: mod_land_vars.F90:135
mod_land_vars::land_temp_t
real(rp), dimension(:,:,:), allocatable, public land_temp_t
tendency of LAND_TEMP
Definition: mod_land_vars.F90:75
scale_land_grid_cartesc_index::lie
integer, public lie
Definition: scale_land_grid_cartesC_index.F90:44
mod_land_vars::snow_ustar
real(rp), dimension(:,:), allocatable, public snow_ustar
Definition: mod_land_vars.F90:105
scale_land_grid_cartesc_real
module land / grid / cartesianC / real
Definition: scale_land_grid_cartesC_real.F90:11
scale_landuse::landuse_index_pft
integer, dimension(:,:,:), allocatable, public landuse_index_pft
index of PFT for each mosaic
Definition: scale_landuse.F90:67
mod_land_vars::land_qstar
real(rp), dimension(:,:), allocatable, target, public land_qstar
moisture scale [kg/kg]
Definition: mod_land_vars.F90:97
scale_file_cartesc::file_cartesc_close
subroutine, public file_cartesc_close(fid)
Close a netCDF file.
Definition: scale_file_cartesC.F90:1023
mod_land_vars
module LAND Variables
Definition: mod_land_vars.F90:11
scale_landuse::landuse_pft_nmax
integer, public landuse_pft_nmax
number of plant functional type(PFT)
Definition: scale_landuse.F90:63
mod_land_vars::land_sflx_water
real(rp), dimension(:,:), allocatable, public land_sflx_water
land surface water flux [kg/m2/s]
Definition: mod_land_vars.F90:81
mod_land_vars::land_restart_out_aggregate
logical, public land_restart_out_aggregate
Switch to use aggregate file.
Definition: mod_land_vars.F90:55
mod_land_vars::land_vars_restart_open
subroutine, public land_vars_restart_open
Open land restart file for read.
Definition: mod_land_vars.F90:573
mod_land_vars::land_property_nmax
integer, parameter, public land_property_nmax
Definition: mod_land_vars.F90:139
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_land_vars::snow_nosnowsec
real(rp), dimension(:,:), allocatable, public snow_nosnowsec
sec while no snow [s]
Definition: mod_land_vars.F90:72
mod_land_vars::i_thermalcond
integer, parameter, public i_thermalcond
Definition: mod_land_vars.F90:143
scale_monitor::monitor_reg
subroutine, public monitor_reg(name, desc, unit, itemid, ndims, dim_type, is_tendency)
Search existing item, or matching check between requested and registered item.
Definition: scale_monitor.F90:241
mod_land_vars::land_restart_output
logical, public land_restart_output
Output restart file?
Definition: mod_land_vars.F90:49
mod_land_vars::land_vars_restart_enddef
subroutine, public land_vars_restart_enddef
Exit netCDF define mode.
Definition: mod_land_vars.F90:1321
scale_time
module TIME
Definition: scale_time.F90:11
mod_land_vars::land_runoff_engi
real(rp), dimension(:,:), allocatable, public land_runoff_engi
internal energy of the runoff [J/m2/s]
Definition: mod_land_vars.F90:112
scale_land_grid_cartesc_index::lis
integer, public lis
Definition: scale_land_grid_cartesC_index.F90:42
mod_land_vars::i_heatcapacity
integer, parameter, public i_heatcapacity
Definition: mod_land_vars.F90:144
mod_land_vars::land_restart_in_basename
character(len=h_long), public land_restart_in_basename
Basename of the input file.
Definition: mod_land_vars.F90:51
mod_land_vars::land_restart_out_dtype
character(len=h_short), public land_restart_out_dtype
REAL4 or REAL8.
Definition: mod_land_vars.F90:58
mod_land_vars::soil_qstar
real(rp), dimension(:,:), pointer, public soil_qstar
Definition: mod_land_vars.F90:102
mod_land_vars::snow_swe
real(rp), dimension(:,:), allocatable, public snow_swe
snow water equivalent [kg/m2]
Definition: mod_land_vars.F90:69
mod_land_vars::i_waterlimit
integer, parameter, public i_waterlimit
Definition: mod_land_vars.F90:140
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
mod_land_vars::i_z0h
integer, parameter, public i_z0h
Definition: mod_land_vars.F90:149
mod_land_vars::land_q2
real(rp), dimension(:,:), allocatable, public land_q2
land surface water vapor at 2m [kg/kg]
Definition: mod_land_vars.F90:94
scale_atmos_hydrometeor::i_qv
integer, public i_qv
Definition: scale_atmos_hydrometeor.F90:77
mod_land_vars::i_z0e
integer, parameter, public i_z0e
Definition: mod_land_vars.F90:150
mod_land_vars::convert_ws2vwc
real(rp) function, dimension(lia, lja), public convert_ws2vwc(WS, critical)
conversion from water saturation [fraction] to volumetric water content [m3/m3]
Definition: mod_land_vars.F90:1253
mod_land_vars::land_vars_check
subroutine, public land_vars_check(force)
Budget monitor for land.
Definition: mod_land_vars.F90:927
mod_land_vars::atmos_dens
real(rp), dimension(:,:), allocatable, public atmos_dens
Definition: mod_land_vars.F90:121
scale_const::const_dwatr
real(rp), parameter, public const_dwatr
density of water [kg/m3]
Definition: scale_const.F90:82
scale_land_grid_cartesc_real::land_grid_cartesc_real_vol
real(rp), dimension(:,:,:), allocatable, public land_grid_cartesc_real_vol
volume of grid cell
Definition: scale_land_grid_cartesC_real.F90:37
mod_land_vars::land_sfc_temp
real(rp), dimension(:,:), allocatable, public land_sfc_temp
land surface skin temperature [K]
Definition: mod_land_vars.F90:64
scale_debug
module DEBUG
Definition: scale_debug.F90:11
mod_land_vars::snow_qstar
real(rp), dimension(:,:), allocatable, public snow_qstar
Definition: mod_land_vars.F90:107
mod_land_vars::land_vars_setup
subroutine, public land_vars_setup
Setup.
Definition: mod_land_vars.F90:284
scale_file_cartesc::file_cartesc_create
subroutine, public file_cartesc_create(basename, title, datatype, fid, date, subsec, haszcoord, append, aggregate, single)
Create/open a netCDF file.
Definition: scale_file_cartesC.F90:780
scale_file_cartesc::file_cartesc_open
subroutine, public file_cartesc_open(basename, fid, aggregate)
open a netCDF file for read
Definition: scale_file_cartesC.F90:746
scale_statistics::statistics_checktotal
logical, public statistics_checktotal
calc&report variable totals to logfile?
Definition: scale_statistics.F90:64
scale_file_cartesc::file_cartesc_flush
subroutine, public file_cartesc_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
Definition: scale_file_cartesC.F90:997
scale_time::time_gettimelabel
subroutine, public time_gettimelabel(timelabel)
generate time label
Definition: scale_time.F90:91
scale_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
scale_cpl_sfc_index
module coupler / surface-atmospehre
Definition: scale_cpl_sfc_index.F90:11
mod_land_vars::snow_depth
real(rp), dimension(:,:), allocatable, public snow_depth
snow depth [m]
Definition: mod_land_vars.F90:70
mod_land_admin::land_do
logical, public land_do
Definition: mod_land_admin.F90:41
mod_land_vars::land_u10
real(rp), dimension(:,:), allocatable, public land_u10
land surface velocity u at 10m [m/s]
Definition: mod_land_vars.F90:91
scale_cpl_sfc_index::i_r_vis
integer, parameter, public i_r_vis
Definition: scale_cpl_sfc_index.F90:31
mod_land_vars::snow_flag
logical, public snow_flag
Definition: mod_land_vars.F90:132
mod_land_vars::atmos_sfc_dens
real(rp), dimension(:,:), allocatable, public atmos_sfc_dens
Definition: mod_land_vars.F90:124
scale_atmos_hydrometeor::lhf
real(rp), public lhf
latent heat of fusion for use [J/kg]
Definition: scale_atmos_hydrometeor.F90:128
scale_file::file_get_aggregate
logical function, public file_get_aggregate(fid)
Definition: scale_file.F90:4844
mod_land_vars::land_sflx_lh
real(rp), dimension(:,:), allocatable, public land_sflx_lh
land surface latent heat flux [J/m2/s]
Definition: mod_land_vars.F90:89
mod_land_vars::land_v10
real(rp), dimension(:,:), allocatable, public land_v10
land surface velocity v at 10m [m/s]
Definition: mod_land_vars.F90:92
scale_prof::prof_rapend
subroutine, public prof_rapend(rapname_base, level, disable_barrier)
Save raptime.
Definition: scale_prof.F90:217
scale_tracer::description
character(len=h_mid), public description
Definition: scale_tracer.F90:39
scale_land_grid_cartesc_index::lke
integer, public lke
Definition: scale_land_grid_cartesC_index.F90:41
mod_land_vars::land_vars_restart_create
subroutine, public land_vars_restart_create
Create land restart file.
Definition: mod_land_vars.F90:1282
scale_landuse
module LANDUSE
Definition: scale_landuse.F90:19
scale_const::const_dice
real(rp), parameter, public const_dice
density of ice [kg/m3]
Definition: scale_const.F90:83
scale_cpl_sfc_index::n_rad_rgn
integer, parameter, public n_rad_rgn
Definition: scale_cpl_sfc_index.F90:28
mod_land_vars::land_vars_restart_read
subroutine, public land_vars_restart_read
Read land restart.
Definition: mod_land_vars.F90:616
mod_land_vars::land_ice
real(rp), dimension(:,:,:), allocatable, public land_ice
ice of each soil layer [m3/m3]
Definition: mod_land_vars.F90:63
mod_land_vars::land_t2
real(rp), dimension(:,:), allocatable, public land_t2
land surface temperature at 2m [K]
Definition: mod_land_vars.F90:93
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:41
mod_land_vars::atmos_sflx_engi
real(rp), dimension(:,:), allocatable, public atmos_sflx_engi
Definition: mod_land_vars.F90:129
mod_land_vars::snow_rlmo
real(rp), dimension(:,:), allocatable, public snow_rlmo
Definition: mod_land_vars.F90:109
mod_land_vars::atmos_pbl
real(rp), dimension(:,:), allocatable, public atmos_pbl
Definition: mod_land_vars.F90:123
mod_land_vars::i_watercritical
integer, parameter, public i_watercritical
Definition: mod_land_vars.F90:141
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_land_grid_cartesc_index::lks
integer, public lks
Definition: scale_land_grid_cartesC_index.F90:40
scale_file_cartesc
module file / cartesianC
Definition: scale_file_cartesC.F90:11
scale_atmos_hydrometeor::cv_water
real(rp), public cv_water
CV for water [J/kg/K].
Definition: scale_atmos_hydrometeor.F90:132
mod_land_vars::snow_dzero
real(rp), dimension(:,:), allocatable, public snow_dzero
snow depth at melting point [m]
Definition: mod_land_vars.F90:71
mod_land_vars::atmos_v
real(rp), dimension(:,:), allocatable, public atmos_v
Definition: mod_land_vars.F90:120
mod_land_vars::land_restart_in_postfix_timelabel
logical, public land_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
Definition: mod_land_vars.F90:53
mod_land_vars::land_sflx_qtrc
real(rp), dimension(:,:,:), allocatable, public land_sflx_qtrc
land surface tracer flux [kg/m2/s]
Definition: mod_land_vars.F90:90
scale_atmos_hydrometeor::cv_ice
real(rp), public cv_ice
CV for ice [J/kg/K].
Definition: scale_atmos_hydrometeor.F90:134
scale_land_grid_cartesc_index::lka
integer, public lka
Definition: scale_land_grid_cartesC_index.F90:36
scale_land_grid_cartesc_real::land_grid_cartesc_real_area
real(rp), dimension(:,:), allocatable, public land_grid_cartesc_real_area
area of grid cell
Definition: scale_land_grid_cartesC_real.F90:35
scale_landuse::landuse_pft_nmin
integer, parameter, public landuse_pft_nmin
minimum number of PFT type
Definition: scale_landuse.F90:62
scale_monitor
module MONITOR
Definition: scale_monitor.F90:12