MODULE module_alloc_space_0 CONTAINS SUBROUTINE alloc_space_field_core_0 ( grid, id, setinitval_in , tl_in , inter_domain_in , okay_to_alloc_in, num_bytes_allocated , & sd31, ed31, sd32, ed32, sd33, ed33, & sm31 , em31 , sm32 , em32 , sm33 , em33 , & sp31 , ep31 , sp32 , ep32 , sp33 , ep33 , & sp31x, ep31x, sp32x, ep32x, sp33x, ep33x, & sp31y, ep31y, sp32y, ep32y, sp33y, ep33y, & sm31x, em31x, sm32x, em32x, sm33x, em33x, & sm31y, em31y, sm32y, em32y, sm33y, em33y ) USE module_domain_type USE module_configure, ONLY : model_config_rec, grid_config_rec_type, in_use_for_config, model_to_grid_config_rec USE module_scalar_tables IMPLICIT NONE TYPE(domain) , POINTER :: grid INTEGER , INTENT(IN) :: id INTEGER , INTENT(IN) :: setinitval_in INTEGER , INTENT(IN) :: sd31, ed31, sd32, ed32, sd33, ed33 INTEGER , INTENT(IN) :: sm31, em31, sm32, em32, sm33, em33 INTEGER , INTENT(IN) :: sp31, ep31, sp32, ep32, sp33, ep33 INTEGER , INTENT(IN) :: sp31x, ep31x, sp32x, ep32x, sp33x, ep33x INTEGER , INTENT(IN) :: sp31y, ep31y, sp32y, ep32y, sp33y, ep33y INTEGER , INTENT(IN) :: sm31x, em31x, sm32x, em32x, sm33x, em33x INTEGER , INTENT(IN) :: sm31y, em31y, sm32y, em32y, sm33y, em33y INTEGER , INTENT(IN) :: tl_in LOGICAL , INTENT(IN) :: inter_domain_in, okay_to_alloc_in INTEGER(KIND=8) , INTENT(INOUT) :: num_bytes_allocated INTEGER idum1, idum2, spec_bdy_width REAL initial_data_value CHARACTER (LEN=256) message INTEGER tl LOGICAL inter_domain, okay_to_alloc INTEGER setinitval INTEGER sr_x, sr_y INTEGER ierr INTEGER :: loop INTEGER(KIND=8) :: nba CHARACTER(LEN=256) :: message_string TYPE ( grid_config_rec_type ) :: config_flags INTEGER :: k_start , k_end, its, ite, jts, jte INTEGER :: ids , ide , jds , jde , kds , kde , & ims , ime , jms , jme , kms , kme , & ips , ipe , jps , jpe , kps , kpe INTEGER :: sids , side , sjds , sjde , skds , skde , & sims , sime , sjms , sjme , skms , skme , & sips , sipe , sjps , sjpe , skps , skpe INTEGER :: imsx, imex, jmsx, jmex, kmsx, kmex, & ipsx, ipex, jpsx, jpex, kpsx, kpex, & imsy, imey, jmsy, jmey, kmsy, kmey, & ipsy, ipey, jpsy, jpey, kpsy, kpey data_ordering : SELECT CASE ( model_data_order ) CASE ( DATA_ORDER_XYZ ) ids = sd31 ; ide = ed31 ; jds = sd32 ; jde = ed32 ; kds = sd33 ; kde = ed33 ; ims = sm31 ; ime = em31 ; jms = sm32 ; jme = em32 ; kms = sm33 ; kme = em33 ; ips = sp31 ; ipe = ep31 ; jps = sp32 ; jpe = ep32 ; kps = sp33 ; kpe = ep33 ; imsx = sm31x ; imex = em31x ; jmsx = sm32x ; jmex = em32x ; kmsx = sm33x ; kmex = em33x ; ipsx = sp31x ; ipex = ep31x ; jpsx = sp32x ; jpex = ep32x ; kpsx = sp33x ; kpex = ep33x ; imsy = sm31y ; imey = em31y ; jmsy = sm32y ; jmey = em32y ; kmsy = sm33y ; kmey = em33y ; ipsy = sp31y ; ipey = ep31y ; jpsy = sp32y ; jpey = ep32y ; kpsy = sp33y ; kpey = ep33y ; CASE ( DATA_ORDER_YXZ ) ids = sd32 ; ide = ed32 ; jds = sd31 ; jde = ed31 ; kds = sd33 ; kde = ed33 ; ims = sm32 ; ime = em32 ; jms = sm31 ; jme = em31 ; kms = sm33 ; kme = em33 ; ips = sp32 ; ipe = ep32 ; jps = sp31 ; jpe = ep31 ; kps = sp33 ; kpe = ep33 ; imsx = sm32x ; imex = em32x ; jmsx = sm31x ; jmex = em31x ; kmsx = sm33x ; kmex = em33x ; ipsx = sp32x ; ipex = ep32x ; jpsx = sp31x ; jpex = ep31x ; kpsx = sp33x ; kpex = ep33x ; imsy = sm32y ; imey = em32y ; jmsy = sm31y ; jmey = em31y ; kmsy = sm33y ; kmey = em33y ; ipsy = sp32y ; ipey = ep32y ; jpsy = sp31y ; jpey = ep31y ; kpsy = sp33y ; kpey = ep33y ; CASE ( DATA_ORDER_ZXY ) ids = sd32 ; ide = ed32 ; jds = sd33 ; jde = ed33 ; kds = sd31 ; kde = ed31 ; ims = sm32 ; ime = em32 ; jms = sm33 ; jme = em33 ; kms = sm31 ; kme = em31 ; ips = sp32 ; ipe = ep32 ; jps = sp33 ; jpe = ep33 ; kps = sp31 ; kpe = ep31 ; imsx = sm32x ; imex = em32x ; jmsx = sm33x ; jmex = em33x ; kmsx = sm31x ; kmex = em31x ; ipsx = sp32x ; ipex = ep32x ; jpsx = sp33x ; jpex = ep33x ; kpsx = sp31x ; kpex = ep31x ; imsy = sm32y ; imey = em32y ; jmsy = sm33y ; jmey = em33y ; kmsy = sm31y ; kmey = em31y ; ipsy = sp32y ; ipey = ep32y ; jpsy = sp33y ; jpey = ep33y ; kpsy = sp31y ; kpey = ep31y ; CASE ( DATA_ORDER_ZYX ) ids = sd33 ; ide = ed33 ; jds = sd32 ; jde = ed32 ; kds = sd31 ; kde = ed31 ; ims = sm33 ; ime = em33 ; jms = sm32 ; jme = em32 ; kms = sm31 ; kme = em31 ; ips = sp33 ; ipe = ep33 ; jps = sp32 ; jpe = ep32 ; kps = sp31 ; kpe = ep31 ; imsx = sm33x ; imex = em33x ; jmsx = sm32x ; jmex = em32x ; kmsx = sm31x ; kmex = em31x ; ipsx = sp33x ; ipex = ep33x ; jpsx = sp32x ; jpex = ep32x ; kpsx = sp31x ; kpex = ep31x ; imsy = sm33y ; imey = em33y ; jmsy = sm32y ; jmey = em32y ; kmsy = sm31y ; kmey = em31y ; ipsy = sp33y ; ipey = ep33y ; jpsy = sp32y ; jpey = ep32y ; kpsy = sp31y ; kpey = ep31y ; CASE ( DATA_ORDER_XZY ) ids = sd31 ; ide = ed31 ; jds = sd33 ; jde = ed33 ; kds = sd32 ; kde = ed32 ; ims = sm31 ; ime = em31 ; jms = sm33 ; jme = em33 ; kms = sm32 ; kme = em32 ; ips = sp31 ; ipe = ep31 ; jps = sp33 ; jpe = ep33 ; kps = sp32 ; kpe = ep32 ; imsx = sm31x ; imex = em31x ; jmsx = sm33x ; jmex = em33x ; kmsx = sm32x ; kmex = em32x ; ipsx = sp31x ; ipex = ep31x ; jpsx = sp33x ; jpex = ep33x ; kpsx = sp32x ; kpex = ep32x ; imsy = sm31y ; imey = em31y ; jmsy = sm33y ; jmey = em33y ; kmsy = sm32y ; kmey = em32y ; ipsy = sp31y ; ipey = ep31y ; jpsy = sp33y ; jpey = ep33y ; kpsy = sp32y ; kpey = ep32y ; CASE ( DATA_ORDER_YZX ) ids = sd33 ; ide = ed33 ; jds = sd31 ; jde = ed31 ; kds = sd32 ; kde = ed32 ; ims = sm33 ; ime = em33 ; jms = sm31 ; jme = em31 ; kms = sm32 ; kme = em32 ; ips = sp33 ; ipe = ep33 ; jps = sp31 ; jpe = ep31 ; kps = sp32 ; kpe = ep32 ; imsx = sm33x ; imex = em33x ; jmsx = sm31x ; jmex = em31x ; kmsx = sm32x ; kmex = em32x ; ipsx = sp33x ; ipex = ep33x ; jpsx = sp31x ; jpex = ep31x ; kpsx = sp32x ; kpex = ep32x ; imsy = sm33y ; imey = em33y ; jmsy = sm31y ; jmey = em31y ; kmsy = sm32y ; kmey = em32y ; ipsy = sp33y ; ipey = ep33y ; jpsy = sp31y ; jpey = ep31y ; kpsy = sp32y ; kpey = ep32y ; END SELECT data_ordering CALL model_to_grid_config_rec ( id , model_config_rec , config_flags ) CALL nl_get_sr_x( id , sr_x ) CALL nl_get_sr_y( id , sr_y ) tl = tl_in inter_domain = inter_domain_in okay_to_alloc = okay_to_alloc_in CALL get_initial_data_value ( initial_data_value ) setinitval = setinitval_in CALL nl_get_spec_bdy_width( 1, spec_bdy_width ) IF(okay_to_alloc.AND.in_use_for_config(id,'xlat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xlat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",169,& 'frame/module_domain.f: Failed to allocate grid%xlat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xlat' grid%tail_statevars%DataName = 'XLAT' grid%tail_statevars%Description = 'LATITUDE, SOUTH IS NEGATIVE' grid%tail_statevars%Units = 'degree_north' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xlat grid%tail_statevars%streams(1) = 515899491 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xlat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",219,& 'frame/module_domain.f: Failed to allocate grid%xlat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xlong'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xlong(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",230,& 'frame/module_domain.f: Failed to allocate grid%xlong(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xlong' grid%tail_statevars%DataName = 'XLONG' grid%tail_statevars%Description = 'LONGITUDE, WEST IS NEGATIVE' grid%tail_statevars%Units = 'degree_east' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xlong grid%tail_statevars%streams(1) = 515899491 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xlong(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",280,& 'frame/module_domain.f: Failed to allocate grid%xlong(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lu_index'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lu_index(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",291,& 'frame/module_domain.f: Failed to allocate grid%lu_index(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lu_index=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lu_index' grid%tail_statevars%DataName = 'LU_INDEX' grid%tail_statevars%Description = 'LAND USE CATEGORY' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lu_index grid%tail_statevars%streams(1) = 234881027 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lu_index(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",341,& 'frame/module_domain.f: Failed to allocate grid%lu_index(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lu_mask').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lu_mask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",352,& 'frame/module_domain.f: Failed to allocate grid%lu_mask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lu_mask=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lu_mask' grid%tail_statevars%DataName = 'LU_MASK' grid%tail_statevars%Description = '0 land 1 water' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lu_mask grid%tail_statevars%streams(1) = 268435458 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lu_mask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",402,& 'frame/module_domain.f: Failed to allocate grid%lu_mask(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'znu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%znu(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",413,& 'frame/module_domain.f: Failed to allocate grid%znu(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%znu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'znu' grid%tail_statevars%DataName = 'ZNU' grid%tail_statevars%Description = 'eta values on half (mass) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%znu grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%znu(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",461,& 'frame/module_domain.f: Failed to allocate grid%znu(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'znw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%znw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",472,& 'frame/module_domain.f: Failed to allocate grid%znw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%znw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'znw' grid%tail_statevars%DataName = 'ZNW' grid%tail_statevars%Description = 'eta values on full (w) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%znw grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = kde grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( kde, kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%znw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",520,& 'frame/module_domain.f: Failed to allocate grid%znw(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%zs(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",531,& 'frame/module_domain.f: Failed to allocate grid%zs(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zs' grid%tail_statevars%DataName = 'ZS' grid%tail_statevars%Description = 'DEPTHS OF CENTERS OF SOIL LAYERS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%zs grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'soil_layers_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%zs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",579,& 'frame/module_domain.f: Failed to allocate grid%zs(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%dzs(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",590,& 'frame/module_domain.f: Failed to allocate grid%dzs(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzs' grid%tail_statevars%DataName = 'DZS' grid%tail_statevars%Description = 'THICKNESSES OF SOIL LAYERS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dzs grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'soil_layers_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dzs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",638,& 'frame/module_domain.f: Failed to allocate grid%dzs(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traj_i').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_traj)-(1)+1))) * 4 nba = & ((((model_config_rec%num_traj)-(1)+1))) * 4 ALLOCATE(grid%traj_i(1:model_config_rec%num_traj),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",649,& 'frame/module_domain.f: Failed to allocate grid%traj_i(1:model_config_rec%num_traj). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traj_i=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traj_i' grid%tail_statevars%DataName = 'TRAJ_I' grid%tail_statevars%Description = 'grid number of trajectory ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%traj_i grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_traj grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_traj grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_traj grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'num_traj_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traj_i(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",697,& 'frame/module_domain.f: Failed to allocate grid%traj_i(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traj_j').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_traj)-(1)+1))) * 4 nba = & ((((model_config_rec%num_traj)-(1)+1))) * 4 ALLOCATE(grid%traj_j(1:model_config_rec%num_traj),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",708,& 'frame/module_domain.f: Failed to allocate grid%traj_j(1:model_config_rec%num_traj). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traj_j=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traj_j' grid%tail_statevars%DataName = 'TRAJ_J' grid%tail_statevars%Description = 'grid number of trajectory ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%traj_j grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_traj grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_traj grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_traj grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'num_traj_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traj_j(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",756,& 'frame/module_domain.f: Failed to allocate grid%traj_j(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traj_k').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_traj)-(1)+1))) * 4 nba = & ((((model_config_rec%num_traj)-(1)+1))) * 4 ALLOCATE(grid%traj_k(1:model_config_rec%num_traj),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",767,& 'frame/module_domain.f: Failed to allocate grid%traj_k(1:model_config_rec%num_traj). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traj_k=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traj_k' grid%tail_statevars%DataName = 'TRAJ_K' grid%tail_statevars%Description = 'vertical eta level of trajectory ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%traj_k grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_traj grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_traj grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_traj grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'num_traj_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traj_k(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",815,& 'frame/module_domain.f: Failed to allocate grid%traj_k(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traj_long').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_traj)-(1)+1))) * 4 nba = & ((((model_config_rec%num_traj)-(1)+1))) * 4 ALLOCATE(grid%traj_long(1:model_config_rec%num_traj),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",826,& 'frame/module_domain.f: Failed to allocate grid%traj_long(1:model_config_rec%num_traj). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traj_long=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traj_long' grid%tail_statevars%DataName = 'TRAJ_LONG' grid%tail_statevars%Description = 'longitude of trajectory ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%traj_long grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_traj grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_traj grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_traj grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'num_traj_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traj_long(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",874,& 'frame/module_domain.f: Failed to allocate grid%traj_long(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traj_lat').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_traj)-(1)+1))) * 4 nba = & ((((model_config_rec%num_traj)-(1)+1))) * 4 ALLOCATE(grid%traj_lat(1:model_config_rec%num_traj),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",885,& 'frame/module_domain.f: Failed to allocate grid%traj_lat(1:model_config_rec%num_traj). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traj_lat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traj_lat' grid%tail_statevars%DataName = 'TRAJ_LAT' grid%tail_statevars%Description = 'latitude of trajectory ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%traj_lat grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_traj grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_traj grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_traj grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'num_traj_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traj_lat(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",933,& 'frame/module_domain.f: Failed to allocate grid%traj_lat(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",944,& 'frame/module_domain.f: Failed to allocate grid%u_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_gc' grid%tail_statevars%DataName = 'UU' grid%tail_statevars%Description = 'x-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'XZ' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",994,& 'frame/module_domain.f: Failed to allocate grid%u_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1005,& 'frame/module_domain.f: Failed to allocate grid%v_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_gc' grid%tail_statevars%DataName = 'VV' grid%tail_statevars%Description = 'y-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'YZ' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%v_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1055,& 'frame/module_domain.f: Failed to allocate grid%v_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1066,& 'frame/module_domain.f: Failed to allocate grid%t_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_gc' grid%tail_statevars%DataName = 'TT' grid%tail_statevars%Description = 'temperature' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1116,& 'frame/module_domain.f: Failed to allocate grid%t_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rh_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1127,& 'frame/module_domain.f: Failed to allocate grid%rh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rh_gc' grid%tail_statevars%DataName = 'RH' grid%tail_statevars%Description = 'relative humidity' grid%tail_statevars%Units = '%' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rh_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rh_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1177,& 'frame/module_domain.f: Failed to allocate grid%rh_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ght_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ght_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1188,& 'frame/module_domain.f: Failed to allocate grid%ght_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ght_gc' grid%tail_statevars%DataName = 'GHT' grid%tail_statevars%Description = 'geopotential height' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ght_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ght_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1238,& 'frame/module_domain.f: Failed to allocate grid%ght_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1249,& 'frame/module_domain.f: Failed to allocate grid%p_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'p_gc' grid%tail_statevars%DataName = 'PRES' grid%tail_statevars%Description = 'pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%p_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1299,& 'frame/module_domain.f: Failed to allocate grid%p_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'prho_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%prho_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1310,& 'frame/module_domain.f: Failed to allocate grid%prho_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%prho_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'prho_gc' grid%tail_statevars%DataName = 'PRHO' grid%tail_statevars%Description = 'for UM data, pressure of U and V' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%prho_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%prho_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1360,& 'frame/module_domain.f: Failed to allocate grid%prho_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xlat_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xlat_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1371,& 'frame/module_domain.f: Failed to allocate grid%xlat_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xlat_gc' grid%tail_statevars%DataName = 'XLAT_M' grid%tail_statevars%Description = 'latitude, positive north' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xlat_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xlat_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1421,& 'frame/module_domain.f: Failed to allocate grid%xlat_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xlong_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xlong_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1432,& 'frame/module_domain.f: Failed to allocate grid%xlong_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xlong_gc' grid%tail_statevars%DataName = 'XLONG_M' grid%tail_statevars%Description = 'longitude, positive east' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xlong_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xlong_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1482,& 'frame/module_domain.f: Failed to allocate grid%xlong_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1493,& 'frame/module_domain.f: Failed to allocate grid%ht_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_gc' grid%tail_statevars%DataName = 'HGT_M' grid%tail_statevars%Description = 'topography elevation' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ht_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1543,& 'frame/module_domain.f: Failed to allocate grid%ht_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'var_sso'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%var_sso(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1554,& 'frame/module_domain.f: Failed to allocate grid%var_sso(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%var_sso=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'var_sso' grid%tail_statevars%DataName = 'VAR_SSO' grid%tail_statevars%Description = 'variance of subgrid-scale orography' grid%tail_statevars%Units = 'm2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%var_sso grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%var_sso(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1604,& 'frame/module_domain.f: Failed to allocate grid%var_sso(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lap_hgt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lap_hgt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1615,& 'frame/module_domain.f: Failed to allocate grid%lap_hgt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lap_hgt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lap_hgt' grid%tail_statevars%DataName = 'LAP_HGT' grid%tail_statevars%Description = 'Laplacian of orography' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lap_hgt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lap_hgt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1665,& 'frame/module_domain.f: Failed to allocate grid%lap_hgt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tsk_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1676,& 'frame/module_domain.f: Failed to allocate grid%tsk_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsk_gc' grid%tail_statevars%DataName = 'SKINTEMP' grid%tail_statevars%Description = 'skin temperature' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tsk_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tsk_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1726,& 'frame/module_domain.f: Failed to allocate grid%tsk_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tavgsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tavgsfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1737,& 'frame/module_domain.f: Failed to allocate grid%tavgsfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tavgsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tavgsfc' grid%tail_statevars%DataName = 'TAVGSFC' grid%tail_statevars%Description = 'daily mean of surface air temperature' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tavgsfc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tavgsfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1787,& 'frame/module_domain.f: Failed to allocate grid%tavgsfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tmn_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tmn_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1798,& 'frame/module_domain.f: Failed to allocate grid%tmn_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tmn_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tmn_gc' grid%tail_statevars%DataName = 'SOILTEMP' grid%tail_statevars%Description = 'annual mean deep soil temperature' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tmn_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tmn_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1848,& 'frame/module_domain.f: Failed to allocate grid%tmn_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pslv_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pslv_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1859,& 'frame/module_domain.f: Failed to allocate grid%pslv_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pslv_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pslv_gc' grid%tail_statevars%DataName = 'PMSL' grid%tail_statevars%Description = 'sea level pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%pslv_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pslv_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1909,& 'frame/module_domain.f: Failed to allocate grid%pslv_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sct_dom_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sct_dom_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1920,& 'frame/module_domain.f: Failed to allocate grid%sct_dom_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sct_dom_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sct_dom_gc' grid%tail_statevars%DataName = 'SCT_DOM' grid%tail_statevars%Description = 'Dominant soil (top) category from GEOGRID' grid%tail_statevars%Units = 'cat' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sct_dom_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sct_dom_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1970,& 'frame/module_domain.f: Failed to allocate grid%sct_dom_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'scb_dom_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%scb_dom_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1981,& 'frame/module_domain.f: Failed to allocate grid%scb_dom_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scb_dom_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'scb_dom_gc' grid%tail_statevars%DataName = 'SCB_DOM' grid%tail_statevars%Description = 'Dominant soil (bottom) category from GEOGRID' grid%tail_statevars%Units = 'cat' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%scb_dom_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%scb_dom_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2031,& 'frame/module_domain.f: Failed to allocate grid%scb_dom_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'greenfrac').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%greenfrac(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2042,& 'frame/module_domain.f: Failed to allocate grid%greenfrac(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%greenfrac=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'greenfrac' grid%tail_statevars%DataName = 'GREENFRAC' grid%tail_statevars%Description = 'monthly greenness fraction' grid%tail_statevars%Units = '0 - 1 fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%greenfrac grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 12 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 12 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 12 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'months_per_year_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%greenfrac(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2092,& 'frame/module_domain.f: Failed to allocate grid%greenfrac(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'albedo12m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%albedo12m(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2103,& 'frame/module_domain.f: Failed to allocate grid%albedo12m(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albedo12m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'albedo12m' grid%tail_statevars%DataName = 'ALBEDO12M' grid%tail_statevars%Description = 'background albedo' grid%tail_statevars%Units = '0 - 1 fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%albedo12m grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 12 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 12 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 12 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'months_per_year_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%albedo12m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2153,& 'frame/module_domain.f: Failed to allocate grid%albedo12m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lai12m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lai12m(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2164,& 'frame/module_domain.f: Failed to allocate grid%lai12m(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lai12m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lai12m' grid%tail_statevars%DataName = 'LAI12M' grid%tail_statevars%Description = 'monthly LAI' grid%tail_statevars%Units = 'm2/m2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%lai12m grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 12 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 12 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 12 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'months_per_year_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lai12m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2214,& 'frame/module_domain.f: Failed to allocate grid%lai12m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pd_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pd_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2225,& 'frame/module_domain.f: Failed to allocate grid%pd_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pd_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pd_gc' grid%tail_statevars%DataName = 'PD' grid%tail_statevars%Description = 'dry pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%pd_gc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%pd_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2275,& 'frame/module_domain.f: Failed to allocate grid%pd_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pdrho_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pdrho_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2286,& 'frame/module_domain.f: Failed to allocate grid%pdrho_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pdrho_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pdrho_gc' grid%tail_statevars%DataName = 'PDRHO' grid%tail_statevars%Description = 'dry pressure for UM data for the variables U and V' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%pdrho_gc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%pdrho_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2336,& 'frame/module_domain.f: Failed to allocate grid%pdrho_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'psfc_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%psfc_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2347,& 'frame/module_domain.f: Failed to allocate grid%psfc_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'psfc_gc' grid%tail_statevars%DataName = 'PSFC_GC' grid%tail_statevars%Description = 'surface pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%psfc_gc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%psfc_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2397,& 'frame/module_domain.f: Failed to allocate grid%psfc_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'intq_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%intq_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2408,& 'frame/module_domain.f: Failed to allocate grid%intq_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%intq_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'intq_gc' grid%tail_statevars%DataName = 'INTQ' grid%tail_statevars%Description = 'integrated mixing ratio' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%intq_gc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%intq_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2458,& 'frame/module_domain.f: Failed to allocate grid%intq_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pdhs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pdhs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2469,& 'frame/module_domain.f: Failed to allocate grid%pdhs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pdhs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pdhs' grid%tail_statevars%DataName = 'PDHS' grid%tail_statevars%Description = 'hydrostatic dry surface pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%pdhs grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pdhs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2519,& 'frame/module_domain.f: Failed to allocate grid%pdhs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qv_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2530,& 'frame/module_domain.f: Failed to allocate grid%qv_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_gc' grid%tail_statevars%DataName = 'QV' grid%tail_statevars%Description = 'mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qv_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qv_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2580,& 'frame/module_domain.f: Failed to allocate grid%qv_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sh_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2591,& 'frame/module_domain.f: Failed to allocate grid%sh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sh_gc' grid%tail_statevars%DataName = 'SPECHUMD' grid%tail_statevars%Description = 'Specific humidity' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sh_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sh_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2641,& 'frame/module_domain.f: Failed to allocate grid%sh_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cl_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cl_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2652,& 'frame/module_domain.f: Failed to allocate grid%cl_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cl_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cl_gc' grid%tail_statevars%DataName = 'SPECCLDL' grid%tail_statevars%Description = 'Cloud water content, liquid' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cl_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%cl_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2702,& 'frame/module_domain.f: Failed to allocate grid%cl_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cf_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cf_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2713,& 'frame/module_domain.f: Failed to allocate grid%cf_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cf_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cf_gc' grid%tail_statevars%DataName = 'SPECCLDF' grid%tail_statevars%Description = 'Cloud water content, frozen' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cf_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%cf_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2763,& 'frame/module_domain.f: Failed to allocate grid%cf_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icefrac_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%icefrac_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2774,& 'frame/module_domain.f: Failed to allocate grid%icefrac_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icefrac_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icefrac_gc' grid%tail_statevars%DataName = 'ICEFRAC' grid%tail_statevars%Description = 'Sea ice fraction' grid%tail_statevars%Units = '0 - 1 fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%icefrac_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%icefrac_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2824,& 'frame/module_domain.f: Failed to allocate grid%icefrac_gc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icepct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%icepct(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2835,& 'frame/module_domain.f: Failed to allocate grid%icepct(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icepct=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icepct' grid%tail_statevars%DataName = 'ICEPCT' grid%tail_statevars%Description = 'Sea ice percent' grid%tail_statevars%Units = '%' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%icepct grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%icepct(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2885,& 'frame/module_domain.f: Failed to allocate grid%icepct(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qr_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qr_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2896,& 'frame/module_domain.f: Failed to allocate grid%qr_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qr_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qr_gc' grid%tail_statevars%DataName = 'QR' grid%tail_statevars%Description = 'rain water mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qr_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qr_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2946,& 'frame/module_domain.f: Failed to allocate grid%qr_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qc_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2957,& 'frame/module_domain.f: Failed to allocate grid%qc_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qc_gc' grid%tail_statevars%DataName = 'QC' grid%tail_statevars%Description = 'cloud water mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qc_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qc_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3007,& 'frame/module_domain.f: Failed to allocate grid%qc_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qs_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qs_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3018,& 'frame/module_domain.f: Failed to allocate grid%qs_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qs_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qs_gc' grid%tail_statevars%DataName = 'QS' grid%tail_statevars%Description = 'snow mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qs_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qs_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3068,& 'frame/module_domain.f: Failed to allocate grid%qs_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qi_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qi_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3079,& 'frame/module_domain.f: Failed to allocate grid%qi_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qi_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qi_gc' grid%tail_statevars%DataName = 'QI' grid%tail_statevars%Description = 'cloud ice mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qi_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qi_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3129,& 'frame/module_domain.f: Failed to allocate grid%qi_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qg_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qg_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3140,& 'frame/module_domain.f: Failed to allocate grid%qg_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qg_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qg_gc' grid%tail_statevars%DataName = 'QG' grid%tail_statevars%Description = 'graupel mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qg_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qg_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3190,& 'frame/module_domain.f: Failed to allocate grid%qg_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qh_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3201,& 'frame/module_domain.f: Failed to allocate grid%qh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qh_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qh_gc' grid%tail_statevars%DataName = 'QH' grid%tail_statevars%Description = 'hail mixing ratio' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qh_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qh_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3251,& 'frame/module_domain.f: Failed to allocate grid%qh_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qni_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qni_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3262,& 'frame/module_domain.f: Failed to allocate grid%qni_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qni_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qni_gc' grid%tail_statevars%DataName = 'QNI' grid%tail_statevars%Description = 'ice num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qni_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qni_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3312,& 'frame/module_domain.f: Failed to allocate grid%qni_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnc_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnc_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3323,& 'frame/module_domain.f: Failed to allocate grid%qnc_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnc_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnc_gc' grid%tail_statevars%DataName = 'QNC' grid%tail_statevars%Description = 'cloud water num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnc_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnc_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3373,& 'frame/module_domain.f: Failed to allocate grid%qnc_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnr_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnr_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3384,& 'frame/module_domain.f: Failed to allocate grid%qnr_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnr_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnr_gc' grid%tail_statevars%DataName = 'QNR' grid%tail_statevars%Description = 'rain num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnr_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnr_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3434,& 'frame/module_domain.f: Failed to allocate grid%qnr_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qns_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qns_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3445,& 'frame/module_domain.f: Failed to allocate grid%qns_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qns_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qns_gc' grid%tail_statevars%DataName = 'QNS' grid%tail_statevars%Description = 'snow num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qns_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qns_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3495,& 'frame/module_domain.f: Failed to allocate grid%qns_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qng_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qng_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3506,& 'frame/module_domain.f: Failed to allocate grid%qng_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qng_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qng_gc' grid%tail_statevars%DataName = 'QNG' grid%tail_statevars%Description = 'graupel num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qng_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qng_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3556,& 'frame/module_domain.f: Failed to allocate grid%qng_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnh_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3567,& 'frame/module_domain.f: Failed to allocate grid%qnh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnh_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnh_gc' grid%tail_statevars%DataName = 'QNH' grid%tail_statevars%Description = 'hail num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnh_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnh_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3617,& 'frame/module_domain.f: Failed to allocate grid%qnh_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3628,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_gc' grid%tail_statevars%DataName = 'QNWFA' grid%tail_statevars%Description = 'water-friendly aerosol num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3678,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_gc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3689,& 'frame/module_domain.f: Failed to allocate grid%qnifa_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_gc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_gc' grid%tail_statevars%DataName = 'QNIFA' grid%tail_statevars%Description = 'water-friendly aerosol num concentration' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_gc grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3739,& 'frame/module_domain.f: Failed to allocate grid%qnifa_gc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_now').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_now(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3750,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_now(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_now=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_now' grid%tail_statevars%DataName = 'QNWFA_NOW' grid%tail_statevars%Description = 'num water-friendly aerosol Now' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_now grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_now(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3800,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_now(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_jan').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_jan(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3811,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jan(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_jan=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_jan' grid%tail_statevars%DataName = 'QNWFA_JAN' grid%tail_statevars%Description = 'num water-friendly aerosol Jan' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_jan grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_jan(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3861,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jan(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_feb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_feb(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3872,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_feb(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_feb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_feb' grid%tail_statevars%DataName = 'QNWFA_FEB' grid%tail_statevars%Description = 'num water-friendly aerosol Feb' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_feb grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_feb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3922,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_feb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_mar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_mar(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3933,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_mar(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_mar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_mar' grid%tail_statevars%DataName = 'QNWFA_MAR' grid%tail_statevars%Description = 'num water-friendly aerosol Mar' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_mar grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_mar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3983,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_mar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_apr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_apr(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3994,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_apr(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_apr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_apr' grid%tail_statevars%DataName = 'QNWFA_APR' grid%tail_statevars%Description = 'num water-friendly aerosol Apr' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_apr grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_apr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4044,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_apr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_may').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_may(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4055,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_may(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_may=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_may' grid%tail_statevars%DataName = 'QNWFA_MAY' grid%tail_statevars%Description = 'num water-friendly aerosol May' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_may grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_may(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4105,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_may(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_jun').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_jun(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4116,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jun(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_jun=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_jun' grid%tail_statevars%DataName = 'QNWFA_JUN' grid%tail_statevars%Description = 'num water-friendly aerosol Jun' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_jun grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_jun(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4166,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jun(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_jul').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_jul(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4177,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jul(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_jul=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_jul' grid%tail_statevars%DataName = 'QNWFA_JUL' grid%tail_statevars%Description = 'num water-friendly aerosol Jul' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_jul grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_jul(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4227,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_jul(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_aug').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_aug(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4238,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_aug(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_aug=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_aug' grid%tail_statevars%DataName = 'QNWFA_AUG' grid%tail_statevars%Description = 'num water-friendly aerosol Aug' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_aug grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_aug(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4288,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_aug(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_sep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_sep(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4299,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_sep(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_sep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_sep' grid%tail_statevars%DataName = 'QNWFA_SEP' grid%tail_statevars%Description = 'num water-friendly aerosol Sep' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_sep grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_sep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4349,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_sep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_oct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_oct(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4360,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_oct(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_oct=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_oct' grid%tail_statevars%DataName = 'QNWFA_OCT' grid%tail_statevars%Description = 'num water-friendly aerosol Oct' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_oct grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_oct(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4410,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_oct(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_nov').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_nov(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4421,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_nov(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_nov=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_nov' grid%tail_statevars%DataName = 'QNWFA_NOV' grid%tail_statevars%Description = 'num water-friendly aerosol Nov' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_nov grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_nov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4471,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_nov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa_dec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa_dec(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4482,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_dec(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa_dec=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa_dec' grid%tail_statevars%DataName = 'QNWFA_DEC' grid%tail_statevars%Description = 'num water-friendly aerosol Dec' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnwfa_dec grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnwfa_dec(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4532,& 'frame/module_domain.f: Failed to allocate grid%qnwfa_dec(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_now').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_now(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4543,& 'frame/module_domain.f: Failed to allocate grid%qnifa_now(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_now=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_now' grid%tail_statevars%DataName = 'QNIFA_NOW' grid%tail_statevars%Description = 'num ice-friendly aerosol Now' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_now grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_now(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4593,& 'frame/module_domain.f: Failed to allocate grid%qnifa_now(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_jan').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_jan(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4604,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jan(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_jan=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_jan' grid%tail_statevars%DataName = 'QNIFA_JAN' grid%tail_statevars%Description = 'num ice-friendly aerosol Jan' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_jan grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_jan(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4654,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jan(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_feb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_feb(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4665,& 'frame/module_domain.f: Failed to allocate grid%qnifa_feb(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_feb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_feb' grid%tail_statevars%DataName = 'QNIFA_FEB' grid%tail_statevars%Description = 'num ice-friendly aerosol Feb' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_feb grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_feb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4715,& 'frame/module_domain.f: Failed to allocate grid%qnifa_feb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_mar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_mar(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4726,& 'frame/module_domain.f: Failed to allocate grid%qnifa_mar(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_mar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_mar' grid%tail_statevars%DataName = 'QNIFA_MAR' grid%tail_statevars%Description = 'num ice-friendly aerosol Mar' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_mar grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_mar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4776,& 'frame/module_domain.f: Failed to allocate grid%qnifa_mar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_apr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_apr(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4787,& 'frame/module_domain.f: Failed to allocate grid%qnifa_apr(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_apr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_apr' grid%tail_statevars%DataName = 'QNIFA_APR' grid%tail_statevars%Description = 'num ice-friendly aerosol Apr' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_apr grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_apr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4837,& 'frame/module_domain.f: Failed to allocate grid%qnifa_apr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_may').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_may(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4848,& 'frame/module_domain.f: Failed to allocate grid%qnifa_may(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_may=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_may' grid%tail_statevars%DataName = 'QNIFA_MAY' grid%tail_statevars%Description = 'num ice-friendly aerosol May' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_may grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_may(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4898,& 'frame/module_domain.f: Failed to allocate grid%qnifa_may(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_jun').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_jun(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4909,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jun(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_jun=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_jun' grid%tail_statevars%DataName = 'QNIFA_JUN' grid%tail_statevars%Description = 'num ice-friendly aerosol Jun' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_jun grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_jun(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4959,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jun(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_jul').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_jul(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4970,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jul(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_jul=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_jul' grid%tail_statevars%DataName = 'QNIFA_JUL' grid%tail_statevars%Description = 'num ice-friendly aerosol Jul' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_jul grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_jul(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5020,& 'frame/module_domain.f: Failed to allocate grid%qnifa_jul(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_aug').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_aug(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5031,& 'frame/module_domain.f: Failed to allocate grid%qnifa_aug(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_aug=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_aug' grid%tail_statevars%DataName = 'QNIFA_AUG' grid%tail_statevars%Description = 'num ice-friendly aerosol Aug' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_aug grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_aug(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5081,& 'frame/module_domain.f: Failed to allocate grid%qnifa_aug(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_sep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_sep(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5092,& 'frame/module_domain.f: Failed to allocate grid%qnifa_sep(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_sep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_sep' grid%tail_statevars%DataName = 'QNIFA_SEP' grid%tail_statevars%Description = 'num ice-friendly aerosol Sep' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_sep grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_sep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5142,& 'frame/module_domain.f: Failed to allocate grid%qnifa_sep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_oct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_oct(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5153,& 'frame/module_domain.f: Failed to allocate grid%qnifa_oct(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_oct=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_oct' grid%tail_statevars%DataName = 'QNIFA_OCT' grid%tail_statevars%Description = 'num ice-friendly aerosol Oct' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_oct grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_oct(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5203,& 'frame/module_domain.f: Failed to allocate grid%qnifa_oct(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_nov').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_nov(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5214,& 'frame/module_domain.f: Failed to allocate grid%qnifa_nov(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_nov=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_nov' grid%tail_statevars%DataName = 'QNIFA_NOV' grid%tail_statevars%Description = 'num ice-friendly aerosol Nov' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_nov grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_nov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5264,& 'frame/module_domain.f: Failed to allocate grid%qnifa_nov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa_dec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa_dec(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5275,& 'frame/module_domain.f: Failed to allocate grid%qnifa_dec(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa_dec=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa_dec' grid%tail_statevars%DataName = 'QNIFA_DEC' grid%tail_statevars%Description = 'num ice-friendly aerosol Dec' grid%tail_statevars%Units = ' kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qnifa_dec grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qnifa_dec(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5325,& 'frame/module_domain.f: Failed to allocate grid%qnifa_dec(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qntemp').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qntemp(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5336,& 'frame/module_domain.f: Failed to allocate grid%qntemp(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qntemp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qntemp' grid%tail_statevars%DataName = 'QNTEMP' grid%tail_statevars%Description = 'temporary var for time interp' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qntemp grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 12 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 12 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 12 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'months_per_year_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qntemp(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5386,& 'frame/module_domain.f: Failed to allocate grid%qntemp(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qntemp2').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qntemp2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5397,& 'frame/module_domain.f: Failed to allocate grid%qntemp2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qntemp2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qntemp2' grid%tail_statevars%DataName = 'QNTEMP2' grid%tail_statevars%Description = 'temporary var2D for time interp' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%qntemp2 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qntemp2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5447,& 'frame/module_domain.f: Failed to allocate grid%qntemp2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_max_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_max_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5458,& 'frame/module_domain.f: Failed to allocate grid%t_max_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_max_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_max_p' grid%tail_statevars%DataName = 'T_MAX_P' grid%tail_statevars%Description = 'temperature at max pressure' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%t_max_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t_max_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5508,& 'frame/module_domain.f: Failed to allocate grid%t_max_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ght_max_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ght_max_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5519,& 'frame/module_domain.f: Failed to allocate grid%ght_max_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_max_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ght_max_p' grid%tail_statevars%DataName = 'GHT_MAX_P' grid%tail_statevars%Description = 'geopotential height at max pressure' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ght_max_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ght_max_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5569,& 'frame/module_domain.f: Failed to allocate grid%ght_max_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'max_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%max_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5580,& 'frame/module_domain.f: Failed to allocate grid%max_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%max_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'max_p' grid%tail_statevars%DataName = 'MAX_P' grid%tail_statevars%Description = 'max pressure ' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%max_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%max_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5630,& 'frame/module_domain.f: Failed to allocate grid%max_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_min_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_min_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5641,& 'frame/module_domain.f: Failed to allocate grid%t_min_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_min_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_min_p' grid%tail_statevars%DataName = 'T_MIN_P' grid%tail_statevars%Description = 'temperature at min pressure' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%t_min_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t_min_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5691,& 'frame/module_domain.f: Failed to allocate grid%t_min_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ght_min_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ght_min_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5702,& 'frame/module_domain.f: Failed to allocate grid%ght_min_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_min_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ght_min_p' grid%tail_statevars%DataName = 'GHT_MIN_P' grid%tail_statevars%Description = 'geopotential height at min pressure' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ght_min_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ght_min_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5752,& 'frame/module_domain.f: Failed to allocate grid%ght_min_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'min_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%min_p(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5763,& 'frame/module_domain.f: Failed to allocate grid%min_p(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%min_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'min_p' grid%tail_statevars%DataName = 'MIN_P' grid%tail_statevars%Description = 'min pressure ' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%min_p grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%min_p(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5813,& 'frame/module_domain.f: Failed to allocate grid%min_p(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hgtmaxw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hgtmaxw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5824,& 'frame/module_domain.f: Failed to allocate grid%hgtmaxw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hgtmaxw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hgtmaxw' grid%tail_statevars%DataName = 'HGTMAXW' grid%tail_statevars%Description = 'Height of the max wind speed' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%hgtmaxw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%hgtmaxw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5874,& 'frame/module_domain.f: Failed to allocate grid%hgtmaxw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hgttrop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hgttrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5885,& 'frame/module_domain.f: Failed to allocate grid%hgttrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hgttrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hgttrop' grid%tail_statevars%DataName = 'HGTTROP' grid%tail_statevars%Description = 'Height of the tropopause' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%hgttrop grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%hgttrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5935,& 'frame/module_domain.f: Failed to allocate grid%hgttrop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pmaxw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pmaxw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5946,& 'frame/module_domain.f: Failed to allocate grid%pmaxw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pmaxw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pmaxw' grid%tail_statevars%DataName = 'PMAXW' grid%tail_statevars%Description = 'Pressure of the max wind speed' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%pmaxw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pmaxw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5996,& 'frame/module_domain.f: Failed to allocate grid%pmaxw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pmaxwnn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pmaxwnn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6007,& 'frame/module_domain.f: Failed to allocate grid%pmaxwnn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pmaxwnn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pmaxwnn' grid%tail_statevars%DataName = 'PMAXWNN' grid%tail_statevars%Description = 'PMAXW, nearest neighbor interp' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%pmaxwnn grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pmaxwnn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6057,& 'frame/module_domain.f: Failed to allocate grid%pmaxwnn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ptrop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ptrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6068,& 'frame/module_domain.f: Failed to allocate grid%ptrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ptrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ptrop' grid%tail_statevars%DataName = 'PTROP' grid%tail_statevars%Description = 'Pressure of the tropopause' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ptrop grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ptrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6118,& 'frame/module_domain.f: Failed to allocate grid%ptrop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ptropnn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ptropnn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6129,& 'frame/module_domain.f: Failed to allocate grid%ptropnn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ptropnn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ptropnn' grid%tail_statevars%DataName = 'PTROPNN' grid%tail_statevars%Description = 'PTROP, nearest neighbor interp' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ptropnn grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ptropnn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6179,& 'frame/module_domain.f: Failed to allocate grid%ptropnn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tmaxw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tmaxw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6190,& 'frame/module_domain.f: Failed to allocate grid%tmaxw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tmaxw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tmaxw' grid%tail_statevars%DataName = 'TMAXW' grid%tail_statevars%Description = 'Temperature of the max wind speed' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tmaxw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tmaxw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6240,& 'frame/module_domain.f: Failed to allocate grid%tmaxw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ttrop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ttrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6251,& 'frame/module_domain.f: Failed to allocate grid%ttrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ttrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ttrop' grid%tail_statevars%DataName = 'TTROP' grid%tail_statevars%Description = 'Temperature of the tropopause' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ttrop grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ttrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6301,& 'frame/module_domain.f: Failed to allocate grid%ttrop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'umaxw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%umaxw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6312,& 'frame/module_domain.f: Failed to allocate grid%umaxw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%umaxw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'umaxw' grid%tail_statevars%DataName = 'UMAXW' grid%tail_statevars%Description = 'U-component of the max wind speed' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%umaxw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%umaxw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6362,& 'frame/module_domain.f: Failed to allocate grid%umaxw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'utrop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6373,& 'frame/module_domain.f: Failed to allocate grid%utrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utrop' grid%tail_statevars%DataName = 'UTROP' grid%tail_statevars%Description = 'U-component of the tropopause wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%utrop grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%utrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6423,& 'frame/module_domain.f: Failed to allocate grid%utrop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vmaxw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vmaxw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6434,& 'frame/module_domain.f: Failed to allocate grid%vmaxw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vmaxw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vmaxw' grid%tail_statevars%DataName = 'VMAXW' grid%tail_statevars%Description = 'V-component of the max wind speed' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vmaxw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vmaxw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6484,& 'frame/module_domain.f: Failed to allocate grid%vmaxw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vtrop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vtrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6495,& 'frame/module_domain.f: Failed to allocate grid%vtrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vtrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vtrop' grid%tail_statevars%DataName = 'VTROP' grid%tail_statevars%Description = 'V-component of the tropopause wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vtrop grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vtrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6545,& 'frame/module_domain.f: Failed to allocate grid%vtrop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'erod'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%erosion_dim)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%erosion_dim)-(1)+1))) * 4 ALLOCATE(grid%erod(sm31:em31,sm33:em33,1:model_config_rec%erosion_dim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6556,& 'frame/module_domain.f: Failed to allocate grid%erod(sm31:em31,sm33:em33,1:model_config_rec%erosion_dim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%erod=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'erod' grid%tail_statevars%DataName = 'EROD' grid%tail_statevars%Description = 'fraction of erodible surface in each grid cell (0-1)' grid%tail_statevars%Units = 'none' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XYZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%erod grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = config_flags%erosion_dim grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = config_flags%erosion_dim grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = config_flags%erosion_dim grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = 'dust_erosion_dimension' ENDIF ELSE ALLOCATE(grid%erod(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6606,& 'frame/module_domain.f: Failed to allocate grid%erod(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6617,& 'frame/module_domain.f: Failed to allocate grid%u_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_1' grid%tail_statevars%DataName = 'U_1' grid%tail_statevars%Description = 'x-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6667,& 'frame/module_domain.f: Failed to allocate grid%u_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6678,& 'frame/module_domain.f: Failed to allocate grid%u_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_2' grid%tail_statevars%DataName = 'U_2' grid%tail_statevars%Description = 'x-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6728,& 'frame/module_domain.f: Failed to allocate grid%u_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6737,& 'frame/module_domain.f: Failed to allocate grid%u_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6745,& 'frame/module_domain.f: Failed to allocate grid%u_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6753,& 'frame/module_domain.f: Failed to allocate grid%u_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6761,& 'frame/module_domain.f: Failed to allocate grid%u_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bye=initial_data_value ELSE ALLOCATE(grid%u_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6768,& 'frame/module_domain.f: Failed to allocate grid%u_bxs(1,1,1). ') endif ALLOCATE(grid%u_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6773,& 'frame/module_domain.f: Failed to allocate grid%u_bxe(1,1,1). ') endif ALLOCATE(grid%u_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6778,& 'frame/module_domain.f: Failed to allocate grid%u_bys(1,1,1). ') endif ALLOCATE(grid%u_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6783,& 'frame/module_domain.f: Failed to allocate grid%u_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6792,& 'frame/module_domain.f: Failed to allocate grid%u_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6800,& 'frame/module_domain.f: Failed to allocate grid%u_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6808,& 'frame/module_domain.f: Failed to allocate grid%u_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%u_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6816,& 'frame/module_domain.f: Failed to allocate grid%u_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btye=initial_data_value ELSE ALLOCATE(grid%u_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6823,& 'frame/module_domain.f: Failed to allocate grid%u_btxs(1,1,1). ') endif ALLOCATE(grid%u_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6828,& 'frame/module_domain.f: Failed to allocate grid%u_btxe(1,1,1). ') endif ALLOCATE(grid%u_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6833,& 'frame/module_domain.f: Failed to allocate grid%u_btys(1,1,1). ') endif ALLOCATE(grid%u_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6838,& 'frame/module_domain.f: Failed to allocate grid%u_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ru').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ru(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6849,& 'frame/module_domain.f: Failed to allocate grid%ru(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ru' grid%tail_statevars%DataName = 'MU_U' grid%tail_statevars%Description = 'mu-coupled u' grid%tail_statevars%Units = 'Pa m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ru grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ru(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6899,& 'frame/module_domain.f: Failed to allocate grid%ru(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ru_m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ru_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6910,& 'frame/module_domain.f: Failed to allocate grid%ru_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru_m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ru_m' grid%tail_statevars%DataName = 'RU_M' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ru_m grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ru_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6960,& 'frame/module_domain.f: Failed to allocate grid%ru_m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ru_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ru_tend(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6971,& 'frame/module_domain.f: Failed to allocate grid%ru_tend(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ru_tend' grid%tail_statevars%DataName = 'RU_TEND' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ru_tend grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ru_tend(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7021,& 'frame/module_domain.f: Failed to allocate grid%ru_tend(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_save').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7032,& 'frame/module_domain.f: Failed to allocate grid%u_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_save=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_save' grid%tail_statevars%DataName = 'U_SAVE' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_save grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7082,& 'frame/module_domain.f: Failed to allocate grid%u_save(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z_force').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%z_force(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7093,& 'frame/module_domain.f: Failed to allocate grid%z_force(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_force=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z_force' grid%tail_statevars%DataName = 'Z_FORCE' grid%tail_statevars%Description = 'height of forcing input' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%z_force grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%z_force(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7141,& 'frame/module_domain.f: Failed to allocate grid%z_force(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z_force_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%z_force_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7152,& 'frame/module_domain.f: Failed to allocate grid%z_force_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_force_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z_force_tend' grid%tail_statevars%DataName = 'Z_FORCE_TEND' grid%tail_statevars%Description = 'tendency height of forcing input' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%z_force_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%z_force_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7200,& 'frame/module_domain.f: Failed to allocate grid%z_force_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_g').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_g(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7211,& 'frame/module_domain.f: Failed to allocate grid%u_g(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_g=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_g' grid%tail_statevars%DataName = 'U_G' grid%tail_statevars%Description = 'x-direction geostrophic wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_g grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_g(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7259,& 'frame/module_domain.f: Failed to allocate grid%u_g(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_g_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_g_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7270,& 'frame/module_domain.f: Failed to allocate grid%u_g_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_g_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_g_tend' grid%tail_statevars%DataName = 'U_G_TEND' grid%tail_statevars%Description = 'tendency x-direction geostrophic wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_g_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_g_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7318,& 'frame/module_domain.f: Failed to allocate grid%u_g_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7329,& 'frame/module_domain.f: Failed to allocate grid%v_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_1' grid%tail_statevars%DataName = 'V_1' grid%tail_statevars%Description = 'y-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%v_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7379,& 'frame/module_domain.f: Failed to allocate grid%v_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7390,& 'frame/module_domain.f: Failed to allocate grid%v_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_2' grid%tail_statevars%DataName = 'V_2' grid%tail_statevars%Description = 'y-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%v_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7440,& 'frame/module_domain.f: Failed to allocate grid%v_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7449,& 'frame/module_domain.f: Failed to allocate grid%v_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7457,& 'frame/module_domain.f: Failed to allocate grid%v_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7465,& 'frame/module_domain.f: Failed to allocate grid%v_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7473,& 'frame/module_domain.f: Failed to allocate grid%v_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bye=initial_data_value ELSE ALLOCATE(grid%v_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7480,& 'frame/module_domain.f: Failed to allocate grid%v_bxs(1,1,1). ') endif ALLOCATE(grid%v_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7485,& 'frame/module_domain.f: Failed to allocate grid%v_bxe(1,1,1). ') endif ALLOCATE(grid%v_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7490,& 'frame/module_domain.f: Failed to allocate grid%v_bys(1,1,1). ') endif ALLOCATE(grid%v_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7495,& 'frame/module_domain.f: Failed to allocate grid%v_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7504,& 'frame/module_domain.f: Failed to allocate grid%v_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7512,& 'frame/module_domain.f: Failed to allocate grid%v_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7520,& 'frame/module_domain.f: Failed to allocate grid%v_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%v_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7528,& 'frame/module_domain.f: Failed to allocate grid%v_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btye=initial_data_value ELSE ALLOCATE(grid%v_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7535,& 'frame/module_domain.f: Failed to allocate grid%v_btxs(1,1,1). ') endif ALLOCATE(grid%v_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7540,& 'frame/module_domain.f: Failed to allocate grid%v_btxe(1,1,1). ') endif ALLOCATE(grid%v_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7545,& 'frame/module_domain.f: Failed to allocate grid%v_btys(1,1,1). ') endif ALLOCATE(grid%v_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7550,& 'frame/module_domain.f: Failed to allocate grid%v_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7561,& 'frame/module_domain.f: Failed to allocate grid%rv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rv' grid%tail_statevars%DataName = 'MU_V' grid%tail_statevars%Description = 'mu-coupled v' grid%tail_statevars%Units = 'Pa m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rv grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%rv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7611,& 'frame/module_domain.f: Failed to allocate grid%rv(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rv_m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rv_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7622,& 'frame/module_domain.f: Failed to allocate grid%rv_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rv_m' grid%tail_statevars%DataName = 'RV_M' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rv_m grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%rv_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7672,& 'frame/module_domain.f: Failed to allocate grid%rv_m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rv_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rv_tend(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7683,& 'frame/module_domain.f: Failed to allocate grid%rv_tend(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rv_tend' grid%tail_statevars%DataName = 'RV_TEND' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rv_tend grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%rv_tend(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7733,& 'frame/module_domain.f: Failed to allocate grid%rv_tend(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_save').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7744,& 'frame/module_domain.f: Failed to allocate grid%v_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_save=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_save' grid%tail_statevars%DataName = 'V_SAVE' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_save grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%v_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7794,& 'frame/module_domain.f: Failed to allocate grid%v_save(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_g').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_g(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7805,& 'frame/module_domain.f: Failed to allocate grid%v_g(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_g=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_g' grid%tail_statevars%DataName = 'V_G' grid%tail_statevars%Description = 'y-direction geostrophic wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_g grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_g(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7853,& 'frame/module_domain.f: Failed to allocate grid%v_g(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_g_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_g_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7864,& 'frame/module_domain.f: Failed to allocate grid%v_g_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_g_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_g_tend' grid%tail_statevars%DataName = 'V_G_TEND' grid%tail_statevars%Description = 'tendency y-direction geostrophic wind' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_g_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_g_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7912,& 'frame/module_domain.f: Failed to allocate grid%v_g_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7923,& 'frame/module_domain.f: Failed to allocate grid%w_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'w_1' grid%tail_statevars%DataName = 'W_1' grid%tail_statevars%Description = 'z-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%w_1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7973,& 'frame/module_domain.f: Failed to allocate grid%w_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7984,& 'frame/module_domain.f: Failed to allocate grid%w_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'w_2' grid%tail_statevars%DataName = 'W_2' grid%tail_statevars%Description = 'z-wind component' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%w_2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8034,& 'frame/module_domain.f: Failed to allocate grid%w_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8043,& 'frame/module_domain.f: Failed to allocate grid%w_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8051,& 'frame/module_domain.f: Failed to allocate grid%w_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8059,& 'frame/module_domain.f: Failed to allocate grid%w_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8067,& 'frame/module_domain.f: Failed to allocate grid%w_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bye=initial_data_value ELSE ALLOCATE(grid%w_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8074,& 'frame/module_domain.f: Failed to allocate grid%w_bxs(1,1,1). ') endif ALLOCATE(grid%w_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8079,& 'frame/module_domain.f: Failed to allocate grid%w_bxe(1,1,1). ') endif ALLOCATE(grid%w_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8084,& 'frame/module_domain.f: Failed to allocate grid%w_bys(1,1,1). ') endif ALLOCATE(grid%w_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8089,& 'frame/module_domain.f: Failed to allocate grid%w_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8098,& 'frame/module_domain.f: Failed to allocate grid%w_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8106,& 'frame/module_domain.f: Failed to allocate grid%w_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8114,& 'frame/module_domain.f: Failed to allocate grid%w_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%w_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8122,& 'frame/module_domain.f: Failed to allocate grid%w_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btye=initial_data_value ELSE ALLOCATE(grid%w_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8129,& 'frame/module_domain.f: Failed to allocate grid%w_btxs(1,1,1). ') endif ALLOCATE(grid%w_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8134,& 'frame/module_domain.f: Failed to allocate grid%w_btxe(1,1,1). ') endif ALLOCATE(grid%w_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8139,& 'frame/module_domain.f: Failed to allocate grid%w_btys(1,1,1). ') endif ALLOCATE(grid%w_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8144,& 'frame/module_domain.f: Failed to allocate grid%w_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ww').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ww(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8155,& 'frame/module_domain.f: Failed to allocate grid%ww(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ww=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ww' grid%tail_statevars%DataName = 'WW' grid%tail_statevars%Description = 'mu-coupled eta-dot' grid%tail_statevars%Units = 'Pa s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ww grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ww(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8205,& 'frame/module_domain.f: Failed to allocate grid%ww(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8216,& 'frame/module_domain.f: Failed to allocate grid%rw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rw' grid%tail_statevars%DataName = 'RW' grid%tail_statevars%Description = 'mu-coupled w' grid%tail_statevars%Units = 'Pa m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8266,& 'frame/module_domain.f: Failed to allocate grid%rw(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ww_m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ww_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8277,& 'frame/module_domain.f: Failed to allocate grid%ww_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ww_m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ww_m' grid%tail_statevars%DataName = 'WW_M' grid%tail_statevars%Description = 'time-avg mu-coupled eta-dot' grid%tail_statevars%Units = 'Pa s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ww_m grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ww_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8327,& 'frame/module_domain.f: Failed to allocate grid%ww_m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_subs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%w_subs(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8338,& 'frame/module_domain.f: Failed to allocate grid%w_subs(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_subs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'w_subs' grid%tail_statevars%DataName = 'W_SUBS' grid%tail_statevars%Description = 'large-scale vertical velocity' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%w_subs grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%w_subs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8386,& 'frame/module_domain.f: Failed to allocate grid%w_subs(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_subs_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%w_subs_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8397,& 'frame/module_domain.f: Failed to allocate grid%w_subs_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_subs_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'w_subs_tend' grid%tail_statevars%DataName = 'W_SUBS_TEND' grid%tail_statevars%Description = 'tendency large-scale vertical velocity' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%w_subs_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%w_subs_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8445,& 'frame/module_domain.f: Failed to allocate grid%w_subs_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ph_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ph_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8456,& 'frame/module_domain.f: Failed to allocate grid%ph_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ph_1' grid%tail_statevars%DataName = 'PH_1' grid%tail_statevars%Description = 'perturbation geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ph_1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ph_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8506,& 'frame/module_domain.f: Failed to allocate grid%ph_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ph_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ph_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8517,& 'frame/module_domain.f: Failed to allocate grid%ph_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ph_2' grid%tail_statevars%DataName = 'PH_2' grid%tail_statevars%Description = 'perturbation geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ph_2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ph_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8567,& 'frame/module_domain.f: Failed to allocate grid%ph_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8576,& 'frame/module_domain.f: Failed to allocate grid%ph_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8584,& 'frame/module_domain.f: Failed to allocate grid%ph_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8592,& 'frame/module_domain.f: Failed to allocate grid%ph_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8600,& 'frame/module_domain.f: Failed to allocate grid%ph_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bye=initial_data_value ELSE ALLOCATE(grid%ph_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8607,& 'frame/module_domain.f: Failed to allocate grid%ph_bxs(1,1,1). ') endif ALLOCATE(grid%ph_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8612,& 'frame/module_domain.f: Failed to allocate grid%ph_bxe(1,1,1). ') endif ALLOCATE(grid%ph_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8617,& 'frame/module_domain.f: Failed to allocate grid%ph_bys(1,1,1). ') endif ALLOCATE(grid%ph_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8622,& 'frame/module_domain.f: Failed to allocate grid%ph_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8631,& 'frame/module_domain.f: Failed to allocate grid%ph_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8639,& 'frame/module_domain.f: Failed to allocate grid%ph_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8647,& 'frame/module_domain.f: Failed to allocate grid%ph_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ph_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8655,& 'frame/module_domain.f: Failed to allocate grid%ph_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btye=initial_data_value ELSE ALLOCATE(grid%ph_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8662,& 'frame/module_domain.f: Failed to allocate grid%ph_btxs(1,1,1). ') endif ALLOCATE(grid%ph_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8667,& 'frame/module_domain.f: Failed to allocate grid%ph_btxe(1,1,1). ') endif ALLOCATE(grid%ph_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8672,& 'frame/module_domain.f: Failed to allocate grid%ph_btys(1,1,1). ') endif ALLOCATE(grid%ph_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8677,& 'frame/module_domain.f: Failed to allocate grid%ph_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'phb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%phb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8688,& 'frame/module_domain.f: Failed to allocate grid%phb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'phb' grid%tail_statevars%DataName = 'PHB' grid%tail_statevars%Description = 'base-state geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%phb grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%phb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8738,& 'frame/module_domain.f: Failed to allocate grid%phb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'phb_fine').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%phb_fine(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8749,& 'frame/module_domain.f: Failed to allocate grid%phb_fine(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phb_fine=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'phb_fine' grid%tail_statevars%DataName = 'PHB_FINE' grid%tail_statevars%Description = 'for nesting, temp holding interpolated coarse grid phb' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%phb_fine grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%phb_fine(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8799,& 'frame/module_domain.f: Failed to allocate grid%phb_fine(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ph0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ph0(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8810,& 'frame/module_domain.f: Failed to allocate grid%ph0(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ph0' grid%tail_statevars%DataName = 'PH0' grid%tail_statevars%Description = 'initial geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ph0 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ph0(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8860,& 'frame/module_domain.f: Failed to allocate grid%ph0(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'php').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%php(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8871,& 'frame/module_domain.f: Failed to allocate grid%php(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%php=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'php' grid%tail_statevars%DataName = 'PHP' grid%tail_statevars%Description = 'geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%php grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%php(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8921,& 'frame/module_domain.f: Failed to allocate grid%php(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_phy_m_t0'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%th_phy_m_t0(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8932,& 'frame/module_domain.f: Failed to allocate grid%th_phy_m_t0(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_phy_m_t0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_phy_m_t0' grid%tail_statevars%DataName = 'T' grid%tail_statevars%Description = 'perturbation potential temperature theta-t0' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%th_phy_m_t0 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%th_phy_m_t0(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8982,& 'frame/module_domain.f: Failed to allocate grid%th_phy_m_t0(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8993,& 'frame/module_domain.f: Failed to allocate grid%t_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_1' grid%tail_statevars%DataName = 'THM_1' grid%tail_statevars%Description = 'either 1) pert moist pot temp=(1+Rv/Rd Qv)*(theta)-T0, or 2) pert dry pot temp=theta-T0; based on use_theta_m setting' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9043,& 'frame/module_domain.f: Failed to allocate grid%t_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9054,& 'frame/module_domain.f: Failed to allocate grid%t_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_2' grid%tail_statevars%DataName = 'THM_2' grid%tail_statevars%Description = 'either 1) pert moist pot temp=(1+Rv/Rd Qv)*(theta)-T0, or 2) pert dry pot temp=theta-T0; based on use_theta_m setting' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9104,& 'frame/module_domain.f: Failed to allocate grid%t_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9113,& 'frame/module_domain.f: Failed to allocate grid%t_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9121,& 'frame/module_domain.f: Failed to allocate grid%t_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9129,& 'frame/module_domain.f: Failed to allocate grid%t_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9137,& 'frame/module_domain.f: Failed to allocate grid%t_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bye=initial_data_value ELSE ALLOCATE(grid%t_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9144,& 'frame/module_domain.f: Failed to allocate grid%t_bxs(1,1,1). ') endif ALLOCATE(grid%t_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9149,& 'frame/module_domain.f: Failed to allocate grid%t_bxe(1,1,1). ') endif ALLOCATE(grid%t_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9154,& 'frame/module_domain.f: Failed to allocate grid%t_bys(1,1,1). ') endif ALLOCATE(grid%t_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9159,& 'frame/module_domain.f: Failed to allocate grid%t_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9168,& 'frame/module_domain.f: Failed to allocate grid%t_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9176,& 'frame/module_domain.f: Failed to allocate grid%t_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9184,& 'frame/module_domain.f: Failed to allocate grid%t_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%t_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9192,& 'frame/module_domain.f: Failed to allocate grid%t_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btye=initial_data_value ELSE ALLOCATE(grid%t_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9199,& 'frame/module_domain.f: Failed to allocate grid%t_btxs(1,1,1). ') endif ALLOCATE(grid%t_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9204,& 'frame/module_domain.f: Failed to allocate grid%t_btxe(1,1,1). ') endif ALLOCATE(grid%t_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9209,& 'frame/module_domain.f: Failed to allocate grid%t_btys(1,1,1). ') endif ALLOCATE(grid%t_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9214,& 'frame/module_domain.f: Failed to allocate grid%t_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_init'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_init(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9225,& 'frame/module_domain.f: Failed to allocate grid%t_init(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_init=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_init' grid%tail_statevars%DataName = 'T_INIT' grid%tail_statevars%Description = 'initial potential temperature' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_init grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_init(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9275,& 'frame/module_domain.f: Failed to allocate grid%t_init(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_save').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9286,& 'frame/module_domain.f: Failed to allocate grid%t_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_save=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_save' grid%tail_statevars%DataName = 'T_SAVE' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_save grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9336,& 'frame/module_domain.f: Failed to allocate grid%t_save(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_upstream_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9347,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_upstream_x' grid%tail_statevars%DataName = 'TH_UPSTREAM_X' grid%tail_statevars%Description = 'upstream theta x-advection' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_upstream_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9395,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_upstream_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9406,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_upstream_x_tend' grid%tail_statevars%DataName = 'TH_UPSTREAM_X_TEND' grid%tail_statevars%Description = 'tendency upstream theta x-advection' grid%tail_statevars%Units = 'K s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_upstream_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9454,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_upstream_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9465,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_upstream_y' grid%tail_statevars%DataName = 'TH_UPSTREAM_Y' grid%tail_statevars%Description = 'upstream theta y-advection' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_upstream_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9513,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_upstream_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9524,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_upstream_y_tend' grid%tail_statevars%DataName = 'TH_UPSTREAM_Y_TEND' grid%tail_statevars%Description = 'tendency upstream theta y-advection' grid%tail_statevars%Units = 'K s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_upstream_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9572,& 'frame/module_domain.f: Failed to allocate grid%th_upstream_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_upstream_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9583,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_upstream_x' grid%tail_statevars%DataName = 'QV_UPSTREAM_X' grid%tail_statevars%Description = 'upstream qv x-advection' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_upstream_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9631,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_upstream_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9642,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_upstream_x_tend' grid%tail_statevars%DataName = 'QV_UPSTREAM_X_TEND' grid%tail_statevars%Description = 'tendency upstream qv x-advection' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_upstream_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9690,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_upstream_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9701,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_upstream_y' grid%tail_statevars%DataName = 'QV_UPSTREAM_Y' grid%tail_statevars%Description = 'upstream qv y-advection' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_upstream_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9749,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_upstream_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9760,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_upstream_y_tend' grid%tail_statevars%DataName = 'QV_UPSTREAM_Y_TEND' grid%tail_statevars%Description = 'tendency upstream qv y-advection' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_upstream_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9808,& 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_upstream_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9819,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_upstream_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_upstream_x' grid%tail_statevars%DataName = 'QL_UPSTREAM_X' grid%tail_statevars%Description = 'upstream ql x-advection' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_upstream_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9867,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_upstream_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9878,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_upstream_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_upstream_x_tend' grid%tail_statevars%DataName = 'QL_UPSTREAM_X_TEND' grid%tail_statevars%Description = 'tendency upstream ql x-advection' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_upstream_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9926,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_upstream_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9937,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_upstream_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_upstream_y' grid%tail_statevars%DataName = 'QL_UPSTREAM_Y' grid%tail_statevars%Description = 'upstream ql y-advection' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_upstream_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9985,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_upstream_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9996,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_upstream_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_upstream_y_tend' grid%tail_statevars%DataName = 'QL_UPSTREAM_Y_TEND' grid%tail_statevars%Description = 'tendency upstream ql y-advection' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_upstream_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10044,& 'frame/module_domain.f: Failed to allocate grid%ql_upstream_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_upstream_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10055,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_upstream_x' grid%tail_statevars%DataName = 'U_UPSTREAM_X' grid%tail_statevars%Description = 'upstream u x-advection' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_upstream_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10103,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_upstream_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10114,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_upstream_x_tend' grid%tail_statevars%DataName = 'U_UPSTREAM_X_TEND' grid%tail_statevars%Description = 'tendency upstream u x-advection' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_upstream_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10162,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_upstream_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10173,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_upstream_y' grid%tail_statevars%DataName = 'U_UPSTREAM_Y' grid%tail_statevars%Description = 'upstream u y-advection' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_upstream_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10221,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_upstream_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10232,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_upstream_y_tend' grid%tail_statevars%DataName = 'U_UPSTREAM_Y_TEND' grid%tail_statevars%Description = 'tendency upstream u y-advection' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_upstream_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10280,& 'frame/module_domain.f: Failed to allocate grid%u_upstream_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_upstream_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10291,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_upstream_x' grid%tail_statevars%DataName = 'V_UPSTREAM_X' grid%tail_statevars%Description = 'upstream v x-advection' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_upstream_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10339,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_upstream_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10350,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_upstream_x_tend' grid%tail_statevars%DataName = 'V_UPSTREAM_X_TEND' grid%tail_statevars%Description = 'tendency upstream v x-advection' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_upstream_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10398,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_upstream_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10409,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_upstream_y' grid%tail_statevars%DataName = 'V_UPSTREAM_Y' grid%tail_statevars%Description = 'upstream v y-advection' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_upstream_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10457,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_upstream_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10468,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_upstream_y_tend' grid%tail_statevars%DataName = 'V_UPSTREAM_Y_TEND' grid%tail_statevars%Description = 'tendency upstream v y-advection' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_upstream_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10516,& 'frame/module_domain.f: Failed to allocate grid%v_upstream_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_t_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_t_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10527,& 'frame/module_domain.f: Failed to allocate grid%th_t_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_t_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_t_tend' grid%tail_statevars%DataName = 'TH_T_TEND' grid%tail_statevars%Description = 'tendency theta time' grid%tail_statevars%Units = 'K s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_t_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_t_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10575,& 'frame/module_domain.f: Failed to allocate grid%th_t_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_t_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_t_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10586,& 'frame/module_domain.f: Failed to allocate grid%qv_t_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_t_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_t_tend' grid%tail_statevars%DataName = 'QV_T_TEND' grid%tail_statevars%Description = 'tendency qv time' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_t_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_t_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10634,& 'frame/module_domain.f: Failed to allocate grid%qv_t_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10645,& 'frame/module_domain.f: Failed to allocate grid%th_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_largescale' grid%tail_statevars%DataName = 'TH_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale theta' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10693,& 'frame/module_domain.f: Failed to allocate grid%th_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%th_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10704,& 'frame/module_domain.f: Failed to allocate grid%th_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th_largescale_tend' grid%tail_statevars%DataName = 'TH_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale theta' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%th_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10752,& 'frame/module_domain.f: Failed to allocate grid%th_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10763,& 'frame/module_domain.f: Failed to allocate grid%qv_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_largescale' grid%tail_statevars%DataName = 'QV_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale qv' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10811,& 'frame/module_domain.f: Failed to allocate grid%qv_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%qv_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10822,& 'frame/module_domain.f: Failed to allocate grid%qv_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_largescale_tend' grid%tail_statevars%DataName = 'QV_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale qv' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10870,& 'frame/module_domain.f: Failed to allocate grid%qv_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10881,& 'frame/module_domain.f: Failed to allocate grid%ql_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_largescale' grid%tail_statevars%DataName = 'QL_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale ql' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10929,& 'frame/module_domain.f: Failed to allocate grid%ql_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ql_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%ql_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10940,& 'frame/module_domain.f: Failed to allocate grid%ql_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ql_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ql_largescale_tend' grid%tail_statevars%DataName = 'QL_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale ql' grid%tail_statevars%Units = 'kg kg-1 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%ql_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ql_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10988,& 'frame/module_domain.f: Failed to allocate grid%ql_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10999,& 'frame/module_domain.f: Failed to allocate grid%u_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_largescale' grid%tail_statevars%DataName = 'U_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale u' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11047,& 'frame/module_domain.f: Failed to allocate grid%u_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%u_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11058,& 'frame/module_domain.f: Failed to allocate grid%u_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_largescale_tend' grid%tail_statevars%DataName = 'U_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale u' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11106,& 'frame/module_domain.f: Failed to allocate grid%u_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11117,& 'frame/module_domain.f: Failed to allocate grid%v_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_largescale' grid%tail_statevars%DataName = 'V_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale v' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11165,& 'frame/module_domain.f: Failed to allocate grid%v_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%v_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11176,& 'frame/module_domain.f: Failed to allocate grid%v_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_largescale_tend' grid%tail_statevars%DataName = 'V_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale v' grid%tail_statevars%Units = 'm s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11224,& 'frame/module_domain.f: Failed to allocate grid%v_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_largescale').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_largescale(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11235,& 'frame/module_domain.f: Failed to allocate grid%tau_largescale(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_largescale=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_largescale' grid%tail_statevars%DataName = 'TAU_LARGESCALE' grid%tail_statevars%Description = 'SCM largescale timescale' grid%tail_statevars%Units = 's' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_largescale grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_largescale(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11283,& 'frame/module_domain.f: Failed to allocate grid%tau_largescale(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_largescale_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_largescale_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11294,& 'frame/module_domain.f: Failed to allocate grid%tau_largescale_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_largescale_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_largescale_tend' grid%tail_statevars%DataName = 'TAU_LARGESCALE_TEND' grid%tail_statevars%Description = 'SCM tendency largescale timescale' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_largescale_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_largescale_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11342,& 'frame/module_domain.f: Failed to allocate grid%tau_largescale_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_x').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11353,& 'frame/module_domain.f: Failed to allocate grid%tau_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_x=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_x' grid%tail_statevars%DataName = 'TAU_X' grid%tail_statevars%Description = 'X-direction advective timescale' grid%tail_statevars%Units = 's' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_x grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11401,& 'frame/module_domain.f: Failed to allocate grid%tau_x(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_x_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11412,& 'frame/module_domain.f: Failed to allocate grid%tau_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_x_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_x_tend' grid%tail_statevars%DataName = 'TAU_X_TEND' grid%tail_statevars%Description = 'tendency X-direction advective timescale' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_x_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11460,& 'frame/module_domain.f: Failed to allocate grid%tau_x_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_y').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11471,& 'frame/module_domain.f: Failed to allocate grid%tau_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_y=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_y' grid%tail_statevars%DataName = 'TAU_Y' grid%tail_statevars%Description = 'Y-direction advective timescale' grid%tail_statevars%Units = 's' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_y grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11519,& 'frame/module_domain.f: Failed to allocate grid%tau_y(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_y_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11530,& 'frame/module_domain.f: Failed to allocate grid%tau_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_y_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_y_tend' grid%tail_statevars%DataName = 'TAU_Y_TEND' grid%tail_statevars%Description = 'tendency Y-direction advective timescale' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_y_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11578,& 'frame/module_domain.f: Failed to allocate grid%tau_y_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_soil_forcing_val').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%t_soil_forcing_val(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11589,& 'frame/module_domain.f: Failed to allocate grid%t_soil_forcing_val(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_soil_forcing_val=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_soil_forcing_val' grid%tail_statevars%DataName = 'T_SOIL_FORCING_VAL' grid%tail_statevars%Description = 'Soil temp value for SCM forcing' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%t_soil_forcing_val grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t_soil_forcing_val(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11637,& 'frame/module_domain.f: Failed to allocate grid%t_soil_forcing_val(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_soil_forcing_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%t_soil_forcing_tend(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11648,& 'frame/module_domain.f: Failed to allocate grid%t_soil_forcing_tend(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_soil_forcing_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_soil_forcing_tend' grid%tail_statevars%DataName = 'T_SOIL_FORCING_TEND' grid%tail_statevars%Description = 'tendency soil temp for SCM forcing' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%t_soil_forcing_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t_soil_forcing_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11696,& 'frame/module_domain.f: Failed to allocate grid%t_soil_forcing_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q_soil_forcing_val').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%q_soil_forcing_val(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11707,& 'frame/module_domain.f: Failed to allocate grid%q_soil_forcing_val(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q_soil_forcing_val=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q_soil_forcing_val' grid%tail_statevars%DataName = 'Q_SOIL_FORCING_VAL' grid%tail_statevars%Description = 'Soil moisture value for SCM forcing' grid%tail_statevars%Units = '1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%q_soil_forcing_val grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q_soil_forcing_val(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11755,& 'frame/module_domain.f: Failed to allocate grid%q_soil_forcing_val(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q_soil_forcing_tend').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%q_soil_forcing_tend(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11766,& 'frame/module_domain.f: Failed to allocate grid%q_soil_forcing_tend(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q_soil_forcing_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q_soil_forcing_tend' grid%tail_statevars%DataName = 'Q_SOIL_FORCING_TEND' grid%tail_statevars%Description = 'tendency soil moisture for SCM forcing' grid%tail_statevars%Units = 's-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%q_soil_forcing_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q_soil_forcing_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11814,& 'frame/module_domain.f: Failed to allocate grid%q_soil_forcing_tend(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_soil').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%tau_soil(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11825,& 'frame/module_domain.f: Failed to allocate grid%tau_soil(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_soil=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tau_soil' grid%tail_statevars%DataName = 'TAU_SOIL' grid%tail_statevars%Description = 'SCM soil forcing timescale' grid%tail_statevars%Units = 's' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%tau_soil grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tau_soil(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11873,& 'frame/module_domain.f: Failed to allocate grid%tau_soil(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soil_depth_force').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_force_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%soil_depth_force(1:model_config_rec%num_force_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11884,& 'frame/module_domain.f: Failed to allocate grid%soil_depth_force(1:model_config_rec%num_force_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soil_depth_force=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soil_depth_force' grid%tail_statevars%DataName = 'SOIL_DEPTH_FORCE' grid%tail_statevars%Description = 'SCM depth at center of soil layers in forcing file' grid%tail_statevars%Units = '1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%soil_depth_force grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_force_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_force_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_force_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'force_soil_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soil_depth_force(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11932,& 'frame/module_domain.f: Failed to allocate grid%soil_depth_force(1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'hfx_force' grid%tail_statevars%DataName = 'HFX_FORCE' grid%tail_statevars%Description = 'SCM ideal surface sensible heat flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%hfx_force grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%hfx_force=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lh_force' grid%tail_statevars%DataName = 'LH_FORCE' grid%tail_statevars%Description = 'SCM ideal surface latent heat flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lh_force grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lh_force=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'tsk_force' grid%tail_statevars%DataName = 'TSK_FORCE' grid%tail_statevars%Description = 'SCM ideal surface skin temperature' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%tsk_force grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%tsk_force=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'hfx_force_tend' grid%tail_statevars%DataName = 'HFX_FORCE_TEND' grid%tail_statevars%Description = 'SCM ideal surface sensible heat flux tendency' grid%tail_statevars%Units = 'W m-2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%hfx_force_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%hfx_force_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lh_force_tend' grid%tail_statevars%DataName = 'LH_FORCE_TEND' grid%tail_statevars%Description = 'SCM ideal surface latent heat flux tendency' grid%tail_statevars%Units = 'W m-2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lh_force_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lh_force_tend=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'tsk_force_tend' grid%tail_statevars%DataName = 'TSK_FORCE_TEND' grid%tail_statevars%Description = 'SCM ideal surface skin temperature tendency' grid%tail_statevars%Units = 'W m-2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%tsk_force_tend grid%tail_statevars%streams(1) = 268435457 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%tsk_force_tend=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'mu_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mu_1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12057,& 'frame/module_domain.f: Failed to allocate grid%mu_1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mu_1' grid%tail_statevars%DataName = 'MU_1' grid%tail_statevars%Description = 'perturbation dry air mass in column' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mu_1 grid%tail_statevars%streams(1) = 33554435 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mu_1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12107,& 'frame/module_domain.f: Failed to allocate grid%mu_1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mu_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mu_2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12118,& 'frame/module_domain.f: Failed to allocate grid%mu_2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mu_2' grid%tail_statevars%DataName = 'MU_2' grid%tail_statevars%Description = 'perturbation dry air mass in column' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mu_2 grid%tail_statevars%streams(1) = 33554435 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mu_2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12168,& 'frame/module_domain.f: Failed to allocate grid%mu_2(1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_bxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12177,& 'frame/module_domain.f: Failed to allocate grid%mu_bxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_bxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12185,& 'frame/module_domain.f: Failed to allocate grid%mu_bxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_bys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12193,& 'frame/module_domain.f: Failed to allocate grid%mu_bys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_bye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12201,& 'frame/module_domain.f: Failed to allocate grid%mu_bye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bye=initial_data_value ELSE ALLOCATE(grid%mu_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12208,& 'frame/module_domain.f: Failed to allocate grid%mu_bxs(1,1,1). ') endif ALLOCATE(grid%mu_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12213,& 'frame/module_domain.f: Failed to allocate grid%mu_bxe(1,1,1). ') endif ALLOCATE(grid%mu_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12218,& 'frame/module_domain.f: Failed to allocate grid%mu_bys(1,1,1). ') endif ALLOCATE(grid%mu_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12223,& 'frame/module_domain.f: Failed to allocate grid%mu_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_btxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12232,& 'frame/module_domain.f: Failed to allocate grid%mu_btxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_btxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12240,& 'frame/module_domain.f: Failed to allocate grid%mu_btxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_btys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12248,& 'frame/module_domain.f: Failed to allocate grid%mu_btys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%mu_btye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12256,& 'frame/module_domain.f: Failed to allocate grid%mu_btye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btye=initial_data_value ELSE ALLOCATE(grid%mu_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12263,& 'frame/module_domain.f: Failed to allocate grid%mu_btxs(1,1,1). ') endif ALLOCATE(grid%mu_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12268,& 'frame/module_domain.f: Failed to allocate grid%mu_btxe(1,1,1). ') endif ALLOCATE(grid%mu_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12273,& 'frame/module_domain.f: Failed to allocate grid%mu_btys(1,1,1). ') endif ALLOCATE(grid%mu_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12278,& 'frame/module_domain.f: Failed to allocate grid%mu_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mub'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mub(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12289,& 'frame/module_domain.f: Failed to allocate grid%mub(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mub' grid%tail_statevars%DataName = 'MUB' grid%tail_statevars%Description = 'base state dry air mass in column' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mub grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mub(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12339,& 'frame/module_domain.f: Failed to allocate grid%mub(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mub_fine').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mub_fine(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12350,& 'frame/module_domain.f: Failed to allocate grid%mub_fine(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub_fine=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mub_fine' grid%tail_statevars%DataName = 'MUB_FINE' grid%tail_statevars%Description = 'nest temp, holds interpolated coarse grid mub' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mub_fine grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mub_fine(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12400,& 'frame/module_domain.f: Failed to allocate grid%mub_fine(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mub_save').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mub_save(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12411,& 'frame/module_domain.f: Failed to allocate grid%mub_save(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub_save=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mub_save' grid%tail_statevars%DataName = 'MUB_SAVE' grid%tail_statevars%Description = 'nest temp, holds orig fine grid mub' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mub_save grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mub_save(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12461,& 'frame/module_domain.f: Failed to allocate grid%mub_save(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mu0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mu0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12472,& 'frame/module_domain.f: Failed to allocate grid%mu0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mu0' grid%tail_statevars%DataName = 'MU0' grid%tail_statevars%Description = 'initial dry mass in column' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mu0 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mu0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12522,& 'frame/module_domain.f: Failed to allocate grid%mu0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mudf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mudf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12533,& 'frame/module_domain.f: Failed to allocate grid%mudf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mudf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mudf' grid%tail_statevars%DataName = 'MUDF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mudf grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mudf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12583,& 'frame/module_domain.f: Failed to allocate grid%mudf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'muu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%muu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12594,& 'frame/module_domain.f: Failed to allocate grid%muu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'muu' grid%tail_statevars%DataName = 'MUU' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%muu grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%muu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12644,& 'frame/module_domain.f: Failed to allocate grid%muu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'muus').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%muus(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12655,& 'frame/module_domain.f: Failed to allocate grid%muus(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muus=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'muus' grid%tail_statevars%DataName = 'MUUS' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%muus grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%muus(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12705,& 'frame/module_domain.f: Failed to allocate grid%muus(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'muv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%muv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12716,& 'frame/module_domain.f: Failed to allocate grid%muv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'muv' grid%tail_statevars%DataName = 'MUV' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%muv grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%muv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12766,& 'frame/module_domain.f: Failed to allocate grid%muv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'muvs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%muvs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12777,& 'frame/module_domain.f: Failed to allocate grid%muvs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muvs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'muvs' grid%tail_statevars%DataName = 'MUVS' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%muvs grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%muvs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12827,& 'frame/module_domain.f: Failed to allocate grid%muvs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mut').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mut(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12838,& 'frame/module_domain.f: Failed to allocate grid%mut(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mut=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mut' grid%tail_statevars%DataName = 'MUT' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mut grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mut(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12888,& 'frame/module_domain.f: Failed to allocate grid%mut(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'muts').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%muts(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12899,& 'frame/module_domain.f: Failed to allocate grid%muts(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muts=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'muts' grid%tail_statevars%DataName = 'MUTS' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%muts grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%muts(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12949,& 'frame/module_domain.f: Failed to allocate grid%muts(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nest_pos'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nest_pos(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12960,& 'frame/module_domain.f: Failed to allocate grid%nest_pos(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nest_pos=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nest_pos' grid%tail_statevars%DataName = 'NEST_POS' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%nest_pos grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%nest_pos(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13010,& 'frame/module_domain.f: Failed to allocate grid%nest_pos(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nest_mask'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nest_mask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13021,& 'frame/module_domain.f: Failed to allocate grid%nest_mask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nest_mask=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nest_mask' grid%tail_statevars%DataName = 'NEST_MASK' grid%tail_statevars%Description = 'LOCATION OF NEST IF ANY' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%nest_mask grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%nest_mask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13071,& 'frame/module_domain.f: Failed to allocate grid%nest_mask(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_coarse').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_coarse(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13082,& 'frame/module_domain.f: Failed to allocate grid%ht_coarse(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_coarse=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_coarse' grid%tail_statevars%DataName = 'HT_COARSE' grid%tail_statevars%Description = 'STORAGE FOR LOW-RES TERRAIN' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht_coarse grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ht_coarse(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13132,& 'frame/module_domain.f: Failed to allocate grid%ht_coarse(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tke_1').AND.(.NOT.grid%is_intermediate).AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tke_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13143,& 'frame/module_domain.f: Failed to allocate grid%tke_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tke_1' grid%tail_statevars%DataName = 'TKE_1' grid%tail_statevars%Description = 'TURBULENCE KINETIC ENERGY' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 201 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tke_1 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tke_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13193,& 'frame/module_domain.f: Failed to allocate grid%tke_1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tke_2').AND.(.NOT.grid%is_intermediate).AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tke_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13204,& 'frame/module_domain.f: Failed to allocate grid%tke_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tke_2' grid%tail_statevars%DataName = 'TKE_2' grid%tail_statevars%Description = 'TURBULENCE KINETIC ENERGY' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 202 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tke_2 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tke_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13254,& 'frame/module_domain.f: Failed to allocate grid%tke_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nlflux').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nlflux(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13265,& 'frame/module_domain.f: Failed to allocate grid%nlflux(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nlflux=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nlflux' grid%tail_statevars%DataName = 'NLFLUX' grid%tail_statevars%Description = 'PRESCRIBED NONLOCAL HEAT FLUX IN 3DTKE SCHEME' grid%tail_statevars%Units = 'K m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%nlflux grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%nlflux(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13315,& 'frame/module_domain.f: Failed to allocate grid%nlflux(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gamu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gamu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13326,& 'frame/module_domain.f: Failed to allocate grid%gamu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gamu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gamu' grid%tail_statevars%DataName = 'GAMU' grid%tail_statevars%Description = 'NONLOCAL U GAMMA TERM IN 3DTKE SCHEME' grid%tail_statevars%Units = 's-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%gamu grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%gamu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13376,& 'frame/module_domain.f: Failed to allocate grid%gamu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gamv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gamv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13387,& 'frame/module_domain.f: Failed to allocate grid%gamv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gamv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gamv' grid%tail_statevars%DataName = 'GAMV' grid%tail_statevars%Description = 'NONLOCAL V GAMMA TERM IN 3DTKE SCHEME' grid%tail_statevars%Units = 's-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%gamv grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%gamv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13437,& 'frame/module_domain.f: Failed to allocate grid%gamv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dlk').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dlk(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13448,& 'frame/module_domain.f: Failed to allocate grid%dlk(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dlk=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dlk' grid%tail_statevars%DataName = 'DLK' grid%tail_statevars%Description = 'TURBULENT LENGTH SCALE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dlk grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dlk(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13498,& 'frame/module_domain.f: Failed to allocate grid%dlk(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'l_diss').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%l_diss(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13509,& 'frame/module_domain.f: Failed to allocate grid%l_diss(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%l_diss=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'l_diss' grid%tail_statevars%DataName = 'L_DISS' grid%tail_statevars%Description = 'DISSIPATION LENGTH SCALE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%l_diss grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%l_diss(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13559,& 'frame/module_domain.f: Failed to allocate grid%l_diss(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'elmin').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%elmin(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13570,& 'frame/module_domain.f: Failed to allocate grid%elmin(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%elmin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'elmin' grid%tail_statevars%DataName = 'ELMIN' grid%tail_statevars%Description = 'FREE ATMOS LENGTH SCALE (FROM BOULAC SCHEME)' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%elmin grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%elmin(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13620,& 'frame/module_domain.f: Failed to allocate grid%elmin(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xkmv_meso').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xkmv_meso(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13631,& 'frame/module_domain.f: Failed to allocate grid%xkmv_meso(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xkmv_meso=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xkmv_meso' grid%tail_statevars%DataName = 'XKMV_MESO' grid%tail_statevars%Description = 'XKMV AT MESOSCALE LIMIT' grid%tail_statevars%Units = 'm2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%xkmv_meso grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%xkmv_meso(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13681,& 'frame/module_domain.f: Failed to allocate grid%xkmv_meso(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13692,& 'frame/module_domain.f: Failed to allocate grid%p(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'p' grid%tail_statevars%DataName = 'P' grid%tail_statevars%Description = 'perturbation pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%p grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13742,& 'frame/module_domain.f: Failed to allocate grid%p(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'al').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%al(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13753,& 'frame/module_domain.f: Failed to allocate grid%al(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%al=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'al' grid%tail_statevars%DataName = 'AL' grid%tail_statevars%Description = 'inverse perturbation density' grid%tail_statevars%Units = 'm3 kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%al grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%al(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13803,& 'frame/module_domain.f: Failed to allocate grid%al(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13814,& 'frame/module_domain.f: Failed to allocate grid%alt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alt' grid%tail_statevars%DataName = 'ALT' grid%tail_statevars%Description = 'inverse density' grid%tail_statevars%Units = 'm3 kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%alt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%alt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13864,& 'frame/module_domain.f: Failed to allocate grid%alt(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13875,& 'frame/module_domain.f: Failed to allocate grid%alb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alb' grid%tail_statevars%DataName = 'ALB' grid%tail_statevars%Description = 'inverse base density' grid%tail_statevars%Units = 'm3 kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%alb grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%alb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13925,& 'frame/module_domain.f: Failed to allocate grid%alb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zx(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13936,& 'frame/module_domain.f: Failed to allocate grid%zx(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zx' grid%tail_statevars%DataName = 'ZX' grid%tail_statevars%Description = ' ' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'XZ' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%zx grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%zx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13986,& 'frame/module_domain.f: Failed to allocate grid%zx(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zy').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13997,& 'frame/module_domain.f: Failed to allocate grid%zy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zy' grid%tail_statevars%DataName = 'ZY' grid%tail_statevars%Description = ' ' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'YZ' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%zy grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = jde grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( jde, jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%zy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14047,& 'frame/module_domain.f: Failed to allocate grid%zy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rdz').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rdz(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14058,& 'frame/module_domain.f: Failed to allocate grid%rdz(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdz=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rdz' grid%tail_statevars%DataName = 'RDZ' grid%tail_statevars%Description = ' ' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rdz grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rdz(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14108,& 'frame/module_domain.f: Failed to allocate grid%rdz(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rdzw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rdzw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14119,& 'frame/module_domain.f: Failed to allocate grid%rdzw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdzw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rdzw' grid%tail_statevars%DataName = 'RDZW' grid%tail_statevars%Description = ' ' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rdzw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rdzw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14169,& 'frame/module_domain.f: Failed to allocate grid%rdzw(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14180,& 'frame/module_domain.f: Failed to allocate grid%pb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pb' grid%tail_statevars%DataName = 'PB' grid%tail_statevars%Description = 'BASE STATE PRESSURE ' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%pb grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%pb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14230,& 'frame/module_domain.f: Failed to allocate grid%pb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rho').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rho(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14241,& 'frame/module_domain.f: Failed to allocate grid%rho(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rho=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rho' grid%tail_statevars%DataName = 'RHO' grid%tail_statevars%Description = 'DENSITY' grid%tail_statevars%Units = 'Kg m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rho grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rho(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14291,& 'frame/module_domain.f: Failed to allocate grid%rho(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fnm').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%fnm(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14302,& 'frame/module_domain.f: Failed to allocate grid%fnm(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fnm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fnm' grid%tail_statevars%DataName = 'FNM' grid%tail_statevars%Description = 'upper weight for vertical stretching' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%fnm grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%fnm(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14350,& 'frame/module_domain.f: Failed to allocate grid%fnm(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fnp').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%fnp(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14361,& 'frame/module_domain.f: Failed to allocate grid%fnp(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fnp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fnp' grid%tail_statevars%DataName = 'FNP' grid%tail_statevars%Description = 'lower weight for vertical stretching' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%fnp grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%fnp(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14409,& 'frame/module_domain.f: Failed to allocate grid%fnp(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rdnw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%rdnw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14420,& 'frame/module_domain.f: Failed to allocate grid%rdnw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdnw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rdnw' grid%tail_statevars%DataName = 'RDNW' grid%tail_statevars%Description = 'inverse d(eta) values between full (w) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%rdnw grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rdnw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14468,& 'frame/module_domain.f: Failed to allocate grid%rdnw(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rdn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%rdn(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14479,& 'frame/module_domain.f: Failed to allocate grid%rdn(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rdn' grid%tail_statevars%DataName = 'RDN' grid%tail_statevars%Description = 'inverse d(eta) values between half (mass) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%rdn grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rdn(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14527,& 'frame/module_domain.f: Failed to allocate grid%rdn(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dnw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%dnw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14538,& 'frame/module_domain.f: Failed to allocate grid%dnw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dnw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dnw' grid%tail_statevars%DataName = 'DNW' grid%tail_statevars%Description = 'd(eta) values between full (w) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dnw grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dnw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14586,& 'frame/module_domain.f: Failed to allocate grid%dnw(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%dn(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14597,& 'frame/module_domain.f: Failed to allocate grid%dn(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dn' grid%tail_statevars%DataName = 'DN ' grid%tail_statevars%Description = 'd(eta) values between half (mass) levels' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dn grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dn(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14645,& 'frame/module_domain.f: Failed to allocate grid%dn(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_base').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%t_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14656,& 'frame/module_domain.f: Failed to allocate grid%t_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_base=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't_base' grid%tail_statevars%DataName = 'T_BASE' grid%tail_statevars%Description = 'BASE STATE T IN IDEALIZED CASES' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%t_base grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14704,& 'frame/module_domain.f: Failed to allocate grid%t_base(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%z(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14715,& 'frame/module_domain.f: Failed to allocate grid%z(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z' grid%tail_statevars%DataName = 'Z' grid%tail_statevars%Description = ' ' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%z grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%z(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14765,& 'frame/module_domain.f: Failed to allocate grid%z(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z_at_w').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%z_at_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14776,& 'frame/module_domain.f: Failed to allocate grid%z_at_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_at_w=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z_at_w' grid%tail_statevars%DataName = 'Z_AT_W' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%z_at_w grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%z_at_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14826,& 'frame/module_domain.f: Failed to allocate grid%z_at_w(1,1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cfn' grid%tail_statevars%DataName = 'CFN' grid%tail_statevars%Description = 'extrapolation constant' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cfn grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cfn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cfn1' grid%tail_statevars%DataName = 'CFN1' grid%tail_statevars%Description = 'extrapolation constant' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cfn1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cfn1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'step_number' grid%tail_statevars%DataName = 'STEP_NUMBER' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%step_number grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%step_number=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'this_is_an_ideal_run' grid%tail_statevars%DataName = 'THIS_IS_AN_IDEAL_RUN' grid%tail_statevars%Description = 'T/F flag: this is an ARW ideal simulation' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%this_is_an_ideal_run grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%this_is_an_ideal_run=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'stepping_to_time' grid%tail_statevars%DataName = 'STEPPING_TO_TIME' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%stepping_to_time grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%stepping_to_time=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_step_updated' grid%tail_statevars%DataName = 'LAST_STEP_UPDATED' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_step_updated grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_step_updated=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'adapt_step_using_child' grid%tail_statevars%DataName = 'ADAPT_STEP_USING_CHILD' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%adapt_step_using_child grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%adapt_step_using_child=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_dt_sec' grid%tail_statevars%DataName = 'LAST_DT_SEC' grid%tail_statevars%Description = 'Whole seconds for last timestep' grid%tail_statevars%Units = 'sec' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_dt_sec grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_dt_sec=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_dt_sec_num' grid%tail_statevars%DataName = 'LAST_DT_SEC_NUM' grid%tail_statevars%Description = 'Fractional secs, numerator' grid%tail_statevars%Units = 'sec' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_dt_sec_num grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_dt_sec_num=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_dt_sec_den' grid%tail_statevars%DataName = 'LAST_DT_SEC_DEN' grid%tail_statevars%Description = 'Fractional secs, denominator' grid%tail_statevars%Units = 'sec' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_dt_sec_den grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_dt_sec_den=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_dt_yr' grid%tail_statevars%DataName = 'LAST_DT_YR' grid%tail_statevars%Description = 'Relative year' grid%tail_statevars%Units = 'years' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_dt_yr grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_dt_yr=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'last_dt_mm' grid%tail_statevars%DataName = 'LAST_DT_MM' grid%tail_statevars%Description = 'Relative month' grid%tail_statevars%Units = 'months' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%last_dt_mm grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%last_dt_mm=0 IF(okay_to_alloc.AND.in_use_for_config(id,'p_hyd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_hyd(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15065,& 'frame/module_domain.f: Failed to allocate grid%p_hyd(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_hyd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'p_hyd' grid%tail_statevars%DataName = 'P_HYD' grid%tail_statevars%Description = 'hydrostatic pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%p_hyd grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_hyd(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15115,& 'frame/module_domain.f: Failed to allocate grid%p_hyd(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_hyd_w').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_hyd_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15126,& 'frame/module_domain.f: Failed to allocate grid%p_hyd_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_hyd_w=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'p_hyd_w' grid%tail_statevars%DataName = 'P_HYD_W' grid%tail_statevars%Description = 'hydrostatic pressure at full levels' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%p_hyd_w grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_hyd_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15176,& 'frame/module_domain.f: Failed to allocate grid%p_hyd_w(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15187,& 'frame/module_domain.f: Failed to allocate grid%q2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2' grid%tail_statevars%DataName = 'Q2' grid%tail_statevars%Description = 'QV at 2 M' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%q2 grid%tail_statevars%streams(1) = 46137347 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15237,& 'frame/module_domain.f: Failed to allocate grid%q2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15248,& 'frame/module_domain.f: Failed to allocate grid%t2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2' grid%tail_statevars%DataName = 'T2' grid%tail_statevars%Description = 'TEMP at 2 M' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%t2 grid%tail_statevars%streams(1) = 113246211 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15298,& 'frame/module_domain.f: Failed to allocate grid%t2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%th2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15309,& 'frame/module_domain.f: Failed to allocate grid%th2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th2' grid%tail_statevars%DataName = 'TH2' grid%tail_statevars%Description = 'POT TEMP at 2 M' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%th2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%th2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15359,& 'frame/module_domain.f: Failed to allocate grid%th2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'psfc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%psfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15370,& 'frame/module_domain.f: Failed to allocate grid%psfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'psfc' grid%tail_statevars%DataName = 'PSFC' grid%tail_statevars%Description = 'SFC PRESSURE' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%psfc grid%tail_statevars%streams(1) = 100663299 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%psfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15420,& 'frame/module_domain.f: Failed to allocate grid%psfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15431,& 'frame/module_domain.f: Failed to allocate grid%u10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u10' grid%tail_statevars%DataName = 'U10' grid%tail_statevars%Description = 'U at 10 M' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%u10 grid%tail_statevars%streams(1) = 46137347 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15481,& 'frame/module_domain.f: Failed to allocate grid%u10(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15492,& 'frame/module_domain.f: Failed to allocate grid%v10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v10' grid%tail_statevars%DataName = 'V10' grid%tail_statevars%Description = 'V at 10 M' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%v10 grid%tail_statevars%streams(1) = 46137347 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15542,& 'frame/module_domain.f: Failed to allocate grid%v10(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lpi'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lpi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15553,& 'frame/module_domain.f: Failed to allocate grid%lpi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lpi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lpi' grid%tail_statevars%DataName = 'LPI' grid%tail_statevars%Description = 'Lightning Potential Index' grid%tail_statevars%Units = 'm^2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lpi grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lpi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15603,& 'frame/module_domain.f: Failed to allocate grid%lpi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uratx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%uratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15614,& 'frame/module_domain.f: Failed to allocate grid%uratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uratx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uratx' grid%tail_statevars%DataName = 'URATX' grid%tail_statevars%Description = 'Ratio of U over U10 on mass points ' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%uratx grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%uratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15664,& 'frame/module_domain.f: Failed to allocate grid%uratx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vratx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15675,& 'frame/module_domain.f: Failed to allocate grid%vratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vratx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vratx' grid%tail_statevars%DataName = 'VRATX' grid%tail_statevars%Description = 'Ratio of V over V10 on mass points ' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vratx grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15725,& 'frame/module_domain.f: Failed to allocate grid%vratx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tratx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15736,& 'frame/module_domain.f: Failed to allocate grid%tratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tratx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tratx' grid%tail_statevars%DataName = 'TRATX' grid%tail_statevars%Description = 'Ratio of T over TH2 on mass points ' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tratx grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15786,& 'frame/module_domain.f: Failed to allocate grid%tratx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'obs_savwt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_err_flds)-(1)+1))*(((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((model_config_rec%nobs_err_flds)-(1)+1))*(((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%obs_savwt(1:model_config_rec%nobs_err_flds,sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15797,& 'frame/module_domain.f: Failed to allocate grid%obs_savwt(1:model_config_rec%nobs_err_flds,sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%obs_savwt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'obs_savwt' grid%tail_statevars%DataName = 'OBS_SAVWT' grid%tail_statevars%Description = 'Internal space holding weights of each ob, for each i,j,k' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CXZ' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_4d => grid%obs_savwt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%nobs_err_flds grid%tail_statevars%sd2 = ids grid%tail_statevars%ed2 = ide grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%nobs_err_flds grid%tail_statevars%sm2 = ims grid%tail_statevars%em2 = ime grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%nobs_err_flds grid%tail_statevars%sp2 = ips grid%tail_statevars%ep2 = MIN( ide, ipe ) grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = 'west_east_stag' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%obs_savwt(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15846,& 'frame/module_domain.f: Failed to allocate grid%obs_savwt(1,1,1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'rdx' grid%tail_statevars%DataName = 'RDX' grid%tail_statevars%Description = 'INVERSE X GRID LENGTH' grid%tail_statevars%Units = 'm-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%rdx grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%rdx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'rdy' grid%tail_statevars%DataName = 'RDY' grid%tail_statevars%Description = 'INVERSE Y GRID LENGTH' grid%tail_statevars%Units = 'm-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%rdy grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%rdy=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'area2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%area2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15895,& 'frame/module_domain.f: Failed to allocate grid%area2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%area2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'area2d' grid%tail_statevars%DataName = 'AREA2D' grid%tail_statevars%Description = 'Horizontal grid cell area, using dx, dy, and map factors' grid%tail_statevars%Units = 'm2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%area2d grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%area2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15945,& 'frame/module_domain.f: Failed to allocate grid%area2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dx2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dx2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15956,& 'frame/module_domain.f: Failed to allocate grid%dx2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dx2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dx2d' grid%tail_statevars%DataName = 'DX2D' grid%tail_statevars%Description = 'Horizontal grid distance: sqrt(area2d)' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dx2d grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dx2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16006,& 'frame/module_domain.f: Failed to allocate grid%dx2d(1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'dts' grid%tail_statevars%DataName = 'DTS' grid%tail_statevars%Description = 'SMALL TIMESTEP' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%dts grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%dts=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'dtseps' grid%tail_statevars%DataName = 'DTSEPS' grid%tail_statevars%Description = 'TIME WEIGHT CONSTANT FOR SMALL STEPS' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%dtseps grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%dtseps=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'resm' grid%tail_statevars%DataName = 'RESM' grid%tail_statevars%Description = 'TIME WEIGHT CONSTANT FOR SMALL STEPS' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%resm grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%resm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'zetatop' grid%tail_statevars%DataName = 'ZETATOP' grid%tail_statevars%Description = 'ZETA AT MODEL TOP' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%zetatop grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%zetatop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cf1' grid%tail_statevars%DataName = 'CF1' grid%tail_statevars%Description = '2nd order extrapolation constant' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cf1 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cf1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cf2' grid%tail_statevars%DataName = 'CF2' grid%tail_statevars%Description = '2nd order extrapolation constant' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cf2 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cf2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cf3' grid%tail_statevars%DataName = 'CF3' grid%tail_statevars%Description = '2nd order extrapolation constant' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cf3 grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cf3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'number_at_same_level' grid%tail_statevars%DataName = 'NUMBER_AT_SAME_LEVEL' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%number_at_same_level grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%number_at_same_level=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'radtacttime' grid%tail_statevars%DataName = 'RADTACTTIME' grid%tail_statevars%Description = 'RADTACTTIME' grid%tail_statevars%Units = 'LW SW ACTIVATION TIME in s' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%radtacttime grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%radtacttime=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'bldtacttime' grid%tail_statevars%DataName = 'BLDTACTTIME' grid%tail_statevars%Description = 'BLDTACTTIME' grid%tail_statevars%Units = 'PBL ACTIVATION TIME in s' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%bldtacttime grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%bldtacttime=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'cudtacttime' grid%tail_statevars%DataName = 'CUDTACTTIME' grid%tail_statevars%Description = 'CUDTACTTIME' grid%tail_statevars%Units = 'CPS ACTIVATION TIME in s' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%cudtacttime grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%cudtacttime=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ltngacttime' grid%tail_statevars%DataName = 'LTNGACTTIME' grid%tail_statevars%Description = 'LTNGACTTIME' grid%tail_statevars%Units = 'LTNG ACTIVATION TIME in s' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%ltngacttime grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%ltngacttime=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'power').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%power(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16245,& 'frame/module_domain.f: Failed to allocate grid%power(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%power=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'power' grid%tail_statevars%DataName = 'POWER' grid%tail_statevars%Description = 'Power production' grid%tail_statevars%Units = 'W' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%power grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%power(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16295,& 'frame/module_domain.f: Failed to allocate grid%power(1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'itimestep' grid%tail_statevars%DataName = 'ITIMESTEP' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%itimestep grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%itimestep=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'xtime' grid%tail_statevars%DataName = 'XTIME' grid%tail_statevars%Description = 'minutes since YYYY-MM-DD hh:mm:ss' grid%tail_statevars%Units = 'minutes since simulation start' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%xtime grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%xtime=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'julian' grid%tail_statevars%DataName = 'JULIAN' grid%tail_statevars%Description = 'day of year, 0.0 at 0Z on 1 Jan.' grid%tail_statevars%Units = 'days' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%julian grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%julian=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lbc_fid' grid%tail_statevars%DataName = 'LBC_FID' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%lbc_fid grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%lbc_fid=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'tiled' grid%tail_statevars%DataName = 'TILED' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%tiled grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%tiled=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'patched' grid%tail_statevars%DataName = 'PATCHED' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%patched grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%patched=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'press_adj' grid%tail_statevars%DataName = 'PRESS_ADJ' grid%tail_statevars%Description = 'T/F flag adjust mu' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%press_adj grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%press_adj=.FALSE. IF(okay_to_alloc.AND.in_use_for_config(id,'imask_nostag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%imask_nostag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16439,& 'frame/module_domain.f: Failed to allocate grid%imask_nostag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_nostag=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'imask_nostag' grid%tail_statevars%DataName = 'IMASK_NOSTAG' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%imask_nostag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%imask_nostag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16489,& 'frame/module_domain.f: Failed to allocate grid%imask_nostag(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'imask_xstag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%imask_xstag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16500,& 'frame/module_domain.f: Failed to allocate grid%imask_xstag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_xstag=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'imask_xstag' grid%tail_statevars%DataName = 'IMASK_XSTAG' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%imask_xstag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%imask_xstag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16550,& 'frame/module_domain.f: Failed to allocate grid%imask_xstag(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'imask_ystag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%imask_ystag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16561,& 'frame/module_domain.f: Failed to allocate grid%imask_ystag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_ystag=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'imask_ystag' grid%tail_statevars%DataName = 'IMASK_YSTAG' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%imask_ystag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%imask_ystag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16611,& 'frame/module_domain.f: Failed to allocate grid%imask_ystag(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'imask_xystag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%imask_xystag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16622,& 'frame/module_domain.f: Failed to allocate grid%imask_xystag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_xystag=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'imask_xystag' grid%tail_statevars%DataName = 'IMASK_XYSTAG' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'XY' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%imask_xystag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = jde grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%imask_xystag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16672,& 'frame/module_domain.f: Failed to allocate grid%imask_xystag(1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'xi' grid%tail_statevars%DataName = 'XI' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%xi grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%xi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'xj' grid%tail_statevars%DataName = 'XJ' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%xj grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%xj=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'vc_i' grid%tail_statevars%DataName = 'VC_I' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%vc_i grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%vc_i=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'vc_j' grid%tail_statevars%DataName = 'VC_J' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%vc_j grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%vc_j=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'moist'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_moist)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_moist)) * 4 ALLOCATE(grid%moist(sm31:em31,sm32:em32,sm33:em33,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16759,& 'frame/module_domain.f: Failed to allocate grid%moist(sm31:em31,sm32:em32,sm33:em33,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'moist' grid%tail_statevars%DataName = 'MOIST' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%moist grid%tail_statevars%num_table => moist_num_table grid%tail_statevars%index_table => moist_index_table grid%tail_statevars%boundary_table => moist_boundary_table grid%tail_statevars%dname_table => moist_dname_table grid%tail_statevars%desc_table => moist_desc_table grid%tail_statevars%units_table => moist_units_table grid%tail_statevars%streams_table => moist_streams_table grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%moist(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16816,& 'frame/module_domain.f: Failed to allocate grid%moist(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16825,& 'frame/module_domain.f: Failed to allocate grid%moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16833,& 'frame/module_domain.f: Failed to allocate grid%moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16841,& 'frame/module_domain.f: Failed to allocate grid%moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16849,& 'frame/module_domain.f: Failed to allocate grid%moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bye=initial_data_value ELSE ALLOCATE(grid%moist_bxs(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16856,& 'frame/module_domain.f: Failed to allocate grid%moist_bxs(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bxe(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16861,& 'frame/module_domain.f: Failed to allocate grid%moist_bxe(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bys(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16866,& 'frame/module_domain.f: Failed to allocate grid%moist_bys(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bye(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16871,& 'frame/module_domain.f: Failed to allocate grid%moist_bye(1,1,1,num_moist). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16880,& 'frame/module_domain.f: Failed to allocate grid%moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16888,& 'frame/module_domain.f: Failed to allocate grid%moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16896,& 'frame/module_domain.f: Failed to allocate grid%moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * 4 ALLOCATE(grid%moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16904,& 'frame/module_domain.f: Failed to allocate grid%moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btye=initial_data_value ELSE ALLOCATE(grid%moist_btxs(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16911,& 'frame/module_domain.f: Failed to allocate grid%moist_btxs(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btxe(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16916,& 'frame/module_domain.f: Failed to allocate grid%moist_btxe(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btys(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16921,& 'frame/module_domain.f: Failed to allocate grid%moist_btys(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btye(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16926,& 'frame/module_domain.f: Failed to allocate grid%moist_btye(1,1,1,num_moist). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_moist'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_moist)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist(sm31:em31,sm32:em32,sm33:em33,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16937,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist(sm31:em31,sm32:em32,sm33:em33,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_moist' grid%tail_statevars%DataName = 'DFI_MOIST' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%dfi_moist grid%tail_statevars%num_table => dfi_moist_num_table grid%tail_statevars%index_table => dfi_moist_index_table grid%tail_statevars%boundary_table => dfi_moist_boundary_table grid%tail_statevars%dname_table => dfi_moist_dname_table grid%tail_statevars%desc_table => dfi_moist_desc_table grid%tail_statevars%units_table => dfi_moist_units_table grid%tail_statevars%streams_table => dfi_moist_streams_table grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_moist(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16994,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17003,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17011,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17019,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17027,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bye=initial_data_value ELSE ALLOCATE(grid%dfi_moist_bxs(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17034,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxs(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bxe(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17039,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxe(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bys(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17044,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bys(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bye(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17049,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bye(1,1,1,num_dfi_moist). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17058,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17066,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17074,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * 4 ALLOCATE(grid%dfi_moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17082,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btye=initial_data_value ELSE ALLOCATE(grid%dfi_moist_btxs(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17089,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxs(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btxe(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17094,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxe(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btys(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17099,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btys(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btye(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17104,& 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btye(1,1,1,num_dfi_moist). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qvold'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qvold(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17115,& 'frame/module_domain.f: Failed to allocate grid%qvold(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qvold=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qvold' grid%tail_statevars%DataName = 'QVOLD' grid%tail_statevars%Description = 'Water vapor mixing ratio, old time step' grid%tail_statevars%Units = 'kg kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qvold grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qvold(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17165,& 'frame/module_domain.f: Failed to allocate grid%qvold(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rimi').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rimi(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17176,& 'frame/module_domain.f: Failed to allocate grid%rimi(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rimi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rimi' grid%tail_statevars%DataName = 'RIMI' grid%tail_statevars%Description = 'riming intensity' grid%tail_statevars%Units = 'fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rimi grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rimi(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17226,& 'frame/module_domain.f: Failed to allocate grid%rimi(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnwfa2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnwfa2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17237,& 'frame/module_domain.f: Failed to allocate grid%qnwfa2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnwfa2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnwfa2d' grid%tail_statevars%DataName = 'QNWFA2D' grid%tail_statevars%Description = 'Surface aerosol number conc emission' grid%tail_statevars%Units = 'kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%qnwfa2d grid%tail_statevars%streams(1) = 637534209 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qnwfa2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17287,& 'frame/module_domain.f: Failed to allocate grid%qnwfa2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qnifa2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qnifa2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17298,& 'frame/module_domain.f: Failed to allocate grid%qnifa2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qnifa2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qnifa2d' grid%tail_statevars%DataName = 'QNIFA2D' grid%tail_statevars%Description = 'Surface dust number conc emission' grid%tail_statevars%Units = 'kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%qnifa2d grid%tail_statevars%streams(1) = 637534209 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qnifa2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17348,& 'frame/module_domain.f: Failed to allocate grid%qnifa2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_cloud').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_cloud(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17359,& 'frame/module_domain.f: Failed to allocate grid%re_cloud(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_cloud=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_cloud' grid%tail_statevars%DataName = 'RE_CLOUD' grid%tail_statevars%Description = 'Effective radius cloud water' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_cloud grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_cloud(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17409,& 'frame/module_domain.f: Failed to allocate grid%re_cloud(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_ice').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_ice(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17420,& 'frame/module_domain.f: Failed to allocate grid%re_ice(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_ice=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_ice' grid%tail_statevars%DataName = 'RE_ICE' grid%tail_statevars%Description = 'Effective radius cloud ice' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_ice grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_ice(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17470,& 'frame/module_domain.f: Failed to allocate grid%re_ice(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_snow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_snow(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17481,& 'frame/module_domain.f: Failed to allocate grid%re_snow(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_snow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_snow' grid%tail_statevars%DataName = 'RE_SNOW' grid%tail_statevars%Description = 'Effective radius snow' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_snow grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_snow(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17531,& 'frame/module_domain.f: Failed to allocate grid%re_snow(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_cloud_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_cloud_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17542,& 'frame/module_domain.f: Failed to allocate grid%re_cloud_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_cloud_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_cloud_gsfc' grid%tail_statevars%DataName = 'RE_CLOUD_GSFC' grid%tail_statevars%Description = 'Cloud Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_cloud_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_cloud_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17592,& 'frame/module_domain.f: Failed to allocate grid%re_cloud_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_rain_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_rain_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17603,& 'frame/module_domain.f: Failed to allocate grid%re_rain_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_rain_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_rain_gsfc' grid%tail_statevars%DataName = 'RE_RAIN_GSFC' grid%tail_statevars%Description = 'Rain Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_rain_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_rain_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17653,& 'frame/module_domain.f: Failed to allocate grid%re_rain_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_ice_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_ice_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17664,& 'frame/module_domain.f: Failed to allocate grid%re_ice_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_ice_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_ice_gsfc' grid%tail_statevars%DataName = 'RE_ICE_GSFC' grid%tail_statevars%Description = 'Cloud Ice effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_ice_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_ice_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17714,& 'frame/module_domain.f: Failed to allocate grid%re_ice_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_snow_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_snow_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17725,& 'frame/module_domain.f: Failed to allocate grid%re_snow_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_snow_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_snow_gsfc' grid%tail_statevars%DataName = 'RE_SNOW_GSFC' grid%tail_statevars%Description = 'Snow effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_snow_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_snow_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17775,& 'frame/module_domain.f: Failed to allocate grid%re_snow_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_graupel_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_graupel_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17786,& 'frame/module_domain.f: Failed to allocate grid%re_graupel_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_graupel_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_graupel_gsfc' grid%tail_statevars%DataName = 'RE_GRAUPEL_GSFC' grid%tail_statevars%Description = 'Graupel Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_graupel_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_graupel_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17836,& 'frame/module_domain.f: Failed to allocate grid%re_graupel_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_hail_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%re_hail_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17847,& 'frame/module_domain.f: Failed to allocate grid%re_hail_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_hail_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 're_hail_gsfc' grid%tail_statevars%DataName = 'RE_HAIL_GSFC' grid%tail_statevars%Description = 'Hail Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%re_hail_gsfc grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%re_hail_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17897,& 'frame/module_domain.f: Failed to allocate grid%re_hail_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_cloud').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_cloud(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17908,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_cloud(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_cloud=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_cloud' grid%tail_statevars%DataName = 'DFI_RE_CLOUD' grid%tail_statevars%Description = 'DFI Effective radius cloud water' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_cloud grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_cloud(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17958,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_cloud(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_ice').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_ice(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17969,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_ice(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_ice=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_ice' grid%tail_statevars%DataName = 'DFI_RE_ICE' grid%tail_statevars%Description = 'DFI Effective radius cloud ice' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_ice grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_ice(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18019,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_ice(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_snow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_snow(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18030,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_snow(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_snow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_snow' grid%tail_statevars%DataName = 'DFI_RE_SNOW' grid%tail_statevars%Description = 'DFI Effective radius snow' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_snow grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_snow(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18080,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_snow(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_cloud_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_cloud_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18091,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_cloud_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_cloud_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_cloud_gsfc' grid%tail_statevars%DataName = 'DFI_RE_CLOUD_GSFC' grid%tail_statevars%Description = 'DFI Cloud Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_cloud_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_cloud_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18141,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_cloud_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_rain_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_rain_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18152,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_rain_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_rain_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_rain_gsfc' grid%tail_statevars%DataName = 'DFI_RE_RAIN_GSFC' grid%tail_statevars%Description = 'DFI Rain Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_rain_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_rain_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18202,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_rain_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_ice_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_ice_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18213,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_ice_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_ice_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_ice_gsfc' grid%tail_statevars%DataName = 'DFI_RE_ICE_GSFC' grid%tail_statevars%Description = 'DFI Cloud Ice effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_ice_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_ice_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18263,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_ice_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_snow_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_snow_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18274,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_snow_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_snow_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_snow_gsfc' grid%tail_statevars%DataName = 'DFI_RE_SNOW_GSFC' grid%tail_statevars%Description = 'DFI Snow effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_snow_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_snow_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18324,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_snow_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_graupel_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_graupel_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18335,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_graupel_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_graupel_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_graupel_gsfc' grid%tail_statevars%DataName = 'DFI_RE_GRAUPEL_GSFC' grid%tail_statevars%Description = 'DFI Graupel Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_graupel_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_graupel_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18385,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_graupel_gsfc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_re_hail_gsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_re_hail_gsfc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18396,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_hail_gsfc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_re_hail_gsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_re_hail_gsfc' grid%tail_statevars%DataName = 'DFI_RE_HAIL_GSFC' grid%tail_statevars%Description = 'DFI Hail Water effective radius' grid%tail_statevars%Units = 'micron' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_re_hail_gsfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_re_hail_gsfc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18446,& 'frame/module_domain.f: Failed to allocate grid%dfi_re_hail_gsfc(1,1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'has_reqc' grid%tail_statevars%DataName = 'HAS_REQC' grid%tail_statevars%Description = 'Flag for having effective radius cloud water' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%has_reqc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%has_reqc=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'has_reqi' grid%tail_statevars%DataName = 'HAS_REQI' grid%tail_statevars%Description = 'Flag for having effective radius cloud ice' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%has_reqi grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%has_reqi=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'has_reqs' grid%tail_statevars%DataName = 'HAS_REQS' grid%tail_statevars%Description = 'Flag for having effective radius snow' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%has_reqs grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%has_reqs=0 IF(okay_to_alloc.AND.in_use_for_config(id,'scalar'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_scalar)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_scalar)) * 4 ALLOCATE(grid%scalar(sm31:em31,sm32:em32,sm33:em33,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18514,& 'frame/module_domain.f: Failed to allocate grid%scalar(sm31:em31,sm32:em32,sm33:em33,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'scalar' grid%tail_statevars%DataName = 'SCALAR' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%scalar grid%tail_statevars%num_table => scalar_num_table grid%tail_statevars%index_table => scalar_index_table grid%tail_statevars%boundary_table => scalar_boundary_table grid%tail_statevars%dname_table => scalar_dname_table grid%tail_statevars%desc_table => scalar_desc_table grid%tail_statevars%units_table => scalar_units_table grid%tail_statevars%streams_table => scalar_streams_table grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%scalar(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18571,& 'frame/module_domain.f: Failed to allocate grid%scalar(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18580,& 'frame/module_domain.f: Failed to allocate grid%scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18588,& 'frame/module_domain.f: Failed to allocate grid%scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18596,& 'frame/module_domain.f: Failed to allocate grid%scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18604,& 'frame/module_domain.f: Failed to allocate grid%scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bye=initial_data_value ELSE ALLOCATE(grid%scalar_bxs(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18611,& 'frame/module_domain.f: Failed to allocate grid%scalar_bxs(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bxe(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18616,& 'frame/module_domain.f: Failed to allocate grid%scalar_bxe(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bys(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18621,& 'frame/module_domain.f: Failed to allocate grid%scalar_bys(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bye(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18626,& 'frame/module_domain.f: Failed to allocate grid%scalar_bye(1,1,1,num_scalar). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18635,& 'frame/module_domain.f: Failed to allocate grid%scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18643,& 'frame/module_domain.f: Failed to allocate grid%scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18651,& 'frame/module_domain.f: Failed to allocate grid%scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * 4 ALLOCATE(grid%scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18659,& 'frame/module_domain.f: Failed to allocate grid%scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btye=initial_data_value ELSE ALLOCATE(grid%scalar_btxs(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18666,& 'frame/module_domain.f: Failed to allocate grid%scalar_btxs(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btxe(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18671,& 'frame/module_domain.f: Failed to allocate grid%scalar_btxe(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btys(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18676,& 'frame/module_domain.f: Failed to allocate grid%scalar_btys(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btye(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18681,& 'frame/module_domain.f: Failed to allocate grid%scalar_btye(1,1,1,num_scalar). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_scalar'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_scalar)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar(sm31:em31,sm32:em32,sm33:em33,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18692,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar(sm31:em31,sm32:em32,sm33:em33,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_scalar' grid%tail_statevars%DataName = 'DFI_SCALAR' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%dfi_scalar grid%tail_statevars%num_table => dfi_scalar_num_table grid%tail_statevars%index_table => dfi_scalar_index_table grid%tail_statevars%boundary_table => dfi_scalar_boundary_table grid%tail_statevars%dname_table => dfi_scalar_dname_table grid%tail_statevars%desc_table => dfi_scalar_desc_table grid%tail_statevars%units_table => dfi_scalar_units_table grid%tail_statevars%streams_table => dfi_scalar_streams_table grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_scalar(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18749,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18758,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18766,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18774,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18782,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bye=initial_data_value ELSE ALLOCATE(grid%dfi_scalar_bxs(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18789,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxs(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bxe(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18794,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxe(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bys(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18799,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bys(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bye(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18804,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bye(1,1,1,num_dfi_scalar). ') endif ENDIF IF(.TRUE..AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18813,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18821,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18829,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * 4 ALLOCATE(grid%dfi_scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18837,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btye=initial_data_value ELSE ALLOCATE(grid%dfi_scalar_btxs(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18844,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxs(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btxe(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18849,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxe(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btys(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18854,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btys(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btye(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18859,& 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btye(1,1,1,num_dfi_scalar). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fcx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * 4 nba = & ((((model_config_rec%spec_bdy_width)-(1)+1))) * 4 ALLOCATE(grid%fcx(1:model_config_rec%spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18870,& 'frame/module_domain.f: Failed to allocate grid%fcx(1:model_config_rec%spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fcx' grid%tail_statevars%DataName = 'FCX' grid%tail_statevars%Description = 'RELAXATION TERM FOR BOUNDARY ZONE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'C' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%fcx grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%spec_bdy_width grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%spec_bdy_width grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%spec_bdy_width grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%fcx(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18918,& 'frame/module_domain.f: Failed to allocate grid%fcx(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gcx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * 4 nba = & ((((model_config_rec%spec_bdy_width)-(1)+1))) * 4 ALLOCATE(grid%gcx(1:model_config_rec%spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18929,& 'frame/module_domain.f: Failed to allocate grid%gcx(1:model_config_rec%spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gcx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gcx' grid%tail_statevars%DataName = 'GCX' grid%tail_statevars%Description = '2ND RELAXATION TERM FOR BOUNDARY ZONE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'C' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%gcx grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%spec_bdy_width grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%spec_bdy_width grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%spec_bdy_width grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%gcx(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18977,& 'frame/module_domain.f: Failed to allocate grid%gcx(1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'dtbc' grid%tail_statevars%DataName = 'DTBC' grid%tail_statevars%Description = 'TIME SINCE BOUNDARY READ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%dtbc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%dtbc=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'soil_layers').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soil_layers(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19007,& 'frame/module_domain.f: Failed to allocate grid%soil_layers(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soil_layers=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soil_layers' grid%tail_statevars%DataName = 'SOIL_LAYERS' grid%tail_statevars%Description = 'SOIL LAYERS' grid%tail_statevars%Units = 'cm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soil_layers grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soil_layers(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19057,& 'frame/module_domain.f: Failed to allocate grid%soil_layers(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soil_levels').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soil_levels(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19068,& 'frame/module_domain.f: Failed to allocate grid%soil_levels(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soil_levels=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soil_levels' grid%tail_statevars%DataName = 'SOIL_LEVELS' grid%tail_statevars%Description = 'SOIL LEVELS' grid%tail_statevars%Units = 'cm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soil_levels grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soil_levels(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19118,& 'frame/module_domain.f: Failed to allocate grid%soil_levels(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19129,& 'frame/module_domain.f: Failed to allocate grid%st(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st' grid%tail_statevars%DataName = 'ST' grid%tail_statevars%Description = 'SOIL TEMPERATURES' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%st grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%st(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19179,& 'frame/module_domain.f: Failed to allocate grid%st(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19190,& 'frame/module_domain.f: Failed to allocate grid%sm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm' grid%tail_statevars%DataName = 'SM' grid%tail_statevars%Description = 'SOIL MOISTURES' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sm grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19240,& 'frame/module_domain.f: Failed to allocate grid%sm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19251,& 'frame/module_domain.f: Failed to allocate grid%sw(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw' grid%tail_statevars%DataName = 'SW' grid%tail_statevars%Description = 'SOIL LIQUIDS' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sw grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19301,& 'frame/module_domain.f: Failed to allocate grid%sw(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19312,& 'frame/module_domain.f: Failed to allocate grid%soilt(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt' grid%tail_statevars%DataName = 'SOILT' grid%tail_statevars%Description = 'RUC SOIL TEMPERATURES' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soilt grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soilt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19362,& 'frame/module_domain.f: Failed to allocate grid%soilt(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19373,& 'frame/module_domain.f: Failed to allocate grid%soilm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm' grid%tail_statevars%DataName = 'SOILM' grid%tail_statevars%Description = 'RUC SOIL MOISTURES' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soilm grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_metgrid_soil_levels grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_metgrid_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soilm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19423,& 'frame/module_domain.f: Failed to allocate grid%soilm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm000007').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm000007(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19434,& 'frame/module_domain.f: Failed to allocate grid%sm000007(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm000007=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm000007' grid%tail_statevars%DataName = 'SM000007' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm000007 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm000007(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19484,& 'frame/module_domain.f: Failed to allocate grid%sm000007(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm007028').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm007028(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19495,& 'frame/module_domain.f: Failed to allocate grid%sm007028(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm007028=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm007028' grid%tail_statevars%DataName = 'SM007028' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm007028 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm007028(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19545,& 'frame/module_domain.f: Failed to allocate grid%sm007028(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm028100').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm028100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19556,& 'frame/module_domain.f: Failed to allocate grid%sm028100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm028100=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm028100' grid%tail_statevars%DataName = 'SM028100' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm028100 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm028100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19606,& 'frame/module_domain.f: Failed to allocate grid%sm028100(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm100255').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm100255(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19617,& 'frame/module_domain.f: Failed to allocate grid%sm100255(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm100255=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm100255' grid%tail_statevars%DataName = 'SM100255' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm100255 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm100255(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19667,& 'frame/module_domain.f: Failed to allocate grid%sm100255(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st000007').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st000007(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19678,& 'frame/module_domain.f: Failed to allocate grid%st000007(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st000007=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st000007' grid%tail_statevars%DataName = 'ST000007' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st000007 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st000007(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19728,& 'frame/module_domain.f: Failed to allocate grid%st000007(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st007028').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st007028(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19739,& 'frame/module_domain.f: Failed to allocate grid%st007028(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st007028=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st007028' grid%tail_statevars%DataName = 'ST007028' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st007028 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st007028(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19789,& 'frame/module_domain.f: Failed to allocate grid%st007028(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st028100').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st028100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19800,& 'frame/module_domain.f: Failed to allocate grid%st028100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st028100=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st028100' grid%tail_statevars%DataName = 'ST028100' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st028100 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st028100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19850,& 'frame/module_domain.f: Failed to allocate grid%st028100(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st100255').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st100255(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19861,& 'frame/module_domain.f: Failed to allocate grid%st100255(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st100255=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st100255' grid%tail_statevars%DataName = 'ST100255' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st100255 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st100255(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19911,& 'frame/module_domain.f: Failed to allocate grid%st100255(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm000010').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19922,& 'frame/module_domain.f: Failed to allocate grid%sm000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm000010=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm000010' grid%tail_statevars%DataName = 'SM000010' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm000010 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19972,& 'frame/module_domain.f: Failed to allocate grid%sm000010(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm010040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19983,& 'frame/module_domain.f: Failed to allocate grid%sm010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm010040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm010040' grid%tail_statevars%DataName = 'SM010040 ' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm010040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20033,& 'frame/module_domain.f: Failed to allocate grid%sm010040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm040100').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20044,& 'frame/module_domain.f: Failed to allocate grid%sm040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm040100=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm040100' grid%tail_statevars%DataName = 'SM040100 ' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm040100 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20094,& 'frame/module_domain.f: Failed to allocate grid%sm040100(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm100200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20105,& 'frame/module_domain.f: Failed to allocate grid%sm100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm100200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm100200' grid%tail_statevars%DataName = 'SM100200 ' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm100200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20155,& 'frame/module_domain.f: Failed to allocate grid%sm100200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sm010200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sm010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20166,& 'frame/module_domain.f: Failed to allocate grid%sm010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm010200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sm010200' grid%tail_statevars%DataName = 'SM010200' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sm010200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sm010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20216,& 'frame/module_domain.f: Failed to allocate grid%sm010200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm000').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20227,& 'frame/module_domain.f: Failed to allocate grid%soilm000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm000=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm000' grid%tail_statevars%DataName = 'SOILM000' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm000 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20277,& 'frame/module_domain.f: Failed to allocate grid%soilm000(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm005').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20288,& 'frame/module_domain.f: Failed to allocate grid%soilm005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm005=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm005' grid%tail_statevars%DataName = 'SOILM005' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm005 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20338,& 'frame/module_domain.f: Failed to allocate grid%soilm005(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm020').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20349,& 'frame/module_domain.f: Failed to allocate grid%soilm020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm020=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm020' grid%tail_statevars%DataName = 'SOILM020' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm020 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20399,& 'frame/module_domain.f: Failed to allocate grid%soilm020(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20410,& 'frame/module_domain.f: Failed to allocate grid%soilm040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm040' grid%tail_statevars%DataName = 'SOILM040' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20460,& 'frame/module_domain.f: Failed to allocate grid%soilm040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm160').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20471,& 'frame/module_domain.f: Failed to allocate grid%soilm160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm160=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm160' grid%tail_statevars%DataName = 'SOILM160' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm160 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20521,& 'frame/module_domain.f: Failed to allocate grid%soilm160(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilm300').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilm300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20532,& 'frame/module_domain.f: Failed to allocate grid%soilm300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm300=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilm300' grid%tail_statevars%DataName = 'SOILM300' grid%tail_statevars%Description = 'LAYER SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilm300 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilm300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20582,& 'frame/module_domain.f: Failed to allocate grid%soilm300(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw000010').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20593,& 'frame/module_domain.f: Failed to allocate grid%sw000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw000010=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw000010' grid%tail_statevars%DataName = 'SW000010' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sw000010 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sw000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20643,& 'frame/module_domain.f: Failed to allocate grid%sw000010(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw010040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20654,& 'frame/module_domain.f: Failed to allocate grid%sw010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw010040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw010040' grid%tail_statevars%DataName = 'SW010040' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sw010040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sw010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20704,& 'frame/module_domain.f: Failed to allocate grid%sw010040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw040100').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20715,& 'frame/module_domain.f: Failed to allocate grid%sw040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw040100=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw040100' grid%tail_statevars%DataName = 'SW040100' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sw040100 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sw040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20765,& 'frame/module_domain.f: Failed to allocate grid%sw040100(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw100200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20776,& 'frame/module_domain.f: Failed to allocate grid%sw100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw100200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw100200' grid%tail_statevars%DataName = 'SW100200' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sw100200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sw100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20826,& 'frame/module_domain.f: Failed to allocate grid%sw100200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sw010200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sw010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20837,& 'frame/module_domain.f: Failed to allocate grid%sw010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw010200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sw010200' grid%tail_statevars%DataName = 'SW010200' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sw010200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sw010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20887,& 'frame/module_domain.f: Failed to allocate grid%sw010200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw000').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20898,& 'frame/module_domain.f: Failed to allocate grid%soilw000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw000=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw000' grid%tail_statevars%DataName = 'SOILW000' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw000 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20948,& 'frame/module_domain.f: Failed to allocate grid%soilw000(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw005').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20959,& 'frame/module_domain.f: Failed to allocate grid%soilw005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw005=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw005' grid%tail_statevars%DataName = 'SOILW005' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw005 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21009,& 'frame/module_domain.f: Failed to allocate grid%soilw005(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw020').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21020,& 'frame/module_domain.f: Failed to allocate grid%soilw020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw020=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw020' grid%tail_statevars%DataName = 'SOILW020' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw020 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21070,& 'frame/module_domain.f: Failed to allocate grid%soilw020(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21081,& 'frame/module_domain.f: Failed to allocate grid%soilw040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw040' grid%tail_statevars%DataName = 'SOILW040' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21131,& 'frame/module_domain.f: Failed to allocate grid%soilw040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw160').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21142,& 'frame/module_domain.f: Failed to allocate grid%soilw160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw160=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw160' grid%tail_statevars%DataName = 'SOILW160' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw160 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21192,& 'frame/module_domain.f: Failed to allocate grid%soilw160(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilw300').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilw300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21203,& 'frame/module_domain.f: Failed to allocate grid%soilw300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw300=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilw300' grid%tail_statevars%DataName = 'SOILW300' grid%tail_statevars%Description = 'LAYER SOIL LIQUID' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilw300 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilw300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21253,& 'frame/module_domain.f: Failed to allocate grid%soilw300(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st000010').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21264,& 'frame/module_domain.f: Failed to allocate grid%st000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st000010=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st000010' grid%tail_statevars%DataName = 'ST000010' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st000010 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21314,& 'frame/module_domain.f: Failed to allocate grid%st000010(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st010040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21325,& 'frame/module_domain.f: Failed to allocate grid%st010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st010040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st010040' grid%tail_statevars%DataName = 'ST010040' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st010040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21375,& 'frame/module_domain.f: Failed to allocate grid%st010040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st040100').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21386,& 'frame/module_domain.f: Failed to allocate grid%st040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st040100=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st040100' grid%tail_statevars%DataName = 'ST040100' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st040100 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21436,& 'frame/module_domain.f: Failed to allocate grid%st040100(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st100200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21447,& 'frame/module_domain.f: Failed to allocate grid%st100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st100200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st100200' grid%tail_statevars%DataName = 'ST100200' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st100200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21497,& 'frame/module_domain.f: Failed to allocate grid%st100200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'st010200').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%st010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21508,& 'frame/module_domain.f: Failed to allocate grid%st010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st010200=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'st010200' grid%tail_statevars%DataName = 'ST010200' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%st010200 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%st010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21558,& 'frame/module_domain.f: Failed to allocate grid%st010200(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt000').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21569,& 'frame/module_domain.f: Failed to allocate grid%soilt000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt000=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt000' grid%tail_statevars%DataName = 'SOILT000' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt000 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21619,& 'frame/module_domain.f: Failed to allocate grid%soilt000(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt005').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21630,& 'frame/module_domain.f: Failed to allocate grid%soilt005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt005=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt005' grid%tail_statevars%DataName = 'SOILT005' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt005 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21680,& 'frame/module_domain.f: Failed to allocate grid%soilt005(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt020').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21691,& 'frame/module_domain.f: Failed to allocate grid%soilt020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt020=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt020' grid%tail_statevars%DataName = 'SOILT020' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt020 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21741,& 'frame/module_domain.f: Failed to allocate grid%soilt020(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt040').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21752,& 'frame/module_domain.f: Failed to allocate grid%soilt040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt040=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt040' grid%tail_statevars%DataName = 'SOILT040' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt040 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21802,& 'frame/module_domain.f: Failed to allocate grid%soilt040(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt160').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21813,& 'frame/module_domain.f: Failed to allocate grid%soilt160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt160=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt160' grid%tail_statevars%DataName = 'SOILT160' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt160 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21863,& 'frame/module_domain.f: Failed to allocate grid%soilt160(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilt300').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilt300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21874,& 'frame/module_domain.f: Failed to allocate grid%soilt300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt300=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilt300' grid%tail_statevars%DataName = 'SOILT300' grid%tail_statevars%Description = 'LAYER SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilt300 grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilt300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21924,& 'frame/module_domain.f: Failed to allocate grid%soilt300(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'topostdv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%topostdv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21935,& 'frame/module_domain.f: Failed to allocate grid%topostdv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%topostdv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'topostdv' grid%tail_statevars%DataName = 'TOPOSTDV' grid%tail_statevars%Description = 'ELEVATION STD DEV' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%topostdv grid%tail_statevars%streams(1) = 201326592 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%topostdv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21985,& 'frame/module_domain.f: Failed to allocate grid%topostdv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'toposlpx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%toposlpx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21996,& 'frame/module_domain.f: Failed to allocate grid%toposlpx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposlpx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'toposlpx' grid%tail_statevars%DataName = 'TOPOSLPX' grid%tail_statevars%Description = 'ELEVATION X SLOPE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%toposlpx grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%toposlpx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22046,& 'frame/module_domain.f: Failed to allocate grid%toposlpx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'toposlpy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%toposlpy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22057,& 'frame/module_domain.f: Failed to allocate grid%toposlpy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposlpy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'toposlpy' grid%tail_statevars%DataName = 'TOPOSLPY' grid%tail_statevars%Description = 'ELEVATION Y SLOPE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%toposlpy grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%toposlpy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22107,& 'frame/module_domain.f: Failed to allocate grid%toposlpy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slope'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slope(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22118,& 'frame/module_domain.f: Failed to allocate grid%slope(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slope=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slope' grid%tail_statevars%DataName = 'SLOPE' grid%tail_statevars%Description = 'ELEVATION SLOPE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%slope grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%slope(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22168,& 'frame/module_domain.f: Failed to allocate grid%slope(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slp_azi'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slp_azi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22179,& 'frame/module_domain.f: Failed to allocate grid%slp_azi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slp_azi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slp_azi' grid%tail_statevars%DataName = 'SLP_AZI' grid%tail_statevars%Description = 'ELEVATION SLOPE AZIMUTH' grid%tail_statevars%Units = 'rad' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%slp_azi grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%slp_azi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22229,& 'frame/module_domain.f: Failed to allocate grid%slp_azi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shdmax'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shdmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22240,& 'frame/module_domain.f: Failed to allocate grid%shdmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shdmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shdmax' grid%tail_statevars%DataName = 'SHDMAX' grid%tail_statevars%Description = 'ANNUAL MAX VEG FRACTION' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%shdmax grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%shdmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22290,& 'frame/module_domain.f: Failed to allocate grid%shdmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shdmin'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shdmin(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22301,& 'frame/module_domain.f: Failed to allocate grid%shdmin(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shdmin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shdmin' grid%tail_statevars%DataName = 'SHDMIN' grid%tail_statevars%Description = 'ANNUAL MIN VEG FRACTION' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%shdmin grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%shdmin(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22351,& 'frame/module_domain.f: Failed to allocate grid%shdmin(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snoalb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snoalb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22362,& 'frame/module_domain.f: Failed to allocate grid%snoalb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snoalb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snoalb' grid%tail_statevars%DataName = 'SNOALB' grid%tail_statevars%Description = 'ANNUAL MAX SNOW ALBEDO IN FRACTION' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%snoalb grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%snoalb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22412,& 'frame/module_domain.f: Failed to allocate grid%snoalb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'toposoil').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%toposoil(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22423,& 'frame/module_domain.f: Failed to allocate grid%toposoil(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposoil=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'toposoil' grid%tail_statevars%DataName = 'SOILHGT' grid%tail_statevars%Description = 'ELEVATION OF LSM DATA' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%toposoil grid%tail_statevars%streams(1) = 201326592 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%toposoil(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22473,& 'frame/module_domain.f: Failed to allocate grid%toposoil(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'landusef'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_land_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_land_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%landusef(sm31:em31,1:model_config_rec%num_land_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22484,& 'frame/module_domain.f: Failed to allocate grid%landusef(sm31:em31,1:model_config_rec%num_land_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%landusef=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'landusef' grid%tail_statevars%DataName = 'LANDUSEF' grid%tail_statevars%Description = 'LANDUSE FRACTION BY CATEGORY' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%landusef grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_land_cat grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_land_cat grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_land_cat grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'land_cat_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%landusef(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22534,& 'frame/module_domain.f: Failed to allocate grid%landusef(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilctop'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilctop(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22545,& 'frame/module_domain.f: Failed to allocate grid%soilctop(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilctop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilctop' grid%tail_statevars%DataName = 'SOILCTOP' grid%tail_statevars%Description = 'SOIL CAT FRACTION (TOP)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soilctop grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_cat grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_cat grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_cat grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_cat_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soilctop(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22595,& 'frame/module_domain.f: Failed to allocate grid%soilctop(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcbot'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcbot(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22606,& 'frame/module_domain.f: Failed to allocate grid%soilcbot(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcbot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcbot' grid%tail_statevars%DataName = 'SOILCBOT' grid%tail_statevars%Description = 'SOIL CAT FRACTION (BOTTOM)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%soilcbot grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_cat grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_cat grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_cat grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_cat_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soilcbot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22656,& 'frame/module_domain.f: Failed to allocate grid%soilcbot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcat').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22667,& 'frame/module_domain.f: Failed to allocate grid%soilcat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcat' grid%tail_statevars%DataName = 'SOILCAT' grid%tail_statevars%Description = 'SOIL CAT DOMINANT TYPE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilcat grid%tail_statevars%streams(1) = 201326592 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soilcat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22717,& 'frame/module_domain.f: Failed to allocate grid%soilcat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vegcat').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vegcat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22728,& 'frame/module_domain.f: Failed to allocate grid%vegcat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegcat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vegcat' grid%tail_statevars%DataName = 'VEGCAT' grid%tail_statevars%Description = 'VEGETATION CAT DOMINANT TYPE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vegcat grid%tail_statevars%streams(1) = 201326592 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vegcat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22778,& 'frame/module_domain.f: Failed to allocate grid%vegcat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'irrigation'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%irrigation(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22789,& 'frame/module_domain.f: Failed to allocate grid%irrigation(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%irrigation=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'irrigation' grid%tail_statevars%DataName = 'IRRIGATION' grid%tail_statevars%Description = 'irrigated land percentage' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%irrigation grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%irrigation(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22839,& 'frame/module_domain.f: Failed to allocate grid%irrigation(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'irr_rand_field'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%irr_rand_field(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22850,& 'frame/module_domain.f: Failed to allocate grid%irr_rand_field(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%irr_rand_field=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'irr_rand_field' grid%tail_statevars%DataName = 'IRR_PH_FIELD' grid%tail_statevars%Description = 'irrigated land percentage' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%irr_rand_field grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%irr_rand_field(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22900,& 'frame/module_domain.f: Failed to allocate grid%irr_rand_field(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tslb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22911,& 'frame/module_domain.f: Failed to allocate grid%tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tslb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tslb' grid%tail_statevars%DataName = 'TSLB' grid%tail_statevars%Description = 'SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tslb grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tslb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22961,& 'frame/module_domain.f: Failed to allocate grid%tslb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_hour').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_hour(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22972,& 'frame/module_domain.f: Failed to allocate grid%ts_hour(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_hour=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_hour' grid%tail_statevars%DataName = 'TS_HOUR' grid%tail_statevars%Description = 'Model integration time, hours' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_hour grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_hour(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23020,& 'frame/module_domain.f: Failed to allocate grid%ts_hour(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_u').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_u(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23031,& 'frame/module_domain.f: Failed to allocate grid%ts_u(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_u' grid%tail_statevars%DataName = 'TS_U' grid%tail_statevars%Description = 'Surface wind U-component, earth-relative' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_u grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_u(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23079,& 'frame/module_domain.f: Failed to allocate grid%ts_u(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_v').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_v(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23090,& 'frame/module_domain.f: Failed to allocate grid%ts_v(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_v' grid%tail_statevars%DataName = 'TS_V' grid%tail_statevars%Description = 'Surface wind V-component, earth-relative' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_v grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_v(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23138,& 'frame/module_domain.f: Failed to allocate grid%ts_v(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_q').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_q(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23149,& 'frame/module_domain.f: Failed to allocate grid%ts_q(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_q=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_q' grid%tail_statevars%DataName = 'TS_Q' grid%tail_statevars%Description = 'Surface mixing ratio' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_q grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_q(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23197,& 'frame/module_domain.f: Failed to allocate grid%ts_q(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_t').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_t(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23208,& 'frame/module_domain.f: Failed to allocate grid%ts_t(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_t=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_t' grid%tail_statevars%DataName = 'TS_T' grid%tail_statevars%Description = 'Surface temperature' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_t grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_t(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23256,& 'frame/module_domain.f: Failed to allocate grid%ts_t(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_psfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_psfc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23267,& 'frame/module_domain.f: Failed to allocate grid%ts_psfc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_psfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_psfc' grid%tail_statevars%DataName = 'TS_PSFC' grid%tail_statevars%Description = 'Surface pressure' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_psfc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_psfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23315,& 'frame/module_domain.f: Failed to allocate grid%ts_psfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_glw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_glw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23326,& 'frame/module_domain.f: Failed to allocate grid%ts_glw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_glw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_glw' grid%tail_statevars%DataName = 'TS_GLW' grid%tail_statevars%Description = 'Downward long wave flux at surface' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_glw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_glw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23374,& 'frame/module_domain.f: Failed to allocate grid%ts_glw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_gsw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_gsw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23385,& 'frame/module_domain.f: Failed to allocate grid%ts_gsw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_gsw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_gsw' grid%tail_statevars%DataName = 'TS_GSW' grid%tail_statevars%Description = 'Net short wave flux at surface' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_gsw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_gsw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23433,& 'frame/module_domain.f: Failed to allocate grid%ts_gsw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_hfx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_hfx(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23444,& 'frame/module_domain.f: Failed to allocate grid%ts_hfx(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_hfx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_hfx' grid%tail_statevars%DataName = 'TS_HFX' grid%tail_statevars%Description = 'Upward heat flux at surface' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_hfx grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_hfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23492,& 'frame/module_domain.f: Failed to allocate grid%ts_hfx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_lh').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_lh(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23503,& 'frame/module_domain.f: Failed to allocate grid%ts_lh(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_lh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_lh' grid%tail_statevars%DataName = 'TS_LH' grid%tail_statevars%Description = 'Upward moisture flux at surface' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_lh grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_lh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23551,& 'frame/module_domain.f: Failed to allocate grid%ts_lh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tsk').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_tsk(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23562,& 'frame/module_domain.f: Failed to allocate grid%ts_tsk(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_tsk=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_tsk' grid%tail_statevars%DataName = 'TS_TSK' grid%tail_statevars%Description = 'Skin temperature' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_tsk grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23610,& 'frame/module_domain.f: Failed to allocate grid%ts_tsk(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tslb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_tslb(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23621,& 'frame/module_domain.f: Failed to allocate grid%ts_tslb(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_tslb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_tslb' grid%tail_statevars%DataName = 'TS_TSLB' grid%tail_statevars%Description = 'Soil temperature' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_tslb grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_tslb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23669,& 'frame/module_domain.f: Failed to allocate grid%ts_tslb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_clw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_clw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23680,& 'frame/module_domain.f: Failed to allocate grid%ts_clw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_clw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_clw' grid%tail_statevars%DataName = 'TS_CLW' grid%tail_statevars%Description = 'Column integrated cloud water' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_clw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_clw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23728,& 'frame/module_domain.f: Failed to allocate grid%ts_clw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_rainc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_rainc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23739,& 'frame/module_domain.f: Failed to allocate grid%ts_rainc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_rainc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_rainc' grid%tail_statevars%DataName = 'TS_RAINC' grid%tail_statevars%Description = 'Cumulus precip' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_rainc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23787,& 'frame/module_domain.f: Failed to allocate grid%ts_rainc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_rainnc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * 4 ALLOCATE(grid%ts_rainnc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23798,& 'frame/module_domain.f: Failed to allocate grid%ts_rainnc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_rainnc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_rainnc' grid%tail_statevars%DataName = 'TS_RAINNC' grid%tail_statevars%Description = 'Grid-scale precip' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CC' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_rainnc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23846,& 'frame/module_domain.f: Failed to allocate grid%ts_rainnc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_u_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_u_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23857,& 'frame/module_domain.f: Failed to allocate grid%ts_u_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_u_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_u_profile' grid%tail_statevars%DataName = 'TS_U_PROFILE' grid%tail_statevars%Description = 'Wind u-Component, earth relative, vertical profile' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_u_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_u_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23905,& 'frame/module_domain.f: Failed to allocate grid%ts_u_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_v_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_v_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23916,& 'frame/module_domain.f: Failed to allocate grid%ts_v_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_v_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_v_profile' grid%tail_statevars%DataName = 'TS_V_PROFILE' grid%tail_statevars%Description = 'Wind v-Component, earth relative, vertical profile' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_v_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_v_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23964,& 'frame/module_domain.f: Failed to allocate grid%ts_v_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_w_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_w_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23975,& 'frame/module_domain.f: Failed to allocate grid%ts_w_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_w_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_w_profile' grid%tail_statevars%DataName = 'TS_W_PROFILE' grid%tail_statevars%Description = 'Wind w-Component, vertical profile' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_w_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_w_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24023,& 'frame/module_domain.f: Failed to allocate grid%ts_w_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_gph_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_gph_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24034,& 'frame/module_domain.f: Failed to allocate grid%ts_gph_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_gph_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_gph_profile' grid%tail_statevars%DataName = 'TS_GPH_PROFILE' grid%tail_statevars%Description = 'Total geopotential height, vertical profile' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_gph_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_gph_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24082,& 'frame/module_domain.f: Failed to allocate grid%ts_gph_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_th_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_th_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24093,& 'frame/module_domain.f: Failed to allocate grid%ts_th_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_th_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_th_profile' grid%tail_statevars%DataName = 'TS_TH_PROFILE' grid%tail_statevars%Description = 'Total potential temperature, vertical profile' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_th_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_th_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24141,& 'frame/module_domain.f: Failed to allocate grid%ts_th_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_qv_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_qv_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24152,& 'frame/module_domain.f: Failed to allocate grid%ts_qv_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_qv_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_qv_profile' grid%tail_statevars%DataName = 'TS_QV_PROFILE' grid%tail_statevars%Description = 'Water vapor mixing ratio, vertical profile' grid%tail_statevars%Units = 'kg/kg' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_qv_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_qv_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24200,& 'frame/module_domain.f: Failed to allocate grid%ts_qv_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_p_profile').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 nba = & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))*(((em32)-(sm32)+1))) * 4 ALLOCATE(grid%ts_p_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24211,& 'frame/module_domain.f: Failed to allocate grid%ts_p_profile(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs,sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_p_profile=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_p_profile' grid%tail_statevars%DataName = 'TS_P_PROFILE' grid%tail_statevars%Description = 'Pressure, vertical profile' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'CCZ' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%ts_p_profile grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%ts_buf_size grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%max_ts_locs grid%tail_statevars%sd3 = kds grid%tail_statevars%ed3 = (kde-1) grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%ts_buf_size grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%max_ts_locs grid%tail_statevars%sm3 = kms grid%tail_statevars%em3 = kme grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%ts_buf_size grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%max_ts_locs grid%tail_statevars%sp3 = kps grid%tail_statevars%ep3 = MIN( (kde-1), kpe ) grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = 'bottom_top' ENDIF ELSE ALLOCATE(grid%ts_p_profile(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24259,& 'frame/module_domain.f: Failed to allocate grid%ts_p_profile(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%dzr(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24270,& 'frame/module_domain.f: Failed to allocate grid%dzr(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzr' grid%tail_statevars%DataName = 'DZR' grid%tail_statevars%Description = 'THICKNESSES OF ROOF LAYERS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dzr grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'soil_layers_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dzr(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24318,& 'frame/module_domain.f: Failed to allocate grid%dzr(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%dzb(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24329,& 'frame/module_domain.f: Failed to allocate grid%dzb(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzb' grid%tail_statevars%DataName = 'DZB' grid%tail_statevars%Description = 'THICKNESSES OF WALL LAYERS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dzb grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'soil_layers_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dzb(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24377,& 'frame/module_domain.f: Failed to allocate grid%dzb(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzg').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 nba = & ((((model_config_rec%num_soil_layers)-(1)+1))) * 4 ALLOCATE(grid%dzg(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24388,& 'frame/module_domain.f: Failed to allocate grid%dzg(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzg' grid%tail_statevars%DataName = 'DZG' grid%tail_statevars%Description = 'THICKNESSES OF ROAD LAYERS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%dzg grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_soil_layers grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%num_soil_layers grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%num_soil_layers grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'soil_layers_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dzg(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24436,& 'frame/module_domain.f: Failed to allocate grid%dzg(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'urb_param').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((132)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((132)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%urb_param(sm31:em31,1:132,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24447,& 'frame/module_domain.f: Failed to allocate grid%urb_param(sm31:em31,1:132,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%urb_param=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'urb_param' grid%tail_statevars%DataName = 'URB_PARAM' grid%tail_statevars%Description = 'NUDAPT_NBSD Urban Parameters' grid%tail_statevars%Units = 'parameter' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%urb_param grid%tail_statevars%streams(1) = 67108864 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 132 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 132 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 132 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_urb_params' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%urb_param(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24497,& 'frame/module_domain.f: Failed to allocate grid%urb_param(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lp_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lp_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24508,& 'frame/module_domain.f: Failed to allocate grid%lp_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lp_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lp_urb2d' grid%tail_statevars%DataName = 'BUILD_AREA_FRACTION' grid%tail_statevars%Description = 'BUILDING PLAN AREA DENSITY' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lp_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lp_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24558,& 'frame/module_domain.f: Failed to allocate grid%lp_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hi_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_hi)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_hi)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hi_urb2d(sm31:em31,1:model_config_rec%num_urban_hi,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24569,& 'frame/module_domain.f: Failed to allocate grid%hi_urb2d(sm31:em31,1:model_config_rec%num_urban_hi,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hi_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hi_urb2d' grid%tail_statevars%DataName = 'HEIGHT_HISTOGRAMS' grid%tail_statevars%Description = 'DISTRIBUTION OF BUILDING HEIGHTS' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%hi_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_urban_hi grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_urban_hi grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_urban_hi grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_vertical_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%hi_urb2d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24619,& 'frame/module_domain.f: Failed to allocate grid%hi_urb2d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lb_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24630,& 'frame/module_domain.f: Failed to allocate grid%lb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lb_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lb_urb2d' grid%tail_statevars%DataName = 'BUILD_SURF_RATIO' grid%tail_statevars%Description = 'BUILDING SURFACE AREA TO PLAN AREA RATIO' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lb_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24680,& 'frame/module_domain.f: Failed to allocate grid%lb_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hgt_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hgt_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24691,& 'frame/module_domain.f: Failed to allocate grid%hgt_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hgt_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hgt_urb2d' grid%tail_statevars%DataName = 'BUILD_HEIGHT' grid%tail_statevars%Description = 'AVERAGE BUILDING HEIGHT WEIGHTED BY BUILDING PLAN AREA' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%hgt_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%hgt_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24741,& 'frame/module_domain.f: Failed to allocate grid%hgt_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mh_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24752,& 'frame/module_domain.f: Failed to allocate grid%mh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mh_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mh_urb2d' grid%tail_statevars%DataName = 'MH_URB2D' grid%tail_statevars%Description = 'Mean Building Height' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%mh_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%mh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24802,& 'frame/module_domain.f: Failed to allocate grid%mh_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'stdh_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%stdh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24813,& 'frame/module_domain.f: Failed to allocate grid%stdh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%stdh_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'stdh_urb2d' grid%tail_statevars%DataName = 'STDH_URB2D' grid%tail_statevars%Description = 'Standard Deviation of Building Height' grid%tail_statevars%Units = 'm2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%stdh_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%stdh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24863,& 'frame/module_domain.f: Failed to allocate grid%stdh_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lf_urb2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((4)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((4)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lf_urb2d(sm31:em31,1:4,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24874,& 'frame/module_domain.f: Failed to allocate grid%lf_urb2d(sm31:em31,1:4,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lf_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lf_urb2d' grid%tail_statevars%DataName = 'LF_URB2D' grid%tail_statevars%Description = 'Frontal Area Index' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%lf_urb2d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 4 grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 4 grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 4 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_wind_directions_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lf_urb2d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24924,& 'frame/module_domain.f: Failed to allocate grid%lf_urb2d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smois'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24935,& 'frame/module_domain.f: Failed to allocate grid%smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smois=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smois' grid%tail_statevars%DataName = 'SMOIS' grid%tail_statevars%Description = 'SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%smois grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%smois(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24985,& 'frame/module_domain.f: Failed to allocate grid%smois(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sh2o'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sh2o(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24996,& 'frame/module_domain.f: Failed to allocate grid%sh2o(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh2o=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sh2o' grid%tail_statevars%DataName = 'SH2O' grid%tail_statevars%Description = 'SOIL LIQUID WATER' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sh2o grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sh2o(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25046,& 'frame/module_domain.f: Failed to allocate grid%sh2o(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smcrel'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smcrel(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25057,& 'frame/module_domain.f: Failed to allocate grid%smcrel(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smcrel=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smcrel' grid%tail_statevars%DataName = 'SMCREL' grid%tail_statevars%Description = 'RELATIVE SOIL MOISTURE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%smcrel grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%smcrel(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25107,& 'frame/module_domain.f: Failed to allocate grid%smcrel(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xice'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xice(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25118,& 'frame/module_domain.f: Failed to allocate grid%xice(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xice=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xice' grid%tail_statevars%DataName = 'SEAICE' grid%tail_statevars%Description = 'SEA ICE FLAG' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xice grid%tail_statevars%streams(1) = 771751937 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xice(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25168,& 'frame/module_domain.f: Failed to allocate grid%xice(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icedepth'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%icedepth(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25179,& 'frame/module_domain.f: Failed to allocate grid%icedepth(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icedepth=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icedepth' grid%tail_statevars%DataName = 'ICEDEPTH' grid%tail_statevars%Description = 'SEA ICE THICKNESS' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%icedepth grid%tail_statevars%streams(1) = 771751937 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%icedepth(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25229,& 'frame/module_domain.f: Failed to allocate grid%icedepth(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xicem'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xicem(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25240,& 'frame/module_domain.f: Failed to allocate grid%xicem(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xicem=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xicem' grid%tail_statevars%DataName = 'XICEM' grid%tail_statevars%Description = 'SEA ICE FLAG (PREVIOUS STEP)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xicem grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xicem(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25290,& 'frame/module_domain.f: Failed to allocate grid%xicem(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'albsi'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%albsi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25301,& 'frame/module_domain.f: Failed to allocate grid%albsi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albsi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'albsi' grid%tail_statevars%DataName = 'ALBSI' grid%tail_statevars%Description = 'SEA ICE ALBEDO' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%albsi grid%tail_statevars%streams(1) = 771751937 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%albsi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25351,& 'frame/module_domain.f: Failed to allocate grid%albsi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowsi'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowsi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25362,& 'frame/module_domain.f: Failed to allocate grid%snowsi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowsi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowsi' grid%tail_statevars%DataName = 'SNOWSI' grid%tail_statevars%Description = 'SNOW DEPTH ON SEA ICE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%snowsi grid%tail_statevars%streams(1) = 771751937 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%snowsi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25412,& 'frame/module_domain.f: Failed to allocate grid%snowsi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smstav'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smstav(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25423,& 'frame/module_domain.f: Failed to allocate grid%smstav(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smstav=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smstav' grid%tail_statevars%DataName = 'SMSTAV' grid%tail_statevars%Description = 'MOISTURE AVAILABILITY' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%smstav grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%smstav(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25473,& 'frame/module_domain.f: Failed to allocate grid%smstav(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smstot').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smstot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25484,& 'frame/module_domain.f: Failed to allocate grid%smstot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smstot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smstot' grid%tail_statevars%DataName = 'SMSTOT' grid%tail_statevars%Description = 'TOTAL SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%smstot grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%smstot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25534,& 'frame/module_domain.f: Failed to allocate grid%smstot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soldrain').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soldrain(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25545,& 'frame/module_domain.f: Failed to allocate grid%soldrain(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soldrain=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soldrain' grid%tail_statevars%DataName = 'SOLDRAIN' grid%tail_statevars%Description = 'soil column drainage' grid%tail_statevars%Units = 'mm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soldrain grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%soldrain(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25595,& 'frame/module_domain.f: Failed to allocate grid%soldrain(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfcheadrt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfcheadrt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25606,& 'frame/module_domain.f: Failed to allocate grid%sfcheadrt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcheadrt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfcheadrt' grid%tail_statevars%DataName = 'SFCHEADRT' grid%tail_statevars%Description = 'surface water depth' grid%tail_statevars%Units = 'mm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sfcheadrt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sfcheadrt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25656,& 'frame/module_domain.f: Failed to allocate grid%sfcheadrt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'infxsrt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%infxsrt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25667,& 'frame/module_domain.f: Failed to allocate grid%infxsrt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%infxsrt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'infxsrt' grid%tail_statevars%DataName = 'INFXSRT' grid%tail_statevars%Description = 'time step infiltration excess' grid%tail_statevars%Units = 'mm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%infxsrt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%infxsrt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25717,& 'frame/module_domain.f: Failed to allocate grid%infxsrt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfcrunoff'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfcrunoff(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25728,& 'frame/module_domain.f: Failed to allocate grid%sfcrunoff(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcrunoff=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfcrunoff' grid%tail_statevars%DataName = 'SFROFF' grid%tail_statevars%Description = 'SURFACE RUNOFF' grid%tail_statevars%Units = 'mm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sfcrunoff grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sfcrunoff(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25778,& 'frame/module_domain.f: Failed to allocate grid%sfcrunoff(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'udrunoff'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%udrunoff(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25789,& 'frame/module_domain.f: Failed to allocate grid%udrunoff(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%udrunoff=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'udrunoff' grid%tail_statevars%DataName = 'UDROFF' grid%tail_statevars%Description = 'UNDERGROUND RUNOFF' grid%tail_statevars%Units = 'mm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%udrunoff grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%udrunoff(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25839,& 'frame/module_domain.f: Failed to allocate grid%udrunoff(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ivgtyp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ivgtyp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25850,& 'frame/module_domain.f: Failed to allocate grid%ivgtyp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ivgtyp=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ivgtyp' grid%tail_statevars%DataName = 'IVGTYP' grid%tail_statevars%Description = 'DOMINANT VEGETATION CATEGORY' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%ivgtyp grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ivgtyp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25900,& 'frame/module_domain.f: Failed to allocate grid%ivgtyp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'isltyp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%isltyp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25911,& 'frame/module_domain.f: Failed to allocate grid%isltyp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%isltyp=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'isltyp' grid%tail_statevars%DataName = 'ISLTYP' grid%tail_statevars%Description = 'DOMINANT SOIL CATEGORY' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%isltyp grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%isltyp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25961,& 'frame/module_domain.f: Failed to allocate grid%isltyp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vegfra'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vegfra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25972,& 'frame/module_domain.f: Failed to allocate grid%vegfra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegfra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vegfra' grid%tail_statevars%DataName = 'VEGFRA' grid%tail_statevars%Description = 'VEGETATION FRACTION' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vegfra grid%tail_statevars%streams(1) = 704643073 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vegfra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26022,& 'frame/module_domain.f: Failed to allocate grid%vegfra(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfcevp').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfcevp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26033,& 'frame/module_domain.f: Failed to allocate grid%sfcevp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcevp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfcevp' grid%tail_statevars%DataName = 'SFCEVP' grid%tail_statevars%Description = 'ACCUMULATED SURFACE EVAPORATION' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sfcevp grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sfcevp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26083,& 'frame/module_domain.f: Failed to allocate grid%sfcevp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'grdflx').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%grdflx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26094,& 'frame/module_domain.f: Failed to allocate grid%grdflx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grdflx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'grdflx' grid%tail_statevars%DataName = 'GRDFLX' grid%tail_statevars%Description = 'GROUND HEAT FLUX' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%grdflx grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%grdflx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26144,& 'frame/module_domain.f: Failed to allocate grid%grdflx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acgrdflx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acgrdflx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26155,& 'frame/module_domain.f: Failed to allocate grid%acgrdflx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acgrdflx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acgrdflx' grid%tail_statevars%DataName = 'ACGRDFLX' grid%tail_statevars%Description = 'ACCUMULATED GROUND HEAT FLUX' grid%tail_statevars%Units = 'J m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acgrdflx grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%acgrdflx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26205,& 'frame/module_domain.f: Failed to allocate grid%acgrdflx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfcexc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfcexc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26216,& 'frame/module_domain.f: Failed to allocate grid%sfcexc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcexc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfcexc' grid%tail_statevars%DataName = 'SFCEXC ' grid%tail_statevars%Description = 'SURFACE EXCHANGE COEFFICIENT' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sfcexc grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sfcexc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26266,& 'frame/module_domain.f: Failed to allocate grid%sfcexc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acsnow'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acsnow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26277,& 'frame/module_domain.f: Failed to allocate grid%acsnow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acsnow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acsnow' grid%tail_statevars%DataName = 'ACSNOW' grid%tail_statevars%Description = 'ACCUMULATED SNOW' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acsnow grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%acsnow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26327,& 'frame/module_domain.f: Failed to allocate grid%acsnow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acrunoff'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acrunoff(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26338,& 'frame/module_domain.f: Failed to allocate grid%acrunoff(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acrunoff=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acrunoff' grid%tail_statevars%DataName = 'ACRUNOFF' grid%tail_statevars%Description = 'ACCUMULATED RUNOFF' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acrunoff grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%acrunoff(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26388,& 'frame/module_domain.f: Failed to allocate grid%acrunoff(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acsnom'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acsnom(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26399,& 'frame/module_domain.f: Failed to allocate grid%acsnom(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acsnom=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acsnom' grid%tail_statevars%DataName = 'ACSNOM' grid%tail_statevars%Description = 'ACCUMULATED MELTED SNOW' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acsnom grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%acsnom(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26449,& 'frame/module_domain.f: Failed to allocate grid%acsnom(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snow'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26460,& 'frame/module_domain.f: Failed to allocate grid%snow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snow' grid%tail_statevars%DataName = 'SNOW' grid%tail_statevars%Description = 'SNOW WATER EQUIVALENT' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%snow grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%snow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26510,& 'frame/module_domain.f: Failed to allocate grid%snow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowh'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26521,& 'frame/module_domain.f: Failed to allocate grid%snowh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowh' grid%tail_statevars%DataName = 'SNOWH' grid%tail_statevars%Description = 'PHYSICAL SNOW DEPTH' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%snowh grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%snowh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26571,& 'frame/module_domain.f: Failed to allocate grid%snowh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'canwat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%canwat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26582,& 'frame/module_domain.f: Failed to allocate grid%canwat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canwat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'canwat' grid%tail_statevars%DataName = 'CANWAT' grid%tail_statevars%Description = 'CANOPY WATER' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%canwat grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%canwat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26632,& 'frame/module_domain.f: Failed to allocate grid%canwat(1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ifndsnowh' grid%tail_statevars%DataName = 'FNDSNOWH' grid%tail_statevars%Description = 'SNOWH_LOGICAL' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%ifndsnowh grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%ifndsnowh=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ifndsoilw' grid%tail_statevars%DataName = 'FNDSOILW' grid%tail_statevars%Description = 'SOILW_LOGICAL' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%ifndsoilw grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%ifndsoilw=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ifndalbsi' grid%tail_statevars%DataName = 'FNDALBSI' grid%tail_statevars%Description = 'ALBSI_LOGICAL' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%ifndalbsi grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%ifndalbsi=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ifndsnowsi' grid%tail_statevars%DataName = 'FNDSNOWSI' grid%tail_statevars%Description = 'SNOWSI_LOGICAL' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%ifndsnowsi grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%ifndsnowsi=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'ifndicedepth' grid%tail_statevars%DataName = 'FNDICEDEPTH' grid%tail_statevars%Description = 'ICEDEPTH_LOGICAL' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%ifndicedepth grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%ifndicedepth=0 IF(okay_to_alloc.AND.in_use_for_config(id,'xlaidyn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xlaidyn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26738,& 'frame/module_domain.f: Failed to allocate grid%xlaidyn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlaidyn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xlaidyn' grid%tail_statevars%DataName = 'XLAIDYN' grid%tail_statevars%Description = 'Noah Dynamic LEAF AREA INDEX' grid%tail_statevars%Units = 'm-2/m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xlaidyn grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xlaidyn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26788,& 'frame/module_domain.f: Failed to allocate grid%xlaidyn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sstsk'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sstsk(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26799,& 'frame/module_domain.f: Failed to allocate grid%sstsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sstsk=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sstsk' grid%tail_statevars%DataName = 'SSTSK' grid%tail_statevars%Description = 'SKIN SEA SURFACE TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sstsk grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sstsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26849,& 'frame/module_domain.f: Failed to allocate grid%sstsk(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lake_depth'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lake_depth(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26860,& 'frame/module_domain.f: Failed to allocate grid%lake_depth(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lake_depth=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lake_depth' grid%tail_statevars%DataName = 'LAKE_DEPTH' grid%tail_statevars%Description = 'lake depth' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lake_depth grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lake_depth(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26910,& 'frame/module_domain.f: Failed to allocate grid%lake_depth(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dtw').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dtw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26921,& 'frame/module_domain.f: Failed to allocate grid%dtw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dtw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dtw' grid%tail_statevars%DataName = 'DTW' grid%tail_statevars%Description = 'WARM LAYER TEMP DIFF' grid%tail_statevars%Units = 'C' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dtw grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dtw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26971,& 'frame/module_domain.f: Failed to allocate grid%dtw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uoce'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%uoce(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26982,& 'frame/module_domain.f: Failed to allocate grid%uoce(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uoce=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uoce' grid%tail_statevars%DataName = 'UOCE' grid%tail_statevars%Description = 'SEA SURFACE ZONAL CURRENTS' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%uoce grid%tail_statevars%streams(1) = 771751936 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%uoce(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27032,& 'frame/module_domain.f: Failed to allocate grid%uoce(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'voce'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%voce(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27043,& 'frame/module_domain.f: Failed to allocate grid%voce(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%voce=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'voce' grid%tail_statevars%DataName = 'VOCE' grid%tail_statevars%Description = 'SEA SURFACE MERIDIONAL CURRENTS' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%voce grid%tail_statevars%streams(1) = 771751936 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%voce(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27093,& 'frame/module_domain.f: Failed to allocate grid%voce(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cha_coef'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cha_coef(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27104,& 'frame/module_domain.f: Failed to allocate grid%cha_coef(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cha_coef=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cha_coef' grid%tail_statevars%DataName = 'CHA_COEF' grid%tail_statevars%Description = 'CHARNOCK COEFFICIENT' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cha_coef grid%tail_statevars%streams(1) = 771751936 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cha_coef(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27154,& 'frame/module_domain.f: Failed to allocate grid%cha_coef(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hcoeff').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%dfi_time_dim)-(1)+1))) * 4 nba = & ((((model_config_rec%dfi_time_dim)-(1)+1))) * 4 ALLOCATE(grid%hcoeff(1:model_config_rec%dfi_time_dim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27165,& 'frame/module_domain.f: Failed to allocate grid%hcoeff(1:model_config_rec%dfi_time_dim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hcoeff=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hcoeff' grid%tail_statevars%DataName = 'HCOEFF' grid%tail_statevars%Description = 'initialization weights' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'C' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%hcoeff grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%dfi_time_dim grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = 1 grid%tail_statevars%em1 = config_flags%dfi_time_dim grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = 1 grid%tail_statevars%ep1 = config_flags%dfi_time_dim grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = '' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%hcoeff(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27213,& 'frame/module_domain.f: Failed to allocate grid%hcoeff(1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'hcoeff_tot' grid%tail_statevars%DataName = 'HCOEFF_TOT' grid%tail_statevars%Description = 'initialization weights' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%hcoeff_tot grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%hcoeff_tot=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_p').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_p(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27243,& 'frame/module_domain.f: Failed to allocate grid%dfi_p(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_p=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_p' grid%tail_statevars%DataName = 'P_DFI' grid%tail_statevars%Description = 'perturbation pressure' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_p grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_p(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27293,& 'frame/module_domain.f: Failed to allocate grid%dfi_p(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_al').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_al(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27304,& 'frame/module_domain.f: Failed to allocate grid%dfi_al(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_al=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_al' grid%tail_statevars%DataName = 'AL_DFI' grid%tail_statevars%Description = 'inverse perturbation density' grid%tail_statevars%Units = 'm3 kg-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_al grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_al(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27354,& 'frame/module_domain.f: Failed to allocate grid%dfi_al(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_mu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_mu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27365,& 'frame/module_domain.f: Failed to allocate grid%dfi_mu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_mu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_mu' grid%tail_statevars%DataName = 'MU_DFI' grid%tail_statevars%Description = 'perturbation dry air mass in column' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dfi_mu grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dfi_mu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27415,& 'frame/module_domain.f: Failed to allocate grid%dfi_mu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_phb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_phb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27426,& 'frame/module_domain.f: Failed to allocate grid%dfi_phb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_phb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_phb' grid%tail_statevars%DataName = 'PHB_DFI' grid%tail_statevars%Description = 'base-state geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_phb grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_phb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27476,& 'frame/module_domain.f: Failed to allocate grid%dfi_phb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_ph0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_ph0(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27487,& 'frame/module_domain.f: Failed to allocate grid%dfi_ph0(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ph0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_ph0' grid%tail_statevars%DataName = 'PH0_DFI' grid%tail_statevars%Description = 'initial geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_ph0 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_ph0(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27537,& 'frame/module_domain.f: Failed to allocate grid%dfi_ph0(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_php').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_php(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27548,& 'frame/module_domain.f: Failed to allocate grid%dfi_php(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_php=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_php' grid%tail_statevars%DataName = 'PHP_DFI' grid%tail_statevars%Description = 'geopotential' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_php grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_php(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27598,& 'frame/module_domain.f: Failed to allocate grid%dfi_php(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_u').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_u(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27609,& 'frame/module_domain.f: Failed to allocate grid%dfi_u(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_u' grid%tail_statevars%DataName = 'U_DFI' grid%tail_statevars%Description = 'u accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_u grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_u(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27659,& 'frame/module_domain.f: Failed to allocate grid%dfi_u(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_v').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_v(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27670,& 'frame/module_domain.f: Failed to allocate grid%dfi_v(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_v' grid%tail_statevars%DataName = 'V_DFI' grid%tail_statevars%Description = 'v accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_v grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_v(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27720,& 'frame/module_domain.f: Failed to allocate grid%dfi_v(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_w').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27731,& 'frame/module_domain.f: Failed to allocate grid%dfi_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_w=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_w' grid%tail_statevars%DataName = 'W_DFI' grid%tail_statevars%Description = 'w accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_w grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27781,& 'frame/module_domain.f: Failed to allocate grid%dfi_w(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_ww').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_ww(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27792,& 'frame/module_domain.f: Failed to allocate grid%dfi_ww(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ww=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_ww' grid%tail_statevars%DataName = 'WW_DFI' grid%tail_statevars%Description = 'mu-coupled eta-dot' grid%tail_statevars%Units = 'Pa s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_ww grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_ww(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27842,& 'frame/module_domain.f: Failed to allocate grid%dfi_ww(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_t').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_t(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27853,& 'frame/module_domain.f: Failed to allocate grid%dfi_t(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_t=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_t' grid%tail_statevars%DataName = 'TT_DFI' grid%tail_statevars%Description = 't accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_t grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_t(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27903,& 'frame/module_domain.f: Failed to allocate grid%dfi_t(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_rh').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_rh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27914,& 'frame/module_domain.f: Failed to allocate grid%dfi_rh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_rh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_rh' grid%tail_statevars%DataName = 'RH_DFI' grid%tail_statevars%Description = 'initial relative humidity' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_rh grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_rh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27964,& 'frame/module_domain.f: Failed to allocate grid%dfi_rh(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_ph').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_ph(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27975,& 'frame/module_domain.f: Failed to allocate grid%dfi_ph(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ph=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_ph' grid%tail_statevars%DataName = 'PH_DFI' grid%tail_statevars%Description = 'p accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_ph grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_ph(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28025,& 'frame/module_domain.f: Failed to allocate grid%dfi_ph(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_pb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_pb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28036,& 'frame/module_domain.f: Failed to allocate grid%dfi_pb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_pb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_pb' grid%tail_statevars%DataName = 'PB_DFI' grid%tail_statevars%Description = 'pb accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_pb grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_pb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28086,& 'frame/module_domain.f: Failed to allocate grid%dfi_pb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_alt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_alt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28097,& 'frame/module_domain.f: Failed to allocate grid%dfi_alt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_alt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_alt' grid%tail_statevars%DataName = 'ALT_DFI' grid%tail_statevars%Description = '1/rho accumulation array' grid%tail_statevars%Units = ' ' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_alt grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_alt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28147,& 'frame/module_domain.f: Failed to allocate grid%dfi_alt(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_tke').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_tke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28158,& 'frame/module_domain.f: Failed to allocate grid%dfi_tke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tke=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_tke' grid%tail_statevars%DataName = 'TKE_DFI' grid%tail_statevars%Description = 'TURBULENCE KINETIC ENERGY' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_tke grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_tke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28208,& 'frame/module_domain.f: Failed to allocate grid%dfi_tke(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_tten_rad').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_tten_rad(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28219,& 'frame/module_domain.f: Failed to allocate grid%dfi_tten_rad(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tten_rad=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_tten_rad' grid%tail_statevars%DataName = 'RAD_TTEN_DFI' grid%tail_statevars%Description = 'RADAR POT. TEMP. TENDENCY' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_tten_rad grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_tten_rad(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28269,& 'frame/module_domain.f: Failed to allocate grid%dfi_tten_rad(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_tslb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28280,& 'frame/module_domain.f: Failed to allocate grid%dfi_tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tslb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_tslb' grid%tail_statevars%DataName = 'TSLB_DFI' grid%tail_statevars%Description = 'SOIL TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_tslb grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_tslb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28330,& 'frame/module_domain.f: Failed to allocate grid%dfi_tslb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_smois').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28341,& 'frame/module_domain.f: Failed to allocate grid%dfi_smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_smois=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_smois' grid%tail_statevars%DataName = 'SMOIS_DFI' grid%tail_statevars%Description = 'SOIL MOISTURE' grid%tail_statevars%Units = 'm3 m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_smois grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_smois(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28391,& 'frame/module_domain.f: Failed to allocate grid%dfi_smois(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_snow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_snow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28402,& 'frame/module_domain.f: Failed to allocate grid%dfi_snow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_snow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_snow' grid%tail_statevars%DataName = 'SNOW_DFI' grid%tail_statevars%Description = 'SNOW WATER EQUIVALENT' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dfi_snow grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dfi_snow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28452,& 'frame/module_domain.f: Failed to allocate grid%dfi_snow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_snowh').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_snowh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28463,& 'frame/module_domain.f: Failed to allocate grid%dfi_snowh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_snowh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_snowh' grid%tail_statevars%DataName = 'SNOWH_DFI' grid%tail_statevars%Description = 'PHYSICAL SNOW DEPTH' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dfi_snowh grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dfi_snowh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28513,& 'frame/module_domain.f: Failed to allocate grid%dfi_snowh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_canwat').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_canwat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28524,& 'frame/module_domain.f: Failed to allocate grid%dfi_canwat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_canwat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_canwat' grid%tail_statevars%DataName = 'CANWAT_DFI' grid%tail_statevars%Description = 'CANOPY WATER' grid%tail_statevars%Units = 'kg m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%dfi_canwat grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dfi_canwat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28574,& 'frame/module_domain.f: Failed to allocate grid%dfi_canwat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_smfr3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28585,& 'frame/module_domain.f: Failed to allocate grid%dfi_smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_smfr3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_smfr3d' grid%tail_statevars%DataName = 'SMFR3D_DFI' grid%tail_statevars%Description = 'SOIL ICE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_smfr3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_smfr3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28635,& 'frame/module_domain.f: Failed to allocate grid%dfi_smfr3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_keepfr3dflag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28646,& 'frame/module_domain.f: Failed to allocate grid%dfi_keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_keepfr3dflag=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_keepfr3dflag' grid%tail_statevars%DataName = 'KEEPFR3DFLAG_DFI' grid%tail_statevars%Description = 'FLAG - 1. FROZEN SOIL YES, 0 - NO' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dfi_keepfr3dflag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dfi_keepfr3dflag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28696,& 'frame/module_domain.f: Failed to allocate grid%dfi_keepfr3dflag(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_rural'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tsk_rural(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28707,& 'frame/module_domain.f: Failed to allocate grid%tsk_rural(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_rural=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsk_rural' grid%tail_statevars%DataName = 'TSK_RURAL' grid%tail_statevars%Description = 'TSK for rural fraction' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tsk_rural grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tsk_rural(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28757,& 'frame/module_domain.f: Failed to allocate grid%tsk_rural(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28768,& 'frame/module_domain.f: Failed to allocate grid%tr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tr_urb2d' grid%tail_statevars%DataName = 'TR_URB' grid%tail_statevars%Description = 'URBAN ROOF SKIN TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28818,& 'frame/module_domain.f: Failed to allocate grid%tr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28829,& 'frame/module_domain.f: Failed to allocate grid%tgr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgr_urb2d' grid%tail_statevars%DataName = 'TGR_URB' grid%tail_statevars%Description = 'URBAN GREEN ROOF SKIN TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tgr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tgr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28879,& 'frame/module_domain.f: Failed to allocate grid%tgr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28890,& 'frame/module_domain.f: Failed to allocate grid%tb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tb_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tb_urb2d' grid%tail_statevars%DataName = 'TB_URB' grid%tail_statevars%Description = 'URBAN WALL SKIN TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tb_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28940,& 'frame/module_domain.f: Failed to allocate grid%tb_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28951,& 'frame/module_domain.f: Failed to allocate grid%tg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tg_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tg_urb2d' grid%tail_statevars%DataName = 'TG_URB' grid%tail_statevars%Description = 'URBAN ROAD SKIN TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tg_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29001,& 'frame/module_domain.f: Failed to allocate grid%tg_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29012,& 'frame/module_domain.f: Failed to allocate grid%tc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tc_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tc_urb2d' grid%tail_statevars%DataName = 'TC_URB' grid%tail_statevars%Description = 'URBAN CANOPY TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tc_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29062,& 'frame/module_domain.f: Failed to allocate grid%tc_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29073,& 'frame/module_domain.f: Failed to allocate grid%qc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qc_urb2d' grid%tail_statevars%DataName = 'QC_URB' grid%tail_statevars%Description = 'URBAN CANOPY HUMIDITY' grid%tail_statevars%Units = 'kg kg{-1}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%qc_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29123,& 'frame/module_domain.f: Failed to allocate grid%qc_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%uc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29134,& 'frame/module_domain.f: Failed to allocate grid%uc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uc_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uc_urb2d' grid%tail_statevars%DataName = 'UC_URB' grid%tail_statevars%Description = 'URBAN CANOPY WIND' grid%tail_statevars%Units = 'm s{-1}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%uc_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%uc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29184,& 'frame/module_domain.f: Failed to allocate grid%uc_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xxxr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xxxr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29195,& 'frame/module_domain.f: Failed to allocate grid%xxxr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xxxr_urb2d' grid%tail_statevars%DataName = 'XXXR_URB' grid%tail_statevars%Description = 'M-O LENGTH ABOVE URBAN ROOF' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xxxr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xxxr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29245,& 'frame/module_domain.f: Failed to allocate grid%xxxr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xxxb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xxxb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29256,& 'frame/module_domain.f: Failed to allocate grid%xxxb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxb_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xxxb_urb2d' grid%tail_statevars%DataName = 'XXXB_URB' grid%tail_statevars%Description = 'M-O LENGTH ABOVE URBAN WALL' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xxxb_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xxxb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29306,& 'frame/module_domain.f: Failed to allocate grid%xxxb_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xxxg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xxxg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29317,& 'frame/module_domain.f: Failed to allocate grid%xxxg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxg_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xxxg_urb2d' grid%tail_statevars%DataName = 'XXXG_URB' grid%tail_statevars%Description = 'M-O LENGTH ABOVE URBAN ROAD' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xxxg_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xxxg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29367,& 'frame/module_domain.f: Failed to allocate grid%xxxg_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xxxc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xxxc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29378,& 'frame/module_domain.f: Failed to allocate grid%xxxc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxc_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xxxc_urb2d' grid%tail_statevars%DataName = 'XXXC_URB' grid%tail_statevars%Description = 'M-O LENGTH ABOVE URBAN CANOPY' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xxxc_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%xxxc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29428,& 'frame/module_domain.f: Failed to allocate grid%xxxc_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cmcr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cmcr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29439,& 'frame/module_domain.f: Failed to allocate grid%cmcr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cmcr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cmcr_urb2d' grid%tail_statevars%DataName = 'CMCR_URB' grid%tail_statevars%Description = 'GREEN ROOF CANOPY INTERCAPTED WATER' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cmcr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cmcr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29489,& 'frame/module_domain.f: Failed to allocate grid%cmcr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'drelr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%drelr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29500,& 'frame/module_domain.f: Failed to allocate grid%drelr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%drelr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'drelr_urb2d' grid%tail_statevars%DataName = 'DRELR_URB' grid%tail_statevars%Description = 'WATER HOLDING DEPTH ON ROOF IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%drelr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%drelr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29550,& 'frame/module_domain.f: Failed to allocate grid%drelr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'drelb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%drelb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29561,& 'frame/module_domain.f: Failed to allocate grid%drelb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%drelb_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'drelb_urb2d' grid%tail_statevars%DataName = 'DRELB_URB' grid%tail_statevars%Description = 'WATER HOLDING DEPTH ON WALL IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%drelb_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%drelb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29611,& 'frame/module_domain.f: Failed to allocate grid%drelb_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'drelg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%drelg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29622,& 'frame/module_domain.f: Failed to allocate grid%drelg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%drelg_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'drelg_urb2d' grid%tail_statevars%DataName = 'DRELG_URB' grid%tail_statevars%Description = 'WATER HOLDING DEPTH ON ROAD IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%drelg_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%drelg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29672,& 'frame/module_domain.f: Failed to allocate grid%drelg_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flxhumr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%flxhumr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29683,& 'frame/module_domain.f: Failed to allocate grid%flxhumr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flxhumr_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flxhumr_urb2d' grid%tail_statevars%DataName = 'FLXHUMR_URB' grid%tail_statevars%Description = 'WATER FLUX ON ROOF IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%flxhumr_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%flxhumr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29733,& 'frame/module_domain.f: Failed to allocate grid%flxhumr_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flxhumb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%flxhumb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29744,& 'frame/module_domain.f: Failed to allocate grid%flxhumb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flxhumb_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flxhumb_urb2d' grid%tail_statevars%DataName = 'FLXHUMB_URB' grid%tail_statevars%Description = 'WATER FLUX ON WALL IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%flxhumb_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%flxhumb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29794,& 'frame/module_domain.f: Failed to allocate grid%flxhumb_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flxhumg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%flxhumg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29805,& 'frame/module_domain.f: Failed to allocate grid%flxhumg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flxhumg_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flxhumg_urb2d' grid%tail_statevars%DataName = 'FLXHUMG_URB' grid%tail_statevars%Description = 'WATER FLUX ON ROAD IMPERVIOUS SURFACE' grid%tail_statevars%Units = 'm/s' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%flxhumg_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%flxhumg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29855,& 'frame/module_domain.f: Failed to allocate grid%flxhumg_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgrl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgrl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29866,& 'frame/module_domain.f: Failed to allocate grid%tgrl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgrl_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgrl_urb3d' grid%tail_statevars%DataName = 'TGRL_URB' grid%tail_statevars%Description = 'GREEN ROOF LAYER TEMPERATURE' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tgrl_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tgrl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29916,& 'frame/module_domain.f: Failed to allocate grid%tgrl_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smr_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smr_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29927,& 'frame/module_domain.f: Failed to allocate grid%smr_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smr_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smr_urb3d' grid%tail_statevars%DataName = 'SMR_URB' grid%tail_statevars%Description = 'GREEN ROOF LAYER SOIL MOISTURE' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%smr_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%smr_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29977,& 'frame/module_domain.f: Failed to allocate grid%smr_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'trl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%trl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29988,& 'frame/module_domain.f: Failed to allocate grid%trl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trl_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'trl_urb3d' grid%tail_statevars%DataName = 'TRL_URB' grid%tail_statevars%Description = 'ROOF LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%trl_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%trl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30038,& 'frame/module_domain.f: Failed to allocate grid%trl_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tbl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tbl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30049,& 'frame/module_domain.f: Failed to allocate grid%tbl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tbl_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tbl_urb3d' grid%tail_statevars%DataName = 'TBL_URB' grid%tail_statevars%Description = 'WALL LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tbl_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tbl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30099,& 'frame/module_domain.f: Failed to allocate grid%tbl_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30110,& 'frame/module_domain.f: Failed to allocate grid%tgl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgl_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgl_urb3d' grid%tail_statevars%DataName = 'TGL_URB' grid%tail_statevars%Description = 'ROAD LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tgl_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tgl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30160,& 'frame/module_domain.f: Failed to allocate grid%tgl_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sh_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30171,& 'frame/module_domain.f: Failed to allocate grid%sh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sh_urb2d' grid%tail_statevars%DataName = 'SH_URB' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sh_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30221,& 'frame/module_domain.f: Failed to allocate grid%sh_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lh_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30232,& 'frame/module_domain.f: Failed to allocate grid%lh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lh_urb2d' grid%tail_statevars%DataName = 'LH_URB' grid%tail_statevars%Description = 'LATENT HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lh_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30282,& 'frame/module_domain.f: Failed to allocate grid%lh_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'g_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%g_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30293,& 'frame/module_domain.f: Failed to allocate grid%g_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%g_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'g_urb2d' grid%tail_statevars%DataName = 'G_URB' grid%tail_statevars%Description = 'GROUND HEAT FLUX INTO URBAN' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%g_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%g_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30343,& 'frame/module_domain.f: Failed to allocate grid%g_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rn_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rn_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30354,& 'frame/module_domain.f: Failed to allocate grid%rn_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rn_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rn_urb2d' grid%tail_statevars%DataName = 'RN_URB' grid%tail_statevars%Description = 'NET RADIATION ON URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%rn_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rn_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30404,& 'frame/module_domain.f: Failed to allocate grid%rn_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ts_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30415,& 'frame/module_domain.f: Failed to allocate grid%ts_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ts_urb2d' grid%tail_statevars%DataName = 'TS_URB' grid%tail_statevars%Description = 'SKIN TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ts_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ts_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30465,& 'frame/module_domain.f: Failed to allocate grid%ts_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'frc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%frc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30476,& 'frame/module_domain.f: Failed to allocate grid%frc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%frc_urb2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'frc_urb2d' grid%tail_statevars%DataName = 'FRC_URB2D' grid%tail_statevars%Description = 'URBAN FRACTION' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%frc_urb2d grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%frc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30526,& 'frame/module_domain.f: Failed to allocate grid%frc_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'utype_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utype_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30537,& 'frame/module_domain.f: Failed to allocate grid%utype_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utype_urb2d=0 IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utype_urb2d' grid%tail_statevars%DataName = 'UTYPE_URB' grid%tail_statevars%Description = 'URBAN TYPE' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%utype_urb2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%utype_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30587,& 'frame/module_domain.f: Failed to allocate grid%utype_urb2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'trb_urb4d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zrd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zrd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%trb_urb4d(sm31:em31,1:model_config_rec%urban_map_zrd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30598,& 'frame/module_domain.f: Failed to allocate grid%trb_urb4d(sm31:em31,1:model_config_rec%urban_map_zrd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trb_urb4d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'trb_urb4d' grid%tail_statevars%DataName = 'TRB_URB4D' grid%tail_statevars%Description = 'ROOF LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%trb_urb4d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zrd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zrd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zrd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zrd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%trb_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30648,& 'frame/module_domain.f: Failed to allocate grid%trb_urb4d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tw1_urb4d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zwd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zwd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tw1_urb4d(sm31:em31,1:model_config_rec%urban_map_zwd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30659,& 'frame/module_domain.f: Failed to allocate grid%tw1_urb4d(sm31:em31,1:model_config_rec%urban_map_zwd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw1_urb4d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tw1_urb4d' grid%tail_statevars%DataName = 'TW1_URB4D' grid%tail_statevars%Description = 'WALL LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tw1_urb4d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zwd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zwd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zwd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zwd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tw1_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30709,& 'frame/module_domain.f: Failed to allocate grid%tw1_urb4d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tw2_urb4d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zwd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zwd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tw2_urb4d(sm31:em31,1:model_config_rec%urban_map_zwd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30720,& 'frame/module_domain.f: Failed to allocate grid%tw2_urb4d(sm31:em31,1:model_config_rec%urban_map_zwd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw2_urb4d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tw2_urb4d' grid%tail_statevars%DataName = 'TW2_URB4D' grid%tail_statevars%Description = 'WALL LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tw2_urb4d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zwd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zwd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zwd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zwd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tw2_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30770,& 'frame/module_domain.f: Failed to allocate grid%tw2_urb4d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgb_urb4d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_gd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_gd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgb_urb4d(sm31:em31,1:model_config_rec%urban_map_gd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30781,& 'frame/module_domain.f: Failed to allocate grid%tgb_urb4d(sm31:em31,1:model_config_rec%urban_map_gd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgb_urb4d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgb_urb4d' grid%tail_statevars%DataName = 'TGB_URB4D' grid%tail_statevars%Description = 'ROAD LAYER TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tgb_urb4d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_gd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_gd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_gd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_gd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tgb_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30831,& 'frame/module_domain.f: Failed to allocate grid%tgb_urb4d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tlev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_bd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_bd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tlev_urb3d(sm31:em31,1:model_config_rec%urban_map_bd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30842,& 'frame/module_domain.f: Failed to allocate grid%tlev_urb3d(sm31:em31,1:model_config_rec%urban_map_bd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tlev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tlev_urb3d' grid%tail_statevars%DataName = 'TLEV_URB3D' grid%tail_statevars%Description = 'INDOOR TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tlev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_bd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_bd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_bd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_bd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tlev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30892,& 'frame/module_domain.f: Failed to allocate grid%tlev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qlev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_bd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_bd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qlev_urb3d(sm31:em31,1:model_config_rec%urban_map_bd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30903,& 'frame/module_domain.f: Failed to allocate grid%qlev_urb3d(sm31:em31,1:model_config_rec%urban_map_bd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qlev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qlev_urb3d' grid%tail_statevars%DataName = 'QLEV_URB3D' grid%tail_statevars%Description = 'SPECIFIC HUMIDITY' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qlev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_bd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_bd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_bd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_bd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qlev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30953,& 'frame/module_domain.f: Failed to allocate grid%qlev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tw1lev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tw1lev_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30964,& 'frame/module_domain.f: Failed to allocate grid%tw1lev_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw1lev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tw1lev_urb3d' grid%tail_statevars%DataName = 'TW1LEV_URB3D' grid%tail_statevars%Description = 'WINDOW TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tw1lev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_wd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_wd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_wd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_wd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tw1lev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31014,& 'frame/module_domain.f: Failed to allocate grid%tw1lev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tw2lev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tw2lev_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31025,& 'frame/module_domain.f: Failed to allocate grid%tw2lev_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw2lev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tw2lev_urb3d' grid%tail_statevars%DataName = 'TW2LEV_URB3D' grid%tail_statevars%Description = 'WINDOW TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tw2lev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_wd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_wd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_wd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_wd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tw2lev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31075,& 'frame/module_domain.f: Failed to allocate grid%tw2lev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tglev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_gbd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_gbd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tglev_urb3d(sm31:em31,1:model_config_rec%urban_map_gbd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31086,& 'frame/module_domain.f: Failed to allocate grid%tglev_urb3d(sm31:em31,1:model_config_rec%urban_map_gbd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tglev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tglev_urb3d' grid%tail_statevars%DataName = 'TGLEV_URB3D' grid%tail_statevars%Description = 'GROUND TEMPERATURE BELOW A BUILDING' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tglev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_gbd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_gbd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_gbd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_gbd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tglev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31136,& 'frame/module_domain.f: Failed to allocate grid%tglev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tflev_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_fbd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_fbd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tflev_urb3d(sm31:em31,1:model_config_rec%urban_map_fbd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31147,& 'frame/module_domain.f: Failed to allocate grid%tflev_urb3d(sm31:em31,1:model_config_rec%urban_map_fbd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tflev_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tflev_urb3d' grid%tail_statevars%DataName = 'TFLEV_URB3D' grid%tail_statevars%Description = 'FLOOR TEMPERATURE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tflev_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_fbd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_fbd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_fbd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_fbd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tflev_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31197,& 'frame/module_domain.f: Failed to allocate grid%tflev_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sf_ac_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sf_ac_urb3d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31208,& 'frame/module_domain.f: Failed to allocate grid%sf_ac_urb3d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sf_ac_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sf_ac_urb3d' grid%tail_statevars%DataName = 'SF_AC_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM THE AIR COND.' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sf_ac_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sf_ac_urb3d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31258,& 'frame/module_domain.f: Failed to allocate grid%sf_ac_urb3d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lf_ac_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lf_ac_urb3d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31269,& 'frame/module_domain.f: Failed to allocate grid%lf_ac_urb3d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lf_ac_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lf_ac_urb3d' grid%tail_statevars%DataName = 'LF_AC_URB3D' grid%tail_statevars%Description = 'LATENT HEAT FLUX FROM THE AIR COND.' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lf_ac_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lf_ac_urb3d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31319,& 'frame/module_domain.f: Failed to allocate grid%lf_ac_urb3d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cm_ac_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cm_ac_urb3d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31330,& 'frame/module_domain.f: Failed to allocate grid%cm_ac_urb3d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cm_ac_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cm_ac_urb3d' grid%tail_statevars%DataName = 'CM_AC_URB3D' grid%tail_statevars%Description = 'CONSUMPTION OF THE AIR COND.' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cm_ac_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cm_ac_urb3d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31380,& 'frame/module_domain.f: Failed to allocate grid%cm_ac_urb3d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfvent_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfvent_urb3d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31391,& 'frame/module_domain.f: Failed to allocate grid%sfvent_urb3d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfvent_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfvent_urb3d' grid%tail_statevars%DataName = 'SFVENT_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN VENTILATION' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sfvent_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%sfvent_urb3d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31441,& 'frame/module_domain.f: Failed to allocate grid%sfvent_urb3d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lfvent_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lfvent_urb3d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31452,& 'frame/module_domain.f: Failed to allocate grid%lfvent_urb3d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lfvent_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lfvent_urb3d' grid%tail_statevars%DataName = 'LFVENT_URB3D' grid%tail_statevars%Description = 'LATENT HEAT FLUX FROM URBAN VENTILATION' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lfvent_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lfvent_urb3d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31502,& 'frame/module_domain.f: Failed to allocate grid%lfvent_urb3d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfwin1_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfwin1_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31513,& 'frame/module_domain.f: Failed to allocate grid%sfwin1_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfwin1_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfwin1_urb3d' grid%tail_statevars%DataName = 'SFWIN1_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC WINDOW' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfwin1_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_wd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_wd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_wd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_wd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfwin1_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31563,& 'frame/module_domain.f: Failed to allocate grid%sfwin1_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfwin2_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_wd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfwin2_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31574,& 'frame/module_domain.f: Failed to allocate grid%sfwin2_urb3d(sm31:em31,1:model_config_rec%urban_map_wd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfwin2_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfwin2_urb3d' grid%tail_statevars%DataName = 'SFWIN2_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC WINDOW' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfwin2_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_wd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_wd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_wd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_wd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfwin2_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31624,& 'frame/module_domain.f: Failed to allocate grid%sfwin2_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfw1_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfw1_urb3d(sm31:em31,1:model_config_rec%urban_map_zd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31635,& 'frame/module_domain.f: Failed to allocate grid%sfw1_urb3d(sm31:em31,1:model_config_rec%urban_map_zd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfw1_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfw1_urb3d' grid%tail_statevars%DataName = 'SFW1_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfw1_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfw1_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31685,& 'frame/module_domain.f: Failed to allocate grid%sfw1_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfw2_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zd)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zd)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfw2_urb3d(sm31:em31,1:model_config_rec%urban_map_zd,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31696,& 'frame/module_domain.f: Failed to allocate grid%sfw2_urb3d(sm31:em31,1:model_config_rec%urban_map_zd,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfw2_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfw2_urb3d' grid%tail_statevars%DataName = 'SFW2_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfw2_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zd grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zd grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zd grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zd_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfw2_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31746,& 'frame/module_domain.f: Failed to allocate grid%sfw2_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfr_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zdf)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%urban_map_zdf)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfr_urb3d(sm31:em31,1:model_config_rec%urban_map_zdf,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31757,& 'frame/module_domain.f: Failed to allocate grid%sfr_urb3d(sm31:em31,1:model_config_rec%urban_map_zdf,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfr_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfr_urb3d' grid%tail_statevars%DataName = 'SFR_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfr_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%urban_map_zdf grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%urban_map_zdf grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%urban_map_zdf grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'urban_map_zdf_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfr_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31807,& 'frame/module_domain.f: Failed to allocate grid%sfr_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sfg_urb3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_ndm)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_ndm)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sfg_urb3d(sm31:em31,1:model_config_rec%num_urban_ndm,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31818,& 'frame/module_domain.f: Failed to allocate grid%sfg_urb3d(sm31:em31,1:model_config_rec%num_urban_ndm,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfg_urb3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sfg_urb3d' grid%tail_statevars%DataName = 'SFG_URB3D' grid%tail_statevars%Description = 'SENSIBLE HEAT FLUX FROM URBAN SFC' grid%tail_statevars%Units = 'W m{-2}' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sfg_urb3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_urban_ndm grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_urban_ndm grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_urban_ndm grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'num_urban_ndm_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sfg_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31868,& 'frame/module_domain.f: Failed to allocate grid%sfg_urb3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cmr_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cmr_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31879,& 'frame/module_domain.f: Failed to allocate grid%cmr_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cmr_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cmr_sfcdif' grid%tail_statevars%DataName = 'CMR_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cmr_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cmr_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31929,& 'frame/module_domain.f: Failed to allocate grid%cmr_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chr_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chr_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31940,& 'frame/module_domain.f: Failed to allocate grid%chr_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chr_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chr_sfcdif' grid%tail_statevars%DataName = 'CHR_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%chr_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%chr_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31990,& 'frame/module_domain.f: Failed to allocate grid%chr_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cmc_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cmc_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32001,& 'frame/module_domain.f: Failed to allocate grid%cmc_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cmc_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cmc_sfcdif' grid%tail_statevars%DataName = 'CMC_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cmc_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cmc_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32051,& 'frame/module_domain.f: Failed to allocate grid%cmc_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chc_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chc_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32062,& 'frame/module_domain.f: Failed to allocate grid%chc_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chc_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chc_sfcdif' grid%tail_statevars%DataName = 'CHC_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%chc_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%chc_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32112,& 'frame/module_domain.f: Failed to allocate grid%chc_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cmgr_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cmgr_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32123,& 'frame/module_domain.f: Failed to allocate grid%cmgr_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cmgr_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cmgr_sfcdif' grid%tail_statevars%DataName = 'CMGR_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cmgr_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%cmgr_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32173,& 'frame/module_domain.f: Failed to allocate grid%cmgr_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chgr_sfcdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chgr_sfcdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32184,& 'frame/module_domain.f: Failed to allocate grid%chgr_sfcdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chgr_sfcdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chgr_sfcdif' grid%tail_statevars%DataName = 'CHGR_SFCDIF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%chgr_sfcdif grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%chgr_sfcdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32234,& 'frame/module_domain.f: Failed to allocate grid%chgr_sfcdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'coszen').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%coszen(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32245,& 'frame/module_domain.f: Failed to allocate grid%coszen(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%coszen=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'coszen' grid%tail_statevars%DataName = 'COSZEN' grid%tail_statevars%Description = 'COS of SOLAR ZENITH ANGLE' grid%tail_statevars%Units = 'dimensionless' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%coszen grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%coszen(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32295,& 'frame/module_domain.f: Failed to allocate grid%coszen(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hrang').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hrang(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32306,& 'frame/module_domain.f: Failed to allocate grid%hrang(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hrang=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hrang' grid%tail_statevars%DataName = 'HRANG' grid%tail_statevars%Description = 'SOLAR HOUR ANGLE' grid%tail_statevars%Units = 'radians' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%hrang grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%hrang(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32356,& 'frame/module_domain.f: Failed to allocate grid%hrang(1,1). ') endif ENDIF IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'declin' grid%tail_statevars%DataName = 'DECLIN' grid%tail_statevars%Description = 'SOLAR DECLINATION' grid%tail_statevars%Units = 'radians' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%declin grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%declin=initial_data_value END SUBROUTINE alloc_space_field_core_0 END MODULE module_alloc_space_0