MODULE module_alloc_space_7 CONTAINS SUBROUTINE alloc_space_field_core_7 ( 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,'snowrds2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowrds2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",169,& 'frame/module_domain.f: Failed to allocate grid%snowrds2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowrds2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowrds2' grid%tail_statevars%DataName = 'SNOWRDS2' grid%tail_statevars%Description = 'SECOND SNOW LAYER 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 = '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%snowrds2 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snowrds2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",219,& 'frame/module_domain.f: Failed to allocate grid%snowrds2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowrds3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowrds3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",230,& 'frame/module_domain.f: Failed to allocate grid%snowrds3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowrds3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowrds3' grid%tail_statevars%DataName = 'SNOWRDS3' grid%tail_statevars%Description = 'THIRD SNOW LAYER 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 = '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%snowrds3 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snowrds3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",280,& 'frame/module_domain.f: Failed to allocate grid%snowrds3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowrds4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowrds4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",291,& 'frame/module_domain.f: Failed to allocate grid%snowrds4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowrds4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowrds4' grid%tail_statevars%DataName = 'SNOWRDS4' grid%tail_statevars%Description = 'FOURTH SNOW LAYER 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 = '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%snowrds4 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snowrds4(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",341,& 'frame/module_domain.f: Failed to allocate grid%snowrds4(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowrds5'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowrds5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",352,& 'frame/module_domain.f: Failed to allocate grid%snowrds5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowrds5=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowrds5' grid%tail_statevars%DataName = 'SNOWRDS5' grid%tail_statevars%Description = 'FIFTH SNOW LAYER 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 = '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%snowrds5 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snowrds5(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",402,& 'frame/module_domain.f: Failed to allocate grid%snowrds5(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake1(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",413,& 'frame/module_domain.f: Failed to allocate grid%t_lake1(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake1=initial_data_value IF (.NOT.grid%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_lake1' grid%tail_statevars%DataName = 'T_LAKE1' grid%tail_statevars%Description = '1ST LAKELAYER 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%t_lake1 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",463,& 'frame/module_domain.f: Failed to allocate grid%t_lake1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",474,& 'frame/module_domain.f: Failed to allocate grid%t_lake2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake2=initial_data_value IF (.NOT.grid%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_lake2' grid%tail_statevars%DataName = 'T_LAKE2' grid%tail_statevars%Description = '2ND LAKELAYER 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%t_lake2 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",524,& 'frame/module_domain.f: Failed to allocate grid%t_lake2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",535,& 'frame/module_domain.f: Failed to allocate grid%t_lake3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake3=initial_data_value IF (.NOT.grid%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_lake3' grid%tail_statevars%DataName = 'T_LAKE3' grid%tail_statevars%Description = '3RD LAKELAYER 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%t_lake3 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",585,& 'frame/module_domain.f: Failed to allocate grid%t_lake3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",596,& 'frame/module_domain.f: Failed to allocate grid%t_lake4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake4=initial_data_value IF (.NOT.grid%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_lake4' grid%tail_statevars%DataName = 'T_LAKE4' grid%tail_statevars%Description = '4TH LAKELAYER 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%t_lake4 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake4(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",646,& 'frame/module_domain.f: Failed to allocate grid%t_lake4(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake5'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",657,& 'frame/module_domain.f: Failed to allocate grid%t_lake5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake5=initial_data_value IF (.NOT.grid%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_lake5' grid%tail_statevars%DataName = 'T_LAKE5' grid%tail_statevars%Description = '5TH LAKELAYER 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%t_lake5 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake5(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",707,& 'frame/module_domain.f: Failed to allocate grid%t_lake5(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake6'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake6(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",718,& 'frame/module_domain.f: Failed to allocate grid%t_lake6(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake6=initial_data_value IF (.NOT.grid%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_lake6' grid%tail_statevars%DataName = 'T_LAKE6' grid%tail_statevars%Description = '6TH LAKELAYER 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%t_lake6 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake6(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",768,& 'frame/module_domain.f: Failed to allocate grid%t_lake6(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake7'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake7(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",779,& 'frame/module_domain.f: Failed to allocate grid%t_lake7(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake7=initial_data_value IF (.NOT.grid%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_lake7' grid%tail_statevars%DataName = 'T_LAKE7' grid%tail_statevars%Description = '7TH LAKELAYER 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%t_lake7 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake7(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",829,& 'frame/module_domain.f: Failed to allocate grid%t_lake7(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake8'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake8(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",840,& 'frame/module_domain.f: Failed to allocate grid%t_lake8(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake8=initial_data_value IF (.NOT.grid%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_lake8' grid%tail_statevars%DataName = 'T_LAKE8' grid%tail_statevars%Description = '8TH LAKELAYER 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%t_lake8 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake8(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",890,& 'frame/module_domain.f: Failed to allocate grid%t_lake8(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake9'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake9(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",901,& 'frame/module_domain.f: Failed to allocate grid%t_lake9(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake9=initial_data_value IF (.NOT.grid%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_lake9' grid%tail_statevars%DataName = 'T_LAKE9' grid%tail_statevars%Description = '9TH LAKELAYER 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%t_lake9 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake9(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",951,& 'frame/module_domain.f: Failed to allocate grid%t_lake9(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake10(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",962,& 'frame/module_domain.f: Failed to allocate grid%t_lake10(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake10=initial_data_value IF (.NOT.grid%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_lake10' grid%tail_statevars%DataName = 'T_LAKE10' grid%tail_statevars%Description = '10TH LAKELAYER 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%t_lake10 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake10(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1012,& 'frame/module_domain.f: Failed to allocate grid%t_lake10(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol1(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1023,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol1(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol1' grid%tail_statevars%DataName = 'H2OSOI_VOL1' grid%tail_statevars%Description = '1ST SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol1 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1073,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol1(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1084,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol2(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol2' grid%tail_statevars%DataName = 'H2OSOI_VOL2' grid%tail_statevars%Description = '2ND SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol2 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1134,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1145,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol3(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol3' grid%tail_statevars%DataName = 'H2OSOI_VOL3' grid%tail_statevars%Description = '3RD SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol3 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1195,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1206,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol4(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol4' grid%tail_statevars%DataName = 'H2OSOI_VOL4' grid%tail_statevars%Description = '4TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol4 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol4(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1256,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol4(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol5'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1267,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol5(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol5=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol5' grid%tail_statevars%DataName = 'H2OSOI_VOL5' grid%tail_statevars%Description = '5TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol5 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol5(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1317,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol5(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol6'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol6(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1328,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol6(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol6=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol6' grid%tail_statevars%DataName = 'H2OSOI_VOL6' grid%tail_statevars%Description = '6TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol6 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol6(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1378,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol6(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol7'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol7(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1389,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol7(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol7=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol7' grid%tail_statevars%DataName = 'H2OSOI_VOL7' grid%tail_statevars%Description = '7TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol7 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol7(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1439,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol7(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol8'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol8(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1450,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol8(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol8=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol8' grid%tail_statevars%DataName = 'H2OSOI_VOL8' grid%tail_statevars%Description = '8TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol8 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol8(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1500,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol8(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol9'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol9(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1511,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol9(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol9=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol9' grid%tail_statevars%DataName = 'H2OSOI_VOL9' grid%tail_statevars%Description = '9TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol9 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol9(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1561,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol9(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol10(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1572,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol10(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol10=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol10' grid%tail_statevars%DataName = 'H2OSOI_VOL10' grid%tail_statevars%Description = '10TH SOILLAYER VOL MOIST' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_vol10 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol10(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1622,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol10(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'albedosubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%albedosubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1633,& 'frame/module_domain.f: Failed to allocate grid%albedosubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albedosubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'albedosubgrid' grid%tail_statevars%DataName = 'ALBEDOSUBGRID' grid%tail_statevars%Description = 'PFT-level ALBEDO' 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%albedosubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%albedosubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1683,& 'frame/module_domain.f: Failed to allocate grid%albedosubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lhsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lhsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1694,& 'frame/module_domain.f: Failed to allocate grid%lhsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lhsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lhsubgrid' grid%tail_statevars%DataName = 'LHSUBGRID' grid%tail_statevars%Description = 'PFT-level Latent Heat' 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%lhsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lhsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1744,& 'frame/module_domain.f: Failed to allocate grid%lhsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hfxsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hfxsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1755,& 'frame/module_domain.f: Failed to allocate grid%hfxsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hfxsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hfxsubgrid' grid%tail_statevars%DataName = 'HFXSUBGRID' grid%tail_statevars%Description = 'PFT-level Sensible Heat' 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%hfxsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%hfxsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1805,& 'frame/module_domain.f: Failed to allocate grid%hfxsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lwupsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1816,& 'frame/module_domain.f: Failed to allocate grid%lwupsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupsubgrid' grid%tail_statevars%DataName = 'LWUPSUBGRID' grid%tail_statevars%Description = 'PFT-level Longwave Up' 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%lwupsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lwupsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1866,& 'frame/module_domain.f: Failed to allocate grid%lwupsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2subgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2subgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1877,& 'frame/module_domain.f: Failed to allocate grid%q2subgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2subgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2subgrid' grid%tail_statevars%DataName = 'Q2SUBGRID' grid%tail_statevars%Description = 'PFT-level 2m Moisture' grid%tail_statevars%Units = 'mixing ratio' 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%q2subgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%q2subgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1927,& 'frame/module_domain.f: Failed to allocate grid%q2subgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sabvsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sabvsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1938,& 'frame/module_domain.f: Failed to allocate grid%sabvsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sabvsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sabvsubgrid' grid%tail_statevars%DataName = 'SABVSUBGRID' grid%tail_statevars%Description = 'PFT-level SABV' 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%sabvsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sabvsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1988,& 'frame/module_domain.f: Failed to allocate grid%sabvsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sabgsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sabgsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1999,& 'frame/module_domain.f: Failed to allocate grid%sabgsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sabgsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sabgsubgrid' grid%tail_statevars%DataName = 'SABGSUBGRID' grid%tail_statevars%Description = 'PFT-level SABG' 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%sabgsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sabgsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2049,& 'frame/module_domain.f: Failed to allocate grid%sabgsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nrasubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nrasubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2060,& 'frame/module_domain.f: Failed to allocate grid%nrasubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nrasubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nrasubgrid' grid%tail_statevars%DataName = 'NRASUBGRID' grid%tail_statevars%Description = 'PFT-level Net Radiation' 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%nrasubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%nrasubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2110,& 'frame/module_domain.f: Failed to allocate grid%nrasubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupsubgrid'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%maxpatch)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swupsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2121,& 'frame/module_domain.f: Failed to allocate grid%swupsubgrid(sm31:em31,1:model_config_rec%maxpatch,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupsubgrid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupsubgrid' grid%tail_statevars%DataName = 'SWUPSUBGRID' grid%tail_statevars%Description = 'PFT-level Shortwave Up' 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%swupsubgrid 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%maxpatch 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%maxpatch 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%maxpatch 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 = 'subgrid_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%swupsubgrid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2171,& 'frame/module_domain.f: Failed to allocate grid%swupsubgrid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lake2d').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%lake2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2182,& 'frame/module_domain.f: Failed to allocate grid%lake2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lake2d=.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%VarName = 'lake2d' grid%tail_statevars%DataName = 'LAKE2D' grid%tail_statevars%Description = 'T/F: whether grid is lake' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' 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%lfield_2d => grid%lake2d 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%lake2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2232,& 'frame/module_domain.f: Failed to allocate grid%lake2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lakedepth2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lakedepth2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2243,& 'frame/module_domain.f: Failed to allocate grid%lakedepth2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lakedepth2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lakedepth2d' grid%tail_statevars%DataName = 'LAKEDEPTH2D' 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%lakedepth2d 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%lakedepth2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2293,& 'frame/module_domain.f: Failed to allocate grid%lakedepth2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'savedtke12d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%savedtke12d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2304,& 'frame/module_domain.f: Failed to allocate grid%savedtke12d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%savedtke12d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'savedtke12d' grid%tail_statevars%DataName = 'SAVEDTKE12D' grid%tail_statevars%Description = 'top level eddy conductivity from previous timestep' grid%tail_statevars%Units = 'W/m.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%savedtke12d 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%savedtke12d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2354,& 'frame/module_domain.f: Failed to allocate grid%savedtke12d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowdp2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowdp2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2365,& 'frame/module_domain.f: Failed to allocate grid%snowdp2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowdp2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowdp2d' grid%tail_statevars%DataName = 'SNOWDP2D' grid%tail_statevars%Description = '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%snowdp2d 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%snowdp2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2415,& 'frame/module_domain.f: Failed to allocate grid%snowdp2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osno2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osno2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2426,& 'frame/module_domain.f: Failed to allocate grid%h2osno2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osno2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osno2d' grid%tail_statevars%DataName = 'H2OSNO2D' grid%tail_statevars%Description = 'snow water' 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%h2osno2d 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%h2osno2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2476,& 'frame/module_domain.f: Failed to allocate grid%h2osno2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snl2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snl2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2487,& 'frame/module_domain.f: Failed to allocate grid%snl2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snl2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snl2d' grid%tail_statevars%DataName = 'SNL2D' grid%tail_statevars%Description = 'number of snow layers' 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%snl2d 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%snl2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2537,& 'frame/module_domain.f: Failed to allocate grid%snl2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_grnd2d'))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_grnd2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2548,& 'frame/module_domain.f: Failed to allocate grid%t_grnd2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_grnd2d=initial_data_value IF (.NOT.grid%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_grnd2d' grid%tail_statevars%DataName = 'T_GRND2D' grid%tail_statevars%Description = 'ground 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%t_grnd2d 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%t_grnd2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2598,& 'frame/module_domain.f: Failed to allocate grid%t_grnd2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_lake3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_lake3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2609,& 'frame/module_domain.f: Failed to allocate grid%t_lake3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_lake3d=initial_data_value IF (.NOT.grid%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_lake3d' grid%tail_statevars%DataName = 'T_LAKE3D' grid%tail_statevars%Description = 'lake 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%t_lake3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_lake3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2659,& 'frame/module_domain.f: Failed to allocate grid%t_lake3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lake_icefrac3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lake_icefrac3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2670,& 'frame/module_domain.f: Failed to allocate grid%lake_icefrac3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lake_icefrac3d=initial_data_value IF (.NOT.grid%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_icefrac3d' grid%tail_statevars%DataName = 'LAKE_ICEFRAC3D' grid%tail_statevars%Description = 'mass fraction of lake layer that is frozen' 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%lake_icefrac3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lake_icefrac3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2720,& 'frame/module_domain.f: Failed to allocate grid%lake_icefrac3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z_lake3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%z_lake3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2731,& 'frame/module_domain.f: Failed to allocate grid%z_lake3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_lake3d=initial_data_value IF (.NOT.grid%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_lake3d' grid%tail_statevars%DataName = 'Z_LAKE3D' grid%tail_statevars%Description = 'layer depth for lake' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%z_lake3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%z_lake3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2781,& 'frame/module_domain.f: Failed to allocate grid%z_lake3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dz_lake3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dz_lake3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2792,& 'frame/module_domain.f: Failed to allocate grid%dz_lake3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dz_lake3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dz_lake3d' grid%tail_statevars%DataName = 'DZ_LAKE3D' grid%tail_statevars%Description = 'layer thickness for lake' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dz_lake3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dz_lake3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2842,& 'frame/module_domain.f: Failed to allocate grid%dz_lake3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_soisno3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_soisno3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2853,& 'frame/module_domain.f: Failed to allocate grid%t_soisno3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_soisno3d=initial_data_value IF (.NOT.grid%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_soisno3d' grid%tail_statevars%DataName = 'T_SOISNO3D' grid%tail_statevars%Description = 'soil (or snow) temperature' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%t_soisno3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_soisno3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2903,& 'frame/module_domain.f: Failed to allocate grid%t_soisno3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_ice3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_ice3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2914,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_ice3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_ice3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_ice3d' grid%tail_statevars%DataName = 'H2OSOI_ICE3D' grid%tail_statevars%Description = 'ice lens' grid%tail_statevars%Units = 'kg/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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_ice3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_ice3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2964,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_ice3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_liq3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_liq3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2975,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_liq3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_liq3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_liq3d' grid%tail_statevars%DataName = 'H2OSOI_LIQ3D' grid%tail_statevars%Description = 'liquid water' grid%tail_statevars%Units = 'kg/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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h2osoi_liq3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_liq3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3025,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_liq3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h2osoi_vol3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%h2osoi_vol3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3036,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h2osoi_vol3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h2osoi_vol3d' grid%tail_statevars%DataName = 'H2OSOI_VOL3D' grid%tail_statevars%Description = 'volumetric soil water (0<=h2osoi_vol<=watsat)' grid%tail_statevars%Units = 'm3/m3' 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%h2osoi_vol3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%h2osoi_vol3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3086,& 'frame/module_domain.f: Failed to allocate grid%h2osoi_vol3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%z3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3097,& 'frame/module_domain.f: Failed to allocate grid%z3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z3d' grid%tail_statevars%DataName = 'Z3D' grid%tail_statevars%Description = 'layer depth for snow & soil' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%z3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%z3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3147,& 'frame/module_domain.f: Failed to allocate grid%z3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dz3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((15)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dz3d(sm31:em31,1:15,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3158,& 'frame/module_domain.f: Failed to allocate grid%dz3d(sm31:em31,1:15,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dz3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dz3d' grid%tail_statevars%DataName = 'DZ3D' grid%tail_statevars%Description = 'layer thickness for soil or snow' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dz3d 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 = 1 grid%tail_statevars%ed2 = 15 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 = 15 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 = 15 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 = 'snow_and_soil_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dz3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3208,& 'frame/module_domain.f: Failed to allocate grid%dz3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zi3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((16)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((16)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zi3d(sm31:em31,1:16,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3219,& 'frame/module_domain.f: Failed to allocate grid%zi3d(sm31:em31,1:16,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zi3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zi3d' grid%tail_statevars%DataName = 'ZI3D' grid%tail_statevars%Description = 'interface level below a "z" level' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%zi3d 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 = 1 grid%tail_statevars%ed2 = 16 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 = 16 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 = 16 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 = 'interface_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%zi3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3269,& 'frame/module_domain.f: Failed to allocate grid%zi3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'watsat3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%watsat3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3280,& 'frame/module_domain.f: Failed to allocate grid%watsat3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%watsat3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'watsat3d' grid%tail_statevars%DataName = 'WATSAT3D' grid%tail_statevars%Description = 'volumetric soil water at saturation (porosity)' 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%watsat3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%watsat3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3330,& 'frame/module_domain.f: Failed to allocate grid%watsat3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'csol3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%csol3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3341,& 'frame/module_domain.f: Failed to allocate grid%csol3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%csol3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'csol3d' grid%tail_statevars%DataName = 'CSOL3D' grid%tail_statevars%Description = 'heat capacity, soil solids' grid%tail_statevars%Units = 'J/m**3/Kelvin' 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%csol3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%csol3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3391,& 'frame/module_domain.f: Failed to allocate grid%csol3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tkmg3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tkmg3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3402,& 'frame/module_domain.f: Failed to allocate grid%tkmg3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tkmg3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tkmg3d' grid%tail_statevars%DataName = 'TKMG3D' grid%tail_statevars%Description = 'thermal conductivity, soil minerals' grid%tail_statevars%Units = 'W/m-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%tkmg3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tkmg3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3452,& 'frame/module_domain.f: Failed to allocate grid%tkmg3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tkdry3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tkdry3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3463,& 'frame/module_domain.f: Failed to allocate grid%tkdry3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tkdry3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tkdry3d' grid%tail_statevars%DataName = 'TKDRY3D' grid%tail_statevars%Description = 'thermal conductivity, dry soil' grid%tail_statevars%Units = 'W/m/Kelvin' 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%tkdry3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tkdry3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3513,& 'frame/module_domain.f: Failed to allocate grid%tkdry3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tksatu3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((10)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tksatu3d(sm31:em31,1:10,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3524,& 'frame/module_domain.f: Failed to allocate grid%tksatu3d(sm31:em31,1:10,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tksatu3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tksatu3d' grid%tail_statevars%DataName = 'TKSATU3D' grid%tail_statevars%Description = 'thermal conductivity, saturated soil' grid%tail_statevars%Units = 'W/m-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%tksatu3d 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 = 1 grid%tail_statevars%ed2 = 10 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 = 10 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 = 10 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_levels_or_lake_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tksatu3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3574,& 'frame/module_domain.f: Failed to allocate grid%tksatu3d(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 = 'lakeflag' grid%tail_statevars%DataName = 'LAKEFLAG' grid%tail_statevars%Description = 'Flag for lake in the global attributes for metgrid data' 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%lakeflag grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%lakeflag=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 = 'lake_depth_flag' grid%tail_statevars%DataName = 'LAKE_DEPTH_FLAG' grid%tail_statevars%Description = 'Flag for lakedepth in the global attributes for metgrid data' 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%lake_depth_flag grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%lake_depth_flag=0 IF ( setinitval .EQ. 3 ) grid%lakedepth_default=initial_data_value IF ( setinitval .EQ. 3 ) grid%lake_min_elev=initial_data_value IF ( setinitval .EQ. 3 ) grid%use_lakedepth=0 IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_fm').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%ssib_fm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3626,& 'frame/module_domain.f: Failed to allocate grid%ssib_fm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_fm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_fm' grid%tail_statevars%DataName = 'SSIB_FM' grid%tail_statevars%Description = 'FM coeficient' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_fm 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%ssib_fm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3676,& 'frame/module_domain.f: Failed to allocate grid%ssib_fm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_fh').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%ssib_fh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3687,& 'frame/module_domain.f: Failed to allocate grid%ssib_fh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_fh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_fh' grid%tail_statevars%DataName = 'SSIB_FH' grid%tail_statevars%Description = 'FH coeficient' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_fh 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%ssib_fh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3737,& 'frame/module_domain.f: Failed to allocate grid%ssib_fh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_cm').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%ssib_cm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3748,& 'frame/module_domain.f: Failed to allocate grid%ssib_cm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_cm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_cm' grid%tail_statevars%DataName = 'SSIB_CM' grid%tail_statevars%Description = 'CM coeficient' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_cm 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%ssib_cm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3798,& 'frame/module_domain.f: Failed to allocate grid%ssib_cm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssibxdd').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%ssibxdd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3809,& 'frame/module_domain.f: Failed to allocate grid%ssibxdd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssibxdd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssibxdd' grid%tail_statevars%DataName = 'SSIBXDD' grid%tail_statevars%Description = 'ZERO PLANE DISPLACEMENT' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssibxdd 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%ssibxdd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3859,& 'frame/module_domain.f: Failed to allocate grid%ssibxdd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_br').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%ssib_br(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3870,& 'frame/module_domain.f: Failed to allocate grid%ssib_br(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_br=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_br' grid%tail_statevars%DataName = 'SIBBR' grid%tail_statevars%Description = 'SSiB Bulk Richardson Number' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_br 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%ssib_br(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3920,& 'frame/module_domain.f: Failed to allocate grid%ssib_br(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_lhf').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%ssib_lhf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3931,& 'frame/module_domain.f: Failed to allocate grid%ssib_lhf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_lhf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_lhf' grid%tail_statevars%DataName = 'SIBLHF' grid%tail_statevars%Description = 'SSiB latent heat flx' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_lhf 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%ssib_lhf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3981,& 'frame/module_domain.f: Failed to allocate grid%ssib_lhf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_shf').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%ssib_shf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3992,& 'frame/module_domain.f: Failed to allocate grid%ssib_shf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_shf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_shf' grid%tail_statevars%DataName = 'SIBSHF' grid%tail_statevars%Description = 'SSiB sensible heat flx' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_shf 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%ssib_shf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4042,& 'frame/module_domain.f: Failed to allocate grid%ssib_shf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_ghf').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%ssib_ghf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4053,& 'frame/module_domain.f: Failed to allocate grid%ssib_ghf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_ghf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_ghf' grid%tail_statevars%DataName = 'SIBGHF' grid%tail_statevars%Description = 'SSiB ground heat flx' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_ghf 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%ssib_ghf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4103,& 'frame/module_domain.f: Failed to allocate grid%ssib_ghf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_egs').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%ssib_egs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4114,& 'frame/module_domain.f: Failed to allocate grid%ssib_egs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_egs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_egs' grid%tail_statevars%DataName = 'SIBEGS' grid%tail_statevars%Description = 'SSiB evaporation from soil' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_egs grid%tail_statevars%streams(1) = 1 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%ssib_egs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4164,& 'frame/module_domain.f: Failed to allocate grid%ssib_egs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_eci').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%ssib_eci(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4175,& 'frame/module_domain.f: Failed to allocate grid%ssib_eci(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_eci=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_eci' grid%tail_statevars%DataName = 'SIBECI' grid%tail_statevars%Description = 'SSiB evaporation from interception' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_eci grid%tail_statevars%streams(1) = 1 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%ssib_eci(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4225,& 'frame/module_domain.f: Failed to allocate grid%ssib_eci(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_ect').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%ssib_ect(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4236,& 'frame/module_domain.f: Failed to allocate grid%ssib_ect(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_ect=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_ect' grid%tail_statevars%DataName = 'SIBECT' grid%tail_statevars%Description = 'SSiB evaporation from transpiration' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_ect grid%tail_statevars%streams(1) = 1 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%ssib_ect(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4286,& 'frame/module_domain.f: Failed to allocate grid%ssib_ect(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_egi').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%ssib_egi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4297,& 'frame/module_domain.f: Failed to allocate grid%ssib_egi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_egi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_egi' grid%tail_statevars%DataName = 'SIBEGI' grid%tail_statevars%Description = 'SSiB evaporation from xxx' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_egi grid%tail_statevars%streams(1) = 1 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%ssib_egi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4347,& 'frame/module_domain.f: Failed to allocate grid%ssib_egi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_egt').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%ssib_egt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4358,& 'frame/module_domain.f: Failed to allocate grid%ssib_egt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_egt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_egt' grid%tail_statevars%DataName = 'SIBEGT' grid%tail_statevars%Description = 'SSiB evaporation from snow' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_egt grid%tail_statevars%streams(1) = 1 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%ssib_egt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4408,& 'frame/module_domain.f: Failed to allocate grid%ssib_egt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_sdn').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%ssib_sdn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4419,& 'frame/module_domain.f: Failed to allocate grid%ssib_sdn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_sdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_sdn' grid%tail_statevars%DataName = 'SIBSDN' grid%tail_statevars%Description = 'SSiB short wave rad. down' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_sdn 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%ssib_sdn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4469,& 'frame/module_domain.f: Failed to allocate grid%ssib_sdn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_sup').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%ssib_sup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4480,& 'frame/module_domain.f: Failed to allocate grid%ssib_sup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_sup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_sup' grid%tail_statevars%DataName = 'SIBSUP' grid%tail_statevars%Description = 'SSiB short wave rad. up ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_sup grid%tail_statevars%streams(1) = 1 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%ssib_sup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4530,& 'frame/module_domain.f: Failed to allocate grid%ssib_sup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_ldn').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%ssib_ldn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4541,& 'frame/module_domain.f: Failed to allocate grid%ssib_ldn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_ldn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_ldn' grid%tail_statevars%DataName = 'SIBLDN' grid%tail_statevars%Description = 'SSiB long wave rad. down ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_ldn 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%ssib_ldn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4591,& 'frame/module_domain.f: Failed to allocate grid%ssib_ldn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_lup').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%ssib_lup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4602,& 'frame/module_domain.f: Failed to allocate grid%ssib_lup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_lup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_lup' grid%tail_statevars%DataName = 'SIBLUP' grid%tail_statevars%Description = 'SSiB long wave rad. up ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_lup grid%tail_statevars%streams(1) = 1 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%ssib_lup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4652,& 'frame/module_domain.f: Failed to allocate grid%ssib_lup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_wat').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%ssib_wat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4663,& 'frame/module_domain.f: Failed to allocate grid%ssib_wat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_wat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_wat' grid%tail_statevars%DataName = 'SIBWAT' grid%tail_statevars%Description = 'SSiB total soil moisture content' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_wat grid%tail_statevars%streams(1) = 1 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%ssib_wat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4713,& 'frame/module_domain.f: Failed to allocate grid%ssib_wat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_shc').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%ssib_shc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4724,& 'frame/module_domain.f: Failed to allocate grid%ssib_shc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_shc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_shc' grid%tail_statevars%DataName = 'SIBSHC' grid%tail_statevars%Description = 'SSiB sensible heat from canopy' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_shc grid%tail_statevars%streams(1) = 1 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%ssib_shc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4774,& 'frame/module_domain.f: Failed to allocate grid%ssib_shc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_shg').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%ssib_shg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4785,& 'frame/module_domain.f: Failed to allocate grid%ssib_shg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_shg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_shg' grid%tail_statevars%DataName = 'SIBSHG' grid%tail_statevars%Description = 'SSiB sensible heat from ground' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_shg grid%tail_statevars%streams(1) = 1 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%ssib_shg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4835,& 'frame/module_domain.f: Failed to allocate grid%ssib_shg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_lai').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%ssib_lai(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4846,& 'frame/module_domain.f: Failed to allocate grid%ssib_lai(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_lai=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_lai' grid%tail_statevars%DataName = 'SIBLAI' grid%tail_statevars%Description = 'SSiB leaf area index' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_lai grid%tail_statevars%streams(1) = 1 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%ssib_lai(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4896,& 'frame/module_domain.f: Failed to allocate grid%ssib_lai(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_vcf').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%ssib_vcf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4907,& 'frame/module_domain.f: Failed to allocate grid%ssib_vcf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_vcf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_vcf' grid%tail_statevars%DataName = 'SIBVCF' grid%tail_statevars%Description = 'SSiB vegetation cover' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_vcf grid%tail_statevars%streams(1) = 1 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%ssib_vcf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4957,& 'frame/module_domain.f: Failed to allocate grid%ssib_vcf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_z00').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%ssib_z00(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4968,& 'frame/module_domain.f: Failed to allocate grid%ssib_z00(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_z00=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_z00' grid%tail_statevars%DataName = 'SIBZ00' grid%tail_statevars%Description = 'SSiB surface roughness length' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_z00 grid%tail_statevars%streams(1) = 1 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%ssib_z00(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5018,& 'frame/module_domain.f: Failed to allocate grid%ssib_z00(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ssib_veg').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%ssib_veg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5029,& 'frame/module_domain.f: Failed to allocate grid%ssib_veg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ssib_veg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ssib_veg' grid%tail_statevars%DataName = 'SIBVEG' grid%tail_statevars%Description = 'SSiB vegetation map' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ssib_veg grid%tail_statevars%streams(1) = 1 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%ssib_veg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5079,& 'frame/module_domain.f: Failed to allocate grid%ssib_veg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'isnow').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%isnow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5090,& 'frame/module_domain.f: Failed to allocate grid%isnow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%isnow=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 = 'isnow' grid%tail_statevars%DataName = 'ISNOW' grid%tail_statevars%Description = 'ssib-snow ISNOW' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%isnow 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%isnow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5140,& 'frame/module_domain.f: Failed to allocate grid%isnow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swe').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%swe(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5151,& 'frame/module_domain.f: Failed to allocate grid%swe(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swe=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swe' grid%tail_statevars%DataName = 'SWE' grid%tail_statevars%Description = 'ssib-snow SWE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%swe 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%swe(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5201,& 'frame/module_domain.f: Failed to allocate grid%swe(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowden').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%snowden(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5212,& 'frame/module_domain.f: Failed to allocate grid%snowden(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowden=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowden' grid%tail_statevars%DataName = 'SNOWDEN' grid%tail_statevars%Description = 'ssib-snow SNOWDEN' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%snowden 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%snowden(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5262,& 'frame/module_domain.f: Failed to allocate grid%snowden(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowdepth').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%snowdepth(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5273,& 'frame/module_domain.f: Failed to allocate grid%snowdepth(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowdepth=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowdepth' grid%tail_statevars%DataName = 'SNOWDEPTH' grid%tail_statevars%Description = 'ssib-snow SNOWDEPTH' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%snowdepth 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%snowdepth(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5323,& 'frame/module_domain.f: Failed to allocate grid%snowdepth(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tkair').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%tkair(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5334,& 'frame/module_domain.f: Failed to allocate grid%tkair(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tkair=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tkair' grid%tail_statevars%DataName = 'TKAIR' grid%tail_statevars%Description = 'ssib-snow TKAIR' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tkair 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%tkair(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5384,& 'frame/module_domain.f: Failed to allocate grid%tkair(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzo1').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%dzo1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5395,& 'frame/module_domain.f: Failed to allocate grid%dzo1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzo1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzo1' grid%tail_statevars%DataName = 'DZO1' grid%tail_statevars%Description = 'ssib-snow DZO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%dzo1 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%dzo1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5445,& 'frame/module_domain.f: Failed to allocate grid%dzo1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wo1').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%wo1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5456,& 'frame/module_domain.f: Failed to allocate grid%wo1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wo1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wo1' grid%tail_statevars%DataName = 'WO1' grid%tail_statevars%Description = 'ssib-snow WO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%wo1 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%wo1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5506,& 'frame/module_domain.f: Failed to allocate grid%wo1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssn1').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%tssn1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5517,& 'frame/module_domain.f: Failed to allocate grid%tssn1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssn1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssn1' grid%tail_statevars%DataName = 'TSSN1' grid%tail_statevars%Description = 'ssib-snow TSSN1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssn1 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%tssn1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5567,& 'frame/module_domain.f: Failed to allocate grid%tssn1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssno1').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%tssno1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5578,& 'frame/module_domain.f: Failed to allocate grid%tssno1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssno1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssno1' grid%tail_statevars%DataName = 'TSSNO1' grid%tail_statevars%Description = 'ssib-snow TSSNO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssno1 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%tssno1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5628,& 'frame/module_domain.f: Failed to allocate grid%tssno1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bwo1').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%bwo1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5639,& 'frame/module_domain.f: Failed to allocate grid%bwo1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bwo1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bwo1' grid%tail_statevars%DataName = 'BWO1' grid%tail_statevars%Description = 'ssib-snow BWO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bwo1 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%bwo1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5689,& 'frame/module_domain.f: Failed to allocate grid%bwo1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bto1').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%bto1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5700,& 'frame/module_domain.f: Failed to allocate grid%bto1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bto1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bto1' grid%tail_statevars%DataName = 'BTO1' grid%tail_statevars%Description = 'ssib-snow BTO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bto1 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%bto1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5750,& 'frame/module_domain.f: Failed to allocate grid%bto1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cto1').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%cto1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5761,& 'frame/module_domain.f: Failed to allocate grid%cto1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cto1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cto1' grid%tail_statevars%DataName = 'CTO1' grid%tail_statevars%Description = 'ssib-snow CTO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%cto1 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%cto1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5811,& 'frame/module_domain.f: Failed to allocate grid%cto1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fio1').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%fio1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5822,& 'frame/module_domain.f: Failed to allocate grid%fio1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fio1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fio1' grid%tail_statevars%DataName = 'FIO1' grid%tail_statevars%Description = 'ssib-snow FIO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%fio1 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%fio1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5872,& 'frame/module_domain.f: Failed to allocate grid%fio1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flo1').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%flo1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5883,& 'frame/module_domain.f: Failed to allocate grid%flo1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flo1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flo1' grid%tail_statevars%DataName = 'FLO1' grid%tail_statevars%Description = 'ssib-snow FLO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%flo1 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%flo1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5933,& 'frame/module_domain.f: Failed to allocate grid%flo1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bio1').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%bio1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5944,& 'frame/module_domain.f: Failed to allocate grid%bio1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bio1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bio1' grid%tail_statevars%DataName = 'BIO1' grid%tail_statevars%Description = 'ssib-snow BIO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bio1 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%bio1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5994,& 'frame/module_domain.f: Failed to allocate grid%bio1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'blo1').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%blo1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6005,& 'frame/module_domain.f: Failed to allocate grid%blo1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%blo1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'blo1' grid%tail_statevars%DataName = 'BLO1' grid%tail_statevars%Description = 'ssib-snow BLO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%blo1 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%blo1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6055,& 'frame/module_domain.f: Failed to allocate grid%blo1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ho1').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%ho1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6066,& 'frame/module_domain.f: Failed to allocate grid%ho1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ho1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ho1' grid%tail_statevars%DataName = 'HO1' grid%tail_statevars%Description = 'ssib-snow HO1' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ho1 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%ho1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6116,& 'frame/module_domain.f: Failed to allocate grid%ho1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzo2').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%dzo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6127,& 'frame/module_domain.f: Failed to allocate grid%dzo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzo2' grid%tail_statevars%DataName = 'DZO2' grid%tail_statevars%Description = 'ssib-snow DZO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%dzo2 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%dzo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6177,& 'frame/module_domain.f: Failed to allocate grid%dzo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wo2').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%wo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6188,& 'frame/module_domain.f: Failed to allocate grid%wo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wo2' grid%tail_statevars%DataName = 'WO2' grid%tail_statevars%Description = 'ssib-snow WO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%wo2 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%wo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6238,& 'frame/module_domain.f: Failed to allocate grid%wo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssn2').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%tssn2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6249,& 'frame/module_domain.f: Failed to allocate grid%tssn2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssn2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssn2' grid%tail_statevars%DataName = 'TSSN2' grid%tail_statevars%Description = 'ssib-snow TSSN2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssn2 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%tssn2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6299,& 'frame/module_domain.f: Failed to allocate grid%tssn2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssno2').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%tssno2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6310,& 'frame/module_domain.f: Failed to allocate grid%tssno2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssno2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssno2' grid%tail_statevars%DataName = 'TSSNO2' grid%tail_statevars%Description = 'ssib-snow TSSNO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssno2 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%tssno2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6360,& 'frame/module_domain.f: Failed to allocate grid%tssno2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bwo2').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%bwo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6371,& 'frame/module_domain.f: Failed to allocate grid%bwo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bwo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bwo2' grid%tail_statevars%DataName = 'BWO2' grid%tail_statevars%Description = 'ssib-snow BWO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bwo2 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%bwo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6421,& 'frame/module_domain.f: Failed to allocate grid%bwo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bto2').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%bto2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6432,& 'frame/module_domain.f: Failed to allocate grid%bto2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bto2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bto2' grid%tail_statevars%DataName = 'BTO2' grid%tail_statevars%Description = 'ssib-snow BTO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bto2 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%bto2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6482,& 'frame/module_domain.f: Failed to allocate grid%bto2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cto2').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%cto2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6493,& 'frame/module_domain.f: Failed to allocate grid%cto2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cto2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cto2' grid%tail_statevars%DataName = 'CTO2' grid%tail_statevars%Description = 'ssib-snow CTO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%cto2 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%cto2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6543,& 'frame/module_domain.f: Failed to allocate grid%cto2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fio2').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%fio2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6554,& 'frame/module_domain.f: Failed to allocate grid%fio2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fio2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fio2' grid%tail_statevars%DataName = 'FIO2' grid%tail_statevars%Description = 'ssib-snow FIO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%fio2 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%fio2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6604,& 'frame/module_domain.f: Failed to allocate grid%fio2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flo2').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%flo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6615,& 'frame/module_domain.f: Failed to allocate grid%flo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flo2' grid%tail_statevars%DataName = 'FLO2' grid%tail_statevars%Description = 'ssib-snow FLO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%flo2 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%flo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6665,& 'frame/module_domain.f: Failed to allocate grid%flo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bio2').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%bio2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6676,& 'frame/module_domain.f: Failed to allocate grid%bio2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bio2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bio2' grid%tail_statevars%DataName = 'BIO2' grid%tail_statevars%Description = 'ssib-snow BIO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bio2 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%bio2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6726,& 'frame/module_domain.f: Failed to allocate grid%bio2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'blo2').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%blo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6737,& 'frame/module_domain.f: Failed to allocate grid%blo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%blo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'blo2' grid%tail_statevars%DataName = 'BLO2' grid%tail_statevars%Description = 'ssib-snow BLO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%blo2 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%blo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6787,& 'frame/module_domain.f: Failed to allocate grid%blo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ho2').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%ho2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6798,& 'frame/module_domain.f: Failed to allocate grid%ho2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ho2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ho2' grid%tail_statevars%DataName = 'HO2' grid%tail_statevars%Description = 'ssib-snow HO2' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ho2 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%ho2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6848,& 'frame/module_domain.f: Failed to allocate grid%ho2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzo3').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%dzo3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6859,& 'frame/module_domain.f: Failed to allocate grid%dzo3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzo3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzo3' grid%tail_statevars%DataName = 'DZO3' grid%tail_statevars%Description = 'ssib-snow DZO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%dzo3 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%dzo3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6909,& 'frame/module_domain.f: Failed to allocate grid%dzo3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wo3').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%wo3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6920,& 'frame/module_domain.f: Failed to allocate grid%wo3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wo3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wo3' grid%tail_statevars%DataName = 'WO3' grid%tail_statevars%Description = 'ssib-snow WO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%wo3 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%wo3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6970,& 'frame/module_domain.f: Failed to allocate grid%wo3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssn3').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%tssn3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6981,& 'frame/module_domain.f: Failed to allocate grid%tssn3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssn3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssn3' grid%tail_statevars%DataName = 'TSSN3' grid%tail_statevars%Description = 'ssib-snow TSSN3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssn3 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%tssn3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7031,& 'frame/module_domain.f: Failed to allocate grid%tssn3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssno3').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%tssno3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7042,& 'frame/module_domain.f: Failed to allocate grid%tssno3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssno3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssno3' grid%tail_statevars%DataName = 'TSSNO3' grid%tail_statevars%Description = 'ssib-snow TSSNO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssno3 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%tssno3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7092,& 'frame/module_domain.f: Failed to allocate grid%tssno3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bwo3').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%bwo3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7103,& 'frame/module_domain.f: Failed to allocate grid%bwo3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bwo3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bwo3' grid%tail_statevars%DataName = 'BWO3' grid%tail_statevars%Description = 'ssib-snow BWO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bwo3 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%bwo3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7153,& 'frame/module_domain.f: Failed to allocate grid%bwo3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bto3').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%bto3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7164,& 'frame/module_domain.f: Failed to allocate grid%bto3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bto3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bto3' grid%tail_statevars%DataName = 'BTO3' grid%tail_statevars%Description = 'ssib-snow BTO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bto3 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%bto3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7214,& 'frame/module_domain.f: Failed to allocate grid%bto3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cto3').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%cto3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7225,& 'frame/module_domain.f: Failed to allocate grid%cto3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cto3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cto3' grid%tail_statevars%DataName = 'CTO3' grid%tail_statevars%Description = 'ssib-snow CTO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%cto3 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%cto3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7275,& 'frame/module_domain.f: Failed to allocate grid%cto3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fio3').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%fio3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7286,& 'frame/module_domain.f: Failed to allocate grid%fio3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fio3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fio3' grid%tail_statevars%DataName = 'FIO3' grid%tail_statevars%Description = 'ssib-snow FIO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%fio3 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%fio3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7336,& 'frame/module_domain.f: Failed to allocate grid%fio3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flo3').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%flo3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7347,& 'frame/module_domain.f: Failed to allocate grid%flo3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flo3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flo3' grid%tail_statevars%DataName = 'FLO3' grid%tail_statevars%Description = 'ssib-snow FLO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%flo3 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%flo3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7397,& 'frame/module_domain.f: Failed to allocate grid%flo3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bio3').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%bio3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7408,& 'frame/module_domain.f: Failed to allocate grid%bio3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bio3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bio3' grid%tail_statevars%DataName = 'BIO3' grid%tail_statevars%Description = 'ssib-snow BIO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bio3 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%bio3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7458,& 'frame/module_domain.f: Failed to allocate grid%bio3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'blo3').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%blo3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7469,& 'frame/module_domain.f: Failed to allocate grid%blo3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%blo3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'blo3' grid%tail_statevars%DataName = 'BLO3' grid%tail_statevars%Description = 'ssib-snow BLO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%blo3 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%blo3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7519,& 'frame/module_domain.f: Failed to allocate grid%blo3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ho3').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%ho3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7530,& 'frame/module_domain.f: Failed to allocate grid%ho3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ho3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ho3' grid%tail_statevars%DataName = 'HO3' grid%tail_statevars%Description = 'ssib-snow HO3' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ho3 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%ho3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7580,& 'frame/module_domain.f: Failed to allocate grid%ho3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dzo4').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%dzo4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7591,& 'frame/module_domain.f: Failed to allocate grid%dzo4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzo4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dzo4' grid%tail_statevars%DataName = 'DZO4' grid%tail_statevars%Description = 'ssib-snow DZO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%dzo4 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%dzo4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7641,& 'frame/module_domain.f: Failed to allocate grid%dzo4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wo4').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%wo4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7652,& 'frame/module_domain.f: Failed to allocate grid%wo4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wo4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wo4' grid%tail_statevars%DataName = 'WO4' grid%tail_statevars%Description = 'ssib-snow WO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%wo4 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%wo4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7702,& 'frame/module_domain.f: Failed to allocate grid%wo4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssn4').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%tssn4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7713,& 'frame/module_domain.f: Failed to allocate grid%tssn4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssn4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssn4' grid%tail_statevars%DataName = 'TSSN4' grid%tail_statevars%Description = 'ssib-snow TSSN4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssn4 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%tssn4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7763,& 'frame/module_domain.f: Failed to allocate grid%tssn4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tssno4').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%tssno4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7774,& 'frame/module_domain.f: Failed to allocate grid%tssno4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tssno4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tssno4' grid%tail_statevars%DataName = 'TSSNO4' grid%tail_statevars%Description = 'ssib-snow TSSNO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%tssno4 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%tssno4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7824,& 'frame/module_domain.f: Failed to allocate grid%tssno4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bwo4').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%bwo4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7835,& 'frame/module_domain.f: Failed to allocate grid%bwo4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bwo4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bwo4' grid%tail_statevars%DataName = 'BWO4' grid%tail_statevars%Description = 'ssib-snow BWO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bwo4 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%bwo4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7885,& 'frame/module_domain.f: Failed to allocate grid%bwo4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bto4').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%bto4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7896,& 'frame/module_domain.f: Failed to allocate grid%bto4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bto4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bto4' grid%tail_statevars%DataName = 'BTO4' grid%tail_statevars%Description = 'ssib-snow BTO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bto4 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%bto4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7946,& 'frame/module_domain.f: Failed to allocate grid%bto4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cto4').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%cto4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7957,& 'frame/module_domain.f: Failed to allocate grid%cto4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cto4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cto4' grid%tail_statevars%DataName = 'CTO4' grid%tail_statevars%Description = 'ssib-snow CTO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%cto4 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%cto4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8007,& 'frame/module_domain.f: Failed to allocate grid%cto4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fio4').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%fio4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8018,& 'frame/module_domain.f: Failed to allocate grid%fio4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fio4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fio4' grid%tail_statevars%DataName = 'FIO4' grid%tail_statevars%Description = 'ssib-snow FIO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%fio4 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%fio4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8068,& 'frame/module_domain.f: Failed to allocate grid%fio4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flo4').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%flo4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8079,& 'frame/module_domain.f: Failed to allocate grid%flo4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flo4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flo4' grid%tail_statevars%DataName = 'FLO4' grid%tail_statevars%Description = 'ssib-snow FLO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%flo4 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%flo4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8129,& 'frame/module_domain.f: Failed to allocate grid%flo4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bio4').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%bio4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8140,& 'frame/module_domain.f: Failed to allocate grid%bio4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bio4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bio4' grid%tail_statevars%DataName = 'BIO4' grid%tail_statevars%Description = 'ssib-snow BIO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%bio4 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%bio4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8190,& 'frame/module_domain.f: Failed to allocate grid%bio4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'blo4').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%blo4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8201,& 'frame/module_domain.f: Failed to allocate grid%blo4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%blo4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'blo4' grid%tail_statevars%DataName = 'BLO4' grid%tail_statevars%Description = 'ssib-snow BLO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%blo4 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%blo4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8251,& 'frame/module_domain.f: Failed to allocate grid%blo4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ho4').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%ho4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8262,& 'frame/module_domain.f: Failed to allocate grid%ho4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ho4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ho4' grid%tail_statevars%DataName = 'HO4' grid%tail_statevars%Description = 'ssib-snow HO4' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Z' 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%ho4 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%ho4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8312,& 'frame/module_domain.f: Failed to allocate grid%ho4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'isnowxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%isnowxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8323,& 'frame/module_domain.f: Failed to allocate grid%isnowxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%isnowxy=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 = 'isnowxy' grid%tail_statevars%DataName = 'ISNOW' grid%tail_statevars%Description = 'no. of snow layer' grid%tail_statevars%Units = 'm3 m-3' 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%isnowxy 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%isnowxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8373,& 'frame/module_domain.f: Failed to allocate grid%isnowxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8384,& 'frame/module_domain.f: Failed to allocate grid%tvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tvxy' grid%tail_statevars%DataName = 'TV' grid%tail_statevars%Description = 'vegetation leaf 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%tvxy 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%tvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8434,& 'frame/module_domain.f: Failed to allocate grid%tvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8445,& 'frame/module_domain.f: Failed to allocate grid%tgxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgxy' grid%tail_statevars%DataName = 'TG' grid%tail_statevars%Description = 'bulk ground 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%tgxy 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%tgxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8495,& 'frame/module_domain.f: Failed to allocate grid%tgxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'canicexy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%canicexy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8506,& 'frame/module_domain.f: Failed to allocate grid%canicexy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canicexy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'canicexy' grid%tail_statevars%DataName = 'CANICE' grid%tail_statevars%Description = 'intercepted ice mass' 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%canicexy 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%canicexy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8556,& 'frame/module_domain.f: Failed to allocate grid%canicexy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'canliqxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%canliqxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8567,& 'frame/module_domain.f: Failed to allocate grid%canliqxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canliqxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'canliqxy' grid%tail_statevars%DataName = 'CANLIQ' grid%tail_statevars%Description = 'intercepted liquid water' 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%canliqxy 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%canliqxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8617,& 'frame/module_domain.f: Failed to allocate grid%canliqxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'eahxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%eahxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8628,& 'frame/module_domain.f: Failed to allocate grid%eahxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%eahxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'eahxy' grid%tail_statevars%DataName = 'EAH' grid%tail_statevars%Description = 'canopy air vapor 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%eahxy 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%eahxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8678,& 'frame/module_domain.f: Failed to allocate grid%eahxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tahxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tahxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8689,& 'frame/module_domain.f: Failed to allocate grid%tahxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tahxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tahxy' grid%tail_statevars%DataName = 'TAH' grid%tail_statevars%Description = 'canopy 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tahxy 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%tahxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8739,& 'frame/module_domain.f: Failed to allocate grid%tahxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cmxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cmxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8750,& 'frame/module_domain.f: Failed to allocate grid%cmxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cmxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cmxy' grid%tail_statevars%DataName = 'CM' grid%tail_statevars%Description = 'surf. exchange coeff. for momentum' 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%cmxy 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%cmxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8800,& 'frame/module_domain.f: Failed to allocate grid%cmxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8811,& 'frame/module_domain.f: Failed to allocate grid%chxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chxy' grid%tail_statevars%DataName = 'CH' grid%tail_statevars%Description = 'surf. exchange coeff. for heat' 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%chxy 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%chxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8861,& 'frame/module_domain.f: Failed to allocate grid%chxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fwetxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fwetxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8872,& 'frame/module_domain.f: Failed to allocate grid%fwetxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fwetxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fwetxy' grid%tail_statevars%DataName = 'FWET' grid%tail_statevars%Description = 'wetted or snowed canopy 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%fwetxy 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%fwetxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8922,& 'frame/module_domain.f: Failed to allocate grid%fwetxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sneqvoxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sneqvoxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8933,& 'frame/module_domain.f: Failed to allocate grid%sneqvoxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sneqvoxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sneqvoxy' grid%tail_statevars%DataName = 'SNEQVO' grid%tail_statevars%Description = 'snow mass at last time step' 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%sneqvoxy 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%sneqvoxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8983,& 'frame/module_domain.f: Failed to allocate grid%sneqvoxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alboldxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alboldxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8994,& 'frame/module_domain.f: Failed to allocate grid%alboldxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alboldxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alboldxy' grid%tail_statevars%DataName = 'ALBOLD' grid%tail_statevars%Description = 'snow albedo at last timestep' 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%alboldxy 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%alboldxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9044,& 'frame/module_domain.f: Failed to allocate grid%alboldxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qsnowxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qsnowxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9055,& 'frame/module_domain.f: Failed to allocate grid%qsnowxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsnowxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qsnowxy' grid%tail_statevars%DataName = 'QSNOWXY' grid%tail_statevars%Description = 'snowfall on the ground' grid%tail_statevars%Units = 'mm/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%qsnowxy 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%qsnowxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9105,& 'frame/module_domain.f: Failed to allocate grid%qsnowxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wslakexy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wslakexy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9116,& 'frame/module_domain.f: Failed to allocate grid%wslakexy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wslakexy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wslakexy' grid%tail_statevars%DataName = 'WSLAKE' grid%tail_statevars%Description = 'lake water storage' 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%wslakexy 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%wslakexy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9166,& 'frame/module_domain.f: Failed to allocate grid%wslakexy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zwtxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zwtxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9177,& 'frame/module_domain.f: Failed to allocate grid%zwtxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zwtxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zwtxy' grid%tail_statevars%DataName = 'ZWT' grid%tail_statevars%Description = 'water table 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%zwtxy 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%zwtxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9227,& 'frame/module_domain.f: Failed to allocate grid%zwtxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'waxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%waxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9238,& 'frame/module_domain.f: Failed to allocate grid%waxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%waxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'waxy' grid%tail_statevars%DataName = 'WA' grid%tail_statevars%Description = 'water in the acquifer' 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%waxy 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%waxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9288,& 'frame/module_domain.f: Failed to allocate grid%waxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wtxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wtxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9299,& 'frame/module_domain.f: Failed to allocate grid%wtxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wtxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wtxy' grid%tail_statevars%DataName = 'WT' grid%tail_statevars%Description = 'groundwater storage' 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%wtxy 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%wtxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9349,& 'frame/module_domain.f: Failed to allocate grid%wtxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsnoxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tsnoxy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9360,& 'frame/module_domain.f: Failed to allocate grid%tsnoxy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsnoxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsnoxy' grid%tail_statevars%DataName = 'TSNO' grid%tail_statevars%Description = 'snow 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%tsnoxy 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_snow_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_snow_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_snow_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 = 'snow_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tsnoxy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9410,& 'frame/module_domain.f: Failed to allocate grid%tsnoxy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zsnsoxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_snso_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_snso_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zsnsoxy(sm31:em31,1:model_config_rec%num_snso_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9421,& 'frame/module_domain.f: Failed to allocate grid%zsnsoxy(sm31:em31,1:model_config_rec%num_snso_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zsnsoxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zsnsoxy' grid%tail_statevars%DataName = 'ZSNSO' grid%tail_statevars%Description = 'layer-bottom depth from snow surf' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%zsnsoxy 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_snso_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_snso_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_snso_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 = 'snso_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%zsnsoxy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9471,& 'frame/module_domain.f: Failed to allocate grid%zsnsoxy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snicexy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snicexy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9482,& 'frame/module_domain.f: Failed to allocate grid%snicexy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snicexy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snicexy' grid%tail_statevars%DataName = 'SNICE' grid%tail_statevars%Description = 'snow layer ice' grid%tail_statevars%Units = 'mm' 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%snicexy 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_snow_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_snow_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_snow_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 = 'snow_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snicexy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9532,& 'frame/module_domain.f: Failed to allocate grid%snicexy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snliqxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_snow_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snliqxy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9543,& 'frame/module_domain.f: Failed to allocate grid%snliqxy(sm31:em31,1:model_config_rec%num_snow_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snliqxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snliqxy' grid%tail_statevars%DataName = 'SNLIQ' grid%tail_statevars%Description = 'snow layer liquid' grid%tail_statevars%Units = 'mm' 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%snliqxy 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_snow_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_snow_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_snow_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 = 'snow_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%snliqxy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9593,& 'frame/module_domain.f: Failed to allocate grid%snliqxy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lfmassxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lfmassxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9604,& 'frame/module_domain.f: Failed to allocate grid%lfmassxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lfmassxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lfmassxy' grid%tail_statevars%DataName = 'LFMASS' grid%tail_statevars%Description = 'leaf mass' grid%tail_statevars%Units = 'g/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%lfmassxy 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%lfmassxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9654,& 'frame/module_domain.f: Failed to allocate grid%lfmassxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rtmassxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rtmassxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9665,& 'frame/module_domain.f: Failed to allocate grid%rtmassxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rtmassxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rtmassxy' grid%tail_statevars%DataName = 'RTMASS' grid%tail_statevars%Description = 'mass of fine roots' grid%tail_statevars%Units = 'g/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%rtmassxy 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%rtmassxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9715,& 'frame/module_domain.f: Failed to allocate grid%rtmassxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'stmassxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%stmassxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9726,& 'frame/module_domain.f: Failed to allocate grid%stmassxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%stmassxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'stmassxy' grid%tail_statevars%DataName = 'STMASS' grid%tail_statevars%Description = 'stem mass' grid%tail_statevars%Units = 'g/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%stmassxy 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%stmassxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9776,& 'frame/module_domain.f: Failed to allocate grid%stmassxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'woodxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%woodxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9787,& 'frame/module_domain.f: Failed to allocate grid%woodxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%woodxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'woodxy' grid%tail_statevars%DataName = 'WOOD' grid%tail_statevars%Description = 'mass of wood' grid%tail_statevars%Units = 'g/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%woodxy 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%woodxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9837,& 'frame/module_domain.f: Failed to allocate grid%woodxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'stblcpxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%stblcpxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9848,& 'frame/module_domain.f: Failed to allocate grid%stblcpxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%stblcpxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'stblcpxy' grid%tail_statevars%DataName = 'STBLCP' grid%tail_statevars%Description = 'stable carbon pool' grid%tail_statevars%Units = 'g/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%stblcpxy 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%stblcpxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9898,& 'frame/module_domain.f: Failed to allocate grid%stblcpxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fastcpxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fastcpxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9909,& 'frame/module_domain.f: Failed to allocate grid%fastcpxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fastcpxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fastcpxy' grid%tail_statevars%DataName = 'FASTCP' grid%tail_statevars%Description = 'short-lived carbon' grid%tail_statevars%Units = 'g/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%fastcpxy 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%fastcpxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9959,& 'frame/module_domain.f: Failed to allocate grid%fastcpxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xsaixy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xsaixy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9970,& 'frame/module_domain.f: Failed to allocate grid%xsaixy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xsaixy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xsaixy' grid%tail_statevars%DataName = 'XSAI' grid%tail_statevars%Description = 'stem area index' 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%xsaixy 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%xsaixy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10020,& 'frame/module_domain.f: Failed to allocate grid%xsaixy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taussxy').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%taussxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10031,& 'frame/module_domain.f: Failed to allocate grid%taussxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taussxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taussxy' grid%tail_statevars%DataName = 'TAUSS' grid%tail_statevars%Description = 'non-dimensional snow age' 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%taussxy 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%taussxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10081,& 'frame/module_domain.f: Failed to allocate grid%taussxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2mvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2mvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10092,& 'frame/module_domain.f: Failed to allocate grid%t2mvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2mvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2mvxy' grid%tail_statevars%DataName = 'T2V' grid%tail_statevars%Description = '2 meter temperature over canopy' 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%t2mvxy 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%t2mvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10142,& 'frame/module_domain.f: Failed to allocate grid%t2mvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2mbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2mbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10153,& 'frame/module_domain.f: Failed to allocate grid%t2mbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2mbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2mbxy' grid%tail_statevars%DataName = 'T2B' grid%tail_statevars%Description = '2 meter temperature over bare ground' 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%t2mbxy 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%t2mbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10203,& 'frame/module_domain.f: Failed to allocate grid%t2mbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2mvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2mvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10214,& 'frame/module_domain.f: Failed to allocate grid%q2mvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2mvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2mvxy' grid%tail_statevars%DataName = 'Q2V' grid%tail_statevars%Description = '2 meter mixing ratio over canopy' 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%q2mvxy 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%q2mvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10264,& 'frame/module_domain.f: Failed to allocate grid%q2mvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2mbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2mbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10275,& 'frame/module_domain.f: Failed to allocate grid%q2mbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2mbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2mbxy' grid%tail_statevars%DataName = 'Q2B' grid%tail_statevars%Description = '2 meter mixing ratio over bare ground' 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%q2mbxy 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%q2mbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10325,& 'frame/module_domain.f: Failed to allocate grid%q2mbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tradxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tradxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10336,& 'frame/module_domain.f: Failed to allocate grid%tradxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tradxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tradxy' grid%tail_statevars%DataName = 'TRAD' grid%tail_statevars%Description = 'surface radiative 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%tradxy 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%tradxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10386,& 'frame/module_domain.f: Failed to allocate grid%tradxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'neexy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%neexy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10397,& 'frame/module_domain.f: Failed to allocate grid%neexy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%neexy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'neexy' grid%tail_statevars%DataName = 'NEE' grid%tail_statevars%Description = 'net ecosystem exchange' grid%tail_statevars%Units = 'g/m2/s CO2' 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%neexy 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%neexy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10447,& 'frame/module_domain.f: Failed to allocate grid%neexy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gppxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gppxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10458,& 'frame/module_domain.f: Failed to allocate grid%gppxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gppxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gppxy' grid%tail_statevars%DataName = 'GPP' grid%tail_statevars%Description = 'gross primary productivity' grid%tail_statevars%Units = 'g/m2/s 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%gppxy 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%gppxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10508,& 'frame/module_domain.f: Failed to allocate grid%gppxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nppxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nppxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10519,& 'frame/module_domain.f: Failed to allocate grid%nppxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nppxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nppxy' grid%tail_statevars%DataName = 'NPP' grid%tail_statevars%Description = 'net primary productivity' grid%tail_statevars%Units = 'g/m2/s 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%nppxy 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%nppxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10569,& 'frame/module_domain.f: Failed to allocate grid%nppxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fvegxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fvegxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10580,& 'frame/module_domain.f: Failed to allocate grid%fvegxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fvegxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fvegxy' grid%tail_statevars%DataName = 'FVEG' grid%tail_statevars%Description = 'Noah-MP 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%fvegxy 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%fvegxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10630,& 'frame/module_domain.f: Failed to allocate grid%fvegxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qinxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qinxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10641,& 'frame/module_domain.f: Failed to allocate grid%qinxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qinxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qinxy' grid%tail_statevars%DataName = 'QIN' grid%tail_statevars%Description = 'groundwater recharge' grid%tail_statevars%Units = 'mm/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%qinxy 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%qinxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10691,& 'frame/module_domain.f: Failed to allocate grid%qinxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'runsfxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%runsfxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10702,& 'frame/module_domain.f: Failed to allocate grid%runsfxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%runsfxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'runsfxy' grid%tail_statevars%DataName = 'RUNSF' grid%tail_statevars%Description = 'surface runoff' grid%tail_statevars%Units = 'mm/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%runsfxy 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%runsfxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10752,& 'frame/module_domain.f: Failed to allocate grid%runsfxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'runsbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%runsbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10763,& 'frame/module_domain.f: Failed to allocate grid%runsbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%runsbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'runsbxy' grid%tail_statevars%DataName = 'RUNSB' grid%tail_statevars%Description = 'subsurface runoff' grid%tail_statevars%Units = 'mm/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%runsbxy 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%runsbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10813,& 'frame/module_domain.f: Failed to allocate grid%runsbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ecanxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ecanxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10824,& 'frame/module_domain.f: Failed to allocate grid%ecanxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ecanxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ecanxy' grid%tail_statevars%DataName = 'ECAN' grid%tail_statevars%Description = 'evaporation of intercepted water' grid%tail_statevars%Units = 'mm/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%ecanxy 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%ecanxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10874,& 'frame/module_domain.f: Failed to allocate grid%ecanxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edirxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%edirxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10885,& 'frame/module_domain.f: Failed to allocate grid%edirxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edirxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edirxy' grid%tail_statevars%DataName = 'EDIR' grid%tail_statevars%Description = 'ground surface evaporation rate' grid%tail_statevars%Units = 'mm/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%edirxy 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%edirxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10935,& 'frame/module_domain.f: Failed to allocate grid%edirxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'etranxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%etranxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10946,& 'frame/module_domain.f: Failed to allocate grid%etranxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%etranxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'etranxy' grid%tail_statevars%DataName = 'ETRAN' grid%tail_statevars%Description = 'transpiration rate' grid%tail_statevars%Units = 'mm/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%etranxy 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%etranxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10996,& 'frame/module_domain.f: Failed to allocate grid%etranxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fsaxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fsaxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11007,& 'frame/module_domain.f: Failed to allocate grid%fsaxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fsaxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fsaxy' grid%tail_statevars%DataName = 'FSA' grid%tail_statevars%Description = 'total absorbed solar radiation' grid%tail_statevars%Units = 'W/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%fsaxy 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%fsaxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11057,& 'frame/module_domain.f: Failed to allocate grid%fsaxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'firaxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%firaxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11068,& 'frame/module_domain.f: Failed to allocate grid%firaxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%firaxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'firaxy' grid%tail_statevars%DataName = 'FIRA' grid%tail_statevars%Description = 'total net longwave rad' grid%tail_statevars%Units = 'W/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%firaxy 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%firaxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11118,& 'frame/module_domain.f: Failed to allocate grid%firaxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aparxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%aparxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11129,& 'frame/module_domain.f: Failed to allocate grid%aparxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aparxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aparxy' grid%tail_statevars%DataName = 'APAR' grid%tail_statevars%Description = 'photosyn active energy by canopy' grid%tail_statevars%Units = 'W/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%aparxy 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%aparxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11179,& 'frame/module_domain.f: Failed to allocate grid%aparxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'psnxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%psnxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11190,& 'frame/module_domain.f: Failed to allocate grid%psnxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psnxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'psnxy' grid%tail_statevars%DataName = 'PSN' grid%tail_statevars%Description = 'total photosynthesis' grid%tail_statevars%Units = 'umol co2/m2/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%psnxy 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%psnxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11240,& 'frame/module_domain.f: Failed to allocate grid%psnxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'savxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%savxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11251,& 'frame/module_domain.f: Failed to allocate grid%savxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%savxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'savxy' grid%tail_statevars%DataName = 'SAV' grid%tail_statevars%Description = 'solar rad absorbed by veg' grid%tail_statevars%Units = 'W/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%savxy 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%savxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11301,& 'frame/module_domain.f: Failed to allocate grid%savxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sagxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sagxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11312,& 'frame/module_domain.f: Failed to allocate grid%sagxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sagxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sagxy' grid%tail_statevars%DataName = 'SAG' grid%tail_statevars%Description = 'solar rad absorbed by ground' grid%tail_statevars%Units = 'W/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%sagxy 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%sagxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11362,& 'frame/module_domain.f: Failed to allocate grid%sagxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rssunxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rssunxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11373,& 'frame/module_domain.f: Failed to allocate grid%rssunxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rssunxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rssunxy' grid%tail_statevars%DataName = 'RSSUN' grid%tail_statevars%Description = 'sunlit stomatal resistance' grid%tail_statevars%Units = 's/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%rssunxy 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%rssunxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11423,& 'frame/module_domain.f: Failed to allocate grid%rssunxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rsshaxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rsshaxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11434,& 'frame/module_domain.f: Failed to allocate grid%rsshaxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rsshaxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rsshaxy' grid%tail_statevars%DataName = 'RSSHA' grid%tail_statevars%Description = 'shaded stomatal resistance' grid%tail_statevars%Units = 's/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%rsshaxy 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%rsshaxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11484,& 'frame/module_domain.f: Failed to allocate grid%rsshaxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bgapxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%bgapxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11495,& 'frame/module_domain.f: Failed to allocate grid%bgapxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bgapxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bgapxy' grid%tail_statevars%DataName = 'BGAP' grid%tail_statevars%Description = 'between canopy gap' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%bgapxy 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%bgapxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11545,& 'frame/module_domain.f: Failed to allocate grid%bgapxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wgapxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wgapxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11556,& 'frame/module_domain.f: Failed to allocate grid%wgapxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wgapxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wgapxy' grid%tail_statevars%DataName = 'WGAP' grid%tail_statevars%Description = 'within canopy gap' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wgapxy 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%wgapxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11606,& 'frame/module_domain.f: Failed to allocate grid%wgapxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11617,& 'frame/module_domain.f: Failed to allocate grid%tgvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgvxy' grid%tail_statevars%DataName = 'TGV' grid%tail_statevars%Description = 'ground temp. under canopy' 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%tgvxy 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%tgvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11667,& 'frame/module_domain.f: Failed to allocate grid%tgvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tgbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tgbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11678,& 'frame/module_domain.f: Failed to allocate grid%tgbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tgbxy' grid%tail_statevars%DataName = 'TGB' grid%tail_statevars%Description = 'bare ground 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%tgbxy 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%tgbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11728,& 'frame/module_domain.f: Failed to allocate grid%tgbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11739,& 'frame/module_domain.f: Failed to allocate grid%chvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chvxy' grid%tail_statevars%DataName = 'CHV' grid%tail_statevars%Description = 'vegetated heat exchange coefficient' 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%chvxy 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%chvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11789,& 'frame/module_domain.f: Failed to allocate grid%chvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11800,& 'frame/module_domain.f: Failed to allocate grid%chbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chbxy' grid%tail_statevars%DataName = 'CHB' grid%tail_statevars%Description = 'bare-ground heat exchange coefficient' 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%chbxy 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%chbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11850,& 'frame/module_domain.f: Failed to allocate grid%chbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shgxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shgxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11861,& 'frame/module_domain.f: Failed to allocate grid%shgxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shgxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shgxy' grid%tail_statevars%DataName = 'SHG' grid%tail_statevars%Description = 'sensible heat flux: ground to canopy' grid%tail_statevars%Units = 'W/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%shgxy 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%shgxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11911,& 'frame/module_domain.f: Failed to allocate grid%shgxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shcxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shcxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11922,& 'frame/module_domain.f: Failed to allocate grid%shcxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shcxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shcxy' grid%tail_statevars%DataName = 'SHC' grid%tail_statevars%Description = 'sensible heat flux: leaf to canopy' grid%tail_statevars%Units = 'W/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%shcxy 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%shcxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11972,& 'frame/module_domain.f: Failed to allocate grid%shcxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11983,& 'frame/module_domain.f: Failed to allocate grid%shbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shbxy' grid%tail_statevars%DataName = 'SHB' grid%tail_statevars%Description = 'sensible heat flux: bare grnd to atmo' grid%tail_statevars%Units = 'W/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%shbxy 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%shbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12033,& 'frame/module_domain.f: Failed to allocate grid%shbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'evgxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%evgxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12044,& 'frame/module_domain.f: Failed to allocate grid%evgxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%evgxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'evgxy' grid%tail_statevars%DataName = 'EVG' grid%tail_statevars%Description = 'latent heat flux: ground to canopy' grid%tail_statevars%Units = 'W/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%evgxy 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%evgxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12094,& 'frame/module_domain.f: Failed to allocate grid%evgxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'evbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%evbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12105,& 'frame/module_domain.f: Failed to allocate grid%evbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%evbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'evbxy' grid%tail_statevars%DataName = 'EVB' grid%tail_statevars%Description = 'latent heat flux: bare grnd to atmo' grid%tail_statevars%Units = 'W/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%evbxy 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%evbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12155,& 'frame/module_domain.f: Failed to allocate grid%evbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ghvxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ghvxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12166,& 'frame/module_domain.f: Failed to allocate grid%ghvxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ghvxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ghvxy' grid%tail_statevars%DataName = 'GHV' grid%tail_statevars%Description = 'heat flux into soil: under canopy' grid%tail_statevars%Units = 'W/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%ghvxy 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%ghvxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12216,& 'frame/module_domain.f: Failed to allocate grid%ghvxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ghbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ghbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12227,& 'frame/module_domain.f: Failed to allocate grid%ghbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ghbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ghbxy' grid%tail_statevars%DataName = 'GHB' grid%tail_statevars%Description = 'heat flux into soil: bare fraction' grid%tail_statevars%Units = 'W/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%ghbxy 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%ghbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12277,& 'frame/module_domain.f: Failed to allocate grid%ghbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'irgxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%irgxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12288,& 'frame/module_domain.f: Failed to allocate grid%irgxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%irgxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'irgxy' grid%tail_statevars%DataName = 'IRG' grid%tail_statevars%Description = 'net longwave at below canopy surface' grid%tail_statevars%Units = 'W/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%irgxy 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%irgxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12338,& 'frame/module_domain.f: Failed to allocate grid%irgxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ircxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ircxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12349,& 'frame/module_domain.f: Failed to allocate grid%ircxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ircxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ircxy' grid%tail_statevars%DataName = 'IRC' grid%tail_statevars%Description = 'net longwave in canopy' grid%tail_statevars%Units = 'W/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%ircxy 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%ircxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12399,& 'frame/module_domain.f: Failed to allocate grid%ircxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'irbxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%irbxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12410,& 'frame/module_domain.f: Failed to allocate grid%irbxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%irbxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'irbxy' grid%tail_statevars%DataName = 'IRB' grid%tail_statevars%Description = 'net longwave at bare fraction surface' grid%tail_statevars%Units = 'W/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%irbxy 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%irbxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12460,& 'frame/module_domain.f: Failed to allocate grid%irbxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'trxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%trxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12471,& 'frame/module_domain.f: Failed to allocate grid%trxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'trxy' grid%tail_statevars%DataName = 'TR' grid%tail_statevars%Description = 'transpiration' grid%tail_statevars%Units = 'W/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%trxy 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%trxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12521,& 'frame/module_domain.f: Failed to allocate grid%trxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'evcxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%evcxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12532,& 'frame/module_domain.f: Failed to allocate grid%evcxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%evcxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'evcxy' grid%tail_statevars%DataName = 'EVC' grid%tail_statevars%Description = 'canopy evaporation' grid%tail_statevars%Units = 'W/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%evcxy 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%evcxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12582,& 'frame/module_domain.f: Failed to allocate grid%evcxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chleafxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chleafxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12593,& 'frame/module_domain.f: Failed to allocate grid%chleafxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chleafxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chleafxy' grid%tail_statevars%DataName = 'CHLEAF' grid%tail_statevars%Description = 'leaf exchange coefficient' 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%chleafxy 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%chleafxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12643,& 'frame/module_domain.f: Failed to allocate grid%chleafxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chucxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chucxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12654,& 'frame/module_domain.f: Failed to allocate grid%chucxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chucxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chucxy' grid%tail_statevars%DataName = 'CHUC' grid%tail_statevars%Description = 'under canopy exchange coefficient' 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%chucxy 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%chucxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12704,& 'frame/module_domain.f: Failed to allocate grid%chucxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chv2xy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chv2xy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12715,& 'frame/module_domain.f: Failed to allocate grid%chv2xy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chv2xy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chv2xy' grid%tail_statevars%DataName = 'CHV2' grid%tail_statevars%Description = 'leaf exchange coefficient' 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%chv2xy 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%chv2xy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12765,& 'frame/module_domain.f: Failed to allocate grid%chv2xy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chb2xy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chb2xy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12776,& 'frame/module_domain.f: Failed to allocate grid%chb2xy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chb2xy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chb2xy' grid%tail_statevars%DataName = 'CHB2' grid%tail_statevars%Description = 'under canopy exchange coefficient' 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%chb2xy 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%chb2xy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12826,& 'frame/module_domain.f: Failed to allocate grid%chb2xy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'chstarxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%chstarxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12837,& 'frame/module_domain.f: Failed to allocate grid%chstarxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chstarxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chstarxy' grid%tail_statevars%DataName = 'CHSTAR' grid%tail_statevars%Description = 'dummy exchange coefficient' 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%chstarxy 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%chstarxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12887,& 'frame/module_domain.f: Failed to allocate grid%chstarxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smoiseq').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%smoiseq(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12898,& 'frame/module_domain.f: Failed to allocate grid%smoiseq(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smoiseq=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smoiseq' grid%tail_statevars%DataName = 'SMOISEQ' grid%tail_statevars%Description = 'EQ. 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%smoiseq 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%smoiseq(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12948,& 'frame/module_domain.f: Failed to allocate grid%smoiseq(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smcwtdxy').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%smcwtdxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12959,& 'frame/module_domain.f: Failed to allocate grid%smcwtdxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smcwtdxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smcwtdxy' grid%tail_statevars%DataName = 'SMCWTD' grid%tail_statevars%Description = 'deep 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%smcwtdxy 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%smcwtdxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13009,& 'frame/module_domain.f: Failed to allocate grid%smcwtdxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rechxy').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%rechxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13020,& 'frame/module_domain.f: Failed to allocate grid%rechxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rechxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rechxy' grid%tail_statevars%DataName = 'RECH' grid%tail_statevars%Description = 'water table recharge' 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%rechxy 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%rechxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13070,& 'frame/module_domain.f: Failed to allocate grid%rechxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'deeprechxy').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%deeprechxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13081,& 'frame/module_domain.f: Failed to allocate grid%deeprechxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%deeprechxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'deeprechxy' grid%tail_statevars%DataName = 'DEEPRECH' grid%tail_statevars%Description = 'deep water table recharge' 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%deeprechxy 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%deeprechxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13131,& 'frame/module_domain.f: Failed to allocate grid%deeprechxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'areaxy').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%areaxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13142,& 'frame/module_domain.f: Failed to allocate grid%areaxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%areaxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'areaxy' grid%tail_statevars%DataName = 'AREA' grid%tail_statevars%Description = 'area of grid boxes' 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%areaxy 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%areaxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13192,& 'frame/module_domain.f: Failed to allocate grid%areaxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qrfxy').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%qrfxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13203,& 'frame/module_domain.f: Failed to allocate grid%qrfxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qrfxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qrfxy' grid%tail_statevars%DataName = 'QRF' grid%tail_statevars%Description = 'baseflow ' 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%qrfxy 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%qrfxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13253,& 'frame/module_domain.f: Failed to allocate grid%qrfxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qrfsxy').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%qrfsxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13264,& 'frame/module_domain.f: Failed to allocate grid%qrfsxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qrfsxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qrfsxy' grid%tail_statevars%DataName = 'QRFS' grid%tail_statevars%Description = 'sum baseflow ' 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%qrfsxy 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%qrfsxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13314,& 'frame/module_domain.f: Failed to allocate grid%qrfsxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qspringxy').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%qspringxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13325,& 'frame/module_domain.f: Failed to allocate grid%qspringxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qspringxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qspringxy' grid%tail_statevars%DataName = 'QSPRING' grid%tail_statevars%Description = 'seeping 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%qspringxy 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%qspringxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13375,& 'frame/module_domain.f: Failed to allocate grid%qspringxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qspringsxy').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%qspringsxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13386,& 'frame/module_domain.f: Failed to allocate grid%qspringsxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qspringsxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qspringsxy' grid%tail_statevars%DataName = 'QSPRINGS' grid%tail_statevars%Description = 'sum seeping water ' 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%qspringsxy 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%qspringsxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13436,& 'frame/module_domain.f: Failed to allocate grid%qspringsxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qslatxy').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%qslatxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13447,& 'frame/module_domain.f: Failed to allocate grid%qslatxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qslatxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qslatxy' grid%tail_statevars%DataName = 'QSLAT' grid%tail_statevars%Description = 'sum lateral flow ' 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%qslatxy 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%qslatxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13497,& 'frame/module_domain.f: Failed to allocate grid%qslatxy(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 = 'stepwtd' grid%tail_statevars%DataName = 'STEPWTD' grid%tail_statevars%Description = 'NUMBER OF FUNDAMENTAL TIMESTEPS BETWEEN WTD CALLS' 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%stepwtd grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%stepwtd=0 IF(okay_to_alloc.AND.in_use_for_config(id,'pexpxy').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%pexpxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13527,& 'frame/module_domain.f: Failed to allocate grid%pexpxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pexpxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pexpxy' grid%tail_statevars%DataName = 'PEXP' grid%tail_statevars%Description = 'exponent for river conductance' grid%tail_statevars%Units = 'Kg 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%pexpxy 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%pexpxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13577,& 'frame/module_domain.f: Failed to allocate grid%pexpxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rivercondxy').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%rivercondxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13588,& 'frame/module_domain.f: Failed to allocate grid%rivercondxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rivercondxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rivercondxy' grid%tail_statevars%DataName = 'RIVERCOND' grid%tail_statevars%Description = 'river conductance' grid%tail_statevars%Units = 'Kg 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%rivercondxy 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%rivercondxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13638,& 'frame/module_domain.f: Failed to allocate grid%rivercondxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fdepthxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fdepthxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13649,& 'frame/module_domain.f: Failed to allocate grid%fdepthxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdepthxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fdepthxy' grid%tail_statevars%DataName = 'FDEPTH' grid%tail_statevars%Description = 'e-folding depth for transmissivity ' 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%fdepthxy 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%fdepthxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13699,& 'frame/module_domain.f: Failed to allocate grid%fdepthxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'eqzwt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%eqzwt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13710,& 'frame/module_domain.f: Failed to allocate grid%eqzwt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%eqzwt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'eqzwt' grid%tail_statevars%DataName = 'EQZWT' grid%tail_statevars%Description = 'equilibrium water table 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%eqzwt 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%eqzwt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13760,& 'frame/module_domain.f: Failed to allocate grid%eqzwt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rechclim'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rechclim(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13771,& 'frame/module_domain.f: Failed to allocate grid%rechclim(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rechclim=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rechclim' grid%tail_statevars%DataName = 'RECHCLIM' grid%tail_statevars%Description = 'equilibrium recharge rate ' 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%rechclim 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%rechclim(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13821,& 'frame/module_domain.f: Failed to allocate grid%rechclim(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'riverbedxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%riverbedxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13832,& 'frame/module_domain.f: Failed to allocate grid%riverbedxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%riverbedxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'riverbedxy' grid%tail_statevars%DataName = 'RIVERBED' grid%tail_statevars%Description = 'river bed 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%riverbedxy 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%riverbedxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13882,& 'frame/module_domain.f: Failed to allocate grid%riverbedxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcomp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcomp(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13893,& 'frame/module_domain.f: Failed to allocate grid%soilcomp(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcomp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcomp' grid%tail_statevars%DataName = 'SOILCOMP' grid%tail_statevars%Description = 'soil composition' 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%soilcomp 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 = 8 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 = 8 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 = 8 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_composition_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%soilcomp(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13943,& 'frame/module_domain.f: Failed to allocate grid%soilcomp(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcl1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcl1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13954,& 'frame/module_domain.f: Failed to allocate grid%soilcl1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcl1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcl1' grid%tail_statevars%DataName = 'SOILCL1' grid%tail_statevars%Description = 'soil texture class - level 1' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilcl1 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%soilcl1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14004,& 'frame/module_domain.f: Failed to allocate grid%soilcl1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcl2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcl2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14015,& 'frame/module_domain.f: Failed to allocate grid%soilcl2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcl2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcl2' grid%tail_statevars%DataName = 'SOILCL2' grid%tail_statevars%Description = 'soil texture class - level 2' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilcl2 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%soilcl2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14065,& 'frame/module_domain.f: Failed to allocate grid%soilcl2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcl3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcl3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14076,& 'frame/module_domain.f: Failed to allocate grid%soilcl3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcl3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcl3' grid%tail_statevars%DataName = 'SOILCL3' grid%tail_statevars%Description = 'soil texture class - level 3' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilcl3 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%soilcl3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14126,& 'frame/module_domain.f: Failed to allocate grid%soilcl3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'soilcl4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%soilcl4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14137,& 'frame/module_domain.f: Failed to allocate grid%soilcl4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcl4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'soilcl4' grid%tail_statevars%DataName = 'SOILCL4' grid%tail_statevars%Description = 'soil texture class - level 4' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%soilcl4 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%soilcl4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14187,& 'frame/module_domain.f: Failed to allocate grid%soilcl4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'grainxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%grainxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14198,& 'frame/module_domain.f: Failed to allocate grid%grainxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grainxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'grainxy' grid%tail_statevars%DataName = 'GRAIN' grid%tail_statevars%Description = 'mass of grain' grid%tail_statevars%Units = 'g/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%grainxy 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%grainxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14248,& 'frame/module_domain.f: Failed to allocate grid%grainxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gddxy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gddxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14259,& 'frame/module_domain.f: Failed to allocate grid%gddxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gddxy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gddxy' grid%tail_statevars%DataName = 'GDD' grid%tail_statevars%Description = 'growing degree days' 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%gddxy 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%gddxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14309,& 'frame/module_domain.f: Failed to allocate grid%gddxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'croptype'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((5)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((5)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%croptype(sm31:em31,1:5,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14320,& 'frame/module_domain.f: Failed to allocate grid%croptype(sm31:em31,1:5,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%croptype=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'croptype' grid%tail_statevars%DataName = 'CROPTYPE' grid%tail_statevars%Description = 'crop type' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%croptype 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 = 5 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 = 5 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 = 5 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 = 'crop_types_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%croptype(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14370,& 'frame/module_domain.f: Failed to allocate grid%croptype(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'planting'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%planting(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14381,& 'frame/module_domain.f: Failed to allocate grid%planting(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%planting=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'planting' grid%tail_statevars%DataName = 'PLANTING' grid%tail_statevars%Description = 'planting date' grid%tail_statevars%Units = 'julian day' 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%planting 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%planting(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14431,& 'frame/module_domain.f: Failed to allocate grid%planting(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'harvest'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%harvest(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14442,& 'frame/module_domain.f: Failed to allocate grid%harvest(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%harvest=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'harvest' grid%tail_statevars%DataName = 'HARVEST' grid%tail_statevars%Description = 'harvest date' grid%tail_statevars%Units = 'julian day' 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%harvest 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%harvest(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14492,& 'frame/module_domain.f: Failed to allocate grid%harvest(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'season_gdd'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%season_gdd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14503,& 'frame/module_domain.f: Failed to allocate grid%season_gdd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%season_gdd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'season_gdd' grid%tail_statevars%DataName = 'SEASON_GDD' grid%tail_statevars%Description = 'growing season GDD' 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%season_gdd 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%season_gdd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14553,& 'frame/module_domain.f: Failed to allocate grid%season_gdd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cropcat').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%cropcat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14564,& 'frame/module_domain.f: Failed to allocate grid%cropcat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cropcat=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 = 'cropcat' grid%tail_statevars%DataName = 'CROPCAT' grid%tail_statevars%Description = 'dominant crop category' grid%tail_statevars%Units = 'category' 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%cropcat 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%cropcat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14614,& 'frame/module_domain.f: Failed to allocate grid%cropcat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pgsxy').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%pgsxy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14625,& 'frame/module_domain.f: Failed to allocate grid%pgsxy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pgsxy=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 = 'pgsxy' grid%tail_statevars%DataName = 'PGS' grid%tail_statevars%Description = 'pgs' 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%pgsxy 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%pgsxy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14675,& 'frame/module_domain.f: Failed to allocate grid%pgsxy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gecros_state'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((60)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((60)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gecros_state(sm31:em31,1:60,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14686,& 'frame/module_domain.f: Failed to allocate grid%gecros_state(sm31:em31,1:60,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gecros_state=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gecros_state' grid%tail_statevars%DataName = 'GECROS' grid%tail_statevars%Description = 'gecros state array' 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%gecros_state 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 = 1 grid%tail_statevars%ed2 = 60 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 = 60 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 = 60 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 = 'gecros_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%gecros_state(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14736,& 'frame/module_domain.f: Failed to allocate grid%gecros_state(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ql').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%kext_ql(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14747,& 'frame/module_domain.f: Failed to allocate grid%kext_ql(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ql=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ql' grid%tail_statevars%DataName = 'KEXT_QL' grid%tail_statevars%Description = ' Extinction Coefficient for water ' grid%tail_statevars%Units = 'm-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%kext_ql grid%tail_statevars%streams(1) = 33 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%kext_ql(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14797,& 'frame/module_domain.f: Failed to allocate grid%kext_ql(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qic').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%kext_qic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14808,& 'frame/module_domain.f: Failed to allocate grid%kext_qic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qic=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qic' grid%tail_statevars%DataName = 'KEXT_QIC' grid%tail_statevars%Description = ' Extinction Coefficient for ice columns ' grid%tail_statevars%Units = 'm-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%kext_qic grid%tail_statevars%streams(1) = 33 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%kext_qic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14858,& 'frame/module_domain.f: Failed to allocate grid%kext_qic(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qip').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%kext_qip(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14869,& 'frame/module_domain.f: Failed to allocate grid%kext_qip(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qip=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qip' grid%tail_statevars%DataName = 'KEXT_QIP' grid%tail_statevars%Description = ' Extinction Coefficient for ice plates ' grid%tail_statevars%Units = 'm-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%kext_qip grid%tail_statevars%streams(1) = 33 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%kext_qip(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14919,& 'frame/module_domain.f: Failed to allocate grid%kext_qip(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qid').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%kext_qid(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14930,& 'frame/module_domain.f: Failed to allocate grid%kext_qid(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qid' grid%tail_statevars%DataName = 'KEXT_QID' grid%tail_statevars%Description = ' Extinction Coefficient for ice dendrites ' grid%tail_statevars%Units = 'm-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%kext_qid grid%tail_statevars%streams(1) = 33 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%kext_qid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14980,& 'frame/module_domain.f: Failed to allocate grid%kext_qid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qs').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%kext_qs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14991,& 'frame/module_domain.f: Failed to allocate grid%kext_qs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qs' grid%tail_statevars%DataName = 'KEXT_QS' grid%tail_statevars%Description = ' Extinction Coefficient for snow ' grid%tail_statevars%Units = 'm-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%kext_qs grid%tail_statevars%streams(1) = 33 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%kext_qs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15041,& 'frame/module_domain.f: Failed to allocate grid%kext_qs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qg').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%kext_qg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15052,& 'frame/module_domain.f: Failed to allocate grid%kext_qg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qg' grid%tail_statevars%DataName = 'KEXT_QG' grid%tail_statevars%Description = ' Extinction Coefficient for graupel ' grid%tail_statevars%Units = 'm-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%kext_qg grid%tail_statevars%streams(1) = 33 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%kext_qg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15102,& 'frame/module_domain.f: Failed to allocate grid%kext_qg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qh').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%kext_qh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15113,& 'frame/module_domain.f: Failed to allocate grid%kext_qh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qh' grid%tail_statevars%DataName = 'KEXT_QH' grid%tail_statevars%Description = ' Extinction Coefficient for hail ' grid%tail_statevars%Units = 'm-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%kext_qh grid%tail_statevars%streams(1) = 33 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%kext_qh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15163,& 'frame/module_domain.f: Failed to allocate grid%kext_qh(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_qa').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%kext_qa(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15174,& 'frame/module_domain.f: Failed to allocate grid%kext_qa(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_qa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_qa' grid%tail_statevars%DataName = 'KEXT_QA' grid%tail_statevars%Description = ' Extinction Coefficient for aerosols ' grid%tail_statevars%Units = 'm-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%kext_qa grid%tail_statevars%streams(1) = 33 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%kext_qa(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15224,& 'frame/module_domain.f: Failed to allocate grid%kext_qa(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ft_qic').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%kext_ft_qic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15235,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ft_qic=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ft_qic' grid%tail_statevars%DataName = 'KEXT_FT_QIC' grid%tail_statevars%Description = ' Extinction Adj. Coefficient for ice columns ' grid%tail_statevars%Units = 'm-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%kext_ft_qic grid%tail_statevars%streams(1) = 33 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%kext_ft_qic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15285,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qic(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ft_qip').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%kext_ft_qip(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15296,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qip(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ft_qip=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ft_qip' grid%tail_statevars%DataName = 'KEXT_FT_QIP' grid%tail_statevars%Description = ' Extinction Adj. Coefficient for ice plates ' grid%tail_statevars%Units = 'm-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%kext_ft_qip grid%tail_statevars%streams(1) = 33 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%kext_ft_qip(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15346,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qip(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ft_qid').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%kext_ft_qid(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15357,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qid(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ft_qid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ft_qid' grid%tail_statevars%DataName = 'KEXT_FT_QID' grid%tail_statevars%Description = ' Extinction Adj. Coefficient for ice dendrites ' grid%tail_statevars%Units = 'm-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%kext_ft_qid grid%tail_statevars%streams(1) = 33 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%kext_ft_qid(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15407,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qid(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ft_qs').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%kext_ft_qs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15418,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ft_qs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ft_qs' grid%tail_statevars%DataName = 'KEXT_FT_QS' grid%tail_statevars%Description = ' Extinction Adj. Coefficient for snow ' grid%tail_statevars%Units = 'm-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%kext_ft_qs grid%tail_statevars%streams(1) = 33 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%kext_ft_qs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15468,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kext_ft_qg').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%kext_ft_qg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15479,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kext_ft_qg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kext_ft_qg' grid%tail_statevars%DataName = 'KEXT_FT_QG' grid%tail_statevars%Description = ' Extinction Adj. Coefficient for graupel ' grid%tail_statevars%Units = 'm-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%kext_ft_qg grid%tail_statevars%streams(1) = 33 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%kext_ft_qg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15529,& 'frame/module_domain.f: Failed to allocate grid%kext_ft_qg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'height').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%height(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15540,& 'frame/module_domain.f: Failed to allocate grid%height(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%height=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'height' grid%tail_statevars%DataName = 'HEIGHT' grid%tail_statevars%Description = ' Height ' 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%height grid%tail_statevars%streams(1) = 32 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%height(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15590,& 'frame/module_domain.f: Failed to allocate grid%height(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tempc').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%tempc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15601,& 'frame/module_domain.f: Failed to allocate grid%tempc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tempc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tempc' grid%tail_statevars%DataName = 'TEMPC' grid%tail_statevars%Description = ' Temperature ' grid%tail_statevars%Units = 'C' 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%tempc grid%tail_statevars%streams(1) = 32 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%tempc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15651,& 'frame/module_domain.f: Failed to allocate grid%tempc(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%sbm_diagnostics=0 IF(okay_to_alloc.AND.in_use_for_config(id,'sbmradar'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_sbmradar)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_sbmradar)) * 4 ALLOCATE(grid%sbmradar(sm31:em31,sm32:em32,sm33:em33,num_sbmradar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15663,& 'frame/module_domain.f: Failed to allocate grid%sbmradar(sm31:em31,sm32:em32,sm33:em33,num_sbmradar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sbmradar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sbmradar' grid%tail_statevars%DataName = 'SBMRADAR' 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%sbmradar grid%tail_statevars%num_table => sbmradar_num_table grid%tail_statevars%index_table => sbmradar_index_table grid%tail_statevars%boundary_table => sbmradar_boundary_table grid%tail_statevars%dname_table => sbmradar_dname_table grid%tail_statevars%desc_table => sbmradar_desc_table grid%tail_statevars%units_table => sbmradar_units_table grid%tail_statevars%streams_table => sbmradar_streams_table grid%tail_statevars%streams(1) = 9 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%sbmradar(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15720,& 'frame/module_domain.f: Failed to allocate grid%sbmradar(1,1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%afwa_diag_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_ptype_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_vil_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_radar_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_severe_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_icing_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_vis_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_cloud_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_therm_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_turb_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_buoy_opt=0 IF ( setinitval .EQ. 3 ) grid%afwa_ptype_ccn_tmp=initial_data_value IF ( setinitval .EQ. 3 ) grid%afwa_ptype_tot_melt=initial_data_value IF ( setinitval .EQ. 3 ) grid%afwa_bad_data_check=0 IF(okay_to_alloc.AND.in_use_for_config(id,'tcoli_max').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%tcoli_max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15745,& 'frame/module_domain.f: Failed to allocate grid%tcoli_max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tcoli_max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tcoli_max' grid%tail_statevars%DataName = 'TCOLI_MAX' grid%tail_statevars%Description = 'MAX TOTAL COLUMN INTEGRATED ICE' 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%tcoli_max grid%tail_statevars%streams(1) = 5 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%tcoli_max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15795,& 'frame/module_domain.f: Failed to allocate grid%tcoli_max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'grpl_flx_max').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%grpl_flx_max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15806,& 'frame/module_domain.f: Failed to allocate grid%grpl_flx_max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grpl_flx_max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'grpl_flx_max' grid%tail_statevars%DataName = 'GRPL_FLX_MAX' grid%tail_statevars%Description = 'MAX PSEUDO GRAUPEL FLUX' grid%tail_statevars%Units = 'g kg-1 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%grpl_flx_max grid%tail_statevars%streams(1) = 5 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%grpl_flx_max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15856,& 'frame/module_domain.f: Failed to allocate grid%grpl_flx_max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'refd_com').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%refd_com(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15867,& 'frame/module_domain.f: Failed to allocate grid%refd_com(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%refd_com=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'refd_com' grid%tail_statevars%DataName = 'REFD_COM' grid%tail_statevars%Description = 'DERIVED COMPOSITE RADAR REFL' grid%tail_statevars%Units = 'dbZ' 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%refd_com grid%tail_statevars%streams(1) = 5 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%refd_com(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15917,& 'frame/module_domain.f: Failed to allocate grid%refd_com(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'refd').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%refd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15928,& 'frame/module_domain.f: Failed to allocate grid%refd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%refd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'refd' grid%tail_statevars%DataName = 'REFD' grid%tail_statevars%Description = 'DERIVED RADAR REFL' grid%tail_statevars%Units = 'dbZ' 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%refd grid%tail_statevars%streams(1) = 5 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%refd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15978,& 'frame/module_domain.f: Failed to allocate grid%refd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vil').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%vil(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15989,& 'frame/module_domain.f: Failed to allocate grid%vil(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vil=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vil' grid%tail_statevars%DataName = 'VIL' grid%tail_statevars%Description = 'VERTICALLY INTEGRATED LIQUID 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%vil grid%tail_statevars%streams(1) = 5 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%vil(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16039,& 'frame/module_domain.f: Failed to allocate grid%vil(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'radarvil').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%radarvil(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16050,& 'frame/module_domain.f: Failed to allocate grid%radarvil(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%radarvil=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'radarvil' grid%tail_statevars%DataName = 'RADARVIL' grid%tail_statevars%Description = 'VERTICALLY INTEGRATED LIQUID WATER FROM Ze' 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%radarvil grid%tail_statevars%streams(1) = 5 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%radarvil(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16100,& 'frame/module_domain.f: Failed to allocate grid%radarvil(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'echotop').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%echotop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16111,& 'frame/module_domain.f: Failed to allocate grid%echotop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%echotop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'echotop' grid%tail_statevars%DataName = 'ECHOTOP' grid%tail_statevars%Description = 'ECHO TOP HEIGHT FROM Ze' 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%echotop grid%tail_statevars%streams(1) = 5 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%echotop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16161,& 'frame/module_domain.f: Failed to allocate grid%echotop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fzlev').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%fzlev(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16172,& 'frame/module_domain.f: Failed to allocate grid%fzlev(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fzlev=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fzlev' grid%tail_statevars%DataName = 'FZLEV' grid%tail_statevars%Description = 'FREEZING LEVEL' 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%fzlev grid%tail_statevars%streams(1) = 5 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%fzlev(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16222,& 'frame/module_domain.f: Failed to allocate grid%fzlev(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icingtop').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%icingtop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16233,& 'frame/module_domain.f: Failed to allocate grid%icingtop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icingtop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icingtop' grid%tail_statevars%DataName = 'ICINGTOP' grid%tail_statevars%Description = 'TOPMOST ICING LEVEL' 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%icingtop grid%tail_statevars%streams(1) = 5 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%icingtop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16283,& 'frame/module_domain.f: Failed to allocate grid%icingtop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icingbot').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%icingbot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16294,& 'frame/module_domain.f: Failed to allocate grid%icingbot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icingbot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icingbot' grid%tail_statevars%DataName = 'ICINGBOT' grid%tail_statevars%Description = 'BOTTOMMOST ICING LEVEL' 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%icingbot grid%tail_statevars%streams(1) = 5 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%icingbot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16344,& 'frame/module_domain.f: Failed to allocate grid%icingbot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qicing_lg').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%qicing_lg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16355,& 'frame/module_domain.f: Failed to allocate grid%qicing_lg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qicing_lg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qicing_lg' grid%tail_statevars%DataName = 'QICING_LG' grid%tail_statevars%Description = 'SUPERCOOLED WATER MIXING RATIO (>50 um)' 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%qicing_lg 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%qicing_lg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16405,& 'frame/module_domain.f: Failed to allocate grid%qicing_lg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qicing_sm').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%qicing_sm(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16416,& 'frame/module_domain.f: Failed to allocate grid%qicing_sm(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qicing_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 = 'qicing_sm' grid%tail_statevars%DataName = 'QICING_SM' grid%tail_statevars%Description = 'SUPERCOOLED WATER MIXING RATIO (<50 um)' 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%qicing_sm 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%qicing_sm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16466,& 'frame/module_domain.f: Failed to allocate grid%qicing_sm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qicing_lg_max').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%qicing_lg_max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16477,& 'frame/module_domain.f: Failed to allocate grid%qicing_lg_max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qicing_lg_max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qicing_lg_max' grid%tail_statevars%DataName = 'QICING_LG_MAX' grid%tail_statevars%Description = 'COLUMN MAX ICING MIXING RATIO (>50 um)' 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%qicing_lg_max grid%tail_statevars%streams(1) = 5 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%qicing_lg_max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16527,& 'frame/module_domain.f: Failed to allocate grid%qicing_lg_max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qicing_sm_max').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%qicing_sm_max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16538,& 'frame/module_domain.f: Failed to allocate grid%qicing_sm_max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qicing_sm_max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qicing_sm_max' grid%tail_statevars%DataName = 'QICING_SM_MAX' grid%tail_statevars%Description = 'COLUMN MAX ICING MIXING RATIO (<50 um)' 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%qicing_sm_max grid%tail_statevars%streams(1) = 5 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%qicing_sm_max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16588,& 'frame/module_domain.f: Failed to allocate grid%qicing_sm_max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icing_lg').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%icing_lg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16599,& 'frame/module_domain.f: Failed to allocate grid%icing_lg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icing_lg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'icing_lg' grid%tail_statevars%DataName = 'ICING_LG' grid%tail_statevars%Description = 'TOTAL COLUMN INTEGRATED ICING (>50 um)' 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%icing_lg grid%tail_statevars%streams(1) = 5 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%icing_lg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16649,& 'frame/module_domain.f: Failed to allocate grid%icing_lg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'icing_sm').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%icing_sm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16660,& 'frame/module_domain.f: Failed to allocate grid%icing_sm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%icing_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 = 'icing_sm' grid%tail_statevars%DataName = 'ICING_SM' grid%tail_statevars%Description = 'TOTAL COLUMN INTEGRATED ICING (<50 um)' 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%icing_sm grid%tail_statevars%streams(1) = 5 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%icing_sm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16710,& 'frame/module_domain.f: Failed to allocate grid%icing_sm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_mslp').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%afwa_mslp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16721,& 'frame/module_domain.f: Failed to allocate grid%afwa_mslp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_mslp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_mslp' grid%tail_statevars%DataName = 'AFWA_MSLP' grid%tail_statevars%Description = 'AFWA Diagnostic: Mean 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%afwa_mslp grid%tail_statevars%streams(1) = 5 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%afwa_mslp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16771,& 'frame/module_domain.f: Failed to allocate grid%afwa_mslp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_heatidx').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%afwa_heatidx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16782,& 'frame/module_domain.f: Failed to allocate grid%afwa_heatidx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_heatidx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_heatidx' grid%tail_statevars%DataName = 'AFWA_HEATIDX' grid%tail_statevars%Description = 'AFWA Diagnostic: Heat index' 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%afwa_heatidx grid%tail_statevars%streams(1) = 5 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%afwa_heatidx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16832,& 'frame/module_domain.f: Failed to allocate grid%afwa_heatidx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_wchill').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%afwa_wchill(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16843,& 'frame/module_domain.f: Failed to allocate grid%afwa_wchill(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_wchill=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_wchill' grid%tail_statevars%DataName = 'AFWA_WCHILL' grid%tail_statevars%Description = 'AFWA Diagnostic: Wind chill' 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%afwa_wchill grid%tail_statevars%streams(1) = 5 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%afwa_wchill(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16893,& 'frame/module_domain.f: Failed to allocate grid%afwa_wchill(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_fits').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%afwa_fits(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16904,& 'frame/module_domain.f: Failed to allocate grid%afwa_fits(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_fits=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_fits' grid%tail_statevars%DataName = 'AFWA_FITS' grid%tail_statevars%Description = 'AFWA Diagnostic: Fighter Index of Thermal Stress' 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%afwa_fits grid%tail_statevars%streams(1) = 5 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%afwa_fits(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16954,& 'frame/module_domain.f: Failed to allocate grid%afwa_fits(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_tlyrbot').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((7)-(1)+1))) * 4 nba = & ((((7)-(1)+1))) * 4 ALLOCATE(grid%afwa_tlyrbot(1:7),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16965,& 'frame/module_domain.f: Failed to allocate grid%afwa_tlyrbot(1:7). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_tlyrbot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_tlyrbot' grid%tail_statevars%DataName = 'AFWA_TLYRBOT' grid%tail_statevars%Description = 'AFWA Diagnostic: Turbulence layer AGL bottom' 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%afwa_tlyrbot grid%tail_statevars%streams(1) = 5 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = 7 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 = 7 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 = 7 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_turb_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%afwa_tlyrbot(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17013,& 'frame/module_domain.f: Failed to allocate grid%afwa_tlyrbot(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_tlyrtop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((7)-(1)+1))) * 4 nba = & ((((7)-(1)+1))) * 4 ALLOCATE(grid%afwa_tlyrtop(1:7),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17024,& 'frame/module_domain.f: Failed to allocate grid%afwa_tlyrtop(1:7). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_tlyrtop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_tlyrtop' grid%tail_statevars%DataName = 'AFWA_TLYRTOP' grid%tail_statevars%Description = 'AFWA Diagnostic: Turbulence layer AGL top' 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%afwa_tlyrtop grid%tail_statevars%streams(1) = 5 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = 7 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 = 7 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 = 7 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_turb_layers' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%afwa_tlyrtop(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17072,& 'frame/module_domain.f: Failed to allocate grid%afwa_tlyrtop(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_turb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((7)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((7)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%afwa_turb(sm31:em31,1:7,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17083,& 'frame/module_domain.f: Failed to allocate grid%afwa_turb(sm31:em31,1:7,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_turb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_turb' grid%tail_statevars%DataName = 'AFWA_TURB' grid%tail_statevars%Description = 'AFWA Diagnostic: Turbulence index' grid%tail_statevars%Units = 'dimensionless' 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%afwa_turb grid%tail_statevars%streams(1) = 5 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 = 7 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 = 7 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 = 7 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_turb_layers' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%afwa_turb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17133,& 'frame/module_domain.f: Failed to allocate grid%afwa_turb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_llturb').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%afwa_llturb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17144,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_llturb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_llturb' grid%tail_statevars%DataName = 'AFWA_LLTURB' grid%tail_statevars%Description = 'AFWA Diagnostic: Low Level Turbulence index' 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%afwa_llturb grid%tail_statevars%streams(1) = 5 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%afwa_llturb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17194,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_llturblgt').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%afwa_llturblgt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17205,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturblgt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_llturblgt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_llturblgt' grid%tail_statevars%DataName = 'AFWA_LLTURBLGT' grid%tail_statevars%Description = 'AFWA Diagnostic: Prob of LGT Low-level Turb' 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%afwa_llturblgt grid%tail_statevars%streams(1) = 5 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%afwa_llturblgt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17255,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturblgt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_llturbmdt').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%afwa_llturbmdt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17266,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturbmdt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_llturbmdt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_llturbmdt' grid%tail_statevars%DataName = 'AFWA_LLTURBMDT' grid%tail_statevars%Description = 'AFWA Diagnostic: Prob of MDT Low-level Turb' 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%afwa_llturbmdt grid%tail_statevars%streams(1) = 5 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%afwa_llturbmdt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17316,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturbmdt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_llturbsvr').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%afwa_llturbsvr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17327,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturbsvr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_llturbsvr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_llturbsvr' grid%tail_statevars%DataName = 'AFWA_LLTURBSVR' grid%tail_statevars%Description = 'AFWA Diagnostic: Prob of SVR Low-level Turb' 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%afwa_llturbsvr grid%tail_statevars%streams(1) = 5 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%afwa_llturbsvr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17377,& 'frame/module_domain.f: Failed to allocate grid%afwa_llturbsvr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_precip').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%afwa_precip(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17388,& 'frame/module_domain.f: Failed to allocate grid%afwa_precip(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_precip=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_precip' grid%tail_statevars%DataName = 'AFWA_PRECIP' grid%tail_statevars%Description = 'AFWA Diagnostic: Precipitation bucket' 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%afwa_precip 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%afwa_precip(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17438,& 'frame/module_domain.f: Failed to allocate grid%afwa_precip(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_totprecip').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%afwa_totprecip(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17449,& 'frame/module_domain.f: Failed to allocate grid%afwa_totprecip(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_totprecip=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_totprecip' grid%tail_statevars%DataName = 'AFWA_TOTPRECIP' grid%tail_statevars%Description = 'AFWA Diagnostic: Total simulation precip' 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%afwa_totprecip grid%tail_statevars%streams(1) = 5 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%afwa_totprecip(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17499,& 'frame/module_domain.f: Failed to allocate grid%afwa_totprecip(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_rain').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%afwa_rain(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17510,& 'frame/module_domain.f: Failed to allocate grid%afwa_rain(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_rain=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_rain' grid%tail_statevars%DataName = 'AFWA_RAIN' grid%tail_statevars%Description = 'AFWA Diagnostic: Rain fall' 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%afwa_rain grid%tail_statevars%streams(1) = 5 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%afwa_rain(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17560,& 'frame/module_domain.f: Failed to allocate grid%afwa_rain(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_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%afwa_snow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17571,& 'frame/module_domain.f: Failed to allocate grid%afwa_snow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_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 = 'afwa_snow' grid%tail_statevars%DataName = 'AFWA_SNOW' grid%tail_statevars%Description = 'AFWA Diagnostic: Liq Equiv Snow fall' 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%afwa_snow grid%tail_statevars%streams(1) = 5 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%afwa_snow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17621,& 'frame/module_domain.f: Failed to allocate grid%afwa_snow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_ice').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%afwa_ice(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17632,& 'frame/module_domain.f: Failed to allocate grid%afwa_ice(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_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 = 'afwa_ice' grid%tail_statevars%DataName = 'AFWA_ICE' grid%tail_statevars%Description = 'AFWA Diagnostic: Ice fall' 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%afwa_ice grid%tail_statevars%streams(1) = 5 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%afwa_ice(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17682,& 'frame/module_domain.f: Failed to allocate grid%afwa_ice(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_fzra').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%afwa_fzra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17693,& 'frame/module_domain.f: Failed to allocate grid%afwa_fzra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_fzra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_fzra' grid%tail_statevars%DataName = 'AFWA_FZRA' grid%tail_statevars%Description = 'AFWA Diagnostic: Freezing rain fall' 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%afwa_fzra grid%tail_statevars%streams(1) = 5 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%afwa_fzra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17743,& 'frame/module_domain.f: Failed to allocate grid%afwa_fzra(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_snowfall').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%afwa_snowfall(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17754,& 'frame/module_domain.f: Failed to allocate grid%afwa_snowfall(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_snowfall=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_snowfall' grid%tail_statevars%DataName = 'AFWA_SNOWFALL' grid%tail_statevars%Description = 'AFWA Diagnostic: Snow fall' 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%afwa_snowfall grid%tail_statevars%streams(1) = 5 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%afwa_snowfall(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17804,& 'frame/module_domain.f: Failed to allocate grid%afwa_snowfall(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_vis').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%afwa_vis(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17815,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_vis=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_vis' grid%tail_statevars%DataName = 'AFWA_VIS' grid%tail_statevars%Description = 'AFWA Diagnostic: Visibility' 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%afwa_vis grid%tail_statevars%streams(1) = 5 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%afwa_vis(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17865,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_vis_alpha').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%afwa_vis_alpha(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17876,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis_alpha(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_vis_alpha=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_vis_alpha' grid%tail_statevars%DataName = 'AFWA_VIS_ALPHA' grid%tail_statevars%Description = 'AFWA Diagnostic: Vis alpha Weibull term' 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%afwa_vis_alpha grid%tail_statevars%streams(1) = 5 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%afwa_vis_alpha(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17926,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis_alpha(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_vis_dust').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%afwa_vis_dust(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17937,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis_dust(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_vis_dust=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_vis_dust' grid%tail_statevars%DataName = 'AFWA_VIS_DUST' grid%tail_statevars%Description = 'AFWA Diagnostic: Visibility due to dust' 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%afwa_vis_dust grid%tail_statevars%streams(1) = 5 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%afwa_vis_dust(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17987,& 'frame/module_domain.f: Failed to allocate grid%afwa_vis_dust(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cloud').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%afwa_cloud(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17998,& 'frame/module_domain.f: Failed to allocate grid%afwa_cloud(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_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 = 'afwa_cloud' grid%tail_statevars%DataName = 'AFWA_CLOUD' grid%tail_statevars%Description = 'AFWA Diagnostic: Cloud cover fraction' grid%tail_statevars%Units = '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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%afwa_cloud grid%tail_statevars%streams(1) = 5 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%afwa_cloud(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18048,& 'frame/module_domain.f: Failed to allocate grid%afwa_cloud(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cloud_ceil').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%afwa_cloud_ceil(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18059,& 'frame/module_domain.f: Failed to allocate grid%afwa_cloud_ceil(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_cloud_ceil=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_cloud_ceil' grid%tail_statevars%DataName = 'AFWA_CLOUD_CEIL' grid%tail_statevars%Description = 'AFWA Diagnostic: Cloud ceiling' 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%afwa_cloud_ceil grid%tail_statevars%streams(1) = 5 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%afwa_cloud_ceil(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18109,& 'frame/module_domain.f: Failed to allocate grid%afwa_cloud_ceil(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cape').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%afwa_cape(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18120,& 'frame/module_domain.f: Failed to allocate grid%afwa_cape(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_cape=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_cape' grid%tail_statevars%DataName = 'AFWA_CAPE' grid%tail_statevars%Description = 'AFWA Diagnostic: Convective Avail Pot Energy' grid%tail_statevars%Units = 'J 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%afwa_cape grid%tail_statevars%streams(1) = 5 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%afwa_cape(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18170,& 'frame/module_domain.f: Failed to allocate grid%afwa_cape(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cin').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%afwa_cin(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18181,& 'frame/module_domain.f: Failed to allocate grid%afwa_cin(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_cin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_cin' grid%tail_statevars%DataName = 'AFWA_CIN' grid%tail_statevars%Description = 'AFWA Diagnostic: Convective Inhibition' grid%tail_statevars%Units = 'J 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%afwa_cin grid%tail_statevars%streams(1) = 5 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%afwa_cin(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18231,& 'frame/module_domain.f: Failed to allocate grid%afwa_cin(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cape_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%afwa_cape_mu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18242,& 'frame/module_domain.f: Failed to allocate grid%afwa_cape_mu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_cape_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 = 'afwa_cape_mu' grid%tail_statevars%DataName = 'AFWA_CAPE_MU' grid%tail_statevars%Description = 'AFWA Diagnostic: Most unstable CAPE 0-180mb' grid%tail_statevars%Units = 'J 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%afwa_cape_mu grid%tail_statevars%streams(1) = 5 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%afwa_cape_mu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18292,& 'frame/module_domain.f: Failed to allocate grid%afwa_cape_mu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_cin_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%afwa_cin_mu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18303,& 'frame/module_domain.f: Failed to allocate grid%afwa_cin_mu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_cin_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 = 'afwa_cin_mu' grid%tail_statevars%DataName = 'AFWA_CIN_MU' grid%tail_statevars%Description = 'AFWA Diagnostic: Most unstable CIN 0-180mb' grid%tail_statevars%Units = 'J 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%afwa_cin_mu grid%tail_statevars%streams(1) = 5 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%afwa_cin_mu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18353,& 'frame/module_domain.f: Failed to allocate grid%afwa_cin_mu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_zlfc').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%afwa_zlfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18364,& 'frame/module_domain.f: Failed to allocate grid%afwa_zlfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_zlfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_zlfc' grid%tail_statevars%DataName = 'AFWA_ZLFC' grid%tail_statevars%Description = 'AFWA Diagnostic: Level of Free Convection' 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%afwa_zlfc grid%tail_statevars%streams(1) = 5 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%afwa_zlfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18414,& 'frame/module_domain.f: Failed to allocate grid%afwa_zlfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_plfc').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%afwa_plfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18425,& 'frame/module_domain.f: Failed to allocate grid%afwa_plfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_plfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_plfc' grid%tail_statevars%DataName = 'AFWA_PLFC' grid%tail_statevars%Description = 'AFWA Diagnostic: Pressure of LFC' 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%afwa_plfc grid%tail_statevars%streams(1) = 5 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%afwa_plfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18475,& 'frame/module_domain.f: Failed to allocate grid%afwa_plfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_lidx').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%afwa_lidx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18486,& 'frame/module_domain.f: Failed to allocate grid%afwa_lidx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_lidx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_lidx' grid%tail_statevars%DataName = 'AFWA_LIDX' grid%tail_statevars%Description = 'AFWA Diagnostic: Surface Lifted Index' 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%afwa_lidx grid%tail_statevars%streams(1) = 5 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%afwa_lidx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18536,& 'frame/module_domain.f: Failed to allocate grid%afwa_lidx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_pwat').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%afwa_pwat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18547,& 'frame/module_domain.f: Failed to allocate grid%afwa_pwat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_pwat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_pwat' grid%tail_statevars%DataName = 'AFWA_PWAT' grid%tail_statevars%Description = 'AFWA Diagnostic: Precipitable 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%afwa_pwat grid%tail_statevars%streams(1) = 5 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%afwa_pwat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18597,& 'frame/module_domain.f: Failed to allocate grid%afwa_pwat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'midrh_min').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%midrh_min(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18608,& 'frame/module_domain.f: Failed to allocate grid%midrh_min(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%midrh_min=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'midrh_min' grid%tail_statevars%DataName = 'MIDRH_MIN' grid%tail_statevars%Description = 'Min Mid-level relative humidity' 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%midrh_min 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%midrh_min(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18658,& 'frame/module_domain.f: Failed to allocate grid%midrh_min(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'midrh_min_old').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%midrh_min_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18669,& 'frame/module_domain.f: Failed to allocate grid%midrh_min_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%midrh_min_old=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'midrh_min_old' grid%tail_statevars%DataName = 'MIDRH_MIN_OLD' grid%tail_statevars%Description = 'Previous Min Mid-level relative humidity' 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%midrh_min_old 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%midrh_min_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18719,& 'frame/module_domain.f: Failed to allocate grid%midrh_min_old(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_hail').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%afwa_hail(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18730,& 'frame/module_domain.f: Failed to allocate grid%afwa_hail(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_hail=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_hail' grid%tail_statevars%DataName = 'AFWA_HAIL' grid%tail_statevars%Description = 'AFWA Diagnostic: Hail Diameter (Weibull)' 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%afwa_hail grid%tail_statevars%streams(1) = 5 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%afwa_hail(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18780,& 'frame/module_domain.f: Failed to allocate grid%afwa_hail(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_llws').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%afwa_llws(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18791,& 'frame/module_domain.f: Failed to allocate grid%afwa_llws(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_llws=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_llws' grid%tail_statevars%DataName = 'AFWA_LLWS' grid%tail_statevars%Description = 'AFWA Diagnostic: 0-2000 ft wind shear' 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%afwa_llws grid%tail_statevars%streams(1) = 5 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%afwa_llws(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18841,& 'frame/module_domain.f: Failed to allocate grid%afwa_llws(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'afwa_tornado').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%afwa_tornado(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18852,& 'frame/module_domain.f: Failed to allocate grid%afwa_tornado(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%afwa_tornado=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'afwa_tornado' grid%tail_statevars%DataName = 'AFWA_TORNADO' grid%tail_statevars%Description = 'AFWA Diagnostic: Tornado wind speed (Weibull)' 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%afwa_tornado grid%tail_statevars%streams(1) = 5 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%afwa_tornado(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18902,& 'frame/module_domain.f: Failed to allocate grid%afwa_tornado(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tornado_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%tornado_mask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18913,& 'frame/module_domain.f: Failed to allocate grid%tornado_mask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tornado_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 = 'tornado_mask' grid%tail_statevars%DataName = 'TORNADO_MASK' grid%tail_statevars%Description = 'Tornado mask, 1 if AFWA tornado > 0' 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%tornado_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%tornado_mask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18963,& 'frame/module_domain.f: Failed to allocate grid%tornado_mask(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tornado_dur').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%tornado_dur(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18974,& 'frame/module_domain.f: Failed to allocate grid%tornado_dur(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tornado_dur=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tornado_dur' grid%tail_statevars%DataName = 'TORNADO_DUR' grid%tail_statevars%Description = 'Tornado duration' grid%tail_statevars%Units = 'sec' 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%tornado_dur 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%tornado_dur(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19024,& 'frame/module_domain.f: Failed to allocate grid%tornado_dur(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%mean_diag=0 IF ( setinitval .EQ. 3 ) grid%mean_freq=0 IF ( setinitval .EQ. 3 ) grid%mean_interval=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval_s=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval_m=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval_h=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval_d=0 IF ( setinitval .EQ. 3 ) grid%mean_diag_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%diurnal_diag=0 IF(okay_to_alloc.AND.in_use_for_config(id,'psfc_mean').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_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19045,& 'frame/module_domain.f: Failed to allocate grid%psfc_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'PSFC_M' grid%tail_statevars%Description = 'AVERAGE 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%psfc_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19095,& 'frame/module_domain.f: Failed to allocate grid%psfc_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_mean').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_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19106,& 'frame/module_domain.f: Failed to allocate grid%tsk_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'TSK_M' grid%tail_statevars%Description = 'AVERAGE SURFACE 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%tsk_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19156,& 'frame/module_domain.f: Failed to allocate grid%tsk_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pmsl_mean').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%pmsl_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19167,& 'frame/module_domain.f: Failed to allocate grid%pmsl_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pmsl_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pmsl_mean' grid%tail_statevars%DataName = 'PMSL_M' grid%tail_statevars%Description = 'AVERAGE 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%pmsl_mean grid%tail_statevars%streams(1) = 32 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%pmsl_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19217,& 'frame/module_domain.f: Failed to allocate grid%pmsl_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2_mean').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%t2_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19228,& 'frame/module_domain.f: Failed to allocate grid%t2_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'T2_M' grid%tail_statevars%Description = 'AVERAGE TEMPERATURE AT 2M' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19278,& 'frame/module_domain.f: Failed to allocate grid%t2_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th2_mean').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%th2_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19289,& 'frame/module_domain.f: Failed to allocate grid%th2_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'TH2_M' grid%tail_statevars%Description = 'AVERAGE POTENTIAL TEMPERATURE AT 2M' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19339,& 'frame/module_domain.f: Failed to allocate grid%th2_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2_mean').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%q2_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19350,& 'frame/module_domain.f: Failed to allocate grid%q2_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'Q2_M' grid%tail_statevars%Description = 'AVERAGE WATER VAPOR MIXING RATIO AT 2M' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19400,& 'frame/module_domain.f: Failed to allocate grid%q2_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10_mean').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%u10_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19411,& 'frame/module_domain.f: Failed to allocate grid%u10_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'U10_M' grid%tail_statevars%Description = 'AVERAGE U-COMPONENT OF WIND AT 10M' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19461,& 'frame/module_domain.f: Failed to allocate grid%u10_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10_mean').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%v10_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19472,& 'frame/module_domain.f: Failed to allocate grid%v10_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'V10_M' grid%tail_statevars%Description = 'AVERAGE V-COMPONENT OF WIND AT 10M' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19522,& 'frame/module_domain.f: Failed to allocate grid%v10_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hfx_mean').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%hfx_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19533,& 'frame/module_domain.f: Failed to allocate grid%hfx_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hfx_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hfx_mean' grid%tail_statevars%DataName = 'HFX_M' grid%tail_statevars%Description = 'AVERAGE SENSIBLE HEAT FLUX AT THE SURFACE' 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%hfx_mean grid%tail_statevars%streams(1) = 32 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%hfx_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19583,& 'frame/module_domain.f: Failed to allocate grid%hfx_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lh_mean').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%lh_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19594,& 'frame/module_domain.f: Failed to allocate grid%lh_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh_mean=initial_data_value IF (.NOT.grid%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_mean' grid%tail_statevars%DataName = 'LH_M' grid%tail_statevars%Description = 'AVERAGE LATENT HEAT FLUX AT THE SURFACE' 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_mean grid%tail_statevars%streams(1) = 32 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_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19644,& 'frame/module_domain.f: Failed to allocate grid%lh_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnb_mean').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%swdnb_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19655,& 'frame/module_domain.f: Failed to allocate grid%swdnb_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnb_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnb_mean' grid%tail_statevars%DataName = 'SWDNB_M' grid%tail_statevars%Description = 'AVERAGE DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE' 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%swdnb_mean grid%tail_statevars%streams(1) = 32 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%swdnb_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19705,& 'frame/module_domain.f: Failed to allocate grid%swdnb_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'glw_mean').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%glw_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19716,& 'frame/module_domain.f: Failed to allocate grid%glw_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%glw_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'glw_mean' grid%tail_statevars%DataName = 'GLW_M' grid%tail_statevars%Description = 'AVERAGE DOWNWARD LONGWAVE FLUX AT GROUND SURFACE' 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%glw_mean grid%tail_statevars%streams(1) = 32 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%glw_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19766,& 'frame/module_domain.f: Failed to allocate grid%glw_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupb_mean').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%lwupb_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19777,& 'frame/module_domain.f: Failed to allocate grid%lwupb_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupb_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupb_mean' grid%tail_statevars%DataName = 'LWUPB_M' grid%tail_statevars%Description = 'AVERAGE UPWELLING LONGWAVE FLUX AT BOTTOM' 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%lwupb_mean grid%tail_statevars%streams(1) = 32 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%lwupb_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19827,& 'frame/module_domain.f: Failed to allocate grid%lwupb_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupb_mean').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%swupb_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19838,& 'frame/module_domain.f: Failed to allocate grid%swupb_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupb_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupb_mean' grid%tail_statevars%DataName = 'SWUPB_M' grid%tail_statevars%Description = 'AVERAGE UPWELLING SHORTWAVE FLUX AT BOTTOM' 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%swupb_mean grid%tail_statevars%streams(1) = 32 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%swupb_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19888,& 'frame/module_domain.f: Failed to allocate grid%swupb_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupt_mean').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%swupt_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19899,& 'frame/module_domain.f: Failed to allocate grid%swupt_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupt_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupt_mean' grid%tail_statevars%DataName = 'SWUPT_M' grid%tail_statevars%Description = 'AVERAGE UPWELLING SHORTWAVE FLUX AT TOP' 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%swupt_mean grid%tail_statevars%streams(1) = 32 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%swupt_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19949,& 'frame/module_domain.f: Failed to allocate grid%swupt_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnt_mean').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%swdnt_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19960,& 'frame/module_domain.f: Failed to allocate grid%swdnt_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnt_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnt_mean' grid%tail_statevars%DataName = 'SWDNT_M' grid%tail_statevars%Description = 'AVERAGE DOWNWELLING SHORTWAVE FLUX AT TOP' 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%swdnt_mean grid%tail_statevars%streams(1) = 32 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%swdnt_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20010,& 'frame/module_domain.f: Failed to allocate grid%swdnt_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupt_mean').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%lwupt_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20021,& 'frame/module_domain.f: Failed to allocate grid%lwupt_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupt_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupt_mean' grid%tail_statevars%DataName = 'LWUPT_M' grid%tail_statevars%Description = 'AVERAGE UPWELLING LONGWAVE FLUX AT TOP' 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%lwupt_mean grid%tail_statevars%streams(1) = 32 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%lwupt_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20071,& 'frame/module_domain.f: Failed to allocate grid%lwupt_mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwdnt_mean').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%lwdnt_mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20082,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnt_mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwdnt_mean' grid%tail_statevars%DataName = 'LWDNT_M' grid%tail_statevars%Description = 'AVERAGE DOWNWELLING LONGWAVE FLUX AT TOP' 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%lwdnt_mean grid%tail_statevars%streams(1) = 32 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%lwdnt_mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20132,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_mean(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 = 'nsteps_mean' grid%tail_statevars%DataName = 'NSTEP_M' grid%tail_statevars%Description = 'NUMBER OF MEAN STEPS ACCUMULATED' 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%nsteps_mean grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%nsteps_mean=0 IF(okay_to_alloc.AND.in_use_for_config(id,'psfc_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%psfc_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20162,& 'frame/module_domain.f: Failed to allocate grid%psfc_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'PSFC_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE SURFACE 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%psfc_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%psfc_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20212,& 'frame/module_domain.f: Failed to allocate grid%psfc_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tsk_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20223,& 'frame/module_domain.f: Failed to allocate grid%tsk_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'TSK_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE SURFACE SKIN 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%tsk_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tsk_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20273,& 'frame/module_domain.f: Failed to allocate grid%tsk_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20284,& 'frame/module_domain.f: Failed to allocate grid%t2_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'T2_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE TEMPERATURE AT 2M' 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%t2_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t2_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20334,& 'frame/module_domain.f: Failed to allocate grid%t2_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th2_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%th2_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20345,& 'frame/module_domain.f: Failed to allocate grid%th2_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'TH2_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE POTENTIAL TEMPERATURE AT 2M' 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%th2_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%th2_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20395,& 'frame/module_domain.f: Failed to allocate grid%th2_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20406,& 'frame/module_domain.f: Failed to allocate grid%q2_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'Q2_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE WATER VAPOR MIXING RATIO AT 2M' 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%q2_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%q2_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20456,& 'frame/module_domain.f: Failed to allocate grid%q2_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20467,& 'frame/module_domain.f: Failed to allocate grid%u10_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'U10_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE U-COMPONENT OF WIND AT 10M' 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 = '' 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%u10_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u10_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20517,& 'frame/module_domain.f: Failed to allocate grid%u10_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20528,& 'frame/module_domain.f: Failed to allocate grid%v10_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'V10_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE V-COMPONENT OF WIND AT 10M' 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 = '' 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%v10_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%v10_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20578,& 'frame/module_domain.f: Failed to allocate grid%v10_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hfx_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hfx_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20589,& 'frame/module_domain.f: Failed to allocate grid%hfx_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hfx_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hfx_diurn' grid%tail_statevars%DataName = 'HFX_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE SENSIBLE HEAT FLUX AT THE SURFACE' 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 = '' 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%hfx_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%hfx_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20639,& 'frame/module_domain.f: Failed to allocate grid%hfx_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lh_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lh_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20650,& 'frame/module_domain.f: Failed to allocate grid%lh_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh_diurn=initial_data_value IF (.NOT.grid%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_diurn' grid%tail_statevars%DataName = 'LH_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE LATENT HEAT FLUX AT THE SURFACE' 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 = '' 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%lh_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lh_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20700,& 'frame/module_domain.f: Failed to allocate grid%lh_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnb_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdnb_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20711,& 'frame/module_domain.f: Failed to allocate grid%swdnb_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnb_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnb_diurn' grid%tail_statevars%DataName = 'SWDNB_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE DOWNWARD SHORTWAVE FLUX AT GROUND SURFACE' 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 = '' 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%swdnb_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%swdnb_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20761,& 'frame/module_domain.f: Failed to allocate grid%swdnb_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'glw_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%glw_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20772,& 'frame/module_domain.f: Failed to allocate grid%glw_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%glw_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'glw_diurn' grid%tail_statevars%DataName = 'GLW_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE DOWNWARD LONGWAVE FLUX AT GROUND SURFACE' 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 = '' 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%glw_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%glw_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20822,& 'frame/module_domain.f: Failed to allocate grid%glw_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupb_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lwupb_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20833,& 'frame/module_domain.f: Failed to allocate grid%lwupb_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupb_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupb_diurn' grid%tail_statevars%DataName = 'LWUPB_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE UPWELLING LONGWAVE FLUX AT BOTTOM' 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 = '' 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%lwupb_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lwupb_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20883,& 'frame/module_domain.f: Failed to allocate grid%lwupb_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupb_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swupb_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20894,& 'frame/module_domain.f: Failed to allocate grid%swupb_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupb_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupb_diurn' grid%tail_statevars%DataName = 'SWUPB_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE UPWELLING SHORTWAVE FLUX AT BOTTOM' 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 = '' 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%swupb_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%swupb_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20944,& 'frame/module_domain.f: Failed to allocate grid%swupb_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupt_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swupt_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20955,& 'frame/module_domain.f: Failed to allocate grid%swupt_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupt_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupt_diurn' grid%tail_statevars%DataName = 'SWUPT_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE UPWELLING SHORTWAVE FLUX AT TOP' 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 = '' 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%swupt_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%swupt_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21005,& 'frame/module_domain.f: Failed to allocate grid%swupt_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnt_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdnt_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21016,& 'frame/module_domain.f: Failed to allocate grid%swdnt_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnt_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnt_diurn' grid%tail_statevars%DataName = 'SWDNT_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE DOWNWELLING SHORTWAVE FLUX AT TOP' 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 = '' 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%swdnt_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%swdnt_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21066,& 'frame/module_domain.f: Failed to allocate grid%swdnt_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupt_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lwupt_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21077,& 'frame/module_domain.f: Failed to allocate grid%lwupt_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupt_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupt_diurn' grid%tail_statevars%DataName = 'LWUPT_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE UPWELLING LONGWAVE FLUX AT TOP' 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 = '' 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%lwupt_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lwupt_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21127,& 'frame/module_domain.f: Failed to allocate grid%lwupt_diurn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwdnt_diurn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((8)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lwdnt_diurn(sm31:em31,1:8,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21138,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_diurn(sm31:em31,1:8,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnt_diurn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwdnt_diurn' grid%tail_statevars%DataName = 'LWDNT_D' grid%tail_statevars%Description = 'DIURNAL AVERAGE DOWNWELLING LONGWAVE FLUX AT TOP' 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 = '' 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%lwdnt_diurn grid%tail_statevars%streams(1) = 64 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 = 8 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 = 8 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 = 8 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 = 'diurnal_cycles' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%lwdnt_diurn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21188,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_diurn(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 = 'nsteps_diurn' grid%tail_statevars%DataName = 'NSTEP_D' grid%tail_statevars%Description = 'NUMBER OF DIURNAL STEPS ACCUMULATED' 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%nsteps_diurn grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%nsteps_diurn=0 IF(okay_to_alloc.AND.in_use_for_config(id,'psfc_dtmp').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_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21218,& 'frame/module_domain.f: Failed to allocate grid%psfc_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'PSFC_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%psfc_dtmp 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%psfc_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21268,& 'frame/module_domain.f: Failed to allocate grid%psfc_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_dtmp').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_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21279,& 'frame/module_domain.f: Failed to allocate grid%tsk_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'TSK_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE SURFACE 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%tsk_dtmp 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_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21329,& 'frame/module_domain.f: Failed to allocate grid%tsk_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2_dtmp').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%t2_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21340,& 'frame/module_domain.f: Failed to allocate grid%t2_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'T2_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE TEMPERATURE AT 2M' 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_dtmp 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%t2_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21390,& 'frame/module_domain.f: Failed to allocate grid%t2_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th2_dtmp').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%th2_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21401,& 'frame/module_domain.f: Failed to allocate grid%th2_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'TH2_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE POTENTIAL TEMPERATURE AT 2M' 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_dtmp 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%th2_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21451,& 'frame/module_domain.f: Failed to allocate grid%th2_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2_dtmp').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%q2_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21462,& 'frame/module_domain.f: Failed to allocate grid%q2_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'Q2_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP WATER VAPOR MIXING RATIO AT 2M' 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_dtmp 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%q2_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21512,& 'frame/module_domain.f: Failed to allocate grid%q2_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10_dtmp').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%u10_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21523,& 'frame/module_domain.f: Failed to allocate grid%u10_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'U10_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP U-COMPONENT OF WIND AT 10M' 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_dtmp 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%u10_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21573,& 'frame/module_domain.f: Failed to allocate grid%u10_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10_dtmp').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%v10_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21584,& 'frame/module_domain.f: Failed to allocate grid%v10_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'V10_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP V-COMPONENT OF WIND AT 10M' 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_dtmp 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%v10_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21634,& 'frame/module_domain.f: Failed to allocate grid%v10_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hfx_dtmp').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%hfx_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21645,& 'frame/module_domain.f: Failed to allocate grid%hfx_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hfx_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hfx_dtmp' grid%tail_statevars%DataName = 'HFX_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE SENSIBLE HEAT FLUX AT THE SURFACE' 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%hfx_dtmp 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%hfx_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21695,& 'frame/module_domain.f: Failed to allocate grid%hfx_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lh_dtmp').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%lh_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21706,& 'frame/module_domain.f: Failed to allocate grid%lh_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh_dtmp=initial_data_value IF (.NOT.grid%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_dtmp' grid%tail_statevars%DataName = 'LH_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE LATENT HEAT FLUX AT THE SURFACE' 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_dtmp 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_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21756,& 'frame/module_domain.f: Failed to allocate grid%lh_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnb_dtmp').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%swdnb_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21767,& 'frame/module_domain.f: Failed to allocate grid%swdnb_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnb_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnb_dtmp' grid%tail_statevars%DataName = 'SWDNB_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE' 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%swdnb_dtmp 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%swdnb_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21817,& 'frame/module_domain.f: Failed to allocate grid%swdnb_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'glw_dtmp').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%glw_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21828,& 'frame/module_domain.f: Failed to allocate grid%glw_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%glw_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'glw_dtmp' grid%tail_statevars%DataName = 'GLW_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE DOWNWARD LONG WAVE FLUX AT GROUND SURFACE' 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%glw_dtmp 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%glw_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21878,& 'frame/module_domain.f: Failed to allocate grid%glw_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupb_dtmp').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%lwupb_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21889,& 'frame/module_domain.f: Failed to allocate grid%lwupb_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupb_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupb_dtmp' grid%tail_statevars%DataName = 'LWUPB_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE UPWELLING LONGWAVE FLUX AT BOTTOM' 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%lwupb_dtmp 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%lwupb_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21939,& 'frame/module_domain.f: Failed to allocate grid%lwupb_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupb_dtmp').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%swupb_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21950,& 'frame/module_domain.f: Failed to allocate grid%swupb_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupb_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupb_dtmp' grid%tail_statevars%DataName = 'SWUPB_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE UPWELLING SHORTWAVE FLUX AT BOTTOM' 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%swupb_dtmp 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%swupb_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22000,& 'frame/module_domain.f: Failed to allocate grid%swupb_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swupt_dtmp').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%swupt_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22011,& 'frame/module_domain.f: Failed to allocate grid%swupt_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupt_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swupt_dtmp' grid%tail_statevars%DataName = 'SWUPT_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE UPWELLING SHORTWAVE FLUX AT TOP' 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%swupt_dtmp 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%swupt_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22061,& 'frame/module_domain.f: Failed to allocate grid%swupt_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdnt_dtmp').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%swdnt_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22072,& 'frame/module_domain.f: Failed to allocate grid%swdnt_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnt_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdnt_dtmp' grid%tail_statevars%DataName = 'SWDNT_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE DOWNWELLING SHORTWAVE FLUX AT TOP' 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%swdnt_dtmp 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%swdnt_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22122,& 'frame/module_domain.f: Failed to allocate grid%swdnt_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwupt_dtmp').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%lwupt_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22133,& 'frame/module_domain.f: Failed to allocate grid%lwupt_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupt_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwupt_dtmp' grid%tail_statevars%DataName = 'LWUPT_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE UPWELLING LONGWAVE FLUX AT TOP' 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%lwupt_dtmp 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%lwupt_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22183,& 'frame/module_domain.f: Failed to allocate grid%lwupt_dtmp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwdnt_dtmp').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%lwdnt_dtmp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22194,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_dtmp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnt_dtmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwdnt_dtmp' grid%tail_statevars%DataName = 'LWDNT_DTM' grid%tail_statevars%Description = 'DIURNAL TEMP AVERAGE DOWNWELLING LONGWAVE FLUX AT TOP' 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%lwdnt_dtmp 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%lwdnt_dtmp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22244,& 'frame/module_domain.f: Failed to allocate grid%lwdnt_dtmp(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 = 'nstepsmean_diurn' grid%tail_statevars%DataName = 'NSTEP_DTM' grid%tail_statevars%Description = 'NUMBER OF MEAN STEPS ACCUMULATED IN DIURNAL Calculation' 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%nstepsmean_diurn grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%nstepsmean_diurn=0 IF(okay_to_alloc.AND.in_use_for_config(id,'rscghis_2d').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%rscghis_2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22274,& 'frame/module_domain.f: Failed to allocate grid%rscghis_2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rscghis_2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rscghis_2d' grid%tail_statevars%DataName = 'RSCGHIS_2D' grid%tail_statevars%Description = 'MAX NONINDUCTIVE CHARGING 2D' grid%tail_statevars%Units = 'C 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%rscghis_2d 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%rscghis_2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22324,& 'frame/module_domain.f: Failed to allocate grid%rscghis_2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'induc').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%induc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22335,& 'frame/module_domain.f: Failed to allocate grid%induc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%induc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'induc' grid%tail_statevars%DataName = 'INDUC' grid%tail_statevars%Description = 'TOTAL INDUCTIVE CHARGING ' grid%tail_statevars%Units = 'C 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%induc 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%induc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22385,& 'frame/module_domain.f: Failed to allocate grid%induc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'noninduc').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%noninduc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22396,& 'frame/module_domain.f: Failed to allocate grid%noninduc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%noninduc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'noninduc' grid%tail_statevars%DataName = 'NONINDUC' grid%tail_statevars%Description = 'TOTAL NONINDUCTIVE CHARGING' grid%tail_statevars%Units = 'C 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%noninduc 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%noninduc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22446,& 'frame/module_domain.f: Failed to allocate grid%noninduc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sctot').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%sctot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22457,& 'frame/module_domain.f: Failed to allocate grid%sctot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sctot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sctot' grid%tail_statevars%DataName = 'SCTOT' grid%tail_statevars%Description = 'Total Space Charge Density' grid%tail_statevars%Units = 'C 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%sctot 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%sctot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22507,& 'frame/module_domain.f: Failed to allocate grid%sctot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'elecmag').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%elecmag(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22518,& 'frame/module_domain.f: Failed to allocate grid%elecmag(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%elecmag=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'elecmag' grid%tail_statevars%DataName = 'ELECMAG' grid%tail_statevars%Description = 'EFIELD MAGNITUDE' grid%tail_statevars%Units = 'V m-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%elecmag 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%elecmag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22568,& 'frame/module_domain.f: Failed to allocate grid%elecmag(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'elecx').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%elecx(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22579,& 'frame/module_domain.f: Failed to allocate grid%elecx(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%elecx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'elecx' grid%tail_statevars%DataName = 'ELECX' grid%tail_statevars%Description = 'EFIELD X-Component' grid%tail_statevars%Units = 'V m-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%elecx 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%elecx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22629,& 'frame/module_domain.f: Failed to allocate grid%elecx(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'elecy').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%elecy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22640,& 'frame/module_domain.f: Failed to allocate grid%elecy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%elecy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'elecy' grid%tail_statevars%DataName = 'ELECY' grid%tail_statevars%Description = 'EFIELD Y-Component' grid%tail_statevars%Units = 'V m-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%elecy 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%elecy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22690,& 'frame/module_domain.f: Failed to allocate grid%elecy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'elecz').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%elecz(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22701,& 'frame/module_domain.f: Failed to allocate grid%elecz(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%elecz=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'elecz' grid%tail_statevars%DataName = 'ELECZ' grid%tail_statevars%Description = 'EFIELD Z-Component' grid%tail_statevars%Units = 'V m-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%elecz 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%elecz(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22751,& 'frame/module_domain.f: Failed to allocate grid%elecz(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pot').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%pot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22762,& 'frame/module_domain.f: Failed to allocate grid%pot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pot' grid%tail_statevars%DataName = 'POT' grid%tail_statevars%Description = 'POTENTIAL' grid%tail_statevars%Units = 'V' 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%pot 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%pot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22812,& 'frame/module_domain.f: Failed to allocate grid%pot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'light').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%light(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22823,& 'frame/module_domain.f: Failed to allocate grid%light(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%light=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'light' grid%tail_statevars%DataName = 'LIGHT' grid%tail_statevars%Description = 'lightning flash' grid%tail_statevars%Units = 'flash origin density' 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%light 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%light(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22873,& 'frame/module_domain.f: Failed to allocate grid%light(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lightdens').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%lightdens(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22884,& 'frame/module_domain.f: Failed to allocate grid%lightdens(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lightdens=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lightdens' grid%tail_statevars%DataName = 'LIGHTDENS' grid%tail_statevars%Description = 'lightning flash density' grid%tail_statevars%Units = 'flash column-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%lightdens 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%lightdens(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22934,& 'frame/module_domain.f: Failed to allocate grid%lightdens(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lightdis').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%lightdis(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22945,& 'frame/module_domain.f: Failed to allocate grid%lightdis(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lightdis=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 = 'lightdis' grid%tail_statevars%DataName = 'LIGHTDIS' grid%tail_statevars%Description = 'lightning source density' grid%tail_statevars%Units = 'Source column-1' 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%lightdis 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%lightdis(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22995,& 'frame/module_domain.f: Failed to allocate grid%lightdis(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flshi').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%flshi(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23006,& 'frame/module_domain.f: Failed to allocate grid%flshi(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flshi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flshi' grid%tail_statevars%DataName = 'FLSHI' grid%tail_statevars%Description = 'Lightning init points' grid%tail_statevars%Units = 'count' 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%flshi 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%flshi(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23056,& 'frame/module_domain.f: Failed to allocate grid%flshi(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flshn').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%flshn(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23067,& 'frame/module_domain.f: Failed to allocate grid%flshn(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flshn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flshn' grid%tail_statevars%DataName = 'FLSHN' grid%tail_statevars%Description = 'Negative channels' grid%tail_statevars%Units = 'count' 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%flshn 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%flshn(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23117,& 'frame/module_domain.f: Failed to allocate grid%flshn(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'flshp').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%flshp(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23128,& 'frame/module_domain.f: Failed to allocate grid%flshp(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flshp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'flshp' grid%tail_statevars%DataName = 'FLSHP' grid%tail_statevars%Description = 'Positive channels' grid%tail_statevars%Units = 'count' 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%flshp 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%flshp(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23178,& 'frame/module_domain.f: Failed to allocate grid%flshp(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%nssl_ipelec=0 IF ( setinitval .EQ. 3 ) grid%nssl_isaund=0 IF ( setinitval .EQ. 3 ) grid%nssl_iscreen=0 IF ( setinitval .EQ. 3 ) grid%nssl_lightrad=initial_data_value IF ( setinitval .EQ. 3 ) grid%nssl_idischarge=0 IF ( setinitval .EQ. 3 ) grid%nssl_ibrkd=0 IF ( setinitval .EQ. 3 ) grid%nssl_ecrit=initial_data_value IF ( setinitval .EQ. 3 ) grid%nssl_disfrac=initial_data_value IF ( setinitval .EQ. 3 ) grid%elec_physics=0 IF(okay_to_alloc.AND.in_use_for_config(id,'field_u_tend_perturb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%field_u_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23198,& 'frame/module_domain.f: Failed to allocate grid%field_u_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%field_u_tend_perturb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'field_u_tend_perturb' grid%tail_statevars%DataName = 'FIELD_U_TEND_PERTURB' grid%tail_statevars%Description = 'field used to perturb u in the boundaries' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%field_u_tend_perturb grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_stoch_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_stoch_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_stoch_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_stoch_levels' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%field_u_tend_perturb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23248,& 'frame/module_domain.f: Failed to allocate grid%field_u_tend_perturb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'field_v_tend_perturb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%field_v_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23259,& 'frame/module_domain.f: Failed to allocate grid%field_v_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%field_v_tend_perturb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'field_v_tend_perturb' grid%tail_statevars%DataName = 'FIELD_V_TEND_PERTURB' grid%tail_statevars%Description = 'field used to perturb v in the boundaries' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%field_v_tend_perturb 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 = 1 grid%tail_statevars%ed2 = config_flags%num_stoch_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_stoch_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_stoch_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_stoch_levels' grid%tail_statevars%dimname3 = 'south_north_stag' ENDIF ELSE ALLOCATE(grid%field_v_tend_perturb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23309,& 'frame/module_domain.f: Failed to allocate grid%field_v_tend_perturb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'field_t_tend_perturb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_stoch_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%field_t_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23320,& 'frame/module_domain.f: Failed to allocate grid%field_t_tend_perturb(sm31:em31,1:model_config_rec%num_stoch_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%field_t_tend_perturb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'field_t_tend_perturb' grid%tail_statevars%DataName = 'FIELD_T_TEND_PERTURB' grid%tail_statevars%Description = 'field used to perturb t in the boundaries' 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%field_t_tend_perturb 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 = 1 grid%tail_statevars%ed2 = config_flags%num_stoch_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_stoch_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_stoch_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_stoch_levels' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%field_t_tend_perturb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23370,& 'frame/module_domain.f: Failed to allocate grid%field_t_tend_perturb(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%perturb_bdy=0 IF ( setinitval .EQ. 3 ) grid%perturb_chem_bdy=0 IF(okay_to_alloc.AND.in_use_for_config(id,'c1h').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c1h(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23383,& 'frame/module_domain.f: Failed to allocate grid%c1h(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c1h=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c1h' grid%tail_statevars%DataName = 'C1H' grid%tail_statevars%Description = 'half levels, c1h = d bf / d eta, using znw' grid%tail_statevars%Units = 'Dimensionless' 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%c1h grid%tail_statevars%streams(1) = 197132289 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%c1h(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23431,& 'frame/module_domain.f: Failed to allocate grid%c1h(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c2h').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c2h(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23442,& 'frame/module_domain.f: Failed to allocate grid%c2h(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c2h=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c2h' grid%tail_statevars%DataName = 'C2H' grid%tail_statevars%Description = 'half levels, c2h = (1-c1h)*(p0-pt)' grid%tail_statevars%Units = 'Pa' 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%c2h grid%tail_statevars%streams(1) = 197132289 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%c2h(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23490,& 'frame/module_domain.f: Failed to allocate grid%c2h(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c1f').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c1f(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23501,& 'frame/module_domain.f: Failed to allocate grid%c1f(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c1f=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c1f' grid%tail_statevars%DataName = 'C1F' grid%tail_statevars%Description = 'full levels, c1f = d bf / d eta, using znu' grid%tail_statevars%Units = 'Dimensionless' 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%c1f grid%tail_statevars%streams(1) = 197132289 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%c1f(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23549,& 'frame/module_domain.f: Failed to allocate grid%c1f(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c2f').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c2f(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23560,& 'frame/module_domain.f: Failed to allocate grid%c2f(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c2f=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c2f' grid%tail_statevars%DataName = 'C2F' grid%tail_statevars%Description = 'full levels, c2f = (1-c1f)*(p0-pt)' grid%tail_statevars%Units = 'Pa' 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%c2f grid%tail_statevars%streams(1) = 197132289 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%c2f(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23608,& 'frame/module_domain.f: Failed to allocate grid%c2f(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c3h').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c3h(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23619,& 'frame/module_domain.f: Failed to allocate grid%c3h(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c3h=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c3h' grid%tail_statevars%DataName = 'C3H' grid%tail_statevars%Description = 'half levels, c3h = bh' grid%tail_statevars%Units = 'Dimensionless' 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%c3h grid%tail_statevars%streams(1) = 197132289 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%c3h(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23667,& 'frame/module_domain.f: Failed to allocate grid%c3h(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c4h').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c4h(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23678,& 'frame/module_domain.f: Failed to allocate grid%c4h(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c4h=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c4h' grid%tail_statevars%DataName = 'C4H' grid%tail_statevars%Description = 'half levels, c4h = (eta-bh)*(p0-pt), using znu' grid%tail_statevars%Units = 'Pa' 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%c4h grid%tail_statevars%streams(1) = 197132289 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%c4h(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23726,& 'frame/module_domain.f: Failed to allocate grid%c4h(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c3f').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c3f(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23737,& 'frame/module_domain.f: Failed to allocate grid%c3f(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c3f=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c3f' grid%tail_statevars%DataName = 'C3F' grid%tail_statevars%Description = 'full levels, c3f = bf' grid%tail_statevars%Units = 'Dimensionless' 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%c3f grid%tail_statevars%streams(1) = 197132289 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%c3f(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23785,& 'frame/module_domain.f: Failed to allocate grid%c3f(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'c4f').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%c4f(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23796,& 'frame/module_domain.f: Failed to allocate grid%c4f(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%c4f=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'c4f' grid%tail_statevars%DataName = 'C4F' grid%tail_statevars%Description = 'full levels, c4f = (eta-bf)*(p0-pt), using znw' grid%tail_statevars%Units = 'Pa' 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%c4f grid%tail_statevars%streams(1) = 197132289 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%c4f(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23844,& 'frame/module_domain.f: Failed to allocate grid%c4f(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pcb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pcb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23855,& 'frame/module_domain.f: Failed to allocate grid%pcb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pcb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pcb' grid%tail_statevars%DataName = 'PCB' 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%pcb 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%pcb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23905,& 'frame/module_domain.f: Failed to allocate grid%pcb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pc_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%pc_1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23916,& 'frame/module_domain.f: Failed to allocate grid%pc_1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_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 = 'pc_1' grid%tail_statevars%DataName = 'PC_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%pc_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 = 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%pc_1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23966,& 'frame/module_domain.f: Failed to allocate grid%pc_1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pc_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%pc_2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23977,& 'frame/module_domain.f: Failed to allocate grid%pc_2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_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 = 'pc_2' grid%tail_statevars%DataName = 'PC_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%pc_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 = 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%pc_2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24027,& 'frame/module_domain.f: Failed to allocate grid%pc_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%pc_bxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24036,& 'frame/module_domain.f: Failed to allocate grid%pc_bxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_bxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24044,& 'frame/module_domain.f: Failed to allocate grid%pc_bxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_bys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24052,& 'frame/module_domain.f: Failed to allocate grid%pc_bys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_bye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24060,& 'frame/module_domain.f: Failed to allocate grid%pc_bye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_bye=initial_data_value ELSE ALLOCATE(grid%pc_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24067,& 'frame/module_domain.f: Failed to allocate grid%pc_bxs(1,1,1). ') endif ALLOCATE(grid%pc_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24072,& 'frame/module_domain.f: Failed to allocate grid%pc_bxe(1,1,1). ') endif ALLOCATE(grid%pc_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24077,& 'frame/module_domain.f: Failed to allocate grid%pc_bys(1,1,1). ') endif ALLOCATE(grid%pc_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24082,& 'frame/module_domain.f: Failed to allocate grid%pc_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%pc_btxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24091,& 'frame/module_domain.f: Failed to allocate grid%pc_btxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_btxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24099,& 'frame/module_domain.f: Failed to allocate grid%pc_btxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_btys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24107,& 'frame/module_domain.f: Failed to allocate grid%pc_btys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%pc_btye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24115,& 'frame/module_domain.f: Failed to allocate grid%pc_btye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pc_btye=initial_data_value ELSE ALLOCATE(grid%pc_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24122,& 'frame/module_domain.f: Failed to allocate grid%pc_btxs(1,1,1). ') endif ALLOCATE(grid%pc_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24127,& 'frame/module_domain.f: Failed to allocate grid%pc_btxe(1,1,1). ') endif ALLOCATE(grid%pc_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24132,& 'frame/module_domain.f: Failed to allocate grid%pc_btys(1,1,1). ') endif ALLOCATE(grid%pc_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24137,& 'frame/module_domain.f: Failed to allocate grid%pc_btye(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%hybrid_opt=0 IF ( setinitval .EQ. 3 ) grid%etac=initial_data_value IF ( setinitval .EQ. 3 ) grid%num_wif_levels=0 IF ( setinitval .EQ. 3 ) grid%wif_input_opt=0 IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_now').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24152,& 'frame/module_domain.f: Failed to allocate grid%p_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_now' grid%tail_statevars%DataName = 'P_WIF_NOW' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Now' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_now(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24202,& 'frame/module_domain.f: Failed to allocate grid%p_wif_now(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_jan').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24213,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_jan' grid%tail_statevars%DataName = 'P_WIF_JAN' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Jan' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_jan(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24263,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jan(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_feb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24274,& 'frame/module_domain.f: Failed to allocate grid%p_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_feb' grid%tail_statevars%DataName = 'P_WIF_FEB' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Feb' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_feb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24324,& 'frame/module_domain.f: Failed to allocate grid%p_wif_feb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_mar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24335,& 'frame/module_domain.f: Failed to allocate grid%p_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_mar' grid%tail_statevars%DataName = 'P_WIF_MAR' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Mar' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_mar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24385,& 'frame/module_domain.f: Failed to allocate grid%p_wif_mar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_apr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24396,& 'frame/module_domain.f: Failed to allocate grid%p_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_apr' grid%tail_statevars%DataName = 'P_WIF_APR' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Apr' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_apr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24446,& 'frame/module_domain.f: Failed to allocate grid%p_wif_apr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_may').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24457,& 'frame/module_domain.f: Failed to allocate grid%p_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_may' grid%tail_statevars%DataName = 'P_WIF_MAY' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols May' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_may(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24507,& 'frame/module_domain.f: Failed to allocate grid%p_wif_may(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_jun').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24518,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_jun' grid%tail_statevars%DataName = 'P_WIF_JUN' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Jun' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_jun(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24568,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jun(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_jul').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24579,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_jul' grid%tail_statevars%DataName = 'P_WIF_JUL' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Jul' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_jul(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24629,& 'frame/module_domain.f: Failed to allocate grid%p_wif_jul(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_aug').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24640,& 'frame/module_domain.f: Failed to allocate grid%p_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_aug' grid%tail_statevars%DataName = 'P_WIF_AUG' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Aug' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_aug(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24690,& 'frame/module_domain.f: Failed to allocate grid%p_wif_aug(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_sep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24701,& 'frame/module_domain.f: Failed to allocate grid%p_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_sep' grid%tail_statevars%DataName = 'P_WIF_SEP' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Sep' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_sep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24751,& 'frame/module_domain.f: Failed to allocate grid%p_wif_sep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_oct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24762,& 'frame/module_domain.f: Failed to allocate grid%p_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_oct' grid%tail_statevars%DataName = 'P_WIF_OCT' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Oct' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_oct(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24812,& 'frame/module_domain.f: Failed to allocate grid%p_wif_oct(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_nov').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24823,& 'frame/module_domain.f: Failed to allocate grid%p_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_nov' grid%tail_statevars%DataName = 'P_WIF_NOV' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Nov' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_nov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24873,& 'frame/module_domain.f: Failed to allocate grid%p_wif_nov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'p_wif_dec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%p_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24884,& 'frame/module_domain.f: Failed to allocate grid%p_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_wif_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 = 'p_wif_dec' grid%tail_statevars%DataName = 'P_WIF_DEC' grid%tail_statevars%Description = 'Pressure for Water Ice Friendly Aerosols Dec' 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_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%p_wif_dec(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24934,& 'frame/module_domain.f: Failed to allocate grid%p_wif_dec(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_now').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24945,& 'frame/module_domain.f: Failed to allocate grid%w_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_now' grid%tail_statevars%DataName = 'W_WIF_NOW' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_now(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24995,& 'frame/module_domain.f: Failed to allocate grid%w_wif_now(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_jan').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25006,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_jan' grid%tail_statevars%DataName = 'W_WIF_JAN' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_jan(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25056,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jan(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_feb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25067,& 'frame/module_domain.f: Failed to allocate grid%w_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_feb' grid%tail_statevars%DataName = 'W_WIF_FEB' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_feb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25117,& 'frame/module_domain.f: Failed to allocate grid%w_wif_feb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_mar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25128,& 'frame/module_domain.f: Failed to allocate grid%w_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_mar' grid%tail_statevars%DataName = 'W_WIF_MAR' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_mar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25178,& 'frame/module_domain.f: Failed to allocate grid%w_wif_mar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_apr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25189,& 'frame/module_domain.f: Failed to allocate grid%w_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_apr' grid%tail_statevars%DataName = 'W_WIF_APR' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_apr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25239,& 'frame/module_domain.f: Failed to allocate grid%w_wif_apr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_may').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25250,& 'frame/module_domain.f: Failed to allocate grid%w_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_may' grid%tail_statevars%DataName = 'W_WIF_MAY' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_may(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25300,& 'frame/module_domain.f: Failed to allocate grid%w_wif_may(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_jun').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25311,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_jun' grid%tail_statevars%DataName = 'W_WIF_JUN' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_jun(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25361,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jun(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_jul').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25372,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_jul' grid%tail_statevars%DataName = 'W_WIF_JUL' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_jul(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25422,& 'frame/module_domain.f: Failed to allocate grid%w_wif_jul(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_aug').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25433,& 'frame/module_domain.f: Failed to allocate grid%w_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_aug' grid%tail_statevars%DataName = 'W_WIF_AUG' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_aug(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25483,& 'frame/module_domain.f: Failed to allocate grid%w_wif_aug(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_sep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25494,& 'frame/module_domain.f: Failed to allocate grid%w_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_sep' grid%tail_statevars%DataName = 'W_WIF_SEP' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_sep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25544,& 'frame/module_domain.f: Failed to allocate grid%w_wif_sep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_oct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25555,& 'frame/module_domain.f: Failed to allocate grid%w_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_oct' grid%tail_statevars%DataName = 'W_WIF_OCT' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_oct(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25605,& 'frame/module_domain.f: Failed to allocate grid%w_wif_oct(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_nov').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25616,& 'frame/module_domain.f: Failed to allocate grid%w_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_nov' grid%tail_statevars%DataName = 'W_WIF_NOV' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_nov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25666,& 'frame/module_domain.f: Failed to allocate grid%w_wif_nov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_wif_dec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25677,& 'frame/module_domain.f: Failed to allocate grid%w_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_wif_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 = 'w_wif_dec' grid%tail_statevars%DataName = 'W_WIF_DEC' grid%tail_statevars%Description = 'Background Water Friendly Aerosol option 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%w_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%w_wif_dec(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25727,& 'frame/module_domain.f: Failed to allocate grid%w_wif_dec(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_now').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25738,& 'frame/module_domain.f: Failed to allocate grid%i_wif_now(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_now' grid%tail_statevars%DataName = 'I_WIF_NOW' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_now(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25788,& 'frame/module_domain.f: Failed to allocate grid%i_wif_now(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_jan').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25799,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jan(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_jan' grid%tail_statevars%DataName = 'I_WIF_JAN' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_jan(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25849,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jan(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_feb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25860,& 'frame/module_domain.f: Failed to allocate grid%i_wif_feb(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_feb' grid%tail_statevars%DataName = 'I_WIF_FEB' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_feb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25910,& 'frame/module_domain.f: Failed to allocate grid%i_wif_feb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_mar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25921,& 'frame/module_domain.f: Failed to allocate grid%i_wif_mar(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_mar' grid%tail_statevars%DataName = 'I_WIF_MAR' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_mar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25971,& 'frame/module_domain.f: Failed to allocate grid%i_wif_mar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_apr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25982,& 'frame/module_domain.f: Failed to allocate grid%i_wif_apr(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_apr' grid%tail_statevars%DataName = 'I_WIF_APR' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_apr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26032,& 'frame/module_domain.f: Failed to allocate grid%i_wif_apr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_may').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26043,& 'frame/module_domain.f: Failed to allocate grid%i_wif_may(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_may' grid%tail_statevars%DataName = 'I_WIF_MAY' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_may(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26093,& 'frame/module_domain.f: Failed to allocate grid%i_wif_may(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_jun').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26104,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jun(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_jun' grid%tail_statevars%DataName = 'I_WIF_JUN' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_jun(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26154,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jun(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_jul').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26165,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jul(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_jul' grid%tail_statevars%DataName = 'I_WIF_JUL' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_jul(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26215,& 'frame/module_domain.f: Failed to allocate grid%i_wif_jul(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_aug').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26226,& 'frame/module_domain.f: Failed to allocate grid%i_wif_aug(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_aug' grid%tail_statevars%DataName = 'I_WIF_AUG' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_aug(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26276,& 'frame/module_domain.f: Failed to allocate grid%i_wif_aug(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_sep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26287,& 'frame/module_domain.f: Failed to allocate grid%i_wif_sep(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_sep' grid%tail_statevars%DataName = 'I_WIF_SEP' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_sep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26337,& 'frame/module_domain.f: Failed to allocate grid%i_wif_sep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_oct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26348,& 'frame/module_domain.f: Failed to allocate grid%i_wif_oct(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_oct' grid%tail_statevars%DataName = 'I_WIF_OCT' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_oct(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26398,& 'frame/module_domain.f: Failed to allocate grid%i_wif_oct(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_nov').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26409,& 'frame/module_domain.f: Failed to allocate grid%i_wif_nov(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_nov' grid%tail_statevars%DataName = 'I_WIF_NOV' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_nov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26459,& 'frame/module_domain.f: Failed to allocate grid%i_wif_nov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_wif_dec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_wif_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26470,& 'frame/module_domain.f: Failed to allocate grid%i_wif_dec(sm31:em31,1:model_config_rec%num_wif_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_wif_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 = 'i_wif_dec' grid%tail_statevars%DataName = 'I_WIF_DEC' grid%tail_statevars%Description = 'Background Ice Friendly Aerosol option 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%i_wif_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_wif_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_wif_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_wif_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_wif_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%i_wif_dec(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26520,& 'frame/module_domain.f: Failed to allocate grid%i_wif_dec(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%diag_nwp2=0 IF(okay_to_alloc.AND.in_use_for_config(id,'sealevelp').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%sealevelp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26532,& 'frame/module_domain.f: Failed to allocate grid%sealevelp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sealevelp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sealevelp' grid%tail_statevars%DataName = 'SEALEVELP' 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%sealevelp grid%tail_statevars%streams(1) = 2 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%sealevelp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26582,& 'frame/module_domain.f: Failed to allocate grid%sealevelp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'temperature').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%temperature(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26593,& 'frame/module_domain.f: Failed to allocate grid%temperature(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%temperature=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'temperature' grid%tail_statevars%DataName = 'TEMPERATURE' grid%tail_statevars%Description = 'sensible 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%temperature grid%tail_statevars%streams(1) = 2 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%temperature(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26643,& 'frame/module_domain.f: Failed to allocate grid%temperature(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'geoheight').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%geoheight(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26654,& 'frame/module_domain.f: Failed to allocate grid%geoheight(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%geoheight=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'geoheight' grid%tail_statevars%DataName = 'GEOHEIGHT' 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 = '' 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%geoheight grid%tail_statevars%streams(1) = 2 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%geoheight(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26704,& 'frame/module_domain.f: Failed to allocate grid%geoheight(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pressure').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%pressure(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26715,& 'frame/module_domain.f: Failed to allocate grid%pressure(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pressure=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pressure' grid%tail_statevars%DataName = 'PRESSURE' grid%tail_statevars%Description = 'atmospheric 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%pressure grid%tail_statevars%streams(1) = 2 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%pressure(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26765,& 'frame/module_domain.f: Failed to allocate grid%pressure(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'umet').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%umet(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26776,& 'frame/module_domain.f: Failed to allocate grid%umet(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%umet=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'umet' grid%tail_statevars%DataName = 'UMET' grid%tail_statevars%Description = 'earth relative U at mass points' grid%tail_statevars%Units = 'm/s' 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%umet grid%tail_statevars%streams(1) = 2 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%umet(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26826,& 'frame/module_domain.f: Failed to allocate grid%umet(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vmet').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%vmet(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26837,& 'frame/module_domain.f: Failed to allocate grid%vmet(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vmet=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vmet' grid%tail_statevars%DataName = 'VMET' grid%tail_statevars%Description = 'earth relative V at mass points' grid%tail_statevars%Units = 'm/s' 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%vmet grid%tail_statevars%streams(1) = 2 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%vmet(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26887,& 'frame/module_domain.f: Failed to allocate grid%vmet(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'speed').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%speed(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26898,& 'frame/module_domain.f: Failed to allocate grid%speed(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%speed=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'speed' grid%tail_statevars%DataName = 'SPEED' grid%tail_statevars%Description = 'horizontal wind speed' grid%tail_statevars%Units = 'm/s' 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%speed grid%tail_statevars%streams(1) = 2 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%speed(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26948,& 'frame/module_domain.f: Failed to allocate grid%speed(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dir').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%dir(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26959,& 'frame/module_domain.f: Failed to allocate grid%dir(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dir' grid%tail_statevars%DataName = 'DIR' grid%tail_statevars%Description = 'wind direction, 0=northly, 270=westerly' grid%tail_statevars%Units = 'degrees' 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%dir grid%tail_statevars%streams(1) = 2 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%dir(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27009,& 'frame/module_domain.f: Failed to allocate grid%dir(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rain').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%rain(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27020,& 'frame/module_domain.f: Failed to allocate grid%rain(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rain=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rain' grid%tail_statevars%DataName = 'RAIN' grid%tail_statevars%Description = 'total rainfall' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%rain grid%tail_statevars%streams(1) = 2 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%rain(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27070,& 'frame/module_domain.f: Failed to allocate grid%rain(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'liqrain').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%liqrain(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27081,& 'frame/module_domain.f: Failed to allocate grid%liqrain(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%liqrain=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'liqrain' grid%tail_statevars%DataName = 'LIQRAIN' grid%tail_statevars%Description = 'total liquid rainfall' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%liqrain grid%tail_statevars%streams(1) = 2 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%liqrain(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27131,& 'frame/module_domain.f: Failed to allocate grid%liqrain(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tpw').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%tpw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27142,& 'frame/module_domain.f: Failed to allocate grid%tpw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tpw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tpw' grid%tail_statevars%DataName = 'TPW' grid%tail_statevars%Description = 'total precipitable water' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tpw grid%tail_statevars%streams(1) = 2 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%tpw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27192,& 'frame/module_domain.f: Failed to allocate grid%tpw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'potential_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%potential_t(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27203,& 'frame/module_domain.f: Failed to allocate grid%potential_t(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%potential_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 = 'potential_t' grid%tail_statevars%DataName = 'POTENTIAL_T' grid%tail_statevars%Description = '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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%potential_t grid%tail_statevars%streams(1) = 2 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%potential_t(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27253,& 'frame/module_domain.f: Failed to allocate grid%potential_t(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'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%rh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27264,& 'frame/module_domain.f: Failed to allocate grid%rh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%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 = 'rh' 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 = '' 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 grid%tail_statevars%streams(1) = 2 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%rh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27314,& 'frame/module_domain.f: Failed to allocate grid%rh(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%solar_diagnostics=0 IF(okay_to_alloc.AND.in_use_for_config(id,'qc_tot').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%qc_tot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27326,& 'frame/module_domain.f: Failed to allocate grid%qc_tot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_tot=initial_data_value IF (.NOT.grid%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_tot' grid%tail_statevars%DataName = 'QC_TOT' grid%tail_statevars%Description = 'CLOUD WATER MIXING RATIO RES + UNRES' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qc_tot 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%qc_tot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27376,& 'frame/module_domain.f: Failed to allocate grid%qc_tot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qi_tot').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%qi_tot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27387,& 'frame/module_domain.f: Failed to allocate grid%qi_tot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qi_tot=initial_data_value IF (.NOT.grid%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_tot' grid%tail_statevars%DataName = 'QI_TOT' grid%tail_statevars%Description = 'ICE MIXING RATIO RES + UNRES' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qi_tot 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%qi_tot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27437,& 'frame/module_domain.f: Failed to allocate grid%qi_tot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfrac2d').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%cldfrac2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27448,& 'frame/module_domain.f: Failed to allocate grid%cldfrac2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfrac2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfrac2d' grid%tail_statevars%DataName = 'CLDFRAC2D' grid%tail_statevars%Description = '2-D MAX CLOUD 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cldfrac2d grid%tail_statevars%streams(1) = 1 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%cldfrac2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27498,& 'frame/module_domain.f: Failed to allocate grid%cldfrac2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wvp').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%wvp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27509,& 'frame/module_domain.f: Failed to allocate grid%wvp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wvp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wvp' grid%tail_statevars%DataName = 'WVP' grid%tail_statevars%Description = 'WATER VAPOR PATH' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wvp grid%tail_statevars%streams(1) = 1 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%wvp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27559,& 'frame/module_domain.f: Failed to allocate grid%wvp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwp').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%lwp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27570,& 'frame/module_domain.f: Failed to allocate grid%lwp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwp' grid%tail_statevars%DataName = 'LWP' grid%tail_statevars%Description = 'LIQUID CLOUD WATER PATH' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lwp grid%tail_statevars%streams(1) = 1 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%lwp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27620,& 'frame/module_domain.f: Failed to allocate grid%lwp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'iwp').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%iwp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27631,& 'frame/module_domain.f: Failed to allocate grid%iwp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%iwp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'iwp' grid%tail_statevars%DataName = 'IWP' grid%tail_statevars%Description = 'ICE CLOUD WATER PATH' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%iwp grid%tail_statevars%streams(1) = 1 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%iwp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27681,& 'frame/module_domain.f: Failed to allocate grid%iwp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swp').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%swp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27692,& 'frame/module_domain.f: Failed to allocate grid%swp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swp' grid%tail_statevars%DataName = 'SWP' grid%tail_statevars%Description = 'SNOW CLOUD WATER PATH' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%swp grid%tail_statevars%streams(1) = 1 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%swp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27742,& 'frame/module_domain.f: Failed to allocate grid%swp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wp_sum').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%wp_sum(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27753,& 'frame/module_domain.f: Failed to allocate grid%wp_sum(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wp_sum=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wp_sum' grid%tail_statevars%DataName = 'WP_SUM' grid%tail_statevars%Description = 'SUM OF LWP+IWP+SWP' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wp_sum grid%tail_statevars%streams(1) = 1 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%wp_sum(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27803,& 'frame/module_domain.f: Failed to allocate grid%wp_sum(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lwp_tot').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%lwp_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27814,& 'frame/module_domain.f: Failed to allocate grid%lwp_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwp_tot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lwp_tot' grid%tail_statevars%DataName = 'LWP_TOT' grid%tail_statevars%Description = 'LIQUID CLOUD WATER PATH RES + UNRES' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lwp_tot grid%tail_statevars%streams(1) = 1 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%lwp_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27864,& 'frame/module_domain.f: Failed to allocate grid%lwp_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'iwp_tot').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%iwp_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27875,& 'frame/module_domain.f: Failed to allocate grid%iwp_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%iwp_tot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'iwp_tot' grid%tail_statevars%DataName = 'IWP_TOT' grid%tail_statevars%Description = 'ICE CLOUD WATER PATH RES + UNRES' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%iwp_tot grid%tail_statevars%streams(1) = 1 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%iwp_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27925,& 'frame/module_domain.f: Failed to allocate grid%iwp_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wp_tot_sum').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%wp_tot_sum(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27936,& 'frame/module_domain.f: Failed to allocate grid%wp_tot_sum(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wp_tot_sum=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wp_tot_sum' grid%tail_statevars%DataName = 'WP_TOT_SUM' grid%tail_statevars%Description = 'SUM OF LWP+IWP+SWP RES + UNRES' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wp_tot_sum grid%tail_statevars%streams(1) = 1 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%wp_tot_sum(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27986,& 'frame/module_domain.f: Failed to allocate grid%wp_tot_sum(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_qc').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%re_qc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27997,& 'frame/module_domain.f: Failed to allocate grid%re_qc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_qc=initial_data_value IF (.NOT.grid%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_qc' grid%tail_statevars%DataName = 'RE_QC' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD EFFECTIVE RADIUS' 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%re_qc grid%tail_statevars%streams(1) = 1 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%re_qc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28047,& 'frame/module_domain.f: Failed to allocate grid%re_qc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_qi').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%re_qi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28058,& 'frame/module_domain.f: Failed to allocate grid%re_qi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_qi=initial_data_value IF (.NOT.grid%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_qi' grid%tail_statevars%DataName = 'RE_QI' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE EFFECTIVE RADIUS' 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%re_qi grid%tail_statevars%streams(1) = 1 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%re_qi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28108,& 'frame/module_domain.f: Failed to allocate grid%re_qi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_qs').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%re_qs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28119,& 'frame/module_domain.f: Failed to allocate grid%re_qs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_qs=initial_data_value IF (.NOT.grid%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_qs' grid%tail_statevars%DataName = 'RE_QS' grid%tail_statevars%Description = 'MASS-WEIGHTED SNOW EFFECTIVE RADIUS' 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%re_qs grid%tail_statevars%streams(1) = 1 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%re_qs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28169,& 'frame/module_domain.f: Failed to allocate grid%re_qs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_qc_tot').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%re_qc_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28180,& 'frame/module_domain.f: Failed to allocate grid%re_qc_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_qc_tot=initial_data_value IF (.NOT.grid%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_qc_tot' grid%tail_statevars%DataName = 'RE_QC_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD EFFECTIVE RADIUS RES + UNRES' 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%re_qc_tot grid%tail_statevars%streams(1) = 1 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%re_qc_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28230,& 'frame/module_domain.f: Failed to allocate grid%re_qc_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'re_qi_tot').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%re_qi_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28241,& 'frame/module_domain.f: Failed to allocate grid%re_qi_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%re_qi_tot=initial_data_value IF (.NOT.grid%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_qi_tot' grid%tail_statevars%DataName = 'RE_QI_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE EFFECTIVE RADIUS RES + UNRES' 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%re_qi_tot grid%tail_statevars%streams(1) = 1 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%re_qi_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28291,& 'frame/module_domain.f: Failed to allocate grid%re_qi_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_qc').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%tau_qc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28302,& 'frame/module_domain.f: Failed to allocate grid%tau_qc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_qc=initial_data_value IF (.NOT.grid%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_qc' grid%tail_statevars%DataName = 'TAU_QC' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD OPTICAL THICKNESS' 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%tau_qc grid%tail_statevars%streams(1) = 1 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%tau_qc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28352,& 'frame/module_domain.f: Failed to allocate grid%tau_qc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_qi').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%tau_qi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28363,& 'frame/module_domain.f: Failed to allocate grid%tau_qi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_qi=initial_data_value IF (.NOT.grid%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_qi' grid%tail_statevars%DataName = 'TAU_QI' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE OPTICAL THICKNESS' 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%tau_qi grid%tail_statevars%streams(1) = 1 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%tau_qi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28413,& 'frame/module_domain.f: Failed to allocate grid%tau_qi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_qs').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%tau_qs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28424,& 'frame/module_domain.f: Failed to allocate grid%tau_qs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_qs=initial_data_value IF (.NOT.grid%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_qs' grid%tail_statevars%DataName = 'TAU_QS' grid%tail_statevars%Description = 'MASS-WEIGHTED SNOW OPTICAL THICKNESS' 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%tau_qs grid%tail_statevars%streams(1) = 1 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%tau_qs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28474,& 'frame/module_domain.f: Failed to allocate grid%tau_qs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_qc_tot').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%tau_qc_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28485,& 'frame/module_domain.f: Failed to allocate grid%tau_qc_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_qc_tot=initial_data_value IF (.NOT.grid%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_qc_tot' grid%tail_statevars%DataName = 'TAU_QC_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD OPTICAL THICKNESS RES + UNRES' 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%tau_qc_tot grid%tail_statevars%streams(1) = 1 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%tau_qc_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28535,& 'frame/module_domain.f: Failed to allocate grid%tau_qc_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tau_qi_tot').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%tau_qi_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28546,& 'frame/module_domain.f: Failed to allocate grid%tau_qi_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tau_qi_tot=initial_data_value IF (.NOT.grid%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_qi_tot' grid%tail_statevars%DataName = 'TAU_QI_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE OPTICAL THICKNESS RES + UNRES' 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%tau_qi_tot grid%tail_statevars%streams(1) = 1 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%tau_qi_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28596,& 'frame/module_domain.f: Failed to allocate grid%tau_qi_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cbaseht').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%cbaseht(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28607,& 'frame/module_domain.f: Failed to allocate grid%cbaseht(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cbaseht=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cbaseht' grid%tail_statevars%DataName = 'CBASEHT' grid%tail_statevars%Description = 'CLOUD BASE 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cbaseht grid%tail_statevars%streams(1) = 1 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%cbaseht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28657,& 'frame/module_domain.f: Failed to allocate grid%cbaseht(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ctopht').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%ctopht(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28668,& 'frame/module_domain.f: Failed to allocate grid%ctopht(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ctopht=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ctopht' grid%tail_statevars%DataName = 'CTOPHT' grid%tail_statevars%Description = 'CLOUD TOP 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ctopht grid%tail_statevars%streams(1) = 1 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%ctopht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28718,& 'frame/module_domain.f: Failed to allocate grid%ctopht(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cbaseht_tot').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%cbaseht_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28729,& 'frame/module_domain.f: Failed to allocate grid%cbaseht_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cbaseht_tot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cbaseht_tot' grid%tail_statevars%DataName = 'CBASEHT_TOT' grid%tail_statevars%Description = 'CLOUD BASE HEIGHT RES + UNRES' 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%cbaseht_tot grid%tail_statevars%streams(1) = 1 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%cbaseht_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28779,& 'frame/module_domain.f: Failed to allocate grid%cbaseht_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ctopht_tot').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%ctopht_tot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28790,& 'frame/module_domain.f: Failed to allocate grid%ctopht_tot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ctopht_tot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ctopht_tot' grid%tail_statevars%DataName = 'CTOPHT_TOT' grid%tail_statevars%Description = 'CLOUD TOP HEIGHT RES + UNRES' 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%ctopht_tot grid%tail_statevars%streams(1) = 1 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%ctopht_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28840,& 'frame/module_domain.f: Failed to allocate grid%ctopht_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'clrnidx').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%clrnidx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28851,& 'frame/module_domain.f: Failed to allocate grid%clrnidx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clrnidx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'clrnidx' grid%tail_statevars%DataName = 'CLRNIDX' grid%tail_statevars%Description = 'CLEARNESS INDEX' 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%clrnidx grid%tail_statevars%streams(1) = 1 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%clrnidx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28901,& 'frame/module_domain.f: Failed to allocate grid%clrnidx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sza').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%sza(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28912,& 'frame/module_domain.f: Failed to allocate grid%sza(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sza=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sza' grid%tail_statevars%DataName = 'SZA' grid%tail_statevars%Description = 'SOLAR ZENITH ANGLE' grid%tail_statevars%Units = 'deg' 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%sza grid%tail_statevars%streams(1) = 1 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%sza(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28962,& 'frame/module_domain.f: Failed to allocate grid%sza(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_cldfrac2d').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_cldfrac2d(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("",28973,& 'frame/module_domain.f: Failed to allocate grid%ts_cldfrac2d(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_cldfrac2d=initial_data_value IF (.NOT.grid%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_cldfrac2d' grid%tail_statevars%DataName = 'TS_CLDFRAC2D' grid%tail_statevars%Description = '2-D MAX CLOUD FRACTION' 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_cldfrac2d 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_cldfrac2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29021,& 'frame/module_domain.f: Failed to allocate grid%ts_cldfrac2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_wvp').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_wvp(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("",29032,& 'frame/module_domain.f: Failed to allocate grid%ts_wvp(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_wvp=initial_data_value IF (.NOT.grid%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_wvp' grid%tail_statevars%DataName = 'TS_WVP' grid%tail_statevars%Description = 'WATER VAPOR PATH' 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_wvp 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_wvp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29080,& 'frame/module_domain.f: Failed to allocate grid%ts_wvp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_lwp').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_lwp(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("",29091,& 'frame/module_domain.f: Failed to allocate grid%ts_lwp(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_lwp=initial_data_value IF (.NOT.grid%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_lwp' grid%tail_statevars%DataName = 'TS_LWP' grid%tail_statevars%Description = 'LIQUID CLOUD WATER PATH' 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_lwp 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_lwp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29139,& 'frame/module_domain.f: Failed to allocate grid%ts_lwp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_iwp').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_iwp(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("",29150,& 'frame/module_domain.f: Failed to allocate grid%ts_iwp(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_iwp=initial_data_value IF (.NOT.grid%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_iwp' grid%tail_statevars%DataName = 'TS_IWP' grid%tail_statevars%Description = 'ICE CLOUD WATER PATH' 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_iwp 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_iwp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29198,& 'frame/module_domain.f: Failed to allocate grid%ts_iwp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_swp').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_swp(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("",29209,& 'frame/module_domain.f: Failed to allocate grid%ts_swp(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_swp=initial_data_value IF (.NOT.grid%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_swp' grid%tail_statevars%DataName = 'TS_SWP' grid%tail_statevars%Description = 'SNOW CLOUD WATER PATH' 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_swp 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_swp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29257,& 'frame/module_domain.f: Failed to allocate grid%ts_swp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_wp_sum').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_wp_sum(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("",29268,& 'frame/module_domain.f: Failed to allocate grid%ts_wp_sum(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_wp_sum=initial_data_value IF (.NOT.grid%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_wp_sum' grid%tail_statevars%DataName = 'TS_WP_SUM' grid%tail_statevars%Description = 'SUM OF LWP+IWP+SWP' 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_wp_sum 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_wp_sum(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29316,& 'frame/module_domain.f: Failed to allocate grid%ts_wp_sum(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_lwp_tot').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_lwp_tot(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("",29327,& 'frame/module_domain.f: Failed to allocate grid%ts_lwp_tot(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_lwp_tot=initial_data_value IF (.NOT.grid%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_lwp_tot' grid%tail_statevars%DataName = 'TS_LWP_TOT' grid%tail_statevars%Description = 'LIQUID CLOUD WATER PATH RES + UNRES' 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_lwp_tot 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_lwp_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29375,& 'frame/module_domain.f: Failed to allocate grid%ts_lwp_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_iwp_tot').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_iwp_tot(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("",29386,& 'frame/module_domain.f: Failed to allocate grid%ts_iwp_tot(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_iwp_tot=initial_data_value IF (.NOT.grid%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_iwp_tot' grid%tail_statevars%DataName = 'TS_IWP_TOT' grid%tail_statevars%Description = 'ICE CLOUD WATER PATH RES + UNRES' 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_iwp_tot 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_iwp_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29434,& 'frame/module_domain.f: Failed to allocate grid%ts_iwp_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_wp_tot_sum').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_wp_tot_sum(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("",29445,& 'frame/module_domain.f: Failed to allocate grid%ts_wp_tot_sum(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_wp_tot_sum=initial_data_value IF (.NOT.grid%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_wp_tot_sum' grid%tail_statevars%DataName = 'TS_WP_TOT_SUM' grid%tail_statevars%Description = 'SUM OF LWP+IWP+SWP RES + UNRES' 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_wp_tot_sum 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_wp_tot_sum(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29493,& 'frame/module_domain.f: Failed to allocate grid%ts_wp_tot_sum(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_re_qc').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_re_qc(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("",29504,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qc(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_re_qc=initial_data_value IF (.NOT.grid%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_re_qc' grid%tail_statevars%DataName = 'TS_RE_QC' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD EFFECTIVE RADIUS' 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_re_qc 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_re_qc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29552,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_re_qi').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_re_qi(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("",29563,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qi(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_re_qi=initial_data_value IF (.NOT.grid%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_re_qi' grid%tail_statevars%DataName = 'TS_RE_QI' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE EFFECTIVE RADIUS' 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_re_qi 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_re_qi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29611,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_re_qs').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_re_qs(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("",29622,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qs(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_re_qs=initial_data_value IF (.NOT.grid%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_re_qs' grid%tail_statevars%DataName = 'TS_RE_QS' grid%tail_statevars%Description = 'MASS-WEIGHTED SNOW EFFECTIVE RADIUS' 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_re_qs 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_re_qs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29670,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_re_qc_tot').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_re_qc_tot(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("",29681,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qc_tot(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_re_qc_tot=initial_data_value IF (.NOT.grid%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_re_qc_tot' grid%tail_statevars%DataName = 'TS_RE_QC_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD EFFECTIVE RADIUS RES + UNRES' 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_re_qc_tot 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_re_qc_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29729,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qc_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_re_qi_tot').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_re_qi_tot(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("",29740,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qi_tot(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_re_qi_tot=initial_data_value IF (.NOT.grid%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_re_qi_tot' grid%tail_statevars%DataName = 'TS_RE_QI_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE EFFECTIVE RADIUS RES + UNRES' 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_re_qi_tot 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_re_qi_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29788,& 'frame/module_domain.f: Failed to allocate grid%ts_re_qi_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tau_qc').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_tau_qc(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("",29799,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qc(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_tau_qc=initial_data_value IF (.NOT.grid%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_tau_qc' grid%tail_statevars%DataName = 'TS_TAU_QC' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD OPTICAL THICKNESS' 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_tau_qc 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_tau_qc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29847,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tau_qi').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_tau_qi(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("",29858,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qi(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_tau_qi=initial_data_value IF (.NOT.grid%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_tau_qi' grid%tail_statevars%DataName = 'TS_TAU_QI' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE OPTICAL THICKNESS' 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_tau_qi 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_tau_qi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29906,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tau_qs').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_tau_qs(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("",29917,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qs(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_tau_qs=initial_data_value IF (.NOT.grid%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_tau_qs' grid%tail_statevars%DataName = 'TS_TAU_QS' grid%tail_statevars%Description = 'MASS-WEIGHTED SNOW OPTICAL THICKNESS' 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_tau_qs 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_tau_qs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29965,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tau_qc_tot').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_tau_qc_tot(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("",29976,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qc_tot(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_tau_qc_tot=initial_data_value IF (.NOT.grid%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_tau_qc_tot' grid%tail_statevars%DataName = 'TS_TAU_QC_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED LIQUID CLOUD OPTICAL THICKNESS RES + UNRES' 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_tau_qc_tot 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_tau_qc_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30024,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qc_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_tau_qi_tot').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_tau_qi_tot(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("",30035,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qi_tot(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_tau_qi_tot=initial_data_value IF (.NOT.grid%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_tau_qi_tot' grid%tail_statevars%DataName = 'TS_TAU_QI_TOT' grid%tail_statevars%Description = 'MASS-WEIGHTED ICE OPTICAL THICKNESS RES + UNRES' 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_tau_qi_tot 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_tau_qi_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30083,& 'frame/module_domain.f: Failed to allocate grid%ts_tau_qi_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_cbaseht').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_cbaseht(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("",30094,& 'frame/module_domain.f: Failed to allocate grid%ts_cbaseht(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_cbaseht=initial_data_value IF (.NOT.grid%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_cbaseht' grid%tail_statevars%DataName = 'TS_CBASEHT' grid%tail_statevars%Description = 'CLOUD BASE HEIGHT' 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_cbaseht 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_cbaseht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30142,& 'frame/module_domain.f: Failed to allocate grid%ts_cbaseht(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_ctopht').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_ctopht(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("",30153,& 'frame/module_domain.f: Failed to allocate grid%ts_ctopht(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_ctopht=initial_data_value IF (.NOT.grid%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_ctopht' grid%tail_statevars%DataName = 'TS_CTOPHT' grid%tail_statevars%Description = 'CLOUD TOP HEIGHT' 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_ctopht 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_ctopht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30201,& 'frame/module_domain.f: Failed to allocate grid%ts_ctopht(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_cbaseht_tot').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_cbaseht_tot(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("",30212,& 'frame/module_domain.f: Failed to allocate grid%ts_cbaseht_tot(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_cbaseht_tot=initial_data_value IF (.NOT.grid%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_cbaseht_tot' grid%tail_statevars%DataName = 'TS_CBASEHT_TOT' grid%tail_statevars%Description = 'CLOUD BASE HEIGHT RES + UNRES' 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_cbaseht_tot 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_cbaseht_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30260,& 'frame/module_domain.f: Failed to allocate grid%ts_cbaseht_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_ctopht_tot').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_ctopht_tot(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("",30271,& 'frame/module_domain.f: Failed to allocate grid%ts_ctopht_tot(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_ctopht_tot=initial_data_value IF (.NOT.grid%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_ctopht_tot' grid%tail_statevars%DataName = 'TS_CTOPHT_TOT' grid%tail_statevars%Description = 'CLOUD TOP HEIGHT RES + UNRES' 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_ctopht_tot 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_ctopht_tot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30319,& 'frame/module_domain.f: Failed to allocate grid%ts_ctopht_tot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_clrnidx').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_clrnidx(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("",30330,& 'frame/module_domain.f: Failed to allocate grid%ts_clrnidx(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_clrnidx=initial_data_value IF (.NOT.grid%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_clrnidx' grid%tail_statevars%DataName = 'TS_CLRNIDX' grid%tail_statevars%Description = 'CLEARNESS INDEX' 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_clrnidx 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_clrnidx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30378,& 'frame/module_domain.f: Failed to allocate grid%ts_clrnidx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ts_sza').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_sza(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("",30389,& 'frame/module_domain.f: Failed to allocate grid%ts_sza(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_sza=initial_data_value IF (.NOT.grid%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_sza' grid%tail_statevars%DataName = 'TS_SZA' grid%tail_statevars%Description = 'SOLAR ZENITH ANGLE' 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_sza 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_sza(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30437,& 'frame/module_domain.f: Failed to allocate grid%ts_sza(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%p_lev_diags=0 IF ( setinitval .EQ. 3 ) grid%p_lev_diags_dfi=0 IF ( setinitval .EQ. 3 ) grid%num_press_levels=0 IF ( setinitval .EQ. 3 ) grid%press_levels=initial_data_value IF ( setinitval .EQ. 3 ) grid%use_tot_or_hyd_p=0 IF ( setinitval .EQ. 3 ) grid%extrap_below_grnd=0 IF ( setinitval .EQ. 3 ) grid%p_lev_missing=initial_data_value IF ( setinitval .EQ. 3 ) grid%p_lev_interval=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'p_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_press_levels)-(1)+1))) * 4 nba = & ((((model_config_rec%num_press_levels)-(1)+1))) * 4 ALLOCATE(grid%p_pl(1:model_config_rec%num_press_levels),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30456,& 'frame/module_domain.f: Failed to allocate grid%p_pl(1:model_config_rec%num_press_levels). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'P_PL' grid%tail_statevars%Description = 'Pressure level data, Pressure' grid%tail_statevars%Units = 'Pa' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%p_pl grid%tail_statevars%streams(1) = 8388608 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_press_levels 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_press_levels 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_press_levels 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_press_levels_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%p_pl(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30504,& 'frame/module_domain.f: Failed to allocate grid%p_pl(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30515,& 'frame/module_domain.f: Failed to allocate grid%u_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'U_PL' grid%tail_statevars%Description = 'Pressure level data, U wind' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30565,& 'frame/module_domain.f: Failed to allocate grid%u_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30576,& 'frame/module_domain.f: Failed to allocate grid%v_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'V_PL' grid%tail_statevars%Description = 'Pressure level data, V wind' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%v_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30626,& 'frame/module_domain.f: Failed to allocate grid%v_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30637,& 'frame/module_domain.f: Failed to allocate grid%t_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'T_PL' grid%tail_statevars%Description = 'Pressure level data, 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_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30687,& 'frame/module_domain.f: Failed to allocate grid%t_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rh_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rh_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30698,& 'frame/module_domain.f: Failed to allocate grid%rh_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'RH_PL' grid%tail_statevars%Description = 'Pressure level data, 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_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rh_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30748,& 'frame/module_domain.f: Failed to allocate grid%rh_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ght_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ght_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30759,& 'frame/module_domain.f: Failed to allocate grid%ght_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'GHT_PL' grid%tail_statevars%Description = 'Pressure level data, 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_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ght_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30809,& 'frame/module_domain.f: Failed to allocate grid%ght_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'s_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%s_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30820,& 'frame/module_domain.f: Failed to allocate grid%s_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%s_pl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 's_pl' grid%tail_statevars%DataName = 'S_PL' grid%tail_statevars%Description = 'Pressure level data, Speed' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%s_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%s_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30870,& 'frame/module_domain.f: Failed to allocate grid%s_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'td_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%td_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30881,& 'frame/module_domain.f: Failed to allocate grid%td_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%td_pl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'td_pl' grid%tail_statevars%DataName = 'TD_PL' grid%tail_statevars%Description = 'Pressure level data, Dew point 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%td_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%td_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30931,& 'frame/module_domain.f: Failed to allocate grid%td_pl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q_pl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_press_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30942,& 'frame/module_domain.f: Failed to allocate grid%q_pl(sm31:em31,1:model_config_rec%num_press_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q_pl=initial_data_value IF (.NOT.grid%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_pl' grid%tail_statevars%DataName = 'Q_PL' grid%tail_statevars%Description = 'Pressure level data, Mixing ratio' grid%tail_statevars%Units = 'kg/kg' 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%q_pl grid%tail_statevars%streams(1) = 8388608 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_press_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_press_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_press_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_press_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%q_pl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30992,& 'frame/module_domain.f: Failed to allocate grid%q_pl(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%z_lev_diags=0 IF ( setinitval .EQ. 3 ) grid%z_lev_diags_dfi=0 IF ( setinitval .EQ. 3 ) grid%num_z_levels=0 IF ( setinitval .EQ. 3 ) grid%z_levels=initial_data_value IF ( setinitval .EQ. 3 ) grid%z_lev_missing=initial_data_value IF ( setinitval .EQ. 3 ) grid%z_lev_interval=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'z_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_z_levels)-(1)+1))) * 4 nba = & ((((model_config_rec%num_z_levels)-(1)+1))) * 4 ALLOCATE(grid%z_zl(1:model_config_rec%num_z_levels),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31009,& 'frame/module_domain.f: Failed to allocate grid%z_zl(1:model_config_rec%num_z_levels). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'Z_ZL' grid%tail_statevars%Description = 'Height level data, Height' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%z_zl grid%tail_statevars%streams(1) = 4194304 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%num_z_levels 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_z_levels 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_z_levels 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_z_levels_stag' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%z_zl(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31057,& 'frame/module_domain.f: Failed to allocate grid%z_zl(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31068,& 'frame/module_domain.f: Failed to allocate grid%u_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'U_ZL' grid%tail_statevars%Description = 'Height level data, U wind' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%u_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%u_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31118,& 'frame/module_domain.f: Failed to allocate grid%u_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31129,& 'frame/module_domain.f: Failed to allocate grid%v_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'V_ZL' grid%tail_statevars%Description = 'Height level data, V wind' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%v_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%v_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31179,& 'frame/module_domain.f: Failed to allocate grid%v_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31190,& 'frame/module_domain.f: Failed to allocate grid%t_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'T_ZL' grid%tail_statevars%Description = 'Height level data, 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_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%t_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31240,& 'frame/module_domain.f: Failed to allocate grid%t_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rh_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rh_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31251,& 'frame/module_domain.f: Failed to allocate grid%rh_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'RH_ZL' grid%tail_statevars%Description = 'Height level data, 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_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%rh_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31301,& 'frame/module_domain.f: Failed to allocate grid%rh_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ght_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ght_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31312,& 'frame/module_domain.f: Failed to allocate grid%ght_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'GHT_ZL' grid%tail_statevars%Description = 'Height level data, 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_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ght_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31362,& 'frame/module_domain.f: Failed to allocate grid%ght_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'s_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%s_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31373,& 'frame/module_domain.f: Failed to allocate grid%s_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%s_zl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 's_zl' grid%tail_statevars%DataName = 'S_ZL' grid%tail_statevars%Description = 'Height level data, Speed' 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 = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%s_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%s_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31423,& 'frame/module_domain.f: Failed to allocate grid%s_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'td_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%td_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31434,& 'frame/module_domain.f: Failed to allocate grid%td_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%td_zl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'td_zl' grid%tail_statevars%DataName = 'TD_ZL' grid%tail_statevars%Description = 'Height level data, Dew point 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%td_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%td_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31484,& 'frame/module_domain.f: Failed to allocate grid%td_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q_zl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_z_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31495,& 'frame/module_domain.f: Failed to allocate grid%q_zl(sm31:em31,1:model_config_rec%num_z_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q_zl=initial_data_value IF (.NOT.grid%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_zl' grid%tail_statevars%DataName = 'Q_ZL' grid%tail_statevars%Description = 'Height level data, Mixing ratio' grid%tail_statevars%Units = 'kg/kg' 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%q_zl grid%tail_statevars%streams(1) = 4194304 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_z_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_z_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_z_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_z_levels_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%q_zl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31545,& 'frame/module_domain.f: Failed to allocate grid%q_zl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'landmask'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%landmask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31556,& 'frame/module_domain.f: Failed to allocate grid%landmask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%landmask=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'landmask' grid%tail_statevars%DataName = 'LANDMASK' grid%tail_statevars%Description = 'LAND MASK (1 FOR LAND, 0 FOR 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%landmask grid%tail_statevars%streams(1) = 1308622945 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%landmask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31606,& 'frame/module_domain.f: Failed to allocate grid%landmask(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lakemask'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lakemask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31617,& 'frame/module_domain.f: Failed to allocate grid%lakemask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lakemask=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lakemask' grid%tail_statevars%DataName = 'LAKEMASK' grid%tail_statevars%Description = 'LAKE MASK (1 FOR LAKE, 0 FOR NON-LAKE)' 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%lakemask 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%lakemask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31667,& 'frame/module_domain.f: Failed to allocate grid%lakemask(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sst'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31678,& 'frame/module_domain.f: Failed to allocate grid%sst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sst=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sst' grid%tail_statevars%DataName = 'SST' grid%tail_statevars%Description = '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%sst grid%tail_statevars%streams(1) = 1845493761 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%sst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31728,& 'frame/module_domain.f: Failed to allocate grid%sst(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sst_input').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%sst_input(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31739,& 'frame/module_domain.f: Failed to allocate grid%sst_input(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sst_input=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sst_input' grid%tail_statevars%DataName = 'SST_INPUT' grid%tail_statevars%Description = 'SEA SURFACE TEMPERATURE FROM WRFLOWINPUT FILE' 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%sst_input 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%sst_input(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31789,& 'frame/module_domain.f: Failed to allocate grid%sst_input(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mydrop').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%mydrop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31800,& 'frame/module_domain.f: Failed to allocate grid%mydrop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mydrop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mydrop' grid%tail_statevars%DataName = 'MYDROP' grid%tail_statevars%Description = 'Droplet Concentration number' grid%tail_statevars%Units = 'area/area' 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%mydrop grid%tail_statevars%streams(1) = 536871424 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%mydrop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31850,& 'frame/module_domain.f: Failed to allocate grid%mydrop(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%chem_opt=0 IF(okay_to_alloc.AND.in_use_for_config(id,'chem'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_chem)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_chem)) * 4 ALLOCATE(grid%chem(sm31:em31,sm32:em32,sm33:em33,num_chem),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31862,& 'frame/module_domain.f: Failed to allocate grid%chem(sm31:em31,sm32:em32,sm33:em33,num_chem). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chem=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'chem' grid%tail_statevars%DataName = 'CHEM' 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 = .FALSE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%chem grid%tail_statevars%num_table => chem_num_table grid%tail_statevars%index_table => chem_index_table grid%tail_statevars%boundary_table => chem_boundary_table grid%tail_statevars%dname_table => chem_dname_table grid%tail_statevars%desc_table => chem_desc_table grid%tail_statevars%units_table => chem_units_table grid%tail_statevars%streams_table => chem_streams_table 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%chem(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31917,& 'frame/module_domain.f: Failed to allocate grid%chem(1,1,1,1). ') endif ENDIF END SUBROUTINE alloc_space_field_core_7 END MODULE module_alloc_space_7