MODULE module_alloc_space_1 CONTAINS SUBROUTINE alloc_space_field_core_1 ( 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 (.NOT.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 = 'solcon' grid%tail_statevars%DataName = 'SOLCON' grid%tail_statevars%Description = 'SOLAR CONSTANT' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%solcon grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%solcon=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'rhosnf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rhosnf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",188,& 'frame/module_domain.f: Failed to allocate grid%rhosnf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rhosnf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rhosnf' grid%tail_statevars%DataName = 'RHOSNF' grid%tail_statevars%Description = 'DENSITY OF FROZEN PRECIP' grid%tail_statevars%Units = 'kg/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%rhosnf 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%rhosnf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",238,& 'frame/module_domain.f: Failed to allocate grid%rhosnf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowfallac').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowfallac(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",249,& 'frame/module_domain.f: Failed to allocate grid%snowfallac(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowfallac=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowfallac' grid%tail_statevars%DataName = 'SNOWFALLAC' grid%tail_statevars%Description = 'RUN-TOTAL ACCUMULATED SNOWFALL [mm]' 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%snowfallac 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%snowfallac(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",299,& 'frame/module_domain.f: Failed to allocate grid%snowfallac(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'precipfr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%precipfr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",310,& 'frame/module_domain.f: Failed to allocate grid%precipfr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%precipfr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'precipfr' grid%tail_statevars%DataName = 'PRECIPFR' grid%tail_statevars%Description = 'TIME-STEP FROZEN PRECIP [mm]' 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%precipfr 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%precipfr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",360,& 'frame/module_domain.f: Failed to allocate grid%precipfr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'smfr3d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",371,& 'frame/module_domain.f: Failed to allocate grid%smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smfr3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'smfr3d' grid%tail_statevars%DataName = 'SMFR3D' grid%tail_statevars%Description = 'SOIL ICE' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%smfr3d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%smfr3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",421,& 'frame/module_domain.f: Failed to allocate grid%smfr3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'keepfr3dflag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",432,& 'frame/module_domain.f: Failed to allocate grid%keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%keepfr3dflag=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'keepfr3dflag' grid%tail_statevars%DataName = 'KEEPFR3DFLAG' grid%tail_statevars%Description = 'FLAG - 1. FROZEN SOIL YES, 0 - NO' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%keepfr3dflag grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%num_soil_layers grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = config_flags%num_soil_layers grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = config_flags%num_soil_layers grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'soil_layers_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%keepfr3dflag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",482,& 'frame/module_domain.f: Failed to allocate grid%keepfr3dflag(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swvisdir').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swvisdir(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",493,& 'frame/module_domain.f: Failed to allocate grid%swvisdir(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swvisdir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swvisdir' grid%tail_statevars%DataName = 'SWVISDIR' grid%tail_statevars%Description = 'SWR VIS DIR component' 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%swvisdir 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%swvisdir(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",543,& 'frame/module_domain.f: Failed to allocate grid%swvisdir(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swvisdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swvisdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",554,& 'frame/module_domain.f: Failed to allocate grid%swvisdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swvisdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swvisdif' grid%tail_statevars%DataName = 'SWVISDIF' grid%tail_statevars%Description = 'SWR VIS DIF component' 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%swvisdif 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%swvisdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",604,& 'frame/module_domain.f: Failed to allocate grid%swvisdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swnirdir').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swnirdir(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",615,& 'frame/module_domain.f: Failed to allocate grid%swnirdir(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swnirdir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swnirdir' grid%tail_statevars%DataName = 'SWNIRDIR' grid%tail_statevars%Description = 'SWR NIR DIR component' 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%swnirdir 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%swnirdir(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",665,& 'frame/module_domain.f: Failed to allocate grid%swnirdir(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swnirdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swnirdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",676,& 'frame/module_domain.f: Failed to allocate grid%swnirdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swnirdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swnirdif' grid%tail_statevars%DataName = 'SWNIRDIF' grid%tail_statevars%Description = 'SWR NIR DIF component' 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%swnirdif 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%swnirdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",726,& 'frame/module_domain.f: Failed to allocate grid%swnirdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alswvisdir').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alswvisdir(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",737,& 'frame/module_domain.f: Failed to allocate grid%alswvisdir(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alswvisdir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alswvisdir' grid%tail_statevars%DataName = 'ALSWVISDIR' grid%tail_statevars%Description = 'ALB VIS DIR component' 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%alswvisdir 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%alswvisdir(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",787,& 'frame/module_domain.f: Failed to allocate grid%alswvisdir(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alswvisdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alswvisdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",798,& 'frame/module_domain.f: Failed to allocate grid%alswvisdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alswvisdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alswvisdif' grid%tail_statevars%DataName = 'ALSWVISDIF' grid%tail_statevars%Description = 'ALB VIS DIF component' 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%alswvisdif 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%alswvisdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",848,& 'frame/module_domain.f: Failed to allocate grid%alswvisdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alswnirdir').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alswnirdir(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",859,& 'frame/module_domain.f: Failed to allocate grid%alswnirdir(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alswnirdir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alswnirdir' grid%tail_statevars%DataName = 'ALSWNIRDIR' grid%tail_statevars%Description = 'ALB NIR DIR component' 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%alswnirdir 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%alswnirdir(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",909,& 'frame/module_domain.f: Failed to allocate grid%alswnirdir(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'alswnirdif').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%alswnirdif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",920,& 'frame/module_domain.f: Failed to allocate grid%alswnirdif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alswnirdif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'alswnirdif' grid%tail_statevars%DataName = 'ALSWNIRDIF' grid%tail_statevars%Description = 'ALB NIR DIF component' 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%alswnirdif 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%alswnirdif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",970,& 'frame/module_domain.f: Failed to allocate grid%alswnirdif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ra').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",981,& 'frame/module_domain.f: Failed to allocate grid%ra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ra' grid%tail_statevars%DataName = 'RA' grid%tail_statevars%Description = 'AERODYNAMIC RESISTANCE' grid%tail_statevars%Units = 's m-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%ra 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%ra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1031,& 'frame/module_domain.f: Failed to allocate grid%ra(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1042,& 'frame/module_domain.f: Failed to allocate grid%rs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rs' grid%tail_statevars%DataName = 'RS' grid%tail_statevars%Description = 'SURFACE RESISTANCE' grid%tail_statevars%Units = 's m-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%rs 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%rs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1092,& 'frame/module_domain.f: Failed to allocate grid%rs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'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%lai(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1103,& 'frame/module_domain.f: Failed to allocate grid%lai(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%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 = 'lai' grid%tail_statevars%DataName = 'LAI' grid%tail_statevars%Description = 'LEAF AREA INDEX' grid%tail_statevars%Units = 'm-2/m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lai grid%tail_statevars%streams(1) = 771751937 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%lai(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1153,& 'frame/module_domain.f: Failed to allocate grid%lai(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vegf_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vegf_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1164,& 'frame/module_domain.f: Failed to allocate grid%vegf_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegf_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vegf_px' grid%tail_statevars%DataName = 'VEGF_PX' grid%tail_statevars%Description = 'Vegetation Fraction for PX LSM' 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%vegf_px 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%vegf_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1214,& 'frame/module_domain.f: Failed to allocate grid%vegf_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2obs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2obs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1225,& 'frame/module_domain.f: Failed to allocate grid%t2obs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2obs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2obs' grid%tail_statevars%DataName = 'T2OBS' grid%tail_statevars%Description = '2-m temperature from analysis ' 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%t2obs 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%t2obs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1275,& 'frame/module_domain.f: Failed to allocate grid%t2obs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2obs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2obs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1286,& 'frame/module_domain.f: Failed to allocate grid%q2obs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2obs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2obs' grid%tail_statevars%DataName = 'Q2OBS' grid%tail_statevars%Description = '2-m mixing ratio from analysis ' grid%tail_statevars%Units = 'kg/kg' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%q2obs 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%q2obs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1336,& 'frame/module_domain.f: Failed to allocate grid%q2obs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'imperv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%imperv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1347,& 'frame/module_domain.f: Failed to allocate grid%imperv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imperv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'imperv' grid%tail_statevars%DataName = 'IMPERV' grid%tail_statevars%Description = 'Impervious surface fraction NLCD' grid%tail_statevars%Units = 'percent' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%imperv 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%imperv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1397,& 'frame/module_domain.f: Failed to allocate grid%imperv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'canfra'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%canfra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1408,& 'frame/module_domain.f: Failed to allocate grid%canfra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canfra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'canfra' grid%tail_statevars%DataName = 'CANFRA' grid%tail_statevars%Description = 'Satellite canopy fraction' grid%tail_statevars%Units = 'percent' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%canfra 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%canfra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1458,& 'frame/module_domain.f: Failed to allocate grid%canfra(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lai_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lai_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1469,& 'frame/module_domain.f: Failed to allocate grid%lai_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lai_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lai_px' grid%tail_statevars%DataName = 'LAI_PX' grid%tail_statevars%Description = 'LAI used for PX LSM' grid%tail_statevars%Units = 'm2/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%lai_px 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%lai_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1519,& 'frame/module_domain.f: Failed to allocate grid%lai_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wwlt_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wwlt_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1530,& 'frame/module_domain.f: Failed to allocate grid%wwlt_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wwlt_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wwlt_px' grid%tail_statevars%DataName = 'WWLT_PX' grid%tail_statevars%Description = 'Soil wilting point for PX LSM' grid%tail_statevars%Units = 'm3/m3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wwlt_px 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%wwlt_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1580,& 'frame/module_domain.f: Failed to allocate grid%wwlt_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wfc_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wfc_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1591,& 'frame/module_domain.f: Failed to allocate grid%wfc_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wfc_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wfc_px' grid%tail_statevars%DataName = 'WFC_PX' grid%tail_statevars%Description = 'Soil field capacity for PX LSM' grid%tail_statevars%Units = 'm3/m3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wfc_px 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%wfc_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1641,& 'frame/module_domain.f: Failed to allocate grid%wfc_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wsat_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wsat_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1652,& 'frame/module_domain.f: Failed to allocate grid%wsat_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wsat_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wsat_px' grid%tail_statevars%DataName = 'WSAT_PX' grid%tail_statevars%Description = 'Soil saturation for PX LSM' grid%tail_statevars%Units = 'm3/m3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wsat_px 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%wsat_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1702,& 'frame/module_domain.f: Failed to allocate grid%wsat_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'clay_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%clay_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1713,& 'frame/module_domain.f: Failed to allocate grid%clay_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clay_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'clay_px' grid%tail_statevars%DataName = 'CLAY_PX' grid%tail_statevars%Description = 'Clay perent for PX LSM' 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%clay_px 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%clay_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1763,& 'frame/module_domain.f: Failed to allocate grid%clay_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'csand_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%csand_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1774,& 'frame/module_domain.f: Failed to allocate grid%csand_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%csand_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'csand_px' grid%tail_statevars%DataName = 'CSAND_PX' grid%tail_statevars%Description = 'Coarse sand perent for PX LSM' 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%csand_px 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%csand_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1824,& 'frame/module_domain.f: Failed to allocate grid%csand_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fmsand_px').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fmsand_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1835,& 'frame/module_domain.f: Failed to allocate grid%fmsand_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fmsand_px=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fmsand_px' grid%tail_statevars%DataName = 'FMSAND_PX' grid%tail_statevars%Description = 'Fine-medium sand perent for PX LSM' 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%fmsand_px 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%fmsand_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1885,& 'frame/module_domain.f: Failed to allocate grid%fmsand_px(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'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%fm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1896,& 'frame/module_domain.f: Failed to allocate grid%fm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%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 = 'fm' grid%tail_statevars%DataName = 'FM' grid%tail_statevars%Description = 'INTEGRATED FUNCTION FOR MOMENTUM' 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%fm 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%fm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1946,& 'frame/module_domain.f: Failed to allocate grid%fm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'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%fh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",1957,& 'frame/module_domain.f: Failed to allocate grid%fh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%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 = 'fh' grid%tail_statevars%DataName = 'FH' grid%tail_statevars%Description = 'INTEGRATED FUNCTION FOR HEAT' 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%fh 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%fh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2007,& 'frame/module_domain.f: Failed to allocate grid%fh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wspd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wspd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2018,& 'frame/module_domain.f: Failed to allocate grid%wspd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wspd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wspd' grid%tail_statevars%DataName = 'WSPD' grid%tail_statevars%Description = 'Wind Speed At Lowest Model Level (may contain vconv)' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wspd 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%wspd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2068,& 'frame/module_domain.f: Failed to allocate grid%wspd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'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%br(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2079,& 'frame/module_domain.f: Failed to allocate grid%br(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%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 = 'br' grid%tail_statevars%DataName = 'BR' grid%tail_statevars%Description = 'Bulk Richardson' 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%br 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%br(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2129,& 'frame/module_domain.f: Failed to allocate grid%br(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'zol').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%zol(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2140,& 'frame/module_domain.f: Failed to allocate grid%zol(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zol=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'zol' grid%tail_statevars%DataName = 'ZOL' grid%tail_statevars%Description = 'z/L' 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%zol 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%zol(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2190,& 'frame/module_domain.f: Failed to allocate grid%zol(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wstar_ysu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wstar_ysu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2201,& 'frame/module_domain.f: Failed to allocate grid%wstar_ysu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wstar_ysu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wstar_ysu' grid%tail_statevars%DataName = 'WSTAR_YSU' grid%tail_statevars%Description = 'mixed-layer velocity scale from ysupbl' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%wstar_ysu 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%wstar_ysu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2251,& 'frame/module_domain.f: Failed to allocate grid%wstar_ysu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'delta_ysu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%delta_ysu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2262,& 'frame/module_domain.f: Failed to allocate grid%delta_ysu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%delta_ysu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'delta_ysu' grid%tail_statevars%DataName = 'DELTA_YSU' grid%tail_statevars%Description = 'entrainment layer depth from ysupbl' 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%delta_ysu 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%delta_ysu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2312,& 'frame/module_domain.f: Failed to allocate grid%delta_ysu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'exch_h').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%exch_h(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2323,& 'frame/module_domain.f: Failed to allocate grid%exch_h(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%exch_h=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'exch_h' grid%tail_statevars%DataName = 'EXCH_H' grid%tail_statevars%Description = 'SCALAR EXCHANGE COEFFICIENTS ' grid%tail_statevars%Units = 'm2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '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%exch_h grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%exch_h(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2373,& 'frame/module_domain.f: Failed to allocate grid%exch_h(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'exch_m').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%exch_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2384,& 'frame/module_domain.f: Failed to allocate grid%exch_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%exch_m=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'exch_m' grid%tail_statevars%DataName = 'EXCH_M' grid%tail_statevars%Description = 'EXCHANGE COEFFICIENTS ' grid%tail_statevars%Units = 'm2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '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%exch_m grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%exch_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2434,& 'frame/module_domain.f: Failed to allocate grid%exch_m(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ct').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ct(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2445,& 'frame/module_domain.f: Failed to allocate grid%ct(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ct=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ct' grid%tail_statevars%DataName = 'CT' grid%tail_statevars%Description = 'COUNTERGRADIENT TERM' 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%ct 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%ct(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2495,& 'frame/module_domain.f: Failed to allocate grid%ct(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'thz0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%thz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2506,& 'frame/module_domain.f: Failed to allocate grid%thz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thz0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'thz0' grid%tail_statevars%DataName = 'THZ0' grid%tail_statevars%Description = 'POTENTIAL TEMPERATURE AT ZNT' 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%thz0 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%thz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2556,& 'frame/module_domain.f: Failed to allocate grid%thz0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%z0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2567,& 'frame/module_domain.f: Failed to allocate grid%z0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z0' grid%tail_statevars%DataName = 'Z0' grid%tail_statevars%Description = 'Background ROUGHNESS LENGTH' 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%z0 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%z0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2617,& 'frame/module_domain.f: Failed to allocate grid%z0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qz0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2628,& 'frame/module_domain.f: Failed to allocate grid%qz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qz0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qz0' grid%tail_statevars%DataName = 'QZ0' grid%tail_statevars%Description = 'SPECIFIC HUMIDITY AT ZNT' 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%qz0 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%qz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2678,& 'frame/module_domain.f: Failed to allocate grid%qz0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uz0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%uz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2689,& 'frame/module_domain.f: Failed to allocate grid%uz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uz0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uz0' grid%tail_statevars%DataName = 'UZ0' grid%tail_statevars%Description = 'U WIND COMPONENT AT ZNT' 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%uz0 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%uz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2739,& 'frame/module_domain.f: Failed to allocate grid%uz0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vz0').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2750,& 'frame/module_domain.f: Failed to allocate grid%vz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vz0=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vz0' grid%tail_statevars%DataName = 'VZ0' grid%tail_statevars%Description = 'V WIND COMPONENT AT ZNT' 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%vz0 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%vz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2800,& 'frame/module_domain.f: Failed to allocate grid%vz0(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qsfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qsfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2811,& 'frame/module_domain.f: Failed to allocate grid%qsfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qsfc' grid%tail_statevars%DataName = 'QSFC' grid%tail_statevars%Description = 'SPECIFIC HUMIDITY AT LOWER BOUNDARY' 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%qsfc 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%qsfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2861,& 'frame/module_domain.f: Failed to allocate grid%qsfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'akhs').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%akhs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2872,& 'frame/module_domain.f: Failed to allocate grid%akhs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%akhs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'akhs' grid%tail_statevars%DataName = 'AKHS' grid%tail_statevars%Description = 'SFC EXCH COEFF FOR HEAT' 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%akhs 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%akhs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2922,& 'frame/module_domain.f: Failed to allocate grid%akhs(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'akms').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%akms(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2933,& 'frame/module_domain.f: Failed to allocate grid%akms(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%akms=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'akms' grid%tail_statevars%DataName = 'AKMS' grid%tail_statevars%Description = 'SFC EXCH COEFF FOR MOMENTUM' 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%akms 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%akms(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2983,& 'frame/module_domain.f: Failed to allocate grid%akms(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kpbl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%kpbl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",2994,& 'frame/module_domain.f: Failed to allocate grid%kpbl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kpbl=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 = 'kpbl' grid%tail_statevars%DataName = 'KPBL' grid%tail_statevars%Description = 'LEVEL OF PBL TOP' 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%kpbl 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%kpbl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3044,& 'frame/module_domain.f: Failed to allocate grid%kpbl(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10e'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10e(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3055,& 'frame/module_domain.f: Failed to allocate grid%u10e(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10e=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u10e' grid%tail_statevars%DataName = 'U10E' grid%tail_statevars%Description = 'Special U at 10 M from MYJSFC' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%u10e 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%u10e(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3105,& 'frame/module_domain.f: Failed to allocate grid%u10e(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10e'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10e(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3116,& 'frame/module_domain.f: Failed to allocate grid%v10e(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10e=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v10e' grid%tail_statevars%DataName = 'V10E' grid%tail_statevars%Description = 'Special V at 10 M from MYJSFC' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%v10e 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%v10e(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3166,& 'frame/module_domain.f: Failed to allocate grid%v10e(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'akpbl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%akpbl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3177,& 'frame/module_domain.f: Failed to allocate grid%akpbl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%akpbl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'akpbl' grid%tail_statevars%DataName = 'AKPBL' grid%tail_statevars%Description = 'LEVEL OF PBL TOP' 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%akpbl 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%akpbl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3227,& 'frame/module_domain.f: Failed to allocate grid%akpbl(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tshltr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3238,& 'frame/module_domain.f: Failed to allocate grid%tshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tshltr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tshltr' grid%tail_statevars%DataName = 'TSHLTR' grid%tail_statevars%Description = 'SHELTER THETA FROM MYJ' 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%tshltr 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%tshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3288,& 'frame/module_domain.f: Failed to allocate grid%tshltr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qshltr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%qshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3299,& 'frame/module_domain.f: Failed to allocate grid%qshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qshltr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qshltr' grid%tail_statevars%DataName = 'QSHLTR' grid%tail_statevars%Description = 'SHELTER SPECIFIC HUMIDITY FROM MYJ' 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%qshltr 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%qshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3349,& 'frame/module_domain.f: Failed to allocate grid%qshltr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pshltr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3360,& 'frame/module_domain.f: Failed to allocate grid%pshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pshltr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pshltr' grid%tail_statevars%DataName = 'PSHLTR' grid%tail_statevars%Description = 'SHELTER PRESSURE FROM MYJ' 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%pshltr 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%pshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3410,& 'frame/module_domain.f: Failed to allocate grid%pshltr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th10').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%th10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3421,& 'frame/module_domain.f: Failed to allocate grid%th10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th10=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'th10' grid%tail_statevars%DataName = 'TH10' grid%tail_statevars%Description = '10-M THETA FROM MYJ' 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%th10 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%th10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3471,& 'frame/module_domain.f: Failed to allocate grid%th10(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q10').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3482,& 'frame/module_domain.f: Failed to allocate grid%q10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q10=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q10' grid%tail_statevars%DataName = 'Q10' grid%tail_statevars%Description = '10-M SPECIFIC HUMIDITY FROM MYJ' 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%q10 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%q10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3532,& 'frame/module_domain.f: Failed to allocate grid%q10(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'massflux_edkf').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%massflux_edkf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3543,& 'frame/module_domain.f: Failed to allocate grid%massflux_edkf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%massflux_edkf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'massflux_edkf' grid%tail_statevars%DataName = 'MASS_FLUX' grid%tail_statevars%Description = 'MASS FLUX FROM EDKF' grid%tail_statevars%Units = 'Kg 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%massflux_edkf 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%massflux_edkf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3593,& 'frame/module_domain.f: Failed to allocate grid%massflux_edkf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'entr_edkf').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%entr_edkf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3604,& 'frame/module_domain.f: Failed to allocate grid%entr_edkf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%entr_edkf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'entr_edkf' grid%tail_statevars%DataName = 'ENTR' grid%tail_statevars%Description = 'ENTRAINMENT FROM EDKF' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%entr_edkf 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%entr_edkf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3654,& 'frame/module_domain.f: Failed to allocate grid%entr_edkf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'detr_edkf').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%detr_edkf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3665,& 'frame/module_domain.f: Failed to allocate grid%detr_edkf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%detr_edkf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'detr_edkf' grid%tail_statevars%DataName = 'DETR' grid%tail_statevars%Description = 'ENTRAINMENT FROM EDKF' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%detr_edkf 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%detr_edkf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3715,& 'frame/module_domain.f: Failed to allocate grid%detr_edkf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'thl_up').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%thl_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3726,& 'frame/module_domain.f: Failed to allocate grid%thl_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thl_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'thl_up' grid%tail_statevars%DataName = 'THL_UP' grid%tail_statevars%Description = 'THL OF UPDRAFT FROM EDKF' 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%thl_up 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%thl_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3776,& 'frame/module_domain.f: Failed to allocate grid%thl_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'thv_up').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%thv_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3787,& 'frame/module_domain.f: Failed to allocate grid%thv_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thv_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'thv_up' grid%tail_statevars%DataName = 'THV_UP' grid%tail_statevars%Description = 'THL OF UPDRAFT FROM EDKF' 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%thv_up 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%thv_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3837,& 'frame/module_domain.f: Failed to allocate grid%thv_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rv_up').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rv_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3848,& 'frame/module_domain.f: Failed to allocate grid%rv_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rv_up' grid%tail_statevars%DataName = 'RV_UP' grid%tail_statevars%Description = 'RV OF UPDRAFT FROM EDKF' grid%tail_statevars%Units = 'kq/kg' 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%rv_up 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%rv_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3898,& 'frame/module_domain.f: Failed to allocate grid%rv_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rt_up').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%rt_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3909,& 'frame/module_domain.f: Failed to allocate grid%rt_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rt_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rt_up' grid%tail_statevars%DataName = 'RT_UP' grid%tail_statevars%Description = 'RT OF UPDRAFT FROM EDKF' grid%tail_statevars%Units = 'kq/kg' 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%rt_up 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%rt_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3959,& 'frame/module_domain.f: Failed to allocate grid%rt_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rc_up').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%rc_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",3970,& 'frame/module_domain.f: Failed to allocate grid%rc_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rc_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rc_up' grid%tail_statevars%DataName = 'RC_UP' grid%tail_statevars%Description = 'RC OF UPDRAFT FROM EDKF' grid%tail_statevars%Units = 'kq/kg' 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%rc_up 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%rc_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4020,& 'frame/module_domain.f: Failed to allocate grid%rc_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_up').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4031,& 'frame/module_domain.f: Failed to allocate grid%u_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_up=initial_data_value IF (.NOT.grid%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_up' grid%tail_statevars%DataName = 'U_UP' grid%tail_statevars%Description = 'U OF UPDRAFT FROM EDKF' 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%u_up 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%u_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4081,& 'frame/module_domain.f: Failed to allocate grid%u_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_up').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4092,& 'frame/module_domain.f: Failed to allocate grid%v_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_up=initial_data_value IF (.NOT.grid%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_up' grid%tail_statevars%DataName = 'V_UP' grid%tail_statevars%Description = 'U OF UPDRAFT FROM EDKF' 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%v_up 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%v_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4142,& 'frame/module_domain.f: Failed to allocate grid%v_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'frac_up').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%frac_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4153,& 'frame/module_domain.f: Failed to allocate grid%frac_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%frac_up=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'frac_up' grid%tail_statevars%DataName = 'FRAC_UP' grid%tail_statevars%Description = 'FRACTION OF UPDRAFT FROM EDKF' 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%frac_up 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%frac_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4203,& 'frame/module_domain.f: Failed to allocate grid%frac_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rc_mf').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%rc_mf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4214,& 'frame/module_domain.f: Failed to allocate grid%rc_mf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rc_mf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rc_mf' grid%tail_statevars%DataName = 'RC_MF' grid%tail_statevars%Description = 'RC IN THE GRID COMPUTED BY EDKF' grid%tail_statevars%Units = 'kg/kg' 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%rc_mf 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%rc_mf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4264,& 'frame/module_domain.f: Failed to allocate grid%rc_mf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'te_temf').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%te_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4275,& 'frame/module_domain.f: Failed to allocate grid%te_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%te_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'te_temf' grid%tail_statevars%DataName = 'TE_TEMF' grid%tail_statevars%Description = 'Total energy from TEMF PBL scheme' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%te_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%te_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4325,& 'frame/module_domain.f: Failed to allocate grid%te_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kh_temf').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%kh_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4336,& 'frame/module_domain.f: Failed to allocate grid%kh_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kh_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'kh_temf' grid%tail_statevars%DataName = 'KH_TEMF' grid%tail_statevars%Description = 'Diffusion coefficient for heat from TEMF PBL' 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%kh_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%kh_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4386,& 'frame/module_domain.f: Failed to allocate grid%kh_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'km_temf').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%km_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4397,& 'frame/module_domain.f: Failed to allocate grid%km_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%km_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'km_temf' grid%tail_statevars%DataName = 'KM_TEMF' grid%tail_statevars%Description = 'Diffusion coefficient for momentum from TEMF PBL' 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%km_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%km_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4447,& 'frame/module_domain.f: Failed to allocate grid%km_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shf_temf').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%shf_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4458,& 'frame/module_domain.f: Failed to allocate grid%shf_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shf_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shf_temf' grid%tail_statevars%DataName = 'SHF_TEMF' grid%tail_statevars%Description = 'Sensible heat flux from TEMF PBL' grid%tail_statevars%Units = 'K m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' 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%shf_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%shf_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4508,& 'frame/module_domain.f: Failed to allocate grid%shf_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qf_temf').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%qf_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4519,& 'frame/module_domain.f: Failed to allocate grid%qf_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qf_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qf_temf' grid%tail_statevars%DataName = 'QF_TEMF' grid%tail_statevars%Description = 'Sensible heat flux from TEMF PBL' grid%tail_statevars%Units = 'kg/kg 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%qf_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qf_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4569,& 'frame/module_domain.f: Failed to allocate grid%qf_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uw_temf').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%uw_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4580,& 'frame/module_domain.f: Failed to allocate grid%uw_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uw_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uw_temf' grid%tail_statevars%DataName = 'UW_TEMF' grid%tail_statevars%Description = 'U momentum flux from TEMF PBL' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%uw_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%uw_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4630,& 'frame/module_domain.f: Failed to allocate grid%uw_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vw_temf').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%vw_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4641,& 'frame/module_domain.f: Failed to allocate grid%vw_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vw_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vw_temf' grid%tail_statevars%DataName = 'VW_TEMF' grid%tail_statevars%Description = 'V momentum flux from TEMF PBL' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%vw_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%vw_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4691,& 'frame/module_domain.f: Failed to allocate grid%vw_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wupd_temf').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%wupd_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4702,& 'frame/module_domain.f: Failed to allocate grid%wupd_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wupd_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wupd_temf' grid%tail_statevars%DataName = 'WUPD_TEMF' grid%tail_statevars%Description = 'Updraft velocity from TEMF PBL' 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%wupd_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%wupd_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4752,& 'frame/module_domain.f: Failed to allocate grid%wupd_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mf_temf').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%mf_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4763,& 'frame/module_domain.f: Failed to allocate grid%mf_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mf_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mf_temf' grid%tail_statevars%DataName = 'MF_TEMF' grid%tail_statevars%Description = 'Mass flux from TEMF PBL' 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%mf_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%mf_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4813,& 'frame/module_domain.f: Failed to allocate grid%mf_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'thup_temf').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%thup_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4824,& 'frame/module_domain.f: Failed to allocate grid%thup_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thup_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'thup_temf' grid%tail_statevars%DataName = 'THUP_TEMF' grid%tail_statevars%Description = 'Updraft thetal from TEMF PBL' 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%thup_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%thup_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4874,& 'frame/module_domain.f: Failed to allocate grid%thup_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qtup_temf').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%qtup_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4885,& 'frame/module_domain.f: Failed to allocate grid%qtup_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qtup_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qtup_temf' grid%tail_statevars%DataName = 'QTUP_TEMF' grid%tail_statevars%Description = 'Updraft qt from TEMF PBL' grid%tail_statevars%Units = '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%qtup_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qtup_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4935,& 'frame/module_domain.f: Failed to allocate grid%qtup_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qlup_temf').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%qlup_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4946,& 'frame/module_domain.f: Failed to allocate grid%qlup_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qlup_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qlup_temf' grid%tail_statevars%DataName = 'QLUP_TEMF' grid%tail_statevars%Description = 'Updraft ql (liquid water) from TEMF PBL' grid%tail_statevars%Units = '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%qlup_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qlup_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",4996,& 'frame/module_domain.f: Failed to allocate grid%qlup_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cf3d_temf').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%cf3d_temf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5007,& 'frame/module_domain.f: Failed to allocate grid%cf3d_temf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cf3d_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cf3d_temf' grid%tail_statevars%DataName = 'CF3D_TEMF' grid%tail_statevars%Description = '3D Cloud fraction from TEMF PBL' grid%tail_statevars%Units = '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%cf3d_temf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%cf3d_temf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5057,& 'frame/module_domain.f: Failed to allocate grid%cf3d_temf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hd_temf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hd_temf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5068,& 'frame/module_domain.f: Failed to allocate grid%hd_temf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hd_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hd_temf' grid%tail_statevars%DataName = 'HD_TEMF' grid%tail_statevars%Description = 'Dry thermal top height from TEMF PBL' 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%hd_temf 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%hd_temf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5118,& 'frame/module_domain.f: Failed to allocate grid%hd_temf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lcl_temf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lcl_temf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5129,& 'frame/module_domain.f: Failed to allocate grid%lcl_temf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lcl_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lcl_temf' grid%tail_statevars%DataName = 'LCL_TEMF' grid%tail_statevars%Description = 'Lifting condensation level from TEMF PBL' 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%lcl_temf 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%lcl_temf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5179,& 'frame/module_domain.f: Failed to allocate grid%lcl_temf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hct_temf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hct_temf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5190,& 'frame/module_domain.f: Failed to allocate grid%hct_temf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hct_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hct_temf' grid%tail_statevars%DataName = 'HCT_TEMF' grid%tail_statevars%Description = 'Cloud top height from TEMF PBL' 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%hct_temf 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%hct_temf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5240,& 'frame/module_domain.f: Failed to allocate grid%hct_temf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cfm_temf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cfm_temf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5251,& 'frame/module_domain.f: Failed to allocate grid%cfm_temf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfm_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cfm_temf' grid%tail_statevars%DataName = 'CFM_TEMF' grid%tail_statevars%Description = 'Column cloud fraction from TEMF PBL' grid%tail_statevars%Units = '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%cfm_temf 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%cfm_temf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5301,& 'frame/module_domain.f: Failed to allocate grid%cfm_temf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wm_temf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wm_temf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5312,& 'frame/module_domain.f: Failed to allocate grid%wm_temf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wm_temf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wm_temf' grid%tail_statevars%DataName = 'WM_TEMF' grid%tail_statevars%Description = 'Velocity scale in TEMF surface layer scheme' 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%wm_temf 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%wm_temf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5362,& 'frame/module_domain.f: Failed to allocate grid%wm_temf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qke').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%qke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5373,& 'frame/module_domain.f: Failed to allocate grid%qke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qke=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qke' grid%tail_statevars%DataName = 'QKE' grid%tail_statevars%Description = 'twice TKE from MYNN' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qke 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%qke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5423,& 'frame/module_domain.f: Failed to allocate grid%qke(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qshear').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%qshear(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5434,& 'frame/module_domain.f: Failed to allocate grid%qshear(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qshear=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qshear' grid%tail_statevars%DataName = 'QSHEAR' grid%tail_statevars%Description = 'TKE Production - shear' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qshear 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 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qshear(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5484,& 'frame/module_domain.f: Failed to allocate grid%qshear(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qbuoy').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%qbuoy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5495,& 'frame/module_domain.f: Failed to allocate grid%qbuoy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qbuoy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qbuoy' grid%tail_statevars%DataName = 'QBUOY' grid%tail_statevars%Description = 'TKE Production - buoyancy' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qbuoy 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 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qbuoy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5545,& 'frame/module_domain.f: Failed to allocate grid%qbuoy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qdiss').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%qdiss(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5556,& 'frame/module_domain.f: Failed to allocate grid%qdiss(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qdiss=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qdiss' grid%tail_statevars%DataName = 'QDISS' grid%tail_statevars%Description = 'TKE dissipation' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qdiss 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 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qdiss(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5606,& 'frame/module_domain.f: Failed to allocate grid%qdiss(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qwt').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%qwt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5617,& 'frame/module_domain.f: Failed to allocate grid%qwt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qwt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qwt' grid%tail_statevars%DataName = 'QWT' grid%tail_statevars%Description = 'TKE vertical transport' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qwt 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 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qwt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5667,& 'frame/module_domain.f: Failed to allocate grid%qwt(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dqke').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%dqke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5678,& 'frame/module_domain.f: Failed to allocate grid%dqke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dqke=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dqke' grid%tail_statevars%DataName = 'DTKE' grid%tail_statevars%Description = 'TKE change' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%dqke 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 = 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%dqke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5728,& 'frame/module_domain.f: Failed to allocate grid%dqke(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsq').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%tsq(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5739,& 'frame/module_domain.f: Failed to allocate grid%tsq(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsq=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsq' grid%tail_statevars%DataName = 'TSQ' grid%tail_statevars%Description = 'liquid water pottemp variance' grid%tail_statevars%Units = 'K2' 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%tsq 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%tsq(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5789,& 'frame/module_domain.f: Failed to allocate grid%tsq(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qsq').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%qsq(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5800,& 'frame/module_domain.f: Failed to allocate grid%qsq(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsq=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qsq' grid%tail_statevars%DataName = 'QSQ' grid%tail_statevars%Description = 'liquid water variance' grid%tail_statevars%Units = '(kg/kg)**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%qsq 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%qsq(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5850,& 'frame/module_domain.f: Failed to allocate grid%qsq(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cov').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%cov(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5861,& 'frame/module_domain.f: Failed to allocate grid%cov(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cov=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cov' grid%tail_statevars%DataName = 'COV' grid%tail_statevars%Description = 'liquid water-liquid water pottemp covariance' grid%tail_statevars%Units = 'K kg/kg' 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%cov 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%cov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5911,& 'frame/module_domain.f: Failed to allocate grid%cov(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sh3d').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%sh3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5922,& 'frame/module_domain.f: Failed to allocate grid%sh3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sh3d' grid%tail_statevars%DataName = 'SH3D' grid%tail_statevars%Description = 'Stability function for heat' 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%sh3d 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%sh3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5972,& 'frame/module_domain.f: Failed to allocate grid%sh3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ch').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ch(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",5983,& 'frame/module_domain.f: Failed to allocate grid%ch(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ch=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ch' grid%tail_statevars%DataName = 'CH' grid%tail_statevars%Description = 'surface exchange coeff for heat' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ch 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%ch(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6033,& 'frame/module_domain.f: Failed to allocate grid%ch(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_a').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%edmf_a(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6044,& 'frame/module_domain.f: Failed to allocate grid%edmf_a(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_a=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edmf_a' grid%tail_statevars%DataName = 'EDMF_A' grid%tail_statevars%Description = 'EDMF relative updraft area - moist updrafts' 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%edmf_a 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 = 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%edmf_a(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6094,& 'frame/module_domain.f: Failed to allocate grid%edmf_a(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_w').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%edmf_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6105,& 'frame/module_domain.f: Failed to allocate grid%edmf_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_w=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edmf_w' grid%tail_statevars%DataName = 'EDMF_W' grid%tail_statevars%Description = 'EDMF vertical velocity - mean moist updrafts' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%edmf_w 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 = 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%edmf_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6155,& 'frame/module_domain.f: Failed to allocate grid%edmf_w(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_thl').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%edmf_thl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6166,& 'frame/module_domain.f: Failed to allocate grid%edmf_thl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_thl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edmf_thl' grid%tail_statevars%DataName = 'EDMF_THL' grid%tail_statevars%Description = 'EDMF thetaL - mean moist updrafts' 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%edmf_thl 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 = 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%edmf_thl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6216,& 'frame/module_domain.f: Failed to allocate grid%edmf_thl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_qt').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%edmf_qt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6227,& 'frame/module_domain.f: Failed to allocate grid%edmf_qt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_qt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edmf_qt' grid%tail_statevars%DataName = 'EDMF_QT' grid%tail_statevars%Description = 'EDMF qt - mean moist updrafts' 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%edmf_qt 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 = 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%edmf_qt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6277,& 'frame/module_domain.f: Failed to allocate grid%edmf_qt(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_ent').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%edmf_ent(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6288,& 'frame/module_domain.f: Failed to allocate grid%edmf_ent(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_ent=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edmf_ent' grid%tail_statevars%DataName = 'EDMF_ENT' grid%tail_statevars%Description = 'EDMF entrainment - mean moist updrafts' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%edmf_ent 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 = 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%edmf_ent(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6338,& 'frame/module_domain.f: Failed to allocate grid%edmf_ent(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edmf_qc').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%edmf_qc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6349,& 'frame/module_domain.f: Failed to allocate grid%edmf_qc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edmf_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 = 'edmf_qc' grid%tail_statevars%DataName = 'EDMF_QC' grid%tail_statevars%Description = 'EDMF qc - mean moist updrafts' 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%edmf_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 = 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%edmf_qc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6399,& 'frame/module_domain.f: Failed to allocate grid%edmf_qc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sub_thl3d').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%sub_thl3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6410,& 'frame/module_domain.f: Failed to allocate grid%sub_thl3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sub_thl3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sub_thl3d' grid%tail_statevars%DataName = 'SUB_THL3D' grid%tail_statevars%Description = 'thetaL subsidence tendency from EDMF' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sub_thl3d 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 = 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%sub_thl3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6460,& 'frame/module_domain.f: Failed to allocate grid%sub_thl3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sub_sqv3d').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%sub_sqv3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6471,& 'frame/module_domain.f: Failed to allocate grid%sub_sqv3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sub_sqv3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sub_sqv3d' grid%tail_statevars%DataName = 'SUB_SQV3D' grid%tail_statevars%Description = 'qv subsidence tendency from EDMF' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%sub_sqv3d 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 = 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%sub_sqv3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6521,& 'frame/module_domain.f: Failed to allocate grid%sub_sqv3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'det_thl3d').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%det_thl3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6532,& 'frame/module_domain.f: Failed to allocate grid%det_thl3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%det_thl3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'det_thl3d' grid%tail_statevars%DataName = 'DET_THL3D' grid%tail_statevars%Description = 'thetaL detrainment tendency from EDMF' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%det_thl3d 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 = 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%det_thl3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6582,& 'frame/module_domain.f: Failed to allocate grid%det_thl3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'det_sqv3d').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%det_sqv3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6593,& 'frame/module_domain.f: Failed to allocate grid%det_sqv3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%det_sqv3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'det_sqv3d' grid%tail_statevars%DataName = 'DET_SQV3D' grid%tail_statevars%Description = 'qv detrainment tendency from EDMF' grid%tail_statevars%Units = 'kg kg-1 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%det_sqv3d 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 = 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%det_sqv3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6643,& 'frame/module_domain.f: Failed to allocate grid%det_sqv3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nupdraft').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nupdraft(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6654,& 'frame/module_domain.f: Failed to allocate grid%nupdraft(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nupdraft=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 = 'nupdraft' grid%tail_statevars%DataName = 'NUPDRAFT' grid%tail_statevars%Description = 'Number of updrafts per grid cell' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%nupdraft 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%nupdraft(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6704,& 'frame/module_domain.f: Failed to allocate grid%nupdraft(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ktop_plume').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ktop_plume(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6715,& 'frame/module_domain.f: Failed to allocate grid%ktop_plume(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ktop_plume=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 = 'ktop_plume' grid%tail_statevars%DataName = 'KTOP_PLUME' grid%tail_statevars%Description = 'k-level of highest pentrating plume' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%ktop_plume 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%ktop_plume(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6765,& 'frame/module_domain.f: Failed to allocate grid%ktop_plume(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'maxmf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%maxmf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6776,& 'frame/module_domain.f: Failed to allocate grid%maxmf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%maxmf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'maxmf' grid%tail_statevars%DataName = 'MAXMF' grid%tail_statevars%Description = 'Maximum mass-flux (neg: all dry, pos: moist)' grid%tail_statevars%Units = 'm/s * 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%maxmf 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%maxmf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6826,& 'frame/module_domain.f: Failed to allocate grid%maxmf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fgdp').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%fgdp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6837,& 'frame/module_domain.f: Failed to allocate grid%fgdp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fgdp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fgdp' grid%tail_statevars%DataName = 'FGDP' grid%tail_statevars%Description = 'Accumulated fog deposition' 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%fgdp 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%fgdp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6887,& 'frame/module_domain.f: Failed to allocate grid%fgdp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfgdp').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfgdp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6898,& 'frame/module_domain.f: Failed to allocate grid%dfgdp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfgdp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfgdp' grid%tail_statevars%DataName = 'DFGDP' grid%tail_statevars%Description = 'Fog deposition during timestep' 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%dfgdp 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%dfgdp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6948,& 'frame/module_domain.f: Failed to allocate grid%dfgdp(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vdfg').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vdfg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",6959,& 'frame/module_domain.f: Failed to allocate grid%vdfg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vdfg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vdfg' grid%tail_statevars%DataName = 'VDFG' grid%tail_statevars%Description = 'Deposition velocity of fog' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%vdfg 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%vdfg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7009,& 'frame/module_domain.f: Failed to allocate grid%vdfg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'exch_tke').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%exch_tke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7020,& 'frame/module_domain.f: Failed to allocate grid%exch_tke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%exch_tke=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'exch_tke' grid%tail_statevars%DataName = 'EXCH_TKE' grid%tail_statevars%Description = 'Exchange coefficient TKE enhanced' grid%tail_statevars%Units = 'm2 s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%exch_tke 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 = 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%exch_tke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7070,& 'frame/module_domain.f: Failed to allocate grid%exch_tke(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dtaux3d').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%dtaux3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7081,& 'frame/module_domain.f: Failed to allocate grid%dtaux3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dtaux3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dtaux3d' grid%tail_statevars%DataName = 'DTAUX3D' grid%tail_statevars%Description = 'LOCAL U GWDO STRESS' 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%dtaux3d grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dtaux3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7131,& 'frame/module_domain.f: Failed to allocate grid%dtaux3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dtauy3d').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%dtauy3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7142,& 'frame/module_domain.f: Failed to allocate grid%dtauy3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dtauy3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dtauy3d' grid%tail_statevars%DataName = 'DTAUY3D' grid%tail_statevars%Description = 'LOCAL V GWDO STRESS' 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%dtauy3d grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dtauy3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7192,& 'frame/module_domain.f: Failed to allocate grid%dtauy3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dusfcg').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dusfcg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7203,& 'frame/module_domain.f: Failed to allocate grid%dusfcg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dusfcg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dusfcg' grid%tail_statevars%DataName = 'DUSFCG' grid%tail_statevars%Description = 'COLUMN-INTEGRATED U GWDO STRESS' grid%tail_statevars%Units = 'Pa 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%dusfcg 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%dusfcg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7253,& 'frame/module_domain.f: Failed to allocate grid%dusfcg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dvsfcg').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dvsfcg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7264,& 'frame/module_domain.f: Failed to allocate grid%dvsfcg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dvsfcg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dvsfcg' grid%tail_statevars%DataName = 'DVSFCG' grid%tail_statevars%Description = 'COLUMN-INTEGRATED V GWDO STRESS' grid%tail_statevars%Units = 'Pa 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%dvsfcg 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%dvsfcg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7314,& 'frame/module_domain.f: Failed to allocate grid%dvsfcg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'var2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%var2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7325,& 'frame/module_domain.f: Failed to allocate grid%var2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%var2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'var2d' grid%tail_statevars%DataName = 'VAR' grid%tail_statevars%Description = 'OROGRAPHIC VARIANCE' 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%var2d 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%var2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7375,& 'frame/module_domain.f: Failed to allocate grid%var2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'oc12d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%oc12d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7386,& 'frame/module_domain.f: Failed to allocate grid%oc12d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oc12d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'oc12d' grid%tail_statevars%DataName = 'CON' grid%tail_statevars%Description = 'OROGRAPHIC CONVEXITY' 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%oc12d 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%oc12d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7436,& 'frame/module_domain.f: Failed to allocate grid%oc12d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'oa1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%oa1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7447,& 'frame/module_domain.f: Failed to allocate grid%oa1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'oa1' grid%tail_statevars%DataName = 'OA1' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%oa1 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%oa1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7497,& 'frame/module_domain.f: Failed to allocate grid%oa1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'oa2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%oa2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7508,& 'frame/module_domain.f: Failed to allocate grid%oa2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'oa2' grid%tail_statevars%DataName = 'OA2' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%oa2 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%oa2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7558,& 'frame/module_domain.f: Failed to allocate grid%oa2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'oa3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%oa3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7569,& 'frame/module_domain.f: Failed to allocate grid%oa3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'oa3' grid%tail_statevars%DataName = 'OA3' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%oa3 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%oa3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7619,& 'frame/module_domain.f: Failed to allocate grid%oa3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'oa4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%oa4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7630,& 'frame/module_domain.f: Failed to allocate grid%oa4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'oa4' grid%tail_statevars%DataName = 'OA4' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%oa4 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%oa4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7680,& 'frame/module_domain.f: Failed to allocate grid%oa4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ol1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ol1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7691,& 'frame/module_domain.f: Failed to allocate grid%ol1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ol1' grid%tail_statevars%DataName = 'OL1' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%ol1 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%ol1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7741,& 'frame/module_domain.f: Failed to allocate grid%ol1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ol2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ol2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7752,& 'frame/module_domain.f: Failed to allocate grid%ol2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ol2' grid%tail_statevars%DataName = 'OL2' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%ol2 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%ol2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7802,& 'frame/module_domain.f: Failed to allocate grid%ol2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ol3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ol3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7813,& 'frame/module_domain.f: Failed to allocate grid%ol3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ol3' grid%tail_statevars%DataName = 'OL3' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%ol3 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%ol3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7863,& 'frame/module_domain.f: Failed to allocate grid%ol3(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ol4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ol4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7874,& 'frame/module_domain.f: Failed to allocate grid%ol4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol4=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ol4' grid%tail_statevars%DataName = 'OL4' grid%tail_statevars%Description = 'OROGRAPHIC DIRECTION ASYMMETRY FUNCTION' 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%ol4 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%ol4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7924,& 'frame/module_domain.f: Failed to allocate grid%ol4(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ctopo'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ctopo(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7935,& 'frame/module_domain.f: Failed to allocate grid%ctopo(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ctopo=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ctopo' grid%tail_statevars%DataName = 'CTOPO' grid%tail_statevars%Description = 'Correction for topography' 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%ctopo 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%ctopo(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7985,& 'frame/module_domain.f: Failed to allocate grid%ctopo(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ctopo2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ctopo2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",7996,& 'frame/module_domain.f: Failed to allocate grid%ctopo2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ctopo2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ctopo2' grid%tail_statevars%DataName = 'CTOPO2' grid%tail_statevars%Description = 'Correction for topography 2' 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%ctopo2 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%ctopo2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8046,& 'frame/module_domain.f: Failed to allocate grid%ctopo2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'a_u_bep').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%a_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8057,& 'frame/module_domain.f: Failed to allocate grid%a_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_u_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'a_u_bep' grid%tail_statevars%DataName = 'A_U_BEP' grid%tail_statevars%Description = 'IMPLICIT FOR X-COMP.' grid%tail_statevars%Units = '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%a_u_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%a_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8107,& 'frame/module_domain.f: Failed to allocate grid%a_u_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'a_v_bep').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%a_v_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8118,& 'frame/module_domain.f: Failed to allocate grid%a_v_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_v_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'a_v_bep' grid%tail_statevars%DataName = 'A_V_BEP' grid%tail_statevars%Description = 'IMPLICIT FOR Y-COMP.' grid%tail_statevars%Units = '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%a_v_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%a_v_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8168,& 'frame/module_domain.f: Failed to allocate grid%a_v_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'a_t_bep').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%a_t_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8179,& 'frame/module_domain.f: Failed to allocate grid%a_t_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_t_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'a_t_bep' grid%tail_statevars%DataName = 'A_T_BEP' grid%tail_statevars%Description = 'IMPLICIT FOR Pot. Temp' grid%tail_statevars%Units = '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%a_t_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%a_t_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8229,& 'frame/module_domain.f: Failed to allocate grid%a_t_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'a_q_bep').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%a_q_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8240,& 'frame/module_domain.f: Failed to allocate grid%a_q_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_q_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'a_q_bep' grid%tail_statevars%DataName = 'A_Q_BEP' grid%tail_statevars%Description = 'IMPLICIT FOR Moisture' grid%tail_statevars%Units = '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%a_q_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%a_q_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8290,& 'frame/module_domain.f: Failed to allocate grid%a_q_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'a_e_bep').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%a_e_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8301,& 'frame/module_domain.f: Failed to allocate grid%a_e_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_e_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'a_e_bep' grid%tail_statevars%DataName = 'A_E_BEP' grid%tail_statevars%Description = 'IMPLICIT FOR TKE' grid%tail_statevars%Units = '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%a_e_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%a_e_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8351,& 'frame/module_domain.f: Failed to allocate grid%a_e_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'b_u_bep').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%b_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8362,& 'frame/module_domain.f: Failed to allocate grid%b_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_u_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'b_u_bep' grid%tail_statevars%DataName = 'B_U_BEP' grid%tail_statevars%Description = 'EXPLICIT FOR X-COMP.' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%b_u_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%b_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8412,& 'frame/module_domain.f: Failed to allocate grid%b_u_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'b_v_bep').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%b_v_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8423,& 'frame/module_domain.f: Failed to allocate grid%b_v_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_v_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'b_v_bep' grid%tail_statevars%DataName = 'B_V_BEP' grid%tail_statevars%Description = 'EXPLICIT FOR Y-COMP.' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%b_v_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%b_v_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8473,& 'frame/module_domain.f: Failed to allocate grid%b_v_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'b_t_bep').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%b_t_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8484,& 'frame/module_domain.f: Failed to allocate grid%b_t_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_t_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'b_t_bep' grid%tail_statevars%DataName = 'B_T_BEP' grid%tail_statevars%Description = 'EXPLICIT FOR Pot. Temp' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '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%b_t_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%b_t_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8534,& 'frame/module_domain.f: Failed to allocate grid%b_t_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'b_q_bep').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%b_q_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8545,& 'frame/module_domain.f: Failed to allocate grid%b_q_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_q_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'b_q_bep' grid%tail_statevars%DataName = 'B_Q_BEP' grid%tail_statevars%Description = 'EXPLICIT FOR Moisture' grid%tail_statevars%Units = 'kg 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%b_q_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%b_q_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8595,& 'frame/module_domain.f: Failed to allocate grid%b_q_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'b_e_bep').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%b_e_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8606,& 'frame/module_domain.f: Failed to allocate grid%b_e_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_e_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'b_e_bep' grid%tail_statevars%DataName = 'B_E_BEP' grid%tail_statevars%Description = 'EXPLICIT FOR TKE' grid%tail_statevars%Units = 'm2 s-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%b_e_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%b_e_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8656,& 'frame/module_domain.f: Failed to allocate grid%b_e_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dlg_bep').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%dlg_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8667,& 'frame/module_domain.f: Failed to allocate grid%dlg_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dlg_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dlg_bep' grid%tail_statevars%DataName = 'DLG_BEP' grid%tail_statevars%Description = 'length scale 1' 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%dlg_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dlg_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8717,& 'frame/module_domain.f: Failed to allocate grid%dlg_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dl_u_bep').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%dl_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8728,& 'frame/module_domain.f: Failed to allocate grid%dl_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dl_u_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dl_u_bep' grid%tail_statevars%DataName = 'DL_U_BEP' grid%tail_statevars%Description = 'urban length scale' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '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%dl_u_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%dl_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8778,& 'frame/module_domain.f: Failed to allocate grid%dl_u_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sf_bep').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%sf_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8789,& 'frame/module_domain.f: Failed to allocate grid%sf_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sf_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sf_bep' grid%tail_statevars%DataName = 'SF_BEP' grid%tail_statevars%Description = 'surface grid' 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%sf_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%sf_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8839,& 'frame/module_domain.f: Failed to allocate grid%sf_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vl_bep').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%vl_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8850,& 'frame/module_domain.f: Failed to allocate grid%vl_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vl_bep=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vl_bep' grid%tail_statevars%DataName = 'VL_BEP' grid%tail_statevars%Description = 'volume grid' 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%vl_bep grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%vl_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8900,& 'frame/module_domain.f: Failed to allocate grid%vl_bep(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tke_pbl').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%tke_pbl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8911,& 'frame/module_domain.f: Failed to allocate grid%tke_pbl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_pbl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tke_pbl' grid%tail_statevars%DataName = 'TKE_PBL' grid%tail_statevars%Description = 'TKE from PBL' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tke_pbl grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%tke_pbl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8961,& 'frame/module_domain.f: Failed to allocate grid%tke_pbl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'el_pbl').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%el_pbl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",8972,& 'frame/module_domain.f: Failed to allocate grid%el_pbl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%el_pbl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'el_pbl' grid%tail_statevars%DataName = 'EL_PBL' grid%tail_statevars%Description = 'Length scale from PBL' 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%el_pbl 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 = kds grid%tail_statevars%ed2 = kde grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( kde, kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%el_pbl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9022,& 'frame/module_domain.f: Failed to allocate grid%el_pbl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wu_tur').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%wu_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9033,& 'frame/module_domain.f: Failed to allocate grid%wu_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wu_tur=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wu_tur' grid%tail_statevars%DataName = 'WU_TUR' grid%tail_statevars%Description = 'Turbulent flux of momentum(x)' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%wu_tur 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%wu_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9083,& 'frame/module_domain.f: Failed to allocate grid%wu_tur(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wv_tur').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%wv_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9094,& 'frame/module_domain.f: Failed to allocate grid%wv_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wv_tur=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wv_tur' grid%tail_statevars%DataName = 'WV_TUR' grid%tail_statevars%Description = 'Turbulent flux of momentum(y)' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%wv_tur 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%wv_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9144,& 'frame/module_domain.f: Failed to allocate grid%wv_tur(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wt_tur').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%wt_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9155,& 'frame/module_domain.f: Failed to allocate grid%wt_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wt_tur=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wt_tur' grid%tail_statevars%DataName = 'WT_TUR' grid%tail_statevars%Description = 'Turbulent flux of temperature' grid%tail_statevars%Units = 'K m s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' 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%wt_tur 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%wt_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9205,& 'frame/module_domain.f: Failed to allocate grid%wt_tur(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wq_tur').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%wq_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9216,& 'frame/module_domain.f: Failed to allocate grid%wq_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wq_tur=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wq_tur' grid%tail_statevars%DataName = 'WQ_TUR' grid%tail_statevars%Description = 'Turbulent flux of water vapor' 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%wq_tur 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%wq_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9266,& 'frame/module_domain.f: Failed to allocate grid%wq_tur(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'htop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%htop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9277,& 'frame/module_domain.f: Failed to allocate grid%htop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%htop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'htop' grid%tail_statevars%DataName = 'HTOP' grid%tail_statevars%Description = 'TOP OF CONVECTION LEVEL' 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%htop 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%htop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9327,& 'frame/module_domain.f: Failed to allocate grid%htop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hbot').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hbot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9338,& 'frame/module_domain.f: Failed to allocate grid%hbot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hbot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hbot' grid%tail_statevars%DataName = 'HBOT' grid%tail_statevars%Description = 'BOT OF CONVECTION LEVEL' 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%hbot 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%hbot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9388,& 'frame/module_domain.f: Failed to allocate grid%hbot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'htopr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%htopr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9399,& 'frame/module_domain.f: Failed to allocate grid%htopr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%htopr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'htopr' grid%tail_statevars%DataName = 'HTOPR' grid%tail_statevars%Description = 'TOP OF CONVECTION LEVEL FOR RADIATION' 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%htopr 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%htopr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9449,& 'frame/module_domain.f: Failed to allocate grid%htopr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hbotr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hbotr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9460,& 'frame/module_domain.f: Failed to allocate grid%hbotr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hbotr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hbotr' grid%tail_statevars%DataName = 'HBOTR' grid%tail_statevars%Description = 'BOT OF CONVECTION LEVEL FOR RADIATION' 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%hbotr 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%hbotr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9510,& 'frame/module_domain.f: Failed to allocate grid%hbotr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cutop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cutop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9521,& 'frame/module_domain.f: Failed to allocate grid%cutop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cutop=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cutop' grid%tail_statevars%DataName = 'CUTOP' grid%tail_statevars%Description = 'TOP OF CONVECTION LEVEL FROM CUMULUS PAR' 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%cutop 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%cutop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9571,& 'frame/module_domain.f: Failed to allocate grid%cutop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cubot').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cubot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9582,& 'frame/module_domain.f: Failed to allocate grid%cubot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cubot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cubot' grid%tail_statevars%DataName = 'CUBOT' grid%tail_statevars%Description = 'BOT OF CONVECTION LEVEL FROM CUMULUS PAR' 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%cubot 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%cubot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9632,& 'frame/module_domain.f: Failed to allocate grid%cubot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cuppt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cuppt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9643,& 'frame/module_domain.f: Failed to allocate grid%cuppt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cuppt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cuppt' grid%tail_statevars%DataName = 'CUPPT' grid%tail_statevars%Description = 'ACCUMULATED CONVECTIVE RAIN SINC LAST CALL TO THE RADIATION' 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%cuppt 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%cuppt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9693,& 'frame/module_domain.f: Failed to allocate grid%cuppt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rswtoa').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rswtoa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9704,& 'frame/module_domain.f: Failed to allocate grid%rswtoa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rswtoa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rswtoa' grid%tail_statevars%DataName = 'RSWTOA' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%rswtoa 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%rswtoa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9754,& 'frame/module_domain.f: Failed to allocate grid%rswtoa(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rlwtoa').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rlwtoa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9765,& 'frame/module_domain.f: Failed to allocate grid%rlwtoa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rlwtoa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rlwtoa' grid%tail_statevars%DataName = 'RLWTOA' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%rlwtoa 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%rlwtoa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9815,& 'frame/module_domain.f: Failed to allocate grid%rlwtoa(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'czmean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%czmean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9826,& 'frame/module_domain.f: Failed to allocate grid%czmean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%czmean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'czmean' grid%tail_statevars%DataName = 'CZMEAN' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%czmean 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%czmean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9876,& 'frame/module_domain.f: Failed to allocate grid%czmean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cfracl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cfracl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9887,& 'frame/module_domain.f: Failed to allocate grid%cfracl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfracl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cfracl' grid%tail_statevars%DataName = 'CFRACL' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cfracl 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%cfracl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9937,& 'frame/module_domain.f: Failed to allocate grid%cfracl(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cfracm').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cfracm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9948,& 'frame/module_domain.f: Failed to allocate grid%cfracm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfracm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cfracm' grid%tail_statevars%DataName = 'CFRACM' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cfracm 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%cfracm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",9998,& 'frame/module_domain.f: Failed to allocate grid%cfracm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cfrach').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cfrach(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10009,& 'frame/module_domain.f: Failed to allocate grid%cfrach(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfrach=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cfrach' grid%tail_statevars%DataName = 'CFRACH' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%cfrach 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%cfrach(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10059,& 'frame/module_domain.f: Failed to allocate grid%cfrach(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acfrst').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acfrst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10070,& 'frame/module_domain.f: Failed to allocate grid%acfrst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acfrst=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acfrst' grid%tail_statevars%DataName = 'ACFRST' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acfrst 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%acfrst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10120,& 'frame/module_domain.f: Failed to allocate grid%acfrst(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ncfrst').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ncfrst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10131,& 'frame/module_domain.f: Failed to allocate grid%ncfrst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ncfrst=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 = 'ncfrst' grid%tail_statevars%DataName = 'NCFRST' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%ncfrst 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%ncfrst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10181,& 'frame/module_domain.f: Failed to allocate grid%ncfrst(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acfrcv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%acfrcv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10192,& 'frame/module_domain.f: Failed to allocate grid%acfrcv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acfrcv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acfrcv' grid%tail_statevars%DataName = 'ACFRCV' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%acfrcv 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%acfrcv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10242,& 'frame/module_domain.f: Failed to allocate grid%acfrcv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ncfrcv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ncfrcv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10253,& 'frame/module_domain.f: Failed to allocate grid%ncfrcv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ncfrcv=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 = 'ncfrcv' grid%tail_statevars%DataName = 'NCFRCV' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%ncfrcv 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%ncfrcv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10303,& 'frame/module_domain.f: Failed to allocate grid%ncfrcv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'o3rad'))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%o3rad(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10314,& 'frame/module_domain.f: Failed to allocate grid%o3rad(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%o3rad=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'o3rad' grid%tail_statevars%DataName = 'O3RAD' grid%tail_statevars%Description = 'RADIATION 3D OZONE' grid%tail_statevars%Units = 'ppmv' 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%o3rad 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%o3rad(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10364,& 'frame/module_domain.f: Failed to allocate grid%o3rad(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerodm').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))*(((model_config_rec%no_src_types)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))*(((model_config_rec%no_src_types)-(1)+1))) * 4 ALLOCATE(grid%aerodm(sm31:em31,1:model_config_rec%alevsiz,sm33:em33,1:12,1:model_config_rec%no_src_types),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10375,& 'frame/module_domain.f: Failed to allocate grid%aerodm(sm31:em31,1:model_config_rec%alevsiz,sm33:em33,1:12,1:model_config_rec%no_src_types). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerodm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerodm' grid%tail_statevars%DataName = 'AERODM' 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 = 5 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_5d => grid%aerodm 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%alevsiz grid%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%alevsiz grid%tail_statevars%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%alevsiz grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'alevsiz' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aerodm(1,1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10425,& 'frame/module_domain.f: Failed to allocate grid%aerodm(1,1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pina').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%alevsiz)-(1)+1))) * 4 nba = & ((((model_config_rec%alevsiz)-(1)+1))) * 4 ALLOCATE(grid%pina(1:model_config_rec%alevsiz),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10436,& 'frame/module_domain.f: Failed to allocate grid%pina(1:model_config_rec%alevsiz). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pina=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pina' grid%tail_statevars%DataName = 'PINA' grid%tail_statevars%Description = 'PRESSURE LEVEL OF OZONE MIXING RATIO' grid%tail_statevars%Units = 'millibar' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%pina grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%alevsiz 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%alevsiz 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%alevsiz grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'alevsiz' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pina(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10484,& 'frame/module_domain.f: Failed to allocate grid%pina(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerod'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_aerod)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_aerod)) * 4 ALLOCATE(grid%aerod(sm31:em31,sm32:em32,sm33:em33,num_aerod),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10495,& 'frame/module_domain.f: Failed to allocate grid%aerod(sm31:em31,sm32:em32,sm33:em33,num_aerod). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerod=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerod' grid%tail_statevars%DataName = 'AEROD' 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%aerod grid%tail_statevars%num_table => aerod_num_table grid%tail_statevars%index_table => aerod_index_table grid%tail_statevars%boundary_table => aerod_boundary_table grid%tail_statevars%dname_table => aerod_dname_table grid%tail_statevars%desc_table => aerod_desc_table grid%tail_statevars%units_table => aerod_units_table grid%tail_statevars%streams_table => aerod_streams_table 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%aerod(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10552,& 'frame/module_domain.f: Failed to allocate grid%aerod(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aodtot').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%aodtot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10563,& 'frame/module_domain.f: Failed to allocate grid%aodtot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aodtot=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aodtot' grid%tail_statevars%DataName = 'AODTOT' grid%tail_statevars%Description = 'TOTAL AEROSOL OPTICAL DEPTH' 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%aodtot 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%aodtot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10613,& 'frame/module_domain.f: Failed to allocate grid%aodtot(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aeromcu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz_cu)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))*(((model_config_rec%no_src_types_cu)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz_cu)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))*(((model_config_rec%no_src_types_cu)-(1)+1))) * 4 ALLOCATE(grid%aeromcu(sm31:em31,1:model_config_rec%alevsiz_cu,sm33:em33,1:12,1:model_config_rec%no_src_types_cu),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10624,& 'frame/module_domain.f: Failed to allocate grid%aeromcu(sm31:em31,1:model_config_rec%alevsiz_cu,sm33:em33,1:12,1:model_config_rec%no_src_types_cu). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aeromcu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aeromcu' grid%tail_statevars%DataName = 'AEROMCU' 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 = 5 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_5d => grid%aeromcu 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%alevsiz_cu grid%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%alevsiz_cu grid%tail_statevars%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%alevsiz_cu grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'alevsiz_cu' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aeromcu(1,1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10674,& 'frame/module_domain.f: Failed to allocate grid%aeromcu(1,1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aeropcu').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz_cu)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%alevsiz_cu)-(1)+1))*(((em33)-(sm33)+1))*(((12)-(1)+1))) * 4 ALLOCATE(grid%aeropcu(sm31:em31,1:model_config_rec%alevsiz_cu,sm33:em33,1:12),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10685,& 'frame/module_domain.f: Failed to allocate grid%aeropcu(sm31:em31,1:model_config_rec%alevsiz_cu,sm33:em33,1:12). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aeropcu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aeropcu' grid%tail_statevars%DataName = 'AEROPCU' grid%tail_statevars%Description = 'PRESSURE LEVEL OF AEROSOL DATA' grid%tail_statevars%Units = 'millibar' 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 = .FALSE. grid%tail_statevars%rfield_4d => grid%aeropcu 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%alevsiz_cu grid%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%alevsiz_cu grid%tail_statevars%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%alevsiz_cu grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'alevsiz_cu' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aeropcu(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10735,& 'frame/module_domain.f: Failed to allocate grid%aeropcu(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerocu'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_aerocu)) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_aerocu)) * 4 ALLOCATE(grid%aerocu(sm31:em31,sm32:em32,sm33:em33,num_aerocu),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10746,& 'frame/module_domain.f: Failed to allocate grid%aerocu(sm31:em31,sm32:em32,sm33:em33,num_aerocu). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerocu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerocu' grid%tail_statevars%DataName = 'AEROCU' 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%aerocu grid%tail_statevars%num_table => aerocu_num_table grid%tail_statevars%index_table => aerocu_index_table grid%tail_statevars%boundary_table => aerocu_boundary_table grid%tail_statevars%dname_table => aerocu_dname_table grid%tail_statevars%desc_table => aerocu_desc_table grid%tail_statevars%units_table => aerocu_units_table grid%tail_statevars%streams_table => aerocu_streams_table 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 = 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%aerocu(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10803,& 'frame/module_domain.f: Failed to allocate grid%aerocu(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerovar').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%aerovar(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10814,& 'frame/module_domain.f: Failed to allocate grid%aerovar(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerovar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerovar' grid%tail_statevars%DataName = 'AEROVAR' grid%tail_statevars%Description = 'Aerosol variable for MSKF' grid%tail_statevars%Units = 'ug 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%aerovar grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aerovar(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10864,& 'frame/module_domain.f: Failed to allocate grid%aerovar(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ozmixm'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%levsiz)-(1)+1))*(((em33)-(sm33)+1)*num_ozmixm)) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%levsiz)-(1)+1))*(((em33)-(sm33)+1)*num_ozmixm)) * 4 ALLOCATE(grid%ozmixm(sm31:em31,1:model_config_rec%levsiz,sm33:em33,num_ozmixm),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10875,& 'frame/module_domain.f: Failed to allocate grid%ozmixm(sm31:em31,1:model_config_rec%levsiz,sm33:em33,num_ozmixm). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ozmixm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ozmixm' grid%tail_statevars%DataName = 'OZMIXM' 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%ozmixm grid%tail_statevars%num_table => ozmixm_num_table grid%tail_statevars%index_table => ozmixm_index_table grid%tail_statevars%boundary_table => ozmixm_boundary_table grid%tail_statevars%dname_table => ozmixm_dname_table grid%tail_statevars%desc_table => ozmixm_desc_table grid%tail_statevars%units_table => ozmixm_units_table grid%tail_statevars%streams_table => ozmixm_streams_table 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%levsiz grid%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%levsiz grid%tail_statevars%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%levsiz grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'levsiz' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ozmixm(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10932,& 'frame/module_domain.f: Failed to allocate grid%ozmixm(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pin').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%levsiz)-(1)+1))) * 4 nba = & ((((model_config_rec%levsiz)-(1)+1))) * 4 ALLOCATE(grid%pin(1:model_config_rec%levsiz),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10943,& 'frame/module_domain.f: Failed to allocate grid%pin(1:model_config_rec%levsiz). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pin' grid%tail_statevars%DataName = 'PIN' grid%tail_statevars%Description = 'PRESSURE LEVEL OF OZONE MIXING RATIO' grid%tail_statevars%Units = 'millibar' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%pin grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%levsiz 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%levsiz 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%levsiz grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'levsiz' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%pin(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",10991,& 'frame/module_domain.f: Failed to allocate grid%pin(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'m_ps_1').AND.(.NOT.grid%is_intermediate).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%m_ps_1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11002,& 'frame/module_domain.f: Failed to allocate grid%m_ps_1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_ps_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 = 'm_ps_1' grid%tail_statevars%DataName = 'M_PS_1' grid%tail_statevars%Description = 'PS from MATCH on WRF grids' 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 = 201 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%m_ps_1 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%m_ps_1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11052,& 'frame/module_domain.f: Failed to allocate grid%m_ps_1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'m_ps_2').AND.(.NOT.grid%is_intermediate).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%m_ps_2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11063,& 'frame/module_domain.f: Failed to allocate grid%m_ps_2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_ps_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 = 'm_ps_2' grid%tail_statevars%DataName = 'M_PS_2' grid%tail_statevars%Description = 'PS from MATCH on WRF grids' 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 = 202 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%m_ps_2 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%m_ps_2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11113,& 'frame/module_domain.f: Failed to allocate grid%m_ps_2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerosolc_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * 4 ALLOCATE(grid%aerosolc_1(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11124,& 'frame/module_domain.f: Failed to allocate grid%aerosolc_1(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerosolc_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 = 'aerosolc_1' grid%tail_statevars%DataName = 'AEROSOLC_1' 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 = 201 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%aerosolc_1 grid%tail_statevars%num_table => aerosolc_num_table grid%tail_statevars%index_table => aerosolc_index_table grid%tail_statevars%boundary_table => aerosolc_boundary_table grid%tail_statevars%dname_table => aerosolc_dname_table grid%tail_statevars%desc_table => aerosolc_desc_table grid%tail_statevars%units_table => aerosolc_units_table grid%tail_statevars%streams_table => aerosolc_streams_table 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%paerlev grid%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%paerlev grid%tail_statevars%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%paerlev grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'paerlev' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aerosolc_1(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11181,& 'frame/module_domain.f: Failed to allocate grid%aerosolc_1(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerosolc_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * 4 ALLOCATE(grid%aerosolc_2(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11192,& 'frame/module_domain.f: Failed to allocate grid%aerosolc_2(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerosolc_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 = 'aerosolc_2' grid%tail_statevars%DataName = 'AEROSOLC_2' 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 = 202 grid%tail_statevars%Ndim = 4 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .TRUE. grid%tail_statevars%rfield_4d => grid%aerosolc_2 grid%tail_statevars%num_table => aerosolc_num_table grid%tail_statevars%index_table => aerosolc_index_table grid%tail_statevars%boundary_table => aerosolc_boundary_table grid%tail_statevars%dname_table => aerosolc_dname_table grid%tail_statevars%desc_table => aerosolc_desc_table grid%tail_statevars%units_table => aerosolc_units_table grid%tail_statevars%streams_table => aerosolc_streams_table 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%paerlev grid%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%paerlev grid%tail_statevars%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%paerlev grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'paerlev' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%aerosolc_2(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11249,& 'frame/module_domain.f: Failed to allocate grid%aerosolc_2(1,1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'m_hybi').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%paerlev)-(1)+1))) * 4 nba = & ((((model_config_rec%paerlev)-(1)+1))) * 4 ALLOCATE(grid%m_hybi(1:model_config_rec%paerlev),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11260,& 'frame/module_domain.f: Failed to allocate grid%m_hybi(1:model_config_rec%paerlev). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_hybi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'm_hybi' grid%tail_statevars%DataName = 'M_HYBI' grid%tail_statevars%Description = 'MATCH hybi' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%m_hybi grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = 1 grid%tail_statevars%ed1 = config_flags%paerlev 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%paerlev 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%paerlev grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'paerlev' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%m_hybi(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11308,& 'frame/module_domain.f: Failed to allocate grid%m_hybi(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'f_ice_phy'))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%f_ice_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11319,& 'frame/module_domain.f: Failed to allocate grid%f_ice_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_ice_phy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'f_ice_phy' grid%tail_statevars%DataName = 'F_ICE_PHY' grid%tail_statevars%Description = 'FRACTION OF ICE' 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%f_ice_phy grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%f_ice_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11369,& 'frame/module_domain.f: Failed to allocate grid%f_ice_phy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'f_rain_phy'))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%f_rain_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11380,& 'frame/module_domain.f: Failed to allocate grid%f_rain_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_rain_phy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'f_rain_phy' grid%tail_statevars%DataName = 'F_RAIN_PHY' grid%tail_statevars%Description = 'FRACTION OF RAIN ' 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%f_rain_phy grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%f_rain_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11430,& 'frame/module_domain.f: Failed to allocate grid%f_rain_phy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'f_rimef_phy'))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%f_rimef_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11441,& 'frame/module_domain.f: Failed to allocate grid%f_rimef_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_rimef_phy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'f_rimef_phy' grid%tail_statevars%DataName = 'F_RIMEF_PHY' grid%tail_statevars%Description = 'MASS RATIO OF RIMED ICE ' 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%f_rimef_phy grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%f_rimef_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11491,& 'frame/module_domain.f: Failed to allocate grid%f_rimef_phy(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qndropsource').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%qndropsource(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11502,& 'frame/module_domain.f: Failed to allocate grid%qndropsource(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qndropsource=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qndropsource' grid%tail_statevars%DataName = 'QNDROPSOURCE' grid%tail_statevars%Description = 'Droplet number source' grid%tail_statevars%Units = ' /kg/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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%qndropsource 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%qndropsource(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11552,& 'frame/module_domain.f: Failed to allocate grid%qndropsource(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_tmp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_tmp(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11563,& 'frame/module_domain.f: Failed to allocate grid%om_tmp(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_tmp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_tmp' grid%tail_statevars%DataName = 'OM_TMP' grid%tail_statevars%Description = 'temperature' grid%tail_statevars%Units = 'k' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = 'Z' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%om_tmp 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 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_tmp(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11613,& 'frame/module_domain.f: Failed to allocate grid%om_tmp(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_s'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_s(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11624,& 'frame/module_domain.f: Failed to allocate grid%om_s(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_s=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_s' grid%tail_statevars%DataName = 'OM_S' grid%tail_statevars%Description = 'salinity' grid%tail_statevars%Units = 'degree' 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%om_s 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 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_s(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11674,& 'frame/module_domain.f: Failed to allocate grid%om_s(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_depth'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_depth(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11685,& 'frame/module_domain.f: Failed to allocate grid%om_depth(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_depth=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_depth' grid%tail_statevars%DataName = 'OM_DEPTH' grid%tail_statevars%Description = 'depth' 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%om_depth 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 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_depth(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11735,& 'frame/module_domain.f: Failed to allocate grid%om_depth(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_u'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_u(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11746,& 'frame/module_domain.f: Failed to allocate grid%om_u(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_u' grid%tail_statevars%DataName = 'OM_U' grid%tail_statevars%Description = 'u current' grid%tail_statevars%Units = 'm/s' 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%om_u 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 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_u(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11796,& 'frame/module_domain.f: Failed to allocate grid%om_u(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_v'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_v(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11807,& 'frame/module_domain.f: Failed to allocate grid%om_v(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_v' grid%tail_statevars%DataName = 'OM_V' grid%tail_statevars%Description = 'v current' grid%tail_statevars%Units = 'm/s' 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%om_v 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 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_v(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11857,& 'frame/module_domain.f: Failed to allocate grid%om_v(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_lat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_lat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11868,& 'frame/module_domain.f: Failed to allocate grid%om_lat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_lat=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_lat' grid%tail_statevars%DataName = 'OM_LAT' grid%tail_statevars%Description = 'om lat' grid%tail_statevars%Units = 'degree' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%om_lat 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%om_lat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11918,& 'frame/module_domain.f: Failed to allocate grid%om_lat(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_lon'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_lon(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11929,& 'frame/module_domain.f: Failed to allocate grid%om_lon(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_lon=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_lon' grid%tail_statevars%DataName = 'OM_LON' grid%tail_statevars%Description = 'om lon' grid%tail_statevars%Units = 'degree' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%om_lon 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%om_lon(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11979,& 'frame/module_domain.f: Failed to allocate grid%om_lon(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_ml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_ml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",11990,& 'frame/module_domain.f: Failed to allocate grid%om_ml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_ml=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_ml' grid%tail_statevars%DataName = 'OM_ML' grid%tail_statevars%Description = 'om ml' 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%om_ml 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%om_ml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12040,& 'frame/module_domain.f: Failed to allocate grid%om_ml(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_tini'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_tini(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12051,& 'frame/module_domain.f: Failed to allocate grid%om_tini(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_tini=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_tini' grid%tail_statevars%DataName = 'OM_TINI' grid%tail_statevars%Description = 'temperature init' 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%om_tini grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_tini(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12101,& 'frame/module_domain.f: Failed to allocate grid%om_tini(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'om_sini'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((model_config_rec%ocean_levels)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%om_sini(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12112,& 'frame/module_domain.f: Failed to allocate grid%om_sini(sm31:em31,1:model_config_rec%ocean_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%om_sini=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'om_sini' grid%tail_statevars%DataName = 'OM_SINI' grid%tail_statevars%Description = 'salinity init' grid%tail_statevars%Units = 'degree' 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%om_sini grid%tail_statevars%streams(1) = 234881024 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = config_flags%ocean_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%ocean_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%ocean_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 = 'ocean_layer_stag' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%om_sini(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12162,& 'frame/module_domain.f: Failed to allocate grid%om_sini(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cupflag').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cupflag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12173,& 'frame/module_domain.f: Failed to allocate grid%cupflag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cupflag=.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 = 'cupflag' grid%tail_statevars%DataName = 'CUPFLAG' grid%tail_statevars%Description = 'CuP scheme activavted, T=yes, F=no' 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_2d => grid%cupflag 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%cupflag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12223,& 'frame/module_domain.f: Failed to allocate grid%cupflag(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slopesfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slopesfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12234,& 'frame/module_domain.f: Failed to allocate grid%slopesfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slopesfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slopesfc' grid%tail_statevars%DataName = 'SLOPESFC' grid%tail_statevars%Description = 'Slope of surface layer dTheta/dMixRatio' 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%slopesfc 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%slopesfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12284,& 'frame/module_domain.f: Failed to allocate grid%slopesfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slopeez').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slopeez(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12295,& 'frame/module_domain.f: Failed to allocate grid%slopeez(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slopeez=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slopeez' grid%tail_statevars%DataName = 'SLOPEEZ' grid%tail_statevars%Description = 'Slope of entrainment layer dTheta/dMixRatio' 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%slopeez 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%slopeez(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12345,& 'frame/module_domain.f: Failed to allocate grid%slopeez(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sigmasfc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sigmasfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12356,& 'frame/module_domain.f: Failed to allocate grid%sigmasfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sigmasfc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sigmasfc' grid%tail_statevars%DataName = 'SIGMASFC' grid%tail_statevars%Description = 'Std. dev. of surface layer dTheta/dMixRatio' grid%tail_statevars%Units = 'K 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%sigmasfc 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%sigmasfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12406,& 'frame/module_domain.f: Failed to allocate grid%sigmasfc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sigmaez').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sigmaez(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12417,& 'frame/module_domain.f: Failed to allocate grid%sigmaez(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sigmaez=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sigmaez' grid%tail_statevars%DataName = 'SIGMAEZ' grid%tail_statevars%Description = 'Std. dev. of entrainment layer dTheta/dMixRatio' grid%tail_statevars%Units = 'K 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%sigmaez 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%sigmaez(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12467,& 'frame/module_domain.f: Failed to allocate grid%sigmaez(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shall').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shall(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12478,& 'frame/module_domain.f: Failed to allocate grid%shall(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shall=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'shall' grid%tail_statevars%DataName = 'SHALL' grid%tail_statevars%Description = 'Cumulus type, 0=deep, 1=shallow, 2=none' 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%shall 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%shall(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12528,& 'frame/module_domain.f: Failed to allocate grid%shall(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taucloud').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taucloud(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12539,& 'frame/module_domain.f: Failed to allocate grid%taucloud(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taucloud=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taucloud' grid%tail_statevars%DataName = 'TAUCLOUD' grid%tail_statevars%Description = 'CuP cloud time scale for lifetime' 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%taucloud 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%taucloud(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12589,& 'frame/module_domain.f: Failed to allocate grid%taucloud(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tactive').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tactive(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12600,& 'frame/module_domain.f: Failed to allocate grid%tactive(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tactive=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tactive' grid%tail_statevars%DataName = 'TACTIVE' grid%tail_statevars%Description = 'CuP cloud formation time scale' 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%tactive 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%tactive(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12650,& 'frame/module_domain.f: Failed to allocate grid%tactive(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tcloud_cup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tcloud_cup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12661,& 'frame/module_domain.f: Failed to allocate grid%tcloud_cup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tcloud_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tcloud_cup' grid%tail_statevars%DataName = 'TCLOUD_CUP' grid%tail_statevars%Description = 'CuP cloud duration for modifying T,QV,chem,etc' 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%tcloud_cup 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%tcloud_cup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12711,& 'frame/module_domain.f: Failed to allocate grid%tcloud_cup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wcloudbase').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wcloudbase(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12722,& 'frame/module_domain.f: Failed to allocate grid%wcloudbase(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wcloudbase=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wcloudbase' grid%tail_statevars%DataName = 'WCLOUDBASE' grid%tail_statevars%Description = 'CuP cloud base vertical velocity' 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%wcloudbase 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%wcloudbase(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12772,& 'frame/module_domain.f: Failed to allocate grid%wcloudbase(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'activefrac').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%activefrac(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12783,& 'frame/module_domain.f: Failed to allocate grid%activefrac(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%activefrac=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'activefrac' grid%tail_statevars%DataName = 'ACTIVEFRAC' grid%tail_statevars%Description = 'Fraction of PDF the forms clouds' 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%activefrac 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%activefrac(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12833,& 'frame/module_domain.f: Failed to allocate grid%activefrac(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfratend_cup').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%cldfratend_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12844,& 'frame/module_domain.f: Failed to allocate grid%cldfratend_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfratend_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfratend_cup' grid%tail_statevars%DataName = 'CLDFRATEND_CUP' grid%tail_statevars%Description = 'Cloud fraction tendency due to CuP Scheme' grid%tail_statevars%Units = 'fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cldfratend_cup 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%cldfratend_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12894,& 'frame/module_domain.f: Failed to allocate grid%cldfratend_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra_cup').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%cldfra_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12905,& 'frame/module_domain.f: Failed to allocate grid%cldfra_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfra_cup' grid%tail_statevars%DataName = 'CLDFRA_CUP' grid%tail_statevars%Description = 'Cloud fraction due to CuP Scheme' grid%tail_statevars%Units = 'fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cldfra_cup 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%cldfra_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12955,& 'frame/module_domain.f: Failed to allocate grid%cldfra_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'updfra_cup').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%updfra_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",12966,& 'frame/module_domain.f: Failed to allocate grid%updfra_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%updfra_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'updfra_cup' grid%tail_statevars%DataName = 'UPDFRA_CUP' grid%tail_statevars%Description = 'Updraft fractional area due to CuP Scheme' grid%tail_statevars%Units = 'fraction' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%updfra_cup 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%updfra_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13016,& 'frame/module_domain.f: Failed to allocate grid%updfra_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_iu_cup').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_iu_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13027,& 'frame/module_domain.f: Failed to allocate grid%qc_iu_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_iu_cup=initial_data_value IF (.NOT.grid%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_iu_cup' grid%tail_statevars%DataName = 'QC_IU_CUP' grid%tail_statevars%Description = 'Cloud water due to CuP Scheme (in cumulus updraft)' 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%qc_iu_cup 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%qc_iu_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13077,& 'frame/module_domain.f: Failed to allocate grid%qc_iu_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_ic_cup').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_ic_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13088,& 'frame/module_domain.f: Failed to allocate grid%qc_ic_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_ic_cup=initial_data_value IF (.NOT.grid%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_ic_cup' grid%tail_statevars%DataName = 'QC_IC_CUP' grid%tail_statevars%Description = 'Cloud water due to CuP Scheme (in cumulus cloud)' 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%qc_ic_cup 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%qc_ic_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13138,& 'frame/module_domain.f: Failed to allocate grid%qc_ic_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qndrop_ic_cup').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%qndrop_ic_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13149,& 'frame/module_domain.f: Failed to allocate grid%qndrop_ic_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qndrop_ic_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qndrop_ic_cup' grid%tail_statevars%DataName = 'QNDROP_IC_CUP' grid%tail_statevars%Description = 'Cloud droplet number due to CuP Scheme (in cumulus cloud)' grid%tail_statevars%Units = ' 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%qndrop_ic_cup 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%qndrop_ic_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13199,& 'frame/module_domain.f: Failed to allocate grid%qndrop_ic_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wup_cup').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%wup_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13210,& 'frame/module_domain.f: Failed to allocate grid%wup_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wup_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wup_cup' grid%tail_statevars%DataName = 'WUP_CUP' grid%tail_statevars%Description = 'Updraft vertical velocity' 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%wup_cup 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%wup_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13260,& 'frame/module_domain.f: Failed to allocate grid%wup_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wact_cup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wact_cup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13271,& 'frame/module_domain.f: Failed to allocate grid%wact_cup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wact_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wact_cup' grid%tail_statevars%DataName = 'WACT_CUP' grid%tail_statevars%Description = 'CuP cloud base vertical velocity for activation' 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%wact_cup 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%wact_cup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13321,& 'frame/module_domain.f: Failed to allocate grid%wact_cup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wulcl_cup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wulcl_cup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13332,& 'frame/module_domain.f: Failed to allocate grid%wulcl_cup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wulcl_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wulcl_cup' grid%tail_statevars%DataName = 'WULCL_CUP' grid%tail_statevars%Description = 'CuP updraft vertical velocity at top of first cloud layer' 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%wulcl_cup 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%wulcl_cup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13382,& 'frame/module_domain.f: Failed to allocate grid%wulcl_cup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mfup_cup').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%mfup_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13393,& 'frame/module_domain.f: Failed to allocate grid%mfup_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mfup_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mfup_cup' grid%tail_statevars%DataName = 'MFUP_CUP' grid%tail_statevars%Description = 'Updraft mass flux for shallow-cu in CuP Scheme' grid%tail_statevars%Units = 'kg m-2 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%mfup_cup 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%mfup_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13443,& 'frame/module_domain.f: Failed to allocate grid%mfup_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mfup_ent_cup').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%mfup_ent_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13454,& 'frame/module_domain.f: Failed to allocate grid%mfup_ent_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mfup_ent_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mfup_ent_cup' grid%tail_statevars%DataName = 'MFUP_ENT_CUP' grid%tail_statevars%Description = 'Updraft mass flux entrainment (across layer) for shallow-cu in CuP Scheme' grid%tail_statevars%Units = 'kg m-2 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%mfup_ent_cup 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%mfup_ent_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13504,& 'frame/module_domain.f: Failed to allocate grid%mfup_ent_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mfdn_cup').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%mfdn_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13515,& 'frame/module_domain.f: Failed to allocate grid%mfdn_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mfdn_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mfdn_cup' grid%tail_statevars%DataName = 'MFDN_CUP' grid%tail_statevars%Description = 'Downdraft mass flux for shallow-cu in CuP Scheme' grid%tail_statevars%Units = 'kg m-2 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%mfdn_cup 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%mfdn_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13565,& 'frame/module_domain.f: Failed to allocate grid%mfdn_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mfdn_ent_cup').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%mfdn_ent_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13576,& 'frame/module_domain.f: Failed to allocate grid%mfdn_ent_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mfdn_ent_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mfdn_ent_cup' grid%tail_statevars%DataName = 'MFDN_ENT_CUP' grid%tail_statevars%Description = 'Downdraft mass flux entrainment (across layer) for shallow-cu in CuP Scheme' grid%tail_statevars%Units = 'kg m-2 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%mfdn_ent_cup 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%mfdn_ent_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13626,& 'frame/module_domain.f: Failed to allocate grid%mfdn_ent_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fcvt_qc_to_pr_cup').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%fcvt_qc_to_pr_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13637,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qc_to_pr_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcvt_qc_to_pr_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fcvt_qc_to_pr_cup' grid%tail_statevars%DataName = 'FCVT_QC_TO_PR_CUP' grid%tail_statevars%Description = 'Fraction of cloudwater converted to precip. as air rises thru an updraft layer' 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%fcvt_qc_to_pr_cup 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%fcvt_qc_to_pr_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13687,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qc_to_pr_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fcvt_qc_to_qi_cup').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%fcvt_qc_to_qi_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13698,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qc_to_qi_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcvt_qc_to_qi_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fcvt_qc_to_qi_cup' grid%tail_statevars%DataName = 'FCVT_QC_TO_QI_CUP' grid%tail_statevars%Description = 'Fraction of cloudwater converted to cloudice as air rises thru an updraft layer' 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%fcvt_qc_to_qi_cup 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%fcvt_qc_to_qi_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13748,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qc_to_qi_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'fcvt_qi_to_pr_cup').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%fcvt_qi_to_pr_cup(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13759,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qi_to_pr_cup(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcvt_qi_to_pr_cup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'fcvt_qi_to_pr_cup' grid%tail_statevars%DataName = 'FCVT_QI_TO_PR_CUP' grid%tail_statevars%Description = 'Fraction of cloudice converted to precip. as air rises thru an updraft layer' 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%fcvt_qi_to_pr_cup 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%fcvt_qi_to_pr_cup(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13809,& 'frame/module_domain.f: Failed to allocate grid%fcvt_qi_to_pr_cup(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tstar').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tstar(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13820,& 'frame/module_domain.f: Failed to allocate grid%tstar(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tstar=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tstar' grid%tail_statevars%DataName = 'TSTAR' grid%tail_statevars%Description = 'Boundary layer time scale' grid%tail_statevars%Units = '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%tstar 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%tstar(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13870,& 'frame/module_domain.f: Failed to allocate grid%tstar(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lnterms').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%lnterms(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13881,& 'frame/module_domain.f: Failed to allocate grid%lnterms(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lnterms=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lnterms' grid%tail_statevars%DataName = 'LNTERMS' grid%tail_statevars%Description = 'Liquid+ice+1 ln term for cloud fraction' 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%lnterms 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%lnterms(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13931,& 'frame/module_domain.f: Failed to allocate grid%lnterms(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lnint').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lnint(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13942,& 'frame/module_domain.f: Failed to allocate grid%lnint(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lnint=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'lnint' grid%tail_statevars%DataName = 'LNINT' grid%tail_statevars%Description = 'Integrated ln term for 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 = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%lnint 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%lnint(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",13992,& 'frame/module_domain.f: Failed to allocate grid%lnint(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'h_diabatic'))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%h_diabatic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14003,& 'frame/module_domain.f: Failed to allocate grid%h_diabatic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h_diabatic=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'h_diabatic' grid%tail_statevars%DataName = 'H_DIABATIC' grid%tail_statevars%Description = 'MICROPHYSICS LATENT HEATING' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%h_diabatic 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%h_diabatic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14053,& 'frame/module_domain.f: Failed to allocate grid%h_diabatic(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_diabatic'))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%qv_diabatic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14064,& 'frame/module_domain.f: Failed to allocate grid%qv_diabatic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_diabatic=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_diabatic' grid%tail_statevars%DataName = 'QV_DIABATIC' grid%tail_statevars%Description = 'MICROPHYSICS QV TENDENCY' grid%tail_statevars%Units = 'g g-1 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%qv_diabatic 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%qv_diabatic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14114,& 'frame/module_domain.f: Failed to allocate grid%qv_diabatic(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_diabatic'))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_diabatic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14125,& 'frame/module_domain.f: Failed to allocate grid%qc_diabatic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_diabatic=initial_data_value IF (.NOT.grid%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_diabatic' grid%tail_statevars%DataName = 'QC_DIABATIC' grid%tail_statevars%Description = 'MICROPHYSICS QC TENDENCY' grid%tail_statevars%Units = 'g g-1 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%qc_diabatic 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%qc_diabatic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14175,& 'frame/module_domain.f: Failed to allocate grid%qc_diabatic(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msft'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msft(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14186,& 'frame/module_domain.f: Failed to allocate grid%msft(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msft=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msft' grid%tail_statevars%DataName = 'MAPFAC_M' grid%tail_statevars%Description = 'Map scale factor on mass grid' 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%msft 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%msft(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14236,& 'frame/module_domain.f: Failed to allocate grid%msft(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfu'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14247,& 'frame/module_domain.f: Failed to allocate grid%msfu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfu' grid%tail_statevars%DataName = 'MAPFAC_U' grid%tail_statevars%Description = 'Map scale factor on u-grid' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfu grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14297,& 'frame/module_domain.f: Failed to allocate grid%msfu(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14308,& 'frame/module_domain.f: Failed to allocate grid%msfv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfv' grid%tail_statevars%DataName = 'MAPFAC_V' grid%tail_statevars%Description = 'Map scale factor on v-grid' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfv 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 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14358,& 'frame/module_domain.f: Failed to allocate grid%msfv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msftx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msftx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14369,& 'frame/module_domain.f: Failed to allocate grid%msftx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msftx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msftx' grid%tail_statevars%DataName = 'MAPFAC_MX' grid%tail_statevars%Description = 'Map scale factor on mass grid, x direction' 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%msftx 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%msftx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14419,& 'frame/module_domain.f: Failed to allocate grid%msftx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfty'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfty(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14430,& 'frame/module_domain.f: Failed to allocate grid%msfty(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfty=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfty' grid%tail_statevars%DataName = 'MAPFAC_MY' grid%tail_statevars%Description = 'Map scale factor on mass grid, y direction' 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%msfty 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%msfty(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14480,& 'frame/module_domain.f: Failed to allocate grid%msfty(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfux'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfux(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14491,& 'frame/module_domain.f: Failed to allocate grid%msfux(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfux=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfux' grid%tail_statevars%DataName = 'MAPFAC_UX' grid%tail_statevars%Description = 'Map scale factor on u-grid, x direction' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfux grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfux(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14541,& 'frame/module_domain.f: Failed to allocate grid%msfux(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfuy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfuy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14552,& 'frame/module_domain.f: Failed to allocate grid%msfuy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfuy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfuy' grid%tail_statevars%DataName = 'MAPFAC_UY' grid%tail_statevars%Description = 'Map scale factor on u-grid, y direction' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'X' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfuy grid%tail_statevars%streams(1) = 234881025 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = ide grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( ide, ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east_stag' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfuy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14602,& 'frame/module_domain.f: Failed to allocate grid%msfuy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfvx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfvx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14613,& 'frame/module_domain.f: Failed to allocate grid%msfvx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfvx' grid%tail_statevars%DataName = 'MAPFAC_VX' grid%tail_statevars%Description = 'Map scale factor on v-grid, x direction' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfvx 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 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfvx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14663,& 'frame/module_domain.f: Failed to allocate grid%msfvx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfvx_inv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfvx_inv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14674,& 'frame/module_domain.f: Failed to allocate grid%msfvx_inv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvx_inv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfvx_inv' grid%tail_statevars%DataName = 'MF_VX_INV' grid%tail_statevars%Description = 'Inverse map scale factor on v-grid, x direction' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfvx_inv 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 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfvx_inv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14724,& 'frame/module_domain.f: Failed to allocate grid%msfvx_inv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'msfvy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%msfvy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14735,& 'frame/module_domain.f: Failed to allocate grid%msfvy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvy=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'msfvy' grid%tail_statevars%DataName = 'MAPFAC_VY' grid%tail_statevars%Description = 'Map scale factor on v-grid, y direction' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = 'Y' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%msfvy 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 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( jde, jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north_stag' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%msfvy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14785,& 'frame/module_domain.f: Failed to allocate grid%msfvy(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'f'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%f(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14796,& 'frame/module_domain.f: Failed to allocate grid%f(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'f' grid%tail_statevars%DataName = 'F' grid%tail_statevars%Description = 'Coriolis sine latitude term' grid%tail_statevars%Units = 's-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%f 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%f(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14846,& 'frame/module_domain.f: Failed to allocate grid%f(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'e'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%e(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14857,& 'frame/module_domain.f: Failed to allocate grid%e(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%e=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'e' grid%tail_statevars%DataName = 'E' grid%tail_statevars%Description = 'Coriolis cosine latitude term' grid%tail_statevars%Units = 's-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%e 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%e(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14907,& 'frame/module_domain.f: Failed to allocate grid%e(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sina'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sina(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14918,& 'frame/module_domain.f: Failed to allocate grid%sina(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sina=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sina' grid%tail_statevars%DataName = 'SINALPHA' grid%tail_statevars%Description = 'Local sine of map rotation' 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%sina 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%sina(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14968,& 'frame/module_domain.f: Failed to allocate grid%sina(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cosa'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cosa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",14979,& 'frame/module_domain.f: Failed to allocate grid%cosa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cosa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cosa' grid%tail_statevars%DataName = 'COSALPHA' grid%tail_statevars%Description = 'Local cosine of map rotation' 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%cosa 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%cosa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15029,& 'frame/module_domain.f: Failed to allocate grid%cosa(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15040,& 'frame/module_domain.f: Failed to allocate grid%ht(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht' grid%tail_statevars%DataName = 'HGT' grid%tail_statevars%Description = 'Terrain Height' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht grid%tail_statevars%streams(1) = 234881121 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15090,& 'frame/module_domain.f: Failed to allocate grid%ht(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_fine').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_fine(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15101,& 'frame/module_domain.f: Failed to allocate grid%ht_fine(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_fine=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_fine' grid%tail_statevars%DataName = 'HGT_FINE' grid%tail_statevars%Description = 'Fine Terrain 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%ht_fine grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ht_fine(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15151,& 'frame/module_domain.f: Failed to allocate grid%ht_fine(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_int').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_int(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15162,& 'frame/module_domain.f: Failed to allocate grid%ht_int(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_int=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_int' grid%tail_statevars%DataName = 'HGT_INT' grid%tail_statevars%Description = 'Terrain Height Horizontally Interpolated' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht_int 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%ht_int(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15212,& 'frame/module_domain.f: Failed to allocate grid%ht_int(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_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%ht_input(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15223,& 'frame/module_domain.f: Failed to allocate grid%ht_input(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_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 = 'ht_input' grid%tail_statevars%DataName = 'HGT_INPUT' grid%tail_statevars%Description = 'Terrain Height from FG Input File' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht_input 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%ht_input(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15273,& 'frame/module_domain.f: Failed to allocate grid%ht_input(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_smooth').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_smooth(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15284,& 'frame/module_domain.f: Failed to allocate grid%ht_smooth(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_smooth=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_smooth' grid%tail_statevars%DataName = 'HGT_SMOOTH' grid%tail_statevars%Description = 'Terrain Height Smoothed with External Model Topo (d1 only)' grid%tail_statevars%Units = 'm' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ht_smooth 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%ht_smooth(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15334,& 'frame/module_domain.f: Failed to allocate grid%ht_smooth(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ht_shad'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ht_shad(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15345,& 'frame/module_domain.f: Failed to allocate grid%ht_shad(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ht_shad' grid%tail_statevars%DataName = 'HGT_SHAD' grid%tail_statevars%Description = 'Height of orographic shadow' 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%ht_shad grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ht_shad(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15395,& 'frame/module_domain.f: Failed to allocate grid%ht_shad(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%ht_shad_bxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15404,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_bxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15412,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_bys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15420,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_bye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15428,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bye=initial_data_value ELSE ALLOCATE(grid%ht_shad_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15435,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxs(1,1,1). ') endif ALLOCATE(grid%ht_shad_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15440,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxe(1,1,1). ') endif ALLOCATE(grid%ht_shad_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15445,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_bys(1,1,1). ') endif ALLOCATE(grid%ht_shad_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15450,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_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%ht_shad_btxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15459,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_btxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15467,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_btys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15475,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * 4 ALLOCATE(grid%ht_shad_btye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15483,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btye=initial_data_value ELSE ALLOCATE(grid%ht_shad_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15490,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxs(1,1,1). ') endif ALLOCATE(grid%ht_shad_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15495,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxe(1,1,1). ') endif ALLOCATE(grid%ht_shad_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15500,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btys(1,1,1). ') endif ALLOCATE(grid%ht_shad_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15505,& 'frame/module_domain.f: Failed to allocate grid%ht_shad_btye(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'shadowmask').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%shadowmask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15516,& 'frame/module_domain.f: Failed to allocate grid%shadowmask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shadowmask=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 = 'shadowmask' grid%tail_statevars%DataName = 'SHADOWMASK' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%shadowmask 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%shadowmask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15566,& 'frame/module_domain.f: Failed to allocate grid%shadowmask(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 = 'min_ptchsz' grid%tail_statevars%DataName = 'MIN_PTCHSZ' grid%tail_statevars%Description = '-' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'i' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_0d => grid%min_ptchsz grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%min_ptchsz=0 IF(okay_to_alloc.AND.in_use_for_config(id,'tsk'))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(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15596,& 'frame/module_domain.f: Failed to allocate grid%tsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsk' grid%tail_statevars%DataName = 'TSK' grid%tail_statevars%Description = '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 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%tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15646,& 'frame/module_domain.f: Failed to allocate grid%tsk(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'dfi_tsk').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%dfi_tsk(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15657,& 'frame/module_domain.f: Failed to allocate grid%dfi_tsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tsk=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'dfi_tsk' grid%tail_statevars%DataName = 'TSK_DFI' grid%tail_statevars%Description = 'saved SURFACE SKIN TEMPERATURE' 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%dfi_tsk grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%dfi_tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15707,& 'frame/module_domain.f: Failed to allocate grid%dfi_tsk(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tsk_save').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tsk_save(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15718,& 'frame/module_domain.f: Failed to allocate grid%tsk_save(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_save=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tsk_save' grid%tail_statevars%DataName = 'TSK_SAVE' grid%tail_statevars%Description = 'SURFACE SKIN TEMPERATURE, EXTRA COPY FOR SEA ICE TESTS in REAL' 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_save 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_save(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15768,& 'frame/module_domain.f: Failed to allocate grid%tsk_save(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_base').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%u_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15779,& 'frame/module_domain.f: Failed to allocate grid%u_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_base=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u_base' grid%tail_statevars%DataName = 'U_BASE' grid%tail_statevars%Description = 'BASE STATE X WIND IN IDEALIZED CASES' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%u_base grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15827,& 'frame/module_domain.f: Failed to allocate grid%u_base(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_base').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%v_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15838,& 'frame/module_domain.f: Failed to allocate grid%v_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_base=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v_base' grid%tail_statevars%DataName = 'V_BASE' grid%tail_statevars%Description = 'BASE STATE Y WIND IN IDEALIZED CASES' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%v_base grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15886,& 'frame/module_domain.f: Failed to allocate grid%v_base(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_base').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%qv_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15897,& 'frame/module_domain.f: Failed to allocate grid%qv_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_base=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qv_base' grid%tail_statevars%DataName = 'QV_BASE' grid%tail_statevars%Description = 'BASE STATE QV IN IDEALIZED CASES' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%qv_base grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%qv_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15945,& 'frame/module_domain.f: Failed to allocate grid%qv_base(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'z_base').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%z_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",15956,& 'frame/module_domain.f: Failed to allocate grid%z_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_base=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'z_base' grid%tail_statevars%DataName = 'Z_BASE' grid%tail_statevars%Description = 'BASE STATE HEIGHT IN IDEALIZED CASES' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%z_base grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = kds grid%tail_statevars%ed1 = (kde-1) grid%tail_statevars%sd2 = 1 grid%tail_statevars%ed2 = 1 grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = kms grid%tail_statevars%em1 = kme grid%tail_statevars%sm2 = 1 grid%tail_statevars%em2 = 1 grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = kps grid%tail_statevars%ep1 = MIN( (kde-1), kpe ) grid%tail_statevars%sp2 = 1 grid%tail_statevars%ep2 = 1 grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%dimname1 = 'bottom_top' grid%tail_statevars%dimname2 = '' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%z_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16004,& 'frame/module_domain.f: Failed to allocate grid%z_base(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 = 'u_frame' grid%tail_statevars%DataName = 'U_FRAME' grid%tail_statevars%Description = 'FRAME X WIND' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%u_frame grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%u_frame=initial_data_value IF (.NOT.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 = 'v_frame' grid%tail_statevars%DataName = 'V_FRAME' grid%tail_statevars%Description = 'FRAME Y WIND' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%v_frame grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%v_frame=initial_data_value IF (.NOT.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 = 'just_read_auxinput4' grid%tail_statevars%DataName = 'WE_JUST_READ_SST' grid%tail_statevars%Description = '1=AUXINPUT4 ALARM RINGING, 0=NO AUXINPUT4 ALARM' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%just_read_auxinput4 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%just_read_auxinput4=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'just_read_boundary' grid%tail_statevars%DataName = 'WE_JUST_D01_LBC' grid%tail_statevars%Description = '1=BOUNDARY ALARM RINGING, 0=NO BOUNDARY ALARM' grid%tail_statevars%Units = '-' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%just_read_boundary grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%just_read_boundary=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'mf_fft' grid%tail_statevars%DataName = 'MF_FFT' grid%tail_statevars%Description = 'Mass point map factor at equatorward FFT filter location' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%mf_fft grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%mf_fft=initial_data_value IF (.NOT.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 = 'p_top' grid%tail_statevars%DataName = 'P_TOP' grid%tail_statevars%Description = 'PRESSURE TOP OF THE MODEL' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%p_top grid%tail_statevars%streams(1) = 33554433 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%p_top=initial_data_value IF (.NOT.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 = 'got_var_sso' grid%tail_statevars%DataName = 'GOT_VAR_SSO' grid%tail_statevars%Description = 'whether VAR_SSO was included in WPS output (beginning V3.4)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%got_var_sso grid%tail_statevars%streams(1) = 167772160 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%got_var_sso=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'v4_metgrid' grid%tail_statevars%DataName = 'V4_METGRID' grid%tail_statevars%Description = 'for real, T/F: identify if this is v4 metgrid data' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'l' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%lfield_0d => grid%v4_metgrid grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 ENDIF IF ( setinitval .EQ. 3 ) grid%v4_metgrid=.FALSE. IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ll_t' grid%tail_statevars%DataName = 'LAT_LL_T' grid%tail_statevars%Description = 'latitude lower left, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ll_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ll_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ul_t' grid%tail_statevars%DataName = 'LAT_UL_T' grid%tail_statevars%Description = 'latitude up left, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ul_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ul_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ur_t' grid%tail_statevars%DataName = 'LAT_UR_T' grid%tail_statevars%Description = 'latitude up right, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ur_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ur_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_lr_t' grid%tail_statevars%DataName = 'LAT_LR_T' grid%tail_statevars%Description = 'latitude lower right, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_lr_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_lr_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ll_u' grid%tail_statevars%DataName = 'LAT_LL_U' grid%tail_statevars%Description = 'latitude lower left, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ll_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ll_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ul_u' grid%tail_statevars%DataName = 'LAT_UL_U' grid%tail_statevars%Description = 'latitude up left, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ul_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ul_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ur_u' grid%tail_statevars%DataName = 'LAT_UR_U' grid%tail_statevars%Description = 'latitude up right, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ur_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ur_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_lr_u' grid%tail_statevars%DataName = 'LAT_LR_U' grid%tail_statevars%Description = 'latitude lower right, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_lr_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_lr_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ll_v' grid%tail_statevars%DataName = 'LAT_LL_V' grid%tail_statevars%Description = 'latitude lower left, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ll_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ll_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ul_v' grid%tail_statevars%DataName = 'LAT_UL_V' grid%tail_statevars%Description = 'latitude up left, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ul_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ul_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ur_v' grid%tail_statevars%DataName = 'LAT_UR_V' grid%tail_statevars%Description = 'latitude up right, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ur_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ur_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_lr_v' grid%tail_statevars%DataName = 'LAT_LR_V' grid%tail_statevars%Description = 'latitude lower right, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_lr_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_lr_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lat_ll_d' grid%tail_statevars%DataName = 'LAT_LL_D' grid%tail_statevars%Description = 'latitude lower left, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ll_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ll_d=initial_data_value IF (.NOT.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 = 'lat_ul_d' grid%tail_statevars%DataName = 'LAT_UL_D' grid%tail_statevars%Description = 'latitude up left, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ul_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ul_d=initial_data_value IF (.NOT.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 = 'lat_ur_d' grid%tail_statevars%DataName = 'LAT_UR_D' grid%tail_statevars%Description = 'latitude up right, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_ur_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_ur_d=initial_data_value IF (.NOT.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 = 'lat_lr_d' grid%tail_statevars%DataName = 'LAT_LR_D' grid%tail_statevars%Description = 'latitude lower right, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lat_lr_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lat_lr_d=initial_data_value IF (.NOT.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 = 'lon_ll_t' grid%tail_statevars%DataName = 'LON_LL_T' grid%tail_statevars%Description = 'longitude lower left, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ll_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ll_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ul_t' grid%tail_statevars%DataName = 'LON_UL_T' grid%tail_statevars%Description = 'longitude up left, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ul_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ul_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ur_t' grid%tail_statevars%DataName = 'LON_UR_T' grid%tail_statevars%Description = 'longitude up right, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ur_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ur_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_lr_t' grid%tail_statevars%DataName = 'LON_LR_T' grid%tail_statevars%Description = 'longitude lower right, temp point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_lr_t grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_lr_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%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ll_u' grid%tail_statevars%DataName = 'LON_LL_U' grid%tail_statevars%Description = 'longitude lower left, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ll_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ll_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ul_u' grid%tail_statevars%DataName = 'LON_UL_U' grid%tail_statevars%Description = 'longitude up left, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ul_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ul_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ur_u' grid%tail_statevars%DataName = 'LON_UR_U' grid%tail_statevars%Description = 'longitude up right, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ur_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ur_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_lr_u' grid%tail_statevars%DataName = 'LON_LR_U' grid%tail_statevars%Description = 'longitude lower right, u point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_lr_u grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_lr_u=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ll_v' grid%tail_statevars%DataName = 'LON_LL_V' grid%tail_statevars%Description = 'longitude lower left, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ll_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ll_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ul_v' grid%tail_statevars%DataName = 'LON_UL_V' grid%tail_statevars%Description = 'longitude up left, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ul_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ul_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ur_v' grid%tail_statevars%DataName = 'LON_UR_V' grid%tail_statevars%Description = 'longitude up right, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ur_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ur_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_lr_v' grid%tail_statevars%DataName = 'LON_LR_V' grid%tail_statevars%Description = 'longitude lower right, v point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_lr_v grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_lr_v=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%VarName = 'lon_ll_d' grid%tail_statevars%DataName = 'LON_LL_D' grid%tail_statevars%Description = 'longitude lower left, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ll_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ll_d=initial_data_value IF (.NOT.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 = 'lon_ul_d' grid%tail_statevars%DataName = 'LON_UL_D' grid%tail_statevars%Description = 'longitude up left, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ul_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ul_d=initial_data_value IF (.NOT.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 = 'lon_ur_d' grid%tail_statevars%DataName = 'LON_UR_D' grid%tail_statevars%Description = 'longitude up right, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_ur_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_ur_d=initial_data_value IF (.NOT.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 = 'lon_lr_d' grid%tail_statevars%DataName = 'LON_LR_D' grid%tail_statevars%Description = 'longitude lower right, massless point' grid%tail_statevars%Units = 'degrees' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%lon_lr_d grid%tail_statevars%streams(1) = 33554432 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%lon_lr_d=initial_data_value IF (.NOT.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 = 't00' grid%tail_statevars%DataName = 'T00' grid%tail_statevars%Description = 'BASE STATE TEMPERATURE ' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%t00 grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%t00=initial_data_value IF (.NOT.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 = 'p00' grid%tail_statevars%DataName = 'P00' grid%tail_statevars%Description = 'BASE STATE PRESURE' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%p00 grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%p00=initial_data_value IF (.NOT.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 = 'tlp' grid%tail_statevars%DataName = 'TLP' grid%tail_statevars%Description = 'BASE STATE LAPSE RATE ' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%tlp grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%tlp=initial_data_value IF (.NOT.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 = 'tiso' grid%tail_statevars%DataName = 'TISO' grid%tail_statevars%Description = 'TEMP AT WHICH THE BASE T TURNS CONST' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%tiso grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%tiso=initial_data_value IF (.NOT.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 = 'tlp_strat' grid%tail_statevars%DataName = 'TLP_STRAT' grid%tail_statevars%Description = 'BASE STATE LAPSE RATE (DT/D(LN(P)) IN STRATOSPHERE' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%tlp_strat grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%tlp_strat=initial_data_value IF (.NOT.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 = 'p_strat' grid%tail_statevars%DataName = 'P_STRAT' grid%tail_statevars%Description = 'BASE STATE PRESSURE AT BOTTOM OF STRATOSPHERE' grid%tail_statevars%Units = 'Pa' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%p_strat grid%tail_statevars%streams(1) = 167772161 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%p_strat=initial_data_value IF (.NOT.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 = 'max_msftx' grid%tail_statevars%DataName = 'MAX_MSTFX' grid%tail_statevars%Description = 'Max map factor in domain' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%max_msftx grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%max_msftx=initial_data_value IF (.NOT.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 = 'max_msfty' grid%tail_statevars%DataName = 'MAX_MSTFY' grid%tail_statevars%Description = 'Max map factor in domain' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%Ndim = 0 grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_0d => grid%max_msfty grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%max_msfty=initial_data_value IF(okay_to_alloc.AND.in_use_for_config(id,'phys_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%phys_tot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16927,& 'frame/module_domain.f: Failed to allocate grid%phys_tot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phys_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 = 'phys_tot' grid%tail_statevars%DataName = 'PHYS_TOT' grid%tail_statevars%Description = 'TOTAL LATENT HEATING RATE' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%phys_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 = 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%phys_tot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16977,& 'frame/module_domain.f: Failed to allocate grid%phys_tot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physc').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%physc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",16988,& 'frame/module_domain.f: Failed to allocate grid%physc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physc' grid%tail_statevars%DataName = 'PHYSC' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO CONDENSATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physc 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%physc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17038,& 'frame/module_domain.f: Failed to allocate grid%physc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physe').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%physe(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17049,& 'frame/module_domain.f: Failed to allocate grid%physe(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physe=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physe' grid%tail_statevars%DataName = 'PHYSE' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO EVAPORATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physe 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%physe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17099,& 'frame/module_domain.f: Failed to allocate grid%physe(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physd').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%physd(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17110,& 'frame/module_domain.f: Failed to allocate grid%physd(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physd' grid%tail_statevars%DataName = 'PHYSD' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO DEPOSITION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physd 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%physd(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17160,& 'frame/module_domain.f: Failed to allocate grid%physd(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physs').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%physs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17171,& 'frame/module_domain.f: Failed to allocate grid%physs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physs' grid%tail_statevars%DataName = 'PHYSS' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO SUBLIMATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physs 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%physs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17221,& 'frame/module_domain.f: Failed to allocate grid%physs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physm').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%physm(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17232,& 'frame/module_domain.f: Failed to allocate grid%physm(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physm' grid%tail_statevars%DataName = 'PHYSM' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO MELTING' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physm 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%physm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17282,& 'frame/module_domain.f: Failed to allocate grid%physm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'physf').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%physf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17293,& 'frame/module_domain.f: Failed to allocate grid%physf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%physf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'physf' grid%tail_statevars%DataName = 'PHYSF' grid%tail_statevars%Description = 'LATENT HEATING RATE DUE TO FREEZING' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%physf 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%physf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17343,& 'frame/module_domain.f: Failed to allocate grid%physf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphys_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%acphys_tot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17354,& 'frame/module_domain.f: Failed to allocate grid%acphys_tot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphys_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 = 'acphys_tot' grid%tail_statevars%DataName = 'ACPHYS_TOT' grid%tail_statevars%Description = 'ACCUMULATED TOTAL LATENT HEATING' 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%acphys_tot 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%acphys_tot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17404,& 'frame/module_domain.f: Failed to allocate grid%acphys_tot(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphysc').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%acphysc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17415,& 'frame/module_domain.f: Failed to allocate grid%acphysc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphysc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphysc' grid%tail_statevars%DataName = 'ACPHYSC' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO CONDENSATION' 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%acphysc 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%acphysc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17465,& 'frame/module_domain.f: Failed to allocate grid%acphysc(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphyse').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%acphyse(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17476,& 'frame/module_domain.f: Failed to allocate grid%acphyse(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphyse=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphyse' grid%tail_statevars%DataName = 'ACPHYSE' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO EVAPORATION' 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%acphyse 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%acphyse(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17526,& 'frame/module_domain.f: Failed to allocate grid%acphyse(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphysd').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%acphysd(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17537,& 'frame/module_domain.f: Failed to allocate grid%acphysd(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphysd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphysd' grid%tail_statevars%DataName = 'ACPHYSD' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO DEPOSITION' 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%acphysd 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%acphysd(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17587,& 'frame/module_domain.f: Failed to allocate grid%acphysd(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphyss').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%acphyss(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17598,& 'frame/module_domain.f: Failed to allocate grid%acphyss(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphyss=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphyss' grid%tail_statevars%DataName = 'ACPHYSS' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO SUBLIMATION' 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%acphyss 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%acphyss(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17648,& 'frame/module_domain.f: Failed to allocate grid%acphyss(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphysm').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%acphysm(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17659,& 'frame/module_domain.f: Failed to allocate grid%acphysm(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphysm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphysm' grid%tail_statevars%DataName = 'ACPHYSM' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO MELTING' 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%acphysm 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%acphysm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17709,& 'frame/module_domain.f: Failed to allocate grid%acphysm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'acphysf').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%acphysf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17720,& 'frame/module_domain.f: Failed to allocate grid%acphysf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acphysf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'acphysf' grid%tail_statevars%DataName = 'ACPHYSF' grid%tail_statevars%Description = 'ACCUMULATED LATENT HEATING DUE TO FREEZING' 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%acphysf 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%acphysf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17770,& 'frame/module_domain.f: Failed to allocate grid%acphysf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'preci3d').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%preci3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17781,& 'frame/module_domain.f: Failed to allocate grid%preci3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%preci3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'preci3d' grid%tail_statevars%DataName = 'PRECI3D' grid%tail_statevars%Description = 'Sedimentation Fluxes for cloud ice' grid%tail_statevars%Units = 'KG/M^2/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%preci3d 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%preci3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17831,& 'frame/module_domain.f: Failed to allocate grid%preci3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'precs3d').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%precs3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17842,& 'frame/module_domain.f: Failed to allocate grid%precs3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%precs3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'precs3d' grid%tail_statevars%DataName = 'PRECS3D' grid%tail_statevars%Description = 'Sedimentation Fluxes for snow' grid%tail_statevars%Units = 'KG/M^2/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%precs3d 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%precs3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17892,& 'frame/module_domain.f: Failed to allocate grid%precs3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'precg3d').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%precg3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17903,& 'frame/module_domain.f: Failed to allocate grid%precg3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%precg3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'precg3d' grid%tail_statevars%DataName = 'PRECG3D' grid%tail_statevars%Description = 'Sedimentation Fluxes for graupel' grid%tail_statevars%Units = 'KG/M^2/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%precg3d 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%precg3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17953,& 'frame/module_domain.f: Failed to allocate grid%precg3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'prech3d').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%prech3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",17964,& 'frame/module_domain.f: Failed to allocate grid%prech3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%prech3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'prech3d' grid%tail_statevars%DataName = 'PRECH3D' grid%tail_statevars%Description = 'Sedimentation Fluxes for hail' grid%tail_statevars%Units = 'KG/M^2/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%prech3d 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%prech3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18014,& 'frame/module_domain.f: Failed to allocate grid%prech3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'precr3d').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%precr3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18025,& 'frame/module_domain.f: Failed to allocate grid%precr3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%precr3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'precr3d' grid%tail_statevars%DataName = 'PRECR3D' grid%tail_statevars%Description = 'Sedimentation Fluxes for rain' grid%tail_statevars%Units = 'KG/M^2/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%precr3d 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%precr3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18075,& 'frame/module_domain.f: Failed to allocate grid%precr3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tlwdn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tlwdn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18086,& 'frame/module_domain.f: Failed to allocate grid%tlwdn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tlwdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tlwdn' grid%tail_statevars%DataName = 'TLWDN' grid%tail_statevars%Description = 'TOA LW downwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tlwdn 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%tlwdn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18136,& 'frame/module_domain.f: Failed to allocate grid%tlwdn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tlwup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tlwup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18147,& 'frame/module_domain.f: Failed to allocate grid%tlwup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tlwup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tlwup' grid%tail_statevars%DataName = 'TLWUP' grid%tail_statevars%Description = 'TOA LW upwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tlwup 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%tlwup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18197,& 'frame/module_domain.f: Failed to allocate grid%tlwup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slwdn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slwdn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18208,& 'frame/module_domain.f: Failed to allocate grid%slwdn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slwdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slwdn' grid%tail_statevars%DataName = 'SLWDN' grid%tail_statevars%Description = 'Surface LW downwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%slwdn 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%slwdn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18258,& 'frame/module_domain.f: Failed to allocate grid%slwdn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'slwup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%slwup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18269,& 'frame/module_domain.f: Failed to allocate grid%slwup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slwup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'slwup' grid%tail_statevars%DataName = 'SLWUP' grid%tail_statevars%Description = 'Surface LW upwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%slwup 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%slwup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18319,& 'frame/module_domain.f: Failed to allocate grid%slwup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tswdn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tswdn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18330,& 'frame/module_domain.f: Failed to allocate grid%tswdn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tswdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tswdn' grid%tail_statevars%DataName = 'TSWDN' grid%tail_statevars%Description = 'TOA SW downwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tswdn 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%tswdn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18380,& 'frame/module_domain.f: Failed to allocate grid%tswdn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tswup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tswup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18391,& 'frame/module_domain.f: Failed to allocate grid%tswup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tswup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tswup' grid%tail_statevars%DataName = 'TSWUP' grid%tail_statevars%Description = 'TOA SW upwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tswup 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%tswup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18441,& 'frame/module_domain.f: Failed to allocate grid%tswup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sswdn').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sswdn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18452,& 'frame/module_domain.f: Failed to allocate grid%sswdn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sswdn=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sswdn' grid%tail_statevars%DataName = 'SSWDN' grid%tail_statevars%Description = 'Surface SW downwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sswdn 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%sswdn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18502,& 'frame/module_domain.f: Failed to allocate grid%sswdn(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'sswup').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%sswup(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18513,& 'frame/module_domain.f: Failed to allocate grid%sswup(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sswup=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'sswup' grid%tail_statevars%DataName = 'SSWUP' grid%tail_statevars%Description = 'Surface SW upwelling flux' grid%tail_statevars%Units = 'W m-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%sswup 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%sswup(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18563,& 'frame/module_domain.f: Failed to allocate grid%sswup(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cod2d_out').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cod2d_out(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18574,& 'frame/module_domain.f: Failed to allocate grid%cod2d_out(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cod2d_out=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cod2d_out' grid%tail_statevars%DataName = 'COD2D_OUT' grid%tail_statevars%Description = 'Column Cloud Optical Depth' 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%cod2d_out 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%cod2d_out(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18624,& 'frame/module_domain.f: Failed to allocate grid%cod2d_out(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ctop2d_out').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ctop2d_out(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18635,& 'frame/module_domain.f: Failed to allocate grid%ctop2d_out(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ctop2d_out=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ctop2d_out' grid%tail_statevars%DataName = 'CTOP2D_OUT' grid%tail_statevars%Description = 'Cloud-Top Pressure' grid%tail_statevars%Units = 'mb' grid%tail_statevars%Type = 'r' grid%tail_statevars%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%ctop2d_out 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%ctop2d_out(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18685,& 'frame/module_domain.f: Failed to allocate grid%ctop2d_out(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rushten').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%rushten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18696,& 'frame/module_domain.f: Failed to allocate grid%rushten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rushten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rushten' grid%tail_statevars%DataName = 'RUSHTEN' grid%tail_statevars%Description = 'X WIND TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rushten 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%rushten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18746,& 'frame/module_domain.f: Failed to allocate grid%rushten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rvshten').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%rvshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18757,& 'frame/module_domain.f: Failed to allocate grid%rvshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rvshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rvshten' grid%tail_statevars%DataName = 'RVSHTEN' grid%tail_statevars%Description = 'Y WIND TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rvshten 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%rvshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18807,& 'frame/module_domain.f: Failed to allocate grid%rvshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rthshten').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%rthshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18818,& 'frame/module_domain.f: Failed to allocate grid%rthshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthshten' grid%tail_statevars%DataName = 'RTHSHTEN' grid%tail_statevars%Description = 'THETA TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthshten 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%rthshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18868,& 'frame/module_domain.f: Failed to allocate grid%rthshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqvshten').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%rqvshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18879,& 'frame/module_domain.f: Failed to allocate grid%rqvshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqvshten' grid%tail_statevars%DataName = 'RQVSHTEN' grid%tail_statevars%Description = 'Q_V TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqvshten 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%rqvshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18929,& 'frame/module_domain.f: Failed to allocate grid%rqvshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqrshten').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%rqrshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18940,& 'frame/module_domain.f: Failed to allocate grid%rqrshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqrshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqrshten' grid%tail_statevars%DataName = 'RQRSHTEN' grid%tail_statevars%Description = 'Q_R TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqrshten 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%rqrshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",18990,& 'frame/module_domain.f: Failed to allocate grid%rqrshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqcshten').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%rqcshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19001,& 'frame/module_domain.f: Failed to allocate grid%rqcshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqcshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqcshten' grid%tail_statevars%DataName = 'RQCSHTEN' grid%tail_statevars%Description = 'Q_C TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqcshten 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%rqcshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19051,& 'frame/module_domain.f: Failed to allocate grid%rqcshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqsshten').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%rqsshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19062,& 'frame/module_domain.f: Failed to allocate grid%rqsshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqsshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqsshten' grid%tail_statevars%DataName = 'RQSSHTEN' grid%tail_statevars%Description = 'Q_S TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqsshten 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%rqsshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19112,& 'frame/module_domain.f: Failed to allocate grid%rqsshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqishten').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%rqishten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19123,& 'frame/module_domain.f: Failed to allocate grid%rqishten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqishten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqishten' grid%tail_statevars%DataName = 'RQISHTEN' grid%tail_statevars%Description = 'Q_I TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqishten 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%rqishten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19173,& 'frame/module_domain.f: Failed to allocate grid%rqishten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqgshten').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%rqgshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19184,& 'frame/module_domain.f: Failed to allocate grid%rqgshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqgshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqgshten' grid%tail_statevars%DataName = 'RQGSHTEN' grid%tail_statevars%Description = 'Q_G TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqgshten 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%rqgshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19234,& 'frame/module_domain.f: Failed to allocate grid%rqgshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqcnshten').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%rqcnshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19245,& 'frame/module_domain.f: Failed to allocate grid%rqcnshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqcnshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqcnshten' grid%tail_statevars%DataName = 'RQCNSHTEN' grid%tail_statevars%Description = 'Q_CN TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = ' kg-1 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%rqcnshten 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%rqcnshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19295,& 'frame/module_domain.f: Failed to allocate grid%rqcnshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqinshten').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%rqinshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19306,& 'frame/module_domain.f: Failed to allocate grid%rqinshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqinshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqinshten' grid%tail_statevars%DataName = 'RQINSHTEN' grid%tail_statevars%Description = 'Q_IN TENDENCY DUE TO SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = ' kg-1 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%rqinshten 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%rqinshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19356,& 'frame/module_domain.f: Failed to allocate grid%rqinshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rdcashten').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%rdcashten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19367,& 'frame/module_domain.f: Failed to allocate grid%rdcashten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdcashten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rdcashten' grid%tail_statevars%DataName = 'RDCASHTEN' grid%tail_statevars%Description = 'CLOUD FRACTION AREA TENDENCY DUE TO DENG SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'Pa s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' 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%rdcashten 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%rdcashten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19417,& 'frame/module_domain.f: Failed to allocate grid%rdcashten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqcdcshten').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%rqcdcshten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19428,& 'frame/module_domain.f: Failed to allocate grid%rqcdcshten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqcdcshten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqcdcshten' grid%tail_statevars%DataName = 'RQCDCSHTEN' grid%tail_statevars%Description = 'CLOUD LIQUID TENDENCY DUE TO DENG SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqcdcshten 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%rqcdcshten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19478,& 'frame/module_domain.f: Failed to allocate grid%rqcdcshten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldareaa').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%cldareaa(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19489,& 'frame/module_domain.f: Failed to allocate grid%cldareaa(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldareaa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldareaa' grid%tail_statevars%DataName = 'CLDAREAA' grid%tail_statevars%Description = 'CLOUD FRACTION FROM DENG SCHEME' 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%cldareaa 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%cldareaa(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19539,& 'frame/module_domain.f: Failed to allocate grid%cldareaa(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldareab').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%cldareab(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19550,& 'frame/module_domain.f: Failed to allocate grid%cldareab(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldareab=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldareab' grid%tail_statevars%DataName = 'CLDAREAB' grid%tail_statevars%Description = 'CLOUD FRACTION FROM DENG SCHEME' 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%cldareab 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%cldareab(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19600,& 'frame/module_domain.f: Failed to allocate grid%cldareab(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ca_rad').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ca_rad(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19611,& 'frame/module_domain.f: Failed to allocate grid%ca_rad(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ca_rad=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ca_rad' grid%tail_statevars%DataName = 'CA_RAD' grid%tail_statevars%Description = 'CLOUD WATER CONTENT FROM DENG SCHEME FOR RADIATION' 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%ca_rad 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%ca_rad(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19661,& 'frame/module_domain.f: Failed to allocate grid%ca_rad(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cw_rad').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cw_rad(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19672,& 'frame/module_domain.f: Failed to allocate grid%cw_rad(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cw_rad=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cw_rad' grid%tail_statevars%DataName = 'CW_RAD' grid%tail_statevars%Description = 'CLOUD WATER CONTENT FROM DENG SCHEME FOR RADIATION' 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%cw_rad 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%cw_rad(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19722,& 'frame/module_domain.f: Failed to allocate grid%cw_rad(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldliqa').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%cldliqa(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19733,& 'frame/module_domain.f: Failed to allocate grid%cldliqa(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldliqa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldliqa' grid%tail_statevars%DataName = 'CLDLIQA' grid%tail_statevars%Description = 'CLOUD WATER CONTENT FROM DENG SCHEME' 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%cldliqa 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%cldliqa(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19783,& 'frame/module_domain.f: Failed to allocate grid%cldliqa(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldliqb').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%cldliqb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19794,& 'frame/module_domain.f: Failed to allocate grid%cldliqb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldliqb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldliqb' grid%tail_statevars%DataName = 'CLDLIQB' grid%tail_statevars%Description = 'CLOUD WATER CONTENT FROM DENG SCHEME' 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%cldliqb 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%cldliqb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19844,& 'frame/module_domain.f: Failed to allocate grid%cldliqb(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'clddpthb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%clddpthb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19855,& 'frame/module_domain.f: Failed to allocate grid%clddpthb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clddpthb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'clddpthb' grid%tail_statevars%DataName = 'CLDDPTHB' grid%tail_statevars%Description = 'CLOUD DEPTH FROM TAU-1' 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%clddpthb 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%clddpthb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19905,& 'frame/module_domain.f: Failed to allocate grid%clddpthb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldtopb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cldtopb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19916,& 'frame/module_domain.f: Failed to allocate grid%cldtopb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldtopb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldtopb' grid%tail_statevars%DataName = 'CLDTOPB' grid%tail_statevars%Description = 'CLOUD TOP FROM TAU-1' 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%cldtopb 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%cldtopb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19966,& 'frame/module_domain.f: Failed to allocate grid%cldtopb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pblmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pblmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",19977,& 'frame/module_domain.f: Failed to allocate grid%pblmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pblmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pblmax' grid%tail_statevars%DataName = 'PBLMAX' grid%tail_statevars%Description = 'MAXIMUM VALUE OF PBL DEPTH SINCE THE START OF THE MODEL RUN' 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%pblmax 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%pblmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20027,& 'frame/module_domain.f: Failed to allocate grid%pblmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wub').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%wub(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20038,& 'frame/module_domain.f: Failed to allocate grid%wub(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wub=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wub' grid%tail_statevars%DataName = 'WUB' grid%tail_statevars%Description = 'UPDRAFT VERTICAL VELOCITY' 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%wub 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%wub(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20088,& 'frame/module_domain.f: Failed to allocate grid%wub(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainshvb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainshvb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20099,& 'frame/module_domain.f: Failed to allocate grid%rainshvb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainshvb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainshvb' grid%tail_statevars%DataName = 'RAINSHVB' grid%tail_statevars%Description = 'TIME-STEP SHCU PRECIPITATION FROM TAU-1' 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%rainshvb 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%rainshvb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20149,& 'frame/module_domain.f: Failed to allocate grid%rainshvb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'capesave').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%capesave(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20160,& 'frame/module_domain.f: Failed to allocate grid%capesave(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%capesave=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'capesave' grid%tail_statevars%DataName = 'CAPESAVE' grid%tail_statevars%Description = 'CAPE FROM TAU-1' 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%capesave 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%capesave(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20210,& 'frame/module_domain.f: Failed to allocate grid%capesave(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'radsave').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%radsave(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20221,& 'frame/module_domain.f: Failed to allocate grid%radsave(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%radsave=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'radsave' grid%tail_statevars%DataName = 'RADSAVE' grid%tail_statevars%Description = 'CLOUD RADIUS FROM TAU-1' 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%radsave 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%radsave(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20271,& 'frame/module_domain.f: Failed to allocate grid%radsave(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ainckfsa').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((100)-(1)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((100)-(1)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ainckfsa(sm31:em31,1:100,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20282,& 'frame/module_domain.f: Failed to allocate grid%ainckfsa(sm31:em31,1:100,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ainckfsa=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ainckfsa' grid%tail_statevars%DataName = 'AINCKFSA' grid%tail_statevars%Description = 'NUMBER OF CLOUDS FROM TAU-1' 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%ainckfsa 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 = 100 grid%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 = 100 grid%tail_statevars%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 = 100 grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'nsh' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ainckfsa(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20332,& 'frame/module_domain.f: Failed to allocate grid%ainckfsa(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ltopb').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ltopb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20343,& 'frame/module_domain.f: Failed to allocate grid%ltopb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ltopb=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 = 'ltopb' grid%tail_statevars%DataName = 'LTOPB' grid%tail_statevars%Description = 'LEVEL OF UPDRAFT TOP FROM TAU-1' 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%ltopb 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%ltopb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20393,& 'frame/module_domain.f: Failed to allocate grid%ltopb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kdcldtop').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%kdcldtop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20404,& 'frame/module_domain.f: Failed to allocate grid%kdcldtop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kdcldtop=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 = 'kdcldtop' grid%tail_statevars%DataName = 'KDCLDTOP' grid%tail_statevars%Description = 'LEVEL OF NBC TOP' 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%kdcldtop 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%kdcldtop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20454,& 'frame/module_domain.f: Failed to allocate grid%kdcldtop(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kdcldbas').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%kdcldbas(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20465,& 'frame/module_domain.f: Failed to allocate grid%kdcldbas(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kdcldbas=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 = 'kdcldbas' grid%tail_statevars%DataName = 'KDCLDBAS' grid%tail_statevars%Description = 'LEVEL OF NBC BASE' 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%kdcldbas 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%kdcldbas(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20515,& 'frame/module_domain.f: Failed to allocate grid%kdcldbas(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xtime1').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xtime1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20526,& 'frame/module_domain.f: Failed to allocate grid%xtime1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xtime1=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xtime1' grid%tail_statevars%DataName = 'XTIME1' grid%tail_statevars%Description = 'TIME COUNTER AFTER RAIN' grid%tail_statevars%Units = 'min.' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%xtime1 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%xtime1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20576,& 'frame/module_domain.f: Failed to allocate grid%xtime1(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pblhavg').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pblhavg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20587,& 'frame/module_domain.f: Failed to allocate grid%pblhavg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pblhavg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pblhavg' grid%tail_statevars%DataName = 'PBLHAVG' grid%tail_statevars%Description = 'TIME AVERAGE OF PBLH' 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%pblhavg 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%pblhavg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20637,& 'frame/module_domain.f: Failed to allocate grid%pblhavg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tkeavg').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%tkeavg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20648,& 'frame/module_domain.f: Failed to allocate grid%tkeavg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tkeavg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tkeavg' grid%tail_statevars%DataName = 'TKEAVG' grid%tail_statevars%Description = 'TIME AVERAGE OF TKE' grid%tail_statevars%Units = 'm2 s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%tkeavg 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%tkeavg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20698,& 'frame/module_domain.f: Failed to allocate grid%tkeavg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wsubsid').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * 4 nba = & ((((em32)-(sm32)+1))) * 4 ALLOCATE(grid%wsubsid(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20709,& 'frame/module_domain.f: Failed to allocate grid%wsubsid(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wsubsid=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wsubsid' grid%tail_statevars%DataName = 'WSUBSID' grid%tail_statevars%Description = 'LARGE-SCALE SUBSIDENCE IN DENG SHCU SCHEME' grid%tail_statevars%Units = 'm s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'Z' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 1 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_1d => grid%wsubsid grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 0 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%wsubsid(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20757,& 'frame/module_domain.f: Failed to allocate grid%wsubsid(1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rucuten').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%rucuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20768,& 'frame/module_domain.f: Failed to allocate grid%rucuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rucuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rucuten' grid%tail_statevars%DataName = 'RUCUTEN' grid%tail_statevars%Description = 'X WIND TENDENCY DUE TO CUMULUS PARAMETERIZATION' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rucuten 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%rucuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20818,& 'frame/module_domain.f: Failed to allocate grid%rucuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rvcuten').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%rvcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20829,& 'frame/module_domain.f: Failed to allocate grid%rvcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rvcuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rvcuten' grid%tail_statevars%DataName = 'RVCUTEN' grid%tail_statevars%Description = 'Y WIND TENDENCY DUE TO CUMULUS PARAMETERIZATION' grid%tail_statevars%Units = 'm s-2' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rvcuten 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%rvcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20879,& 'frame/module_domain.f: Failed to allocate grid%rvcuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rthcuten').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%rthcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20890,& 'frame/module_domain.f: Failed to allocate grid%rthcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthcuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthcuten' grid%tail_statevars%DataName = 'RTHCUTEN' grid%tail_statevars%Description = 'THETA TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthcuten 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%rthcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20940,& 'frame/module_domain.f: Failed to allocate grid%rthcuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqvcuten').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%rqvcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",20951,& 'frame/module_domain.f: Failed to allocate grid%rqvcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvcuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqvcuten' grid%tail_statevars%DataName = 'RQVCUTEN' grid%tail_statevars%Description = 'Q_V TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqvcuten 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%rqvcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21001,& 'frame/module_domain.f: Failed to allocate grid%rqvcuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqrcuten').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%rqrcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21012,& 'frame/module_domain.f: Failed to allocate grid%rqrcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqrcuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqrcuten' grid%tail_statevars%DataName = 'RQRCUTEN' grid%tail_statevars%Description = 'Q_R TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqrcuten 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%rqrcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21062,& 'frame/module_domain.f: Failed to allocate grid%rqrcuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqccuten').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%rqccuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21073,& 'frame/module_domain.f: Failed to allocate grid%rqccuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqccuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqccuten' grid%tail_statevars%DataName = 'RQCCUTEN' grid%tail_statevars%Description = 'Q_C TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqccuten 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%rqccuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21123,& 'frame/module_domain.f: Failed to allocate grid%rqccuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqscuten').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%rqscuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21134,& 'frame/module_domain.f: Failed to allocate grid%rqscuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqscuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqscuten' grid%tail_statevars%DataName = 'RQSCUTEN' grid%tail_statevars%Description = 'Q_S TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqscuten 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%rqscuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21184,& 'frame/module_domain.f: Failed to allocate grid%rqscuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqicuten').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%rqicuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21195,& 'frame/module_domain.f: Failed to allocate grid%rqicuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqicuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqicuten' grid%tail_statevars%DataName = 'RQICUTEN' grid%tail_statevars%Description = 'Q_I TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = 'kg kg-1 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%rqicuten 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%rqicuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21245,& 'frame/module_domain.f: Failed to allocate grid%rqicuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqcncuten').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%rqcncuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21256,& 'frame/module_domain.f: Failed to allocate grid%rqcncuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqcncuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqcncuten' grid%tail_statevars%DataName = 'RQCNCUTEN' grid%tail_statevars%Description = 'Q_CN TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = ' kg-1 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%rqcncuten 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%rqcncuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21306,& 'frame/module_domain.f: Failed to allocate grid%rqcncuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqincuten').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%rqincuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21317,& 'frame/module_domain.f: Failed to allocate grid%rqincuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqincuten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqincuten' grid%tail_statevars%DataName = 'RQINCUTEN' grid%tail_statevars%Description = 'Q_IN TENDENCY DUE TO CUMULUS SCHEME' grid%tail_statevars%Units = ' kg-1 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%rqincuten 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%rqincuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21367,& 'frame/module_domain.f: Failed to allocate grid%rqincuten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w0avg').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%w0avg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21378,& 'frame/module_domain.f: Failed to allocate grid%w0avg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w0avg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'w0avg' grid%tail_statevars%DataName = 'W0AVG' grid%tail_statevars%Description = 'AVERAGE VERTICAL VELOCITY FOR KF CUMULUS SCHEME' 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%w0avg 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%w0avg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21428,& 'frame/module_domain.f: Failed to allocate grid%w0avg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qcconv').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%qcconv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21439,& 'frame/module_domain.f: Failed to allocate grid%qcconv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qcconv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qcconv' grid%tail_statevars%DataName = 'QCCONV' grid%tail_statevars%Description = 'CLOUD MIXING RATIO FOR BMJ CUMULUS SCHEME' 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%qcconv 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%qcconv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21489,& 'frame/module_domain.f: Failed to allocate grid%qcconv(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qiconv').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%qiconv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21500,& 'frame/module_domain.f: Failed to allocate grid%qiconv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qiconv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qiconv' grid%tail_statevars%DataName = 'QICONV' grid%tail_statevars%Description = 'ICE MIXING RATIO FOR BMJ CUMULUS SCHEME' 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%qiconv 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%qiconv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21550,& 'frame/module_domain.f: Failed to allocate grid%qiconv(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21561,& 'frame/module_domain.f: Failed to allocate grid%rainc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainc' grid%tail_statevars%DataName = 'RAINC' grid%tail_statevars%Description = 'ACCUMULATED TOTAL CUMULUS PRECIPITATION' 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%rainc grid%tail_statevars%streams(1) = 3 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21611,& 'frame/module_domain.f: Failed to allocate grid%rainc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainsh'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainsh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21622,& 'frame/module_domain.f: Failed to allocate grid%rainsh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainsh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainsh' grid%tail_statevars%DataName = 'RAINSH' grid%tail_statevars%Description = 'ACCUMULATED SHALLOW CUMULUS PRECIPITATION' 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%rainsh grid%tail_statevars%streams(1) = 3 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainsh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21672,& 'frame/module_domain.f: Failed to allocate grid%rainsh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21683,& 'frame/module_domain.f: Failed to allocate grid%rainnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainnc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainnc' grid%tail_statevars%DataName = 'RAINNC' grid%tail_statevars%Description = 'ACCUMULATED TOTAL GRID SCALE PRECIPITATION' 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%rainnc grid%tail_statevars%streams(1) = 3 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21733,& 'frame/module_domain.f: Failed to allocate grid%rainnc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_rainc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_rainc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21744,& 'frame/module_domain.f: Failed to allocate grid%i_rainc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_rainc=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 = 'i_rainc' grid%tail_statevars%DataName = 'I_RAINC' grid%tail_statevars%Description = 'BUCKET FOR RAINC' 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%i_rainc 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%i_rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21794,& 'frame/module_domain.f: Failed to allocate grid%i_rainc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'i_rainnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%i_rainnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21805,& 'frame/module_domain.f: Failed to allocate grid%i_rainnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_rainnc=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 = 'i_rainnc' grid%tail_statevars%DataName = 'I_RAINNC' grid%tail_statevars%Description = 'BUCKET FOR RAINNC' 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%i_rainnc 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%i_rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21855,& 'frame/module_domain.f: Failed to allocate grid%i_rainnc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pratec').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pratec(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21866,& 'frame/module_domain.f: Failed to allocate grid%pratec(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pratec=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pratec' grid%tail_statevars%DataName = 'PRATEC' grid%tail_statevars%Description = 'PRECIP RATE FROM CUMULUS SCHEME' grid%tail_statevars%Units = 'mm 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%pratec 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%pratec(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21916,& 'frame/module_domain.f: Failed to allocate grid%pratec(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pratesh').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%pratesh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21927,& 'frame/module_domain.f: Failed to allocate grid%pratesh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pratesh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pratesh' grid%tail_statevars%DataName = 'PRATESH' grid%tail_statevars%Description = 'PRECIP RATE FROM SHALLOW CUMULUS SCHEME' grid%tail_statevars%Units = 'mm 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%pratesh 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%pratesh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21977,& 'frame/module_domain.f: Failed to allocate grid%pratesh(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",21988,& 'frame/module_domain.f: Failed to allocate grid%raincv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincv' grid%tail_statevars%DataName = 'RAINCV' grid%tail_statevars%Description = 'TIME-STEP CUMULUS PRECIPITATION' 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%raincv 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%raincv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22038,& 'frame/module_domain.f: Failed to allocate grid%raincv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainshv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainshv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22049,& 'frame/module_domain.f: Failed to allocate grid%rainshv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainshv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainshv' grid%tail_statevars%DataName = 'RAINSHV' grid%tail_statevars%Description = 'TIME-STEP SHALLOW CUMULUS PRECIPITATION' 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%rainshv 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%rainshv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22099,& 'frame/module_domain.f: Failed to allocate grid%rainshv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainncv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22110,& 'frame/module_domain.f: Failed to allocate grid%rainncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainncv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainncv' grid%tail_statevars%DataName = 'RAINNCV' grid%tail_statevars%Description = 'TIME-STEP NONCONVECTIVE PRECIPITATION' 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%rainncv 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%rainncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22160,& 'frame/module_domain.f: Failed to allocate grid%rainncv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainbl').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainbl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22171,& 'frame/module_domain.f: Failed to allocate grid%rainbl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainbl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainbl' grid%tail_statevars%DataName = 'RAINBL' grid%tail_statevars%Description = 'PBL TIME-STEP TOTAL PRECIPITATION' 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%rainbl 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%rainbl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22221,& 'frame/module_domain.f: Failed to allocate grid%rainbl(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snownc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snownc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22232,& 'frame/module_domain.f: Failed to allocate grid%snownc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snownc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snownc' grid%tail_statevars%DataName = 'SNOWNC' grid%tail_statevars%Description = 'ACCUMULATED TOTAL GRID SCALE SNOW AND ICE' 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%snownc 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%snownc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22282,& 'frame/module_domain.f: Failed to allocate grid%snownc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'graupelnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%graupelnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22293,& 'frame/module_domain.f: Failed to allocate grid%graupelnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%graupelnc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'graupelnc' grid%tail_statevars%DataName = 'GRAUPELNC' grid%tail_statevars%Description = 'ACCUMULATED TOTAL GRID SCALE GRAUPEL' 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%graupelnc 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%graupelnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22343,& 'frame/module_domain.f: Failed to allocate grid%graupelnc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hailnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hailnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22354,& 'frame/module_domain.f: Failed to allocate grid%hailnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hailnc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hailnc' grid%tail_statevars%DataName = 'HAILNC' grid%tail_statevars%Description = 'ACCUMULATED TOTAL GRID SCALE HAIL' 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%hailnc 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%hailnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22404,& 'frame/module_domain.f: Failed to allocate grid%hailnc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'snowncv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%snowncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22415,& 'frame/module_domain.f: Failed to allocate grid%snowncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowncv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'snowncv' grid%tail_statevars%DataName = 'SNOWNCV' grid%tail_statevars%Description = 'TIME-STEP NONCONVECTIVE SNOW AND ICE' 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%snowncv 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%snowncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22465,& 'frame/module_domain.f: Failed to allocate grid%snowncv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'graupelncv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%graupelncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22476,& 'frame/module_domain.f: Failed to allocate grid%graupelncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%graupelncv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'graupelncv' grid%tail_statevars%DataName = 'GRAUPELNCV' grid%tail_statevars%Description = 'TIME-STEP NONCONVECTIVE GRAUPEL' 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%graupelncv 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%graupelncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22526,& 'frame/module_domain.f: Failed to allocate grid%graupelncv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'hailncv').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%hailncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22537,& 'frame/module_domain.f: Failed to allocate grid%hailncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hailncv=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'hailncv' grid%tail_statevars%DataName = 'HAILNCV' grid%tail_statevars%Description = 'TIME-STEP NONCONVECTIVE HAIL' 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%hailncv 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%hailncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22587,& 'frame/module_domain.f: Failed to allocate grid%hailncv(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'refl_10cm'))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%refl_10cm(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22598,& 'frame/module_domain.f: Failed to allocate grid%refl_10cm(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%refl_10cm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'refl_10cm' grid%tail_statevars%DataName = 'REFL_10CM' grid%tail_statevars%Description = 'Radar reflectivity (lamda = 10 cm)' grid%tail_statevars%Units = 'dBZ' 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%refl_10cm 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 = 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%refl_10cm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22648,& 'frame/module_domain.f: Failed to allocate grid%refl_10cm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mskf_refl_10cm'))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%mskf_refl_10cm(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22659,& 'frame/module_domain.f: Failed to allocate grid%mskf_refl_10cm(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mskf_refl_10cm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mskf_refl_10cm' grid%tail_statevars%DataName = 'MSKF_REFL_10CM' grid%tail_statevars%Description = 'Full Radar reflectivity (lamda = 10 cm)' grid%tail_statevars%Units = 'dBZ' 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%mskf_refl_10cm 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 = 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%mskf_refl_10cm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22709,& 'frame/module_domain.f: Failed to allocate grid%mskf_refl_10cm(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'th_old'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%th_old(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22720,& 'frame/module_domain.f: Failed to allocate grid%th_old(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_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 = 'th_old' grid%tail_statevars%DataName = 'TH_OLD' grid%tail_statevars%Description = 'Old Value of Th' grid%tail_statevars%Units = 'K' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%th_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 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%th_old(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22770,& 'frame/module_domain.f: Failed to allocate grid%th_old(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qv_old'))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%qv_old(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22781,& 'frame/module_domain.f: Failed to allocate grid%qv_old(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_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 = 'qv_old' grid%tail_statevars%DataName = 'QV_OLD' grid%tail_statevars%Description = 'Old Value of qv' 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%qv_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 = 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%qv_old(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22831,& 'frame/module_domain.f: Failed to allocate grid%qv_old(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vmi3d'))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%vmi3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22842,& 'frame/module_domain.f: Failed to allocate grid%vmi3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vmi3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vmi3d' grid%tail_statevars%DataName = 'V_ICE' grid%tail_statevars%Description = 'Mass-weighted ice fallspeed cat 1' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%vmi3d 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 = 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%vmi3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22892,& 'frame/module_domain.f: Failed to allocate grid%vmi3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'di3d'))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%di3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22903,& 'frame/module_domain.f: Failed to allocate grid%di3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%di3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'di3d' grid%tail_statevars%DataName = 'D_ICE' grid%tail_statevars%Description = 'Mass-weighted mean ice size cat 1' 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%di3d 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 = 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%di3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22953,& 'frame/module_domain.f: Failed to allocate grid%di3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rhopo3d'))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%rhopo3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",22964,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rhopo3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rhopo3d' grid%tail_statevars%DataName = 'RHO_ICE' grid%tail_statevars%Description = 'Mass-weighted mean ice density cat 1' grid%tail_statevars%Units = 'kg m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rhopo3d 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 = 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%rhopo3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23014,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'phii3d'))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%phii3d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23025,& 'frame/module_domain.f: Failed to allocate grid%phii3d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phii3d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'phii3d' grid%tail_statevars%DataName = 'PHI_ICE' grid%tail_statevars%Description = 'Number-weighted mean ice aspect ratio cat 1' 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%phii3d 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 = 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%phii3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23075,& 'frame/module_domain.f: Failed to allocate grid%phii3d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vmi3d_2'))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%vmi3d_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23086,& 'frame/module_domain.f: Failed to allocate grid%vmi3d_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vmi3d_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 = 'vmi3d_2' grid%tail_statevars%DataName = 'V_ICE2' grid%tail_statevars%Description = 'Mass-weighted ice fallspeed cat 2' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%vmi3d_2 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 = 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%vmi3d_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23136,& 'frame/module_domain.f: Failed to allocate grid%vmi3d_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'di3d_2'))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%di3d_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23147,& 'frame/module_domain.f: Failed to allocate grid%di3d_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%di3d_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 = 'di3d_2' grid%tail_statevars%DataName = 'D_ICE2' grid%tail_statevars%Description = 'Mass-weighted mean ice size cat 2' 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%di3d_2 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 = 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%di3d_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23197,& 'frame/module_domain.f: Failed to allocate grid%di3d_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rhopo3d_2'))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%rhopo3d_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23208,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rhopo3d_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 = 'rhopo3d_2' grid%tail_statevars%DataName = 'RHO_ICE2' grid%tail_statevars%Description = 'Mass-weighted mean ice density cat 2' grid%tail_statevars%Units = 'kg m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rhopo3d_2 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 = 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%rhopo3d_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23258,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'phii3d_2'))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%phii3d_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23269,& 'frame/module_domain.f: Failed to allocate grid%phii3d_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phii3d_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 = 'phii3d_2' grid%tail_statevars%DataName = 'PHI_ICE2' grid%tail_statevars%Description = 'Number-weighted mean ice aspect ratio cat 2' 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%phii3d_2 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 = 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%phii3d_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23319,& 'frame/module_domain.f: Failed to allocate grid%phii3d_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vmi3d_3'))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%vmi3d_3(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23330,& 'frame/module_domain.f: Failed to allocate grid%vmi3d_3(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vmi3d_3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vmi3d_3' grid%tail_statevars%DataName = 'V_ICE3' grid%tail_statevars%Description = 'Mass-weighted ice fallspeed cat 3' 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%vmi3d_3 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 = 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%vmi3d_3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23380,& 'frame/module_domain.f: Failed to allocate grid%vmi3d_3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'di3d_3'))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%di3d_3(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23391,& 'frame/module_domain.f: Failed to allocate grid%di3d_3(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%di3d_3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'di3d_3' grid%tail_statevars%DataName = 'D_ICE3' grid%tail_statevars%Description = 'Mass-weighted mean ice size cat 3' 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%di3d_3 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 = 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%di3d_3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23441,& 'frame/module_domain.f: Failed to allocate grid%di3d_3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rhopo3d_3'))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%rhopo3d_3(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23452,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d_3(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rhopo3d_3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rhopo3d_3' grid%tail_statevars%DataName = 'RHO_ICE3' grid%tail_statevars%Description = 'Mass-weighted mean ice density cat 3' grid%tail_statevars%Units = 'kg m-3' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rhopo3d_3 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 = 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%rhopo3d_3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23502,& 'frame/module_domain.f: Failed to allocate grid%rhopo3d_3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'phii3d_3'))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%phii3d_3(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23513,& 'frame/module_domain.f: Failed to allocate grid%phii3d_3(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phii3d_3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'phii3d_3' grid%tail_statevars%DataName = 'PHI_ICE3' grid%tail_statevars%Description = 'Number-weighted mean ice aspect ratio cat 3' 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%phii3d_3 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 = 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%phii3d_3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23563,& 'frame/module_domain.f: Failed to allocate grid%phii3d_3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'itype'))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%itype(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23574,& 'frame/module_domain.f: Failed to allocate grid%itype(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%itype=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'itype' grid%tail_statevars%DataName = 'ICE_TYPE' grid%tail_statevars%Description = 'Diagnostic ice type cat 1 ISHMAEL microphysics' 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%itype 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 = 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%itype(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23624,& 'frame/module_domain.f: Failed to allocate grid%itype(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'itype_2'))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%itype_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23635,& 'frame/module_domain.f: Failed to allocate grid%itype_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%itype_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 = 'itype_2' grid%tail_statevars%DataName = 'ICE_TYPE2' grid%tail_statevars%Description = 'Diagnostic ice type cat 2 ISHMAEL microphysics' 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%itype_2 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 = 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%itype_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23685,& 'frame/module_domain.f: Failed to allocate grid%itype_2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'itype_3'))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%itype_3(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23696,& 'frame/module_domain.f: Failed to allocate grid%itype_3(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%itype_3=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'itype_3' grid%tail_statevars%DataName = 'ICE_TYPE3' grid%tail_statevars%Description = 'Diagnostic ice type cat 3 ISHMAEL microphysics' 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%itype_3 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 = 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%itype_3(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23746,& 'frame/module_domain.f: Failed to allocate grid%itype_3(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nca').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%nca(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23757,& 'frame/module_domain.f: Failed to allocate grid%nca(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nca=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nca' grid%tail_statevars%DataName = 'NCA' grid%tail_statevars%Description = 'COUNTER OF THE CLOUD RELAXATION TIME IN KF CUMULUS SCHEME' 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%nca 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%nca(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23807,& 'frame/module_domain.f: Failed to allocate grid%nca(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'lowlyr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%lowlyr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23818,& 'frame/module_domain.f: Failed to allocate grid%lowlyr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lowlyr=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 = 'lowlyr' grid%tail_statevars%DataName = 'LOWLYR' grid%tail_statevars%Description = 'INDEX OF LOWEST MODEL LAYER ABOVE THE GROUND IN BMJ SCHEME' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%lowlyr 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%lowlyr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23868,& 'frame/module_domain.f: Failed to allocate grid%lowlyr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'mass_flux').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%mass_flux(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23879,& 'frame/module_domain.f: Failed to allocate grid%mass_flux(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mass_flux=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'mass_flux' grid%tail_statevars%DataName = 'MASS_FLUX' grid%tail_statevars%Description = 'DOWNDRAFT MASS FLUX FOR IN GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'mb hour-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%mass_flux 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%mass_flux(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23929,& 'frame/module_domain.f: Failed to allocate grid%mass_flux(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra_dp').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%cldfra_dp(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23940,& 'frame/module_domain.f: Failed to allocate grid%cldfra_dp(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra_dp=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfra_dp' grid%tail_statevars%DataName = 'CLDFRA_DP' grid%tail_statevars%Description = 'DEEP CONVECTIVE CLOUD FRACTION FROM KF' 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%cldfra_dp 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%cldfra_dp(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",23990,& 'frame/module_domain.f: Failed to allocate grid%cldfra_dp(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra_sh').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%cldfra_sh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24001,& 'frame/module_domain.f: Failed to allocate grid%cldfra_sh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra_sh=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfra_sh' grid%tail_statevars%DataName = 'CLDFRA_SH' grid%tail_statevars%Description = 'SHALLOW CONVECTIVE CLOUD FRACTION FROM KF' 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%cldfra_sh 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%cldfra_sh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24051,& 'frame/module_domain.f: Failed to allocate grid%cldfra_sh(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'w_up'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%w_up(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24062,& 'frame/module_domain.f: Failed to allocate grid%w_up(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_up=initial_data_value IF (.NOT.grid%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_up' grid%tail_statevars%DataName = 'W_UP' grid%tail_statevars%Description = 'EFFECTIVE SUBGRID VELOCITY FROM KF' 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%w_up 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%w_up(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24112,& 'frame/module_domain.f: Failed to allocate grid%w_up(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'udr_kf').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%udr_kf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24123,& 'frame/module_domain.f: Failed to allocate grid%udr_kf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%udr_kf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'udr_kf' grid%tail_statevars%DataName = 'UDR_KF' grid%tail_statevars%Description = 'UPDRAFT DETRAINMENT RATE FROM KF' grid%tail_statevars%Units = 'kg 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%udr_kf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%udr_kf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24173,& 'frame/module_domain.f: Failed to allocate grid%udr_kf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ddr_kf').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%ddr_kf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24184,& 'frame/module_domain.f: Failed to allocate grid%ddr_kf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ddr_kf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ddr_kf' grid%tail_statevars%DataName = 'DDR_KF' grid%tail_statevars%Description = 'DOWNDRAFT DETRAINMENT RATE FROM KF' grid%tail_statevars%Units = 'kg 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%ddr_kf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ddr_kf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24234,& 'frame/module_domain.f: Failed to allocate grid%ddr_kf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'uer_kf').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%uer_kf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24245,& 'frame/module_domain.f: Failed to allocate grid%uer_kf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uer_kf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'uer_kf' grid%tail_statevars%DataName = 'UER_KF' grid%tail_statevars%Description = 'UPDRAFT ENTRAINMENT RATE FROM KF' grid%tail_statevars%Units = 'kg 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%uer_kf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%uer_kf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24295,& 'frame/module_domain.f: Failed to allocate grid%uer_kf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'der_kf').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%der_kf(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24306,& 'frame/module_domain.f: Failed to allocate grid%der_kf(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%der_kf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'der_kf' grid%tail_statevars%DataName = 'DER_KF' grid%tail_statevars%Description = 'DOWNDRAFT ENTRAINMENT RATE FROM KF' grid%tail_statevars%Units = 'kg 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%der_kf grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%der_kf(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24356,& 'frame/module_domain.f: Failed to allocate grid%der_kf(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'timec_kf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%timec_kf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24367,& 'frame/module_domain.f: Failed to allocate grid%timec_kf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%timec_kf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'timec_kf' grid%tail_statevars%DataName = 'TIMEC_KF' grid%tail_statevars%Description = 'CONVECTIVE TIMESCALE FROM MSKF' grid%tail_statevars%Units = '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%timec_kf 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%timec_kf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24417,& 'frame/module_domain.f: Failed to allocate grid%timec_kf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_gr').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_gr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24428,& 'frame/module_domain.f: Failed to allocate grid%apr_gr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_gr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_gr' grid%tail_statevars%DataName = 'APR_GR' grid%tail_statevars%Description = 'PRECIP FROM CLOSURE OLD_GRELL' grid%tail_statevars%Units = 'mm hour-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%apr_gr 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%apr_gr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24478,& 'frame/module_domain.f: Failed to allocate grid%apr_gr(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_w').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_w(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24489,& 'frame/module_domain.f: Failed to allocate grid%apr_w(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_w=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_w' grid%tail_statevars%DataName = 'APR_W' grid%tail_statevars%Description = 'PRECIP FROM CLOSURE W' grid%tail_statevars%Units = 'mm hour-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%apr_w grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%apr_w(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24539,& 'frame/module_domain.f: Failed to allocate grid%apr_w(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_mc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_mc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24550,& 'frame/module_domain.f: Failed to allocate grid%apr_mc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_mc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_mc' grid%tail_statevars%DataName = 'APR_MC' grid%tail_statevars%Description = 'PRECIP FROM CLOSURE KRISH MV' grid%tail_statevars%Units = 'mm hour-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%apr_mc 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%apr_mc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24600,& 'frame/module_domain.f: Failed to allocate grid%apr_mc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_st').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_st(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24611,& 'frame/module_domain.f: Failed to allocate grid%apr_st(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_st=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_st' grid%tail_statevars%DataName = 'APR_ST' grid%tail_statevars%Description = 'PRECIP FROM CLOSURE STABILITY' grid%tail_statevars%Units = 'mm hour-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%apr_st 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%apr_st(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24661,& 'frame/module_domain.f: Failed to allocate grid%apr_st(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_as').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_as(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24672,& 'frame/module_domain.f: Failed to allocate grid%apr_as(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_as=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_as' grid%tail_statevars%DataName = 'APR_AS' grid%tail_statevars%Description = 'PRECIP FROM CLOSURE AS-TYPE' grid%tail_statevars%Units = 'mm hour-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%apr_as 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%apr_as(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24722,& 'frame/module_domain.f: Failed to allocate grid%apr_as(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_capma').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_capma(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24733,& 'frame/module_domain.f: Failed to allocate grid%apr_capma(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capma=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_capma' grid%tail_statevars%DataName = 'APR_CAPMA' grid%tail_statevars%Description = 'PRECIP FROM MAX CAP' grid%tail_statevars%Units = 'mm hour-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%apr_capma 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%apr_capma(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24783,& 'frame/module_domain.f: Failed to allocate grid%apr_capma(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_capme').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_capme(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24794,& 'frame/module_domain.f: Failed to allocate grid%apr_capme(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capme=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_capme' grid%tail_statevars%DataName = 'APR_CAPME' grid%tail_statevars%Description = 'PRECIP FROM MEAN CAP' grid%tail_statevars%Units = 'mm hour-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%apr_capme 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%apr_capme(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24844,& 'frame/module_domain.f: Failed to allocate grid%apr_capme(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'apr_capmi').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%apr_capmi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24855,& 'frame/module_domain.f: Failed to allocate grid%apr_capmi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capmi=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'apr_capmi' grid%tail_statevars%DataName = 'APR_CAPMI' grid%tail_statevars%Description = 'PRECIP FROM MIN CAP' grid%tail_statevars%Units = 'mm hour-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%apr_capmi 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%apr_capmi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24905,& 'frame/module_domain.f: Failed to allocate grid%apr_capmi(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'edt_out').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%edt_out(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24916,& 'frame/module_domain.f: Failed to allocate grid%edt_out(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edt_out=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'edt_out' grid%tail_statevars%DataName = 'EDT_OUT' grid%tail_statevars%Description = 'EDT FROM GD SCHEME' 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%edt_out 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%edt_out(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24966,& 'frame/module_domain.f: Failed to allocate grid%edt_out(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xmb_shallow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%xmb_shallow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",24977,& 'frame/module_domain.f: Failed to allocate grid%xmb_shallow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xmb_shallow=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xmb_shallow' grid%tail_statevars%DataName = 'XMB_SHALLOW' grid%tail_statevars%Description = 'MASSFLUX FROM SHALLOW CONVECTION (G3 and GF only)' 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%xmb_shallow 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%xmb_shallow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25027,& 'frame/module_domain.f: Failed to allocate grid%xmb_shallow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'k22_shallow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%k22_shallow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25038,& 'frame/module_domain.f: Failed to allocate grid%k22_shallow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%k22_shallow=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 = 'k22_shallow' grid%tail_statevars%DataName = 'K22_SHALLOW' grid%tail_statevars%Description = 'K22 LEVEL FROM SHALLOW CONVECTION (G3 and GF only)' 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%k22_shallow 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%k22_shallow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25088,& 'frame/module_domain.f: Failed to allocate grid%k22_shallow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kbcon_shallow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%kbcon_shallow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25099,& 'frame/module_domain.f: Failed to allocate grid%kbcon_shallow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kbcon_shallow=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 = 'kbcon_shallow' grid%tail_statevars%DataName = 'KBCON_SHALLOW' grid%tail_statevars%Description = 'KBCON LEVEL FROM SHALLOW CONVECTION (G3 and GF only)' 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%kbcon_shallow 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%kbcon_shallow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25149,& 'frame/module_domain.f: Failed to allocate grid%kbcon_shallow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ktop_shallow').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ktop_shallow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25160,& 'frame/module_domain.f: Failed to allocate grid%ktop_shallow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ktop_shallow=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 = 'ktop_shallow' grid%tail_statevars%DataName = 'KTOP_SHALLOW' grid%tail_statevars%Description = 'KTOP LEVEL FROM SHALLOW CONVECTION (G3 and GF only)' 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%ktop_shallow 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%ktop_shallow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25210,& 'frame/module_domain.f: Failed to allocate grid%ktop_shallow(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'k22_deep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%k22_deep(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25221,& 'frame/module_domain.f: Failed to allocate grid%k22_deep(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%k22_deep=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 = 'k22_deep' grid%tail_statevars%DataName = 'K22_DEEP' grid%tail_statevars%Description = 'K22 LEVEL FROM DEEPCONVECTION (G3 and GF only)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%k22_deep 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%k22_deep(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25271,& 'frame/module_domain.f: Failed to allocate grid%k22_deep(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'kbcon_deep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%kbcon_deep(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25282,& 'frame/module_domain.f: Failed to allocate grid%kbcon_deep(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kbcon_deep=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 = 'kbcon_deep' grid%tail_statevars%DataName = 'KBCON_DEEP' grid%tail_statevars%Description = 'KBCON LEVEL FROM DEEP CONVECTION (G3 and GF only)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%kbcon_deep 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%kbcon_deep(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25332,& 'frame/module_domain.f: Failed to allocate grid%kbcon_deep(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ktop_deep').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ktop_deep(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25343,& 'frame/module_domain.f: Failed to allocate grid%ktop_deep(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ktop_deep=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 = 'ktop_deep' grid%tail_statevars%DataName = 'KTOP_DEEP' grid%tail_statevars%Description = 'KTOP LEVEL FROM DEEP CONVECTION (G3 and GF only)' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'i' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%ifield_2d => grid%ktop_deep 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%ktop_deep(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25393,& 'frame/module_domain.f: Failed to allocate grid%ktop_deep(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'xf_ens').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * 4 ALLOCATE(grid%xf_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25404,& 'frame/module_domain.f: Failed to allocate grid%xf_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xf_ens=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'xf_ens' grid%tail_statevars%DataName = 'XF_ENS' grid%tail_statevars%Description = 'MASS FLUX PDF IN GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'mb hour-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XYZ' 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%xf_ens 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 = config_flags%ensdim grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = config_flags%ensdim grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = config_flags%ensdim grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = 'ensemble_stag' ENDIF ELSE ALLOCATE(grid%xf_ens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25454,& 'frame/module_domain.f: Failed to allocate grid%xf_ens(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'pr_ens').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * 4 ALLOCATE(grid%pr_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25465,& 'frame/module_domain.f: Failed to allocate grid%pr_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pr_ens=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'pr_ens' grid%tail_statevars%DataName = 'PR_ENS' grid%tail_statevars%Description = 'PRECIP RATE PDF IN GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'mb hour-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XYZ' 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%pr_ens 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 = config_flags%ensdim grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = config_flags%ensdim grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = config_flags%ensdim grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = 'ensemble_stag' ENDIF ELSE ALLOCATE(grid%pr_ens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25515,& 'frame/module_domain.f: Failed to allocate grid%pr_ens(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cugd_tten').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%cugd_tten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25526,& 'frame/module_domain.f: Failed to allocate grid%cugd_tten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_tten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cugd_tten' grid%tail_statevars%DataName = 'CUGD_TTEN' grid%tail_statevars%Description = 'INITIAL TTENDENCY OUT OFF GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cugd_tten 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%cugd_tten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25576,& 'frame/module_domain.f: Failed to allocate grid%cugd_tten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cugd_qvten').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%cugd_qvten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25587,& 'frame/module_domain.f: Failed to allocate grid%cugd_qvten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qvten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cugd_qvten' grid%tail_statevars%DataName = 'CUGD_QVTEN' grid%tail_statevars%Description = 'INITIAL QTENDENCY OUT OFF GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cugd_qvten 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%cugd_qvten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25637,& 'frame/module_domain.f: Failed to allocate grid%cugd_qvten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cugd_ttens').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%cugd_ttens(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25648,& 'frame/module_domain.f: Failed to allocate grid%cugd_ttens(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_ttens=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cugd_ttens' grid%tail_statevars%DataName = 'CUGD_TTENS' grid%tail_statevars%Description = 'INITIAL SUBSIDENCE TTENDENCY OUT OFF GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cugd_ttens 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%cugd_ttens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25698,& 'frame/module_domain.f: Failed to allocate grid%cugd_ttens(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cugd_qvtens').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%cugd_qvtens(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25709,& 'frame/module_domain.f: Failed to allocate grid%cugd_qvtens(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qvtens=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cugd_qvtens' grid%tail_statevars%DataName = 'CUGD_QVTENS' grid%tail_statevars%Description = 'INITIAL SUBSIDNCE QTENDENCY OUT OFF GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cugd_qvtens 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%cugd_qvtens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25759,& 'frame/module_domain.f: Failed to allocate grid%cugd_qvtens(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cugd_qcten').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%cugd_qcten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25770,& 'frame/module_domain.f: Failed to allocate grid%cugd_qcten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qcten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cugd_qcten' grid%tail_statevars%DataName = 'CUGD_QCTEN' grid%tail_statevars%Description = 'INITIAL TEMPERATURE TENDENCY OUT OFF GRELL CUMULUS SCHEME' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%cugd_qcten 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%cugd_qcten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25820,& 'frame/module_domain.f: Failed to allocate grid%cugd_qcten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gd_cloud').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gd_cloud(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25831,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gd_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 = 'gd_cloud' grid%tail_statevars%DataName = 'GD_CLOUD' grid%tail_statevars%Description = 'CLOUD WATER/ICE MIXING RAIO IN GD CLOUD' 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%gd_cloud grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%gd_cloud(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25881,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gd_cloud2').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%gd_cloud2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25892,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gd_cloud2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gd_cloud2' grid%tail_statevars%DataName = 'GD_CLOUD2' grid%tail_statevars%Description = 'TEST for GD CLOUD' 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%gd_cloud2 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%gd_cloud2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25942,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud2(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gd_cldfr').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%gd_cldfr(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",25953,& 'frame/module_domain.f: Failed to allocate grid%gd_cldfr(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gd_cldfr=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gd_cldfr' grid%tail_statevars%DataName = 'GD_CLDFR' grid%tail_statevars%Description = 'GD CLOUD Fraction' 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%gd_cldfr 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%gd_cldfr(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26003,& 'frame/module_domain.f: Failed to allocate grid%gd_cldfr(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincv_a').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincv_a(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26014,& 'frame/module_domain.f: Failed to allocate grid%raincv_a(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincv_a=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincv_a' grid%tail_statevars%DataName = 'RAINCV_A' grid%tail_statevars%Description = 'taveragd TIME-STEP CUMULUS PRECIPITATION' 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%raincv_a 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%raincv_a(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26064,& 'frame/module_domain.f: Failed to allocate grid%raincv_a(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincv_b').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincv_b(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26075,& 'frame/module_domain.f: Failed to allocate grid%raincv_b(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincv_b=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincv_b' grid%tail_statevars%DataName = 'RAINCV_B' grid%tail_statevars%Description = 'taveragd TIME-STEP CUMULUS PRECIPITATION' 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%raincv_b 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%raincv_b(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26125,& 'frame/module_domain.f: Failed to allocate grid%raincv_b(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gd_cloud_a').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%gd_cloud_a(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26136,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud_a(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gd_cloud_a=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gd_cloud_a' grid%tail_statevars%DataName = 'GD_CLOUD_A' grid%tail_statevars%Description = 'taveragd CLOUD WATER MIXING RAIO IN GD CLOUD' 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%gd_cloud_a 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%gd_cloud_a(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26186,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud_a(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gd_cloud2_a').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%gd_cloud2_a(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26197,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud2_a(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gd_cloud2_a=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gd_cloud2_a' grid%tail_statevars%DataName = 'GD_CLOUD2_A' grid%tail_statevars%Description = 'taveragd cloud ice mix ratio in GD' 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%gd_cloud2_a 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%gd_cloud2_a(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26247,& 'frame/module_domain.f: Failed to allocate grid%gd_cloud2_a(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_cu').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_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26258,& 'frame/module_domain.f: Failed to allocate grid%qc_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_cu=initial_data_value IF (.NOT.grid%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_cu' grid%tail_statevars%DataName = 'QC_CU' grid%tail_statevars%Description = 'CLOUD WATER MIXING RATIO FROM A CU SCHEME' 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%qc_cu 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%qc_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26308,& 'frame/module_domain.f: Failed to allocate grid%qc_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qi_cu').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_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26319,& 'frame/module_domain.f: Failed to allocate grid%qi_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qi_cu=initial_data_value IF (.NOT.grid%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_cu' grid%tail_statevars%DataName = 'QI_CU' grid%tail_statevars%Description = 'CLOUD ICE MIXUNG RATIO FROM A CU SCHEME' 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%qi_cu 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%qi_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26369,& 'frame/module_domain.f: Failed to allocate grid%qi_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qr_cu').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%qr_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26380,& 'frame/module_domain.f: Failed to allocate grid%qr_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qr_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qr_cu' grid%tail_statevars%DataName = 'QR_CU' grid%tail_statevars%Description = 'RAIN MIXING RATIO FROM A CU SCHEME' 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%qr_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qr_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26430,& 'frame/module_domain.f: Failed to allocate grid%qr_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qs_cu').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%qs_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26441,& 'frame/module_domain.f: Failed to allocate grid%qs_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qs_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'qs_cu' grid%tail_statevars%DataName = 'QS_CU' grid%tail_statevars%Description = 'SNOW MIXING RATIO FROM A CU SCHEME' 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%qs_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%qs_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26491,& 'frame/module_domain.f: Failed to allocate grid%qs_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nc_cu').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%nc_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26502,& 'frame/module_domain.f: Failed to allocate grid%nc_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nc_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nc_cu' grid%tail_statevars%DataName = 'NC_CU' grid%tail_statevars%Description = 'CLOUD WATER NUMBER CONCENTRATION FROM A CU SCHEME' grid%tail_statevars%Units = '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%nc_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%nc_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26552,& 'frame/module_domain.f: Failed to allocate grid%nc_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ni_cu').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%ni_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26563,& 'frame/module_domain.f: Failed to allocate grid%ni_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ni_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ni_cu' grid%tail_statevars%DataName = 'NI_CU' grid%tail_statevars%Description = 'CLOUD ICE NUMBER CONCENTRATION FROM A CU SCHEME' grid%tail_statevars%Units = '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%ni_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ni_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26613,& 'frame/module_domain.f: Failed to allocate grid%ni_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'nr_cu').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%nr_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26624,& 'frame/module_domain.f: Failed to allocate grid%nr_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nr_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'nr_cu' grid%tail_statevars%DataName = 'NR_CU' grid%tail_statevars%Description = 'RAIN NUMBER CONCENTRATION FROM A CU SCHEME' grid%tail_statevars%Units = '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%nr_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%nr_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26674,& 'frame/module_domain.f: Failed to allocate grid%nr_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ns_cu').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%ns_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26685,& 'frame/module_domain.f: Failed to allocate grid%ns_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ns_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ns_cu' grid%tail_statevars%DataName = 'NS_CU' grid%tail_statevars%Description = 'SNOW NUMBER CONCENTRATION FROM A CU SCHEME' grid%tail_statevars%Units = '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%ns_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ns_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26735,& 'frame/module_domain.f: Failed to allocate grid%ns_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn_cu').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%ccn_cu(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26746,& 'frame/module_domain.f: Failed to allocate grid%ccn_cu(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn_cu=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn_cu' grid%tail_statevars%DataName = 'CCN_CU' grid%tail_statevars%Description = 'CLOUD CONDENSATION NUCLEI CONCENTRATION FROM A CU SCHEME' grid%tail_statevars%Units = '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%ccn_cu grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn_cu(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26796,& 'frame/module_domain.f: Failed to allocate grid%ccn_cu(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cu_uaf').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cu_uaf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26807,& 'frame/module_domain.f: Failed to allocate grid%cu_uaf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cu_uaf=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cu_uaf' grid%tail_statevars%DataName = 'CU_UAF' grid%tail_statevars%Description = 'CU Updraft Area 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%cu_uaf 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%cu_uaf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26857,& 'frame/module_domain.f: Failed to allocate grid%cu_uaf(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efcs').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%efcs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26868,& 'frame/module_domain.f: Failed to allocate grid%efcs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efcs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efcs' grid%tail_statevars%DataName = 'EFCS' grid%tail_statevars%Description = 'Sub-grid Scale Cloud Effective Radius' grid%tail_statevars%Units = 'um' 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%efcs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efcs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26918,& 'frame/module_domain.f: Failed to allocate grid%efcs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efis').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%efis(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26929,& 'frame/module_domain.f: Failed to allocate grid%efis(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efis=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efis' grid%tail_statevars%DataName = 'EFIS' grid%tail_statevars%Description = 'Sub-grid Scale Ice Effective Radius' grid%tail_statevars%Units = 'um' 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%efis grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efis(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26979,& 'frame/module_domain.f: Failed to allocate grid%efis(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efcg').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%efcg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",26990,& 'frame/module_domain.f: Failed to allocate grid%efcg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efcg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efcg' grid%tail_statevars%DataName = 'EFCG' grid%tail_statevars%Description = 'Grid Scale Cloud Effective Radius' grid%tail_statevars%Units = 'um' 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%efcg grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efcg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27040,& 'frame/module_domain.f: Failed to allocate grid%efcg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efig').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%efig(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27051,& 'frame/module_domain.f: Failed to allocate grid%efig(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efig=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efig' grid%tail_statevars%DataName = 'EFIG' grid%tail_statevars%Description = 'Grid Scale Ice Effective Radius' grid%tail_statevars%Units = 'um' 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%efig grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efig(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27101,& 'frame/module_domain.f: Failed to allocate grid%efig(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efsg').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%efsg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27112,& 'frame/module_domain.f: Failed to allocate grid%efsg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efsg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efsg' grid%tail_statevars%DataName = 'EFSG' grid%tail_statevars%Description = 'Grid Scale Snow Effective Radius' grid%tail_statevars%Units = 'um' 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%efsg grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efsg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27162,& 'frame/module_domain.f: Failed to allocate grid%efsg(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'efss').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%efss(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27173,& 'frame/module_domain.f: Failed to allocate grid%efss(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%efss=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'efss' grid%tail_statevars%DataName = 'EFSS' grid%tail_statevars%Description = 'Subgrid Scale Snow Effective Radius' grid%tail_statevars%Units = 'um' 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%efss grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%efss(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27223,& 'frame/module_domain.f: Failed to allocate grid%efss(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wact').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%wact(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27234,& 'frame/module_domain.f: Failed to allocate grid%wact(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wact=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wact' grid%tail_statevars%DataName = 'WACT' grid%tail_statevars%Description = 'Aerosol Activation Updraft' 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%wact grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%wact(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27284,& 'frame/module_domain.f: Failed to allocate grid%wact(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn1_gs').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%ccn1_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27295,& 'frame/module_domain.f: Failed to allocate grid%ccn1_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn1_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn1_gs' grid%tail_statevars%DataName = 'CCN1_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.02%' grid%tail_statevars%Units = ' /cm-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%ccn1_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn1_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27345,& 'frame/module_domain.f: Failed to allocate grid%ccn1_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn2_gs').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%ccn2_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27356,& 'frame/module_domain.f: Failed to allocate grid%ccn2_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn2_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn2_gs' grid%tail_statevars%DataName = 'CCN2_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.05%' grid%tail_statevars%Units = ' /cm-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%ccn2_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn2_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27406,& 'frame/module_domain.f: Failed to allocate grid%ccn2_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn3_gs').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%ccn3_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27417,& 'frame/module_domain.f: Failed to allocate grid%ccn3_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn3_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn3_gs' grid%tail_statevars%DataName = 'CCN3_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.1%' grid%tail_statevars%Units = ' /cm-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%ccn3_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn3_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27467,& 'frame/module_domain.f: Failed to allocate grid%ccn3_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn4_gs').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%ccn4_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27478,& 'frame/module_domain.f: Failed to allocate grid%ccn4_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn4_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn4_gs' grid%tail_statevars%DataName = 'CCN4_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.2%' grid%tail_statevars%Units = ' /cm-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%ccn4_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn4_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27528,& 'frame/module_domain.f: Failed to allocate grid%ccn4_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn5_gs').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%ccn5_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27539,& 'frame/module_domain.f: Failed to allocate grid%ccn5_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn5_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn5_gs' grid%tail_statevars%DataName = 'CCN5_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.3%' grid%tail_statevars%Units = ' /cm-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%ccn5_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn5_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27589,& 'frame/module_domain.f: Failed to allocate grid%ccn5_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn6_gs').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%ccn6_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27600,& 'frame/module_domain.f: Failed to allocate grid%ccn6_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn6_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn6_gs' grid%tail_statevars%DataName = 'CCN6_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=0.5%' grid%tail_statevars%Units = ' /cm-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%ccn6_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn6_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27650,& 'frame/module_domain.f: Failed to allocate grid%ccn6_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccn7_gs').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%ccn7_gs(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27661,& 'frame/module_domain.f: Failed to allocate grid%ccn7_gs(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccn7_gs=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccn7_gs' grid%tail_statevars%DataName = 'CCN7_GS' grid%tail_statevars%Description = 'Grid Scale Cloud Condensation Nuclei at S=1.0%' grid%tail_statevars%Units = ' /cm-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%ccn7_gs grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%ccn7_gs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27711,& 'frame/module_domain.f: Failed to allocate grid%ccn7_gs(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qc_bl').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_bl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27722,& 'frame/module_domain.f: Failed to allocate grid%qc_bl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_bl=initial_data_value IF (.NOT.grid%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_bl' grid%tail_statevars%DataName = 'QC_BL' grid%tail_statevars%Description = 'CLOUD WATER MIXING RATIO IN PBL schemes' 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%qc_bl 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%qc_bl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27772,& 'frame/module_domain.f: Failed to allocate grid%qc_bl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'qi_bl').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_bl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27783,& 'frame/module_domain.f: Failed to allocate grid%qi_bl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qi_bl=initial_data_value IF (.NOT.grid%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_bl' grid%tail_statevars%DataName = 'QI_BL' grid%tail_statevars%Description = 'CLOUD ICE MIXING RATIO IN PBL schemes' 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%qi_bl 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%qi_bl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27833,& 'frame/module_domain.f: Failed to allocate grid%qi_bl(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 = 'stepave_count' grid%tail_statevars%DataName = 'STEPAVE_COUNT' grid%tail_statevars%Description = 'time steps contained in averages for convective transport' 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%stepave_count grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%stepave_count=0 IF(okay_to_alloc.AND.in_use_for_config(id,'rthften').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%rthften(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27863,& 'frame/module_domain.f: Failed to allocate grid%rthften(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthften=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthften' grid%tail_statevars%DataName = 'RTHFTEN' grid%tail_statevars%Description = 'TOTAL ADVECTIVE POTENTIAL TEMPERATURE TENDENCY' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthften 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%rthften(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27913,& 'frame/module_domain.f: Failed to allocate grid%rthften(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rqvften').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%rqvften(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27924,& 'frame/module_domain.f: Failed to allocate grid%rqvften(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvften=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rqvften' grid%tail_statevars%DataName = 'RQVFTEN' grid%tail_statevars%Description = 'TOTAL ADVECTIVE MOISTURE TENDENCY' grid%tail_statevars%Units = 'kg kg-1 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%rqvften 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%rqvften(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",27974,& 'frame/module_domain.f: Failed to allocate grid%rqvften(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 = 'stepcu' grid%tail_statevars%DataName = 'STEPCU' grid%tail_statevars%Description = 'NUMBER OF FUNDAMENTAL TIMESTEPS BETWEEN CONVECTION 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%stepcu grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%stepcu=0 IF(okay_to_alloc.AND.in_use_for_config(id,'rthraten'))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%rthraten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28004,& 'frame/module_domain.f: Failed to allocate grid%rthraten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthraten=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthraten' grid%tail_statevars%DataName = 'RTHRATEN' grid%tail_statevars%Description = 'THETA TENDENCY DUE TO RADIATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthraten 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%rthraten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28054,& 'frame/module_domain.f: Failed to allocate grid%rthraten(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rthratenlw').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%rthratenlw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28065,& 'frame/module_domain.f: Failed to allocate grid%rthratenlw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthratenlw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthratenlw' grid%tail_statevars%DataName = 'RTHRATLW' grid%tail_statevars%Description = 'UNCOUPLED THETA TENDENCY DUE TO LONG WAVE RADIATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthratenlw 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%rthratenlw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28115,& 'frame/module_domain.f: Failed to allocate grid%rthratenlw(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rthratensw').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%rthratensw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28126,& 'frame/module_domain.f: Failed to allocate grid%rthratensw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthratensw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rthratensw' grid%tail_statevars%DataName = 'RTHRATSW' grid%tail_statevars%Description = 'UNCOUPLED THETA TENDENCY DUE TO SHORT WAVE RADIATION' grid%tail_statevars%Units = 'K s-1' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XZY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 3 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_3d => grid%rthratensw 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%rthratensw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28176,& 'frame/module_domain.f: Failed to allocate grid%rthratensw(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra').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%cldfra(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28187,& 'frame/module_domain.f: Failed to allocate grid%cldfra(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfra' grid%tail_statevars%DataName = 'CLDFRA' grid%tail_statevars%Description = 'CLOUD FRACTION' 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%cldfra grid%tail_statevars%streams(1) = 1 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = kds grid%tail_statevars%ed2 = (kde-1) grid%tail_statevars%sd3 = jds grid%tail_statevars%ed3 = (jde-1) grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = kms grid%tail_statevars%em2 = kme grid%tail_statevars%sm3 = jms grid%tail_statevars%em3 = jme grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = kps grid%tail_statevars%ep2 = MIN( (kde-1), kpe ) grid%tail_statevars%sp3 = jps grid%tail_statevars%ep3 = MIN( (jde-1), jpe ) grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'bottom_top' grid%tail_statevars%dimname3 = 'south_north' ENDIF ELSE ALLOCATE(grid%cldfra(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28237,& 'frame/module_domain.f: Failed to allocate grid%cldfra(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'convcld').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%convcld(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28248,& 'frame/module_domain.f: Failed to allocate grid%convcld(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%convcld=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'convcld' grid%tail_statevars%DataName = 'CONVCLD' grid%tail_statevars%Description = 'BMJ CONVECTIVE CLOUD' 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%convcld 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%convcld(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28298,& 'frame/module_domain.f: Failed to allocate grid%convcld(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ccldfra').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%ccldfra(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28309,& 'frame/module_domain.f: Failed to allocate grid%ccldfra(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ccldfra=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ccldfra' grid%tail_statevars%DataName = 'CCLDFRA' grid%tail_statevars%Description = 'CONVECTIVE CLOUD FRACTION' 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%ccldfra 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%ccldfra(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28359,& 'frame/module_domain.f: Failed to allocate grid%ccldfra(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra_old').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%cldfra_old(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28370,& 'frame/module_domain.f: Failed to allocate grid%cldfra_old(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra_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 = 'cldfra_old' grid%tail_statevars%DataName = 'CLDFRA_OLD' grid%tail_statevars%Description = 'previous time level cldfra' 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%cldfra_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 = 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%cldfra_old(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28420,& 'frame/module_domain.f: Failed to allocate grid%cldfra_old(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldfra_bl').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%cldfra_bl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28431,& 'frame/module_domain.f: Failed to allocate grid%cldfra_bl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra_bl=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldfra_bl' grid%tail_statevars%DataName = 'CLDFRA_BL' grid%tail_statevars%Description = 'CLOUD FRACTION pbl' 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%cldfra_bl 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%cldfra_bl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28481,& 'frame/module_domain.f: Failed to allocate grid%cldfra_bl(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'cldt').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%cldt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28492,& 'frame/module_domain.f: Failed to allocate grid%cldt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldt=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'cldt' grid%tail_statevars%DataName = 'CFRACT' grid%tail_statevars%Description = 'TOTAL 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%cldt 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%cldt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28542,& 'frame/module_domain.f: Failed to allocate grid%cldt(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdown'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdown(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28553,& 'frame/module_domain.f: Failed to allocate grid%swdown(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdown=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdown' grid%tail_statevars%DataName = 'SWDOWN' grid%tail_statevars%Description = '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%swdown 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%swdown(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28603,& 'frame/module_domain.f: Failed to allocate grid%swdown(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdown2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdown2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28614,& 'frame/module_domain.f: Failed to allocate grid%swdown2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdown2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdown2' grid%tail_statevars%DataName = 'SWDOWN2' grid%tail_statevars%Description = 'DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE FROM FARMS' 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%swdown2 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%swdown2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28664,& 'frame/module_domain.f: Failed to allocate grid%swdown2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdownc').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdownc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28675,& 'frame/module_domain.f: Failed to allocate grid%swdownc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdownc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdownc' grid%tail_statevars%DataName = 'SWDOWNC' grid%tail_statevars%Description = 'DOWNWARD CLEAR-SKY 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 = .FALSE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%swdownc 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%swdownc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28725,& 'frame/module_domain.f: Failed to allocate grid%swdownc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdownc2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdownc2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28736,& 'frame/module_domain.f: Failed to allocate grid%swdownc2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdownc2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdownc2' grid%tail_statevars%DataName = 'SWDOWNC2' grid%tail_statevars%Description = 'CLEAR-SKY DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE FROM FARMS' 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%swdownc2 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%swdownc2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28786,& 'frame/module_domain.f: Failed to allocate grid%swdownc2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gsw'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gsw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28797,& 'frame/module_domain.f: Failed to allocate grid%gsw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gsw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gsw' grid%tail_statevars%DataName = 'GSW' grid%tail_statevars%Description = 'NET 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%gsw 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%gsw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28847,& 'frame/module_domain.f: Failed to allocate grid%gsw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'glw'))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(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28858,& 'frame/module_domain.f: Failed to allocate grid%glw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%glw=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'glw' grid%tail_statevars%DataName = 'GLW' grid%tail_statevars%Description = '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 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%glw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28908,& 'frame/module_domain.f: Failed to allocate grid%glw(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swnorm'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swnorm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28919,& 'frame/module_domain.f: Failed to allocate grid%swnorm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swnorm=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swnorm' grid%tail_statevars%DataName = 'SWNORM' grid%tail_statevars%Description = 'NORMAL SHORT WAVE FLUX AT GROUND SURFACE (SLOPE-DEPENDENT)' 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%swnorm 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%swnorm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28969,& 'frame/module_domain.f: Failed to allocate grid%swnorm(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'diffuse_frac'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%diffuse_frac(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",28980,& 'frame/module_domain.f: Failed to allocate grid%diffuse_frac(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%diffuse_frac=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'diffuse_frac' grid%tail_statevars%DataName = 'DIFFUSE_FRAC' grid%tail_statevars%Description = 'DIFFUSE FRACTION OF SURFACE SHORTWAVE IRRADIANCE' 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%diffuse_frac 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%diffuse_frac(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29030,& 'frame/module_domain.f: Failed to allocate grid%diffuse_frac(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddir'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddir(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29041,& 'frame/module_domain.f: Failed to allocate grid%swddir(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddir=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddir' grid%tail_statevars%DataName = 'SWDDIR' grid%tail_statevars%Description = 'Shortwave surface downward direct irradiance' 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%swddir 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%swddir(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29091,& 'frame/module_domain.f: Failed to allocate grid%swddir(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddir2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddir2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29102,& 'frame/module_domain.f: Failed to allocate grid%swddir2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddir2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddir2' grid%tail_statevars%DataName = 'SWDDIR2' grid%tail_statevars%Description = 'Shortwave surface downward direct irradiance from FARMS' 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%swddir2 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%swddir2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29152,& 'frame/module_domain.f: Failed to allocate grid%swddir2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddirc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddirc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29163,& 'frame/module_domain.f: Failed to allocate grid%swddirc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddirc=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddirc' grid%tail_statevars%DataName = 'SWDDIRC' grid%tail_statevars%Description = 'Clear-sky Shortwave surface downward direct irradiance' 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%swddirc 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%swddirc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29213,& 'frame/module_domain.f: Failed to allocate grid%swddirc(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddni'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddni(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29224,& 'frame/module_domain.f: Failed to allocate grid%swddni(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddni=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddni' grid%tail_statevars%DataName = 'SWDDNI' grid%tail_statevars%Description = 'Shortwave surface downward direct normal irradiance' 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%swddni 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%swddni(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29274,& 'frame/module_domain.f: Failed to allocate grid%swddni(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddni2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddni2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29285,& 'frame/module_domain.f: Failed to allocate grid%swddni2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddni2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddni2' grid%tail_statevars%DataName = 'SWDDNI2' grid%tail_statevars%Description = 'Shortwave surface downward direct normal irradiance from FARMS' 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%swddni2 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%swddni2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29335,& 'frame/module_domain.f: Failed to allocate grid%swddni2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddnic'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddnic(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29346,& 'frame/module_domain.f: Failed to allocate grid%swddnic(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddnic=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddnic' grid%tail_statevars%DataName = 'SWDDNIC' grid%tail_statevars%Description = 'Clear-sky Shortwave surface downward direct normal irradiance' 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%swddnic 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%swddnic(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29396,& 'frame/module_domain.f: Failed to allocate grid%swddnic(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddnic2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddnic2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29407,& 'frame/module_domain.f: Failed to allocate grid%swddnic2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddnic2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddnic2' grid%tail_statevars%DataName = 'SWDDNIC2' grid%tail_statevars%Description = 'Clear-sky Shortwave surface downward direct normal irradiance from FARMS' 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%swddnic2 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%swddnic2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29457,& 'frame/module_domain.f: Failed to allocate grid%swddnic2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddif'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddif(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29468,& 'frame/module_domain.f: Failed to allocate grid%swddif(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddif=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddif' grid%tail_statevars%DataName = 'SWDDIF' grid%tail_statevars%Description = 'Shortwave surface downward diffuse irradiance' 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%swddif 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%swddif(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29518,& 'frame/module_domain.f: Failed to allocate grid%swddif(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddif2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddif2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29529,& 'frame/module_domain.f: Failed to allocate grid%swddif2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddif2=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddif2' grid%tail_statevars%DataName = 'SWDDIF2' grid%tail_statevars%Description = 'Shortwave surface downward diffuse irradiance from FARMS' 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%swddif2 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%swddif2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29579,& 'frame/module_domain.f: Failed to allocate grid%swddif2(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29590,& 'frame/module_domain.f: Failed to allocate grid%gx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gx' grid%tail_statevars%DataName = 'GX' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%gx 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%gx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29640,& 'frame/module_domain.f: Failed to allocate grid%gx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%bx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29651,& 'frame/module_domain.f: Failed to allocate grid%bx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bx=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bx' grid%tail_statevars%DataName = 'BX' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%bx 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%bx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29701,& 'frame/module_domain.f: Failed to allocate grid%bx(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'gg'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%gg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29712,& 'frame/module_domain.f: Failed to allocate grid%gg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gg=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'gg' grid%tail_statevars%DataName = 'GG' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%gg 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%gg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29762,& 'frame/module_domain.f: Failed to allocate grid%gg(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'bb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%bb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29773,& 'frame/module_domain.f: Failed to allocate grid%bb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bb=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'bb' grid%tail_statevars%DataName = 'BB' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%bb 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%bb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29823,& 'frame/module_domain.f: Failed to allocate grid%bb(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'coszen_ref'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%coszen_ref(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29834,& 'frame/module_domain.f: Failed to allocate grid%coszen_ref(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%coszen_ref=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'coszen_ref' grid%tail_statevars%DataName = 'COSZEN_REF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%coszen_ref 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%coszen_ref(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29884,& 'frame/module_domain.f: Failed to allocate grid%coszen_ref(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swdown_ref'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swdown_ref(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29895,& 'frame/module_domain.f: Failed to allocate grid%swdown_ref(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdown_ref=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swdown_ref' grid%tail_statevars%DataName = 'SWDOWN_REF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%swdown_ref 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%swdown_ref(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29945,& 'frame/module_domain.f: Failed to allocate grid%swdown_ref(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'swddir_ref'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%swddir_ref(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",29956,& 'frame/module_domain.f: Failed to allocate grid%swddir_ref(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swddir_ref=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'swddir_ref' grid%tail_statevars%DataName = 'SWDDIR_REF' grid%tail_statevars%Description = '' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%swddir_ref 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%swddir_ref(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30006,& 'frame/module_domain.f: Failed to allocate grid%swddir_ref(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aod5502d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%aod5502d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30017,& 'frame/module_domain.f: Failed to allocate grid%aod5502d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aod5502d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aod5502d' grid%tail_statevars%DataName = 'AOD5502D' grid%tail_statevars%Description = 'Total aerosol optical depth at 550 nm' 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%aod5502d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097664 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%aod5502d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30067,& 'frame/module_domain.f: Failed to allocate grid%aod5502d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'angexp2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%angexp2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30078,& 'frame/module_domain.f: Failed to allocate grid%angexp2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%angexp2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'angexp2d' grid%tail_statevars%DataName = 'ANGEXP2D' grid%tail_statevars%Description = 'Aerosol Angstrom exponent' 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%angexp2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097664 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%angexp2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30128,& 'frame/module_domain.f: Failed to allocate grid%angexp2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerssa2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%aerssa2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30139,& 'frame/module_domain.f: Failed to allocate grid%aerssa2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerssa2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerssa2d' grid%tail_statevars%DataName = 'AERSSA2D' grid%tail_statevars%Description = 'Aerosol single-scattering albedo' grid%tail_statevars%Units = '' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%aerssa2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097664 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%aerssa2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30189,& 'frame/module_domain.f: Failed to allocate grid%aerssa2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aerasy2d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%aerasy2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30200,& 'frame/module_domain.f: Failed to allocate grid%aerasy2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerasy2d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aerasy2d' grid%tail_statevars%DataName = 'AERASY2D' grid%tail_statevars%Description = 'Aerosol asymmetry factor' 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%aerasy2d grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097664 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%aerasy2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30250,& 'frame/module_domain.f: Failed to allocate grid%aerasy2d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'aod5503d').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%aod5503d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30261,& 'frame/module_domain.f: Failed to allocate grid%aod5503d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aod5503d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'aod5503d' grid%tail_statevars%DataName = 'AOD5503D' grid%tail_statevars%Description = '3D aerosol optical depth at 550 nm' 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%aod5503d 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%aod5503d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30311,& 'frame/module_domain.f: Failed to allocate grid%aod5503d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taod5503d').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%taod5503d(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30322,& 'frame/module_domain.f: Failed to allocate grid%taod5503d(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taod5503d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taod5503d' grid%tail_statevars%DataName = 'TAOD5503D' grid%tail_statevars%Description = '3D aerosol optical depth at 550 nm (MP=28)' 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%taod5503d 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%taod5503d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30372,& 'frame/module_domain.f: Failed to allocate grid%taod5503d(1,1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taod5502d').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taod5502d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30383,& 'frame/module_domain.f: Failed to allocate grid%taod5502d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taod5502d=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taod5502d' grid%tail_statevars%DataName = 'TAOD5502D' grid%tail_statevars%Description = '2D aerosol optical depth at 550 nm (MP=28)' 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%taod5502d 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%taod5502d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30433,& 'frame/module_domain.f: Failed to allocate grid%taod5502d(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2min').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2min(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30444,& 'frame/module_domain.f: Failed to allocate grid%t2min(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2min=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2min' grid%tail_statevars%DataName = 'T2MIN' grid%tail_statevars%Description = 'MINIMUM TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%t2min grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t2min(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30494,& 'frame/module_domain.f: Failed to allocate grid%t2min(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30505,& 'frame/module_domain.f: Failed to allocate grid%t2max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2max' grid%tail_statevars%DataName = 'T2MAX' grid%tail_statevars%Description = 'MAXIMUM TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%t2max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t2max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30555,& 'frame/module_domain.f: Failed to allocate grid%t2max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tt2min').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tt2min(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30566,& 'frame/module_domain.f: Failed to allocate grid%tt2min(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tt2min=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tt2min' grid%tail_statevars%DataName = 'TT2MIN' grid%tail_statevars%Description = 'TIME OF MINIMUM TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tt2min grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tt2min(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30616,& 'frame/module_domain.f: Failed to allocate grid%tt2min(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tt2max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tt2max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30627,& 'frame/module_domain.f: Failed to allocate grid%tt2max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tt2max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tt2max' grid%tail_statevars%DataName = 'TT2MAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tt2max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tt2max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30677,& 'frame/module_domain.f: Failed to allocate grid%tt2max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30688,& 'frame/module_domain.f: Failed to allocate grid%t2mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2mean' grid%tail_statevars%DataName = 'T2MEAN' grid%tail_statevars%Description = 'MEAN TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%t2mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t2mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30738,& 'frame/module_domain.f: Failed to allocate grid%t2mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'t2std').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%t2std(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30749,& 'frame/module_domain.f: Failed to allocate grid%t2std(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2std=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 't2std' grid%tail_statevars%DataName = 'T2STD' grid%tail_statevars%Description = 'STANDARD DEV. TEMPERATURE AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%t2std grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%t2std(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30799,& 'frame/module_domain.f: Failed to allocate grid%t2std(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2min').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2min(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30810,& 'frame/module_domain.f: Failed to allocate grid%q2min(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2min=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2min' grid%tail_statevars%DataName = 'Q2MIN' grid%tail_statevars%Description = 'MINIMUM WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%q2min grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q2min(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30860,& 'frame/module_domain.f: Failed to allocate grid%q2min(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30871,& 'frame/module_domain.f: Failed to allocate grid%q2max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2max' grid%tail_statevars%DataName = 'Q2MAX' grid%tail_statevars%Description = 'MAXIMUM WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%q2max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q2max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30921,& 'frame/module_domain.f: Failed to allocate grid%q2max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tq2min').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tq2min(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30932,& 'frame/module_domain.f: Failed to allocate grid%tq2min(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tq2min=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tq2min' grid%tail_statevars%DataName = 'TQ2MIN' grid%tail_statevars%Description = 'TIME OF MINIMUM WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tq2min grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tq2min(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30982,& 'frame/module_domain.f: Failed to allocate grid%tq2min(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tq2max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tq2max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",30993,& 'frame/module_domain.f: Failed to allocate grid%tq2max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tq2max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tq2max' grid%tail_statevars%DataName = 'TQ2MAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tq2max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tq2max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31043,& 'frame/module_domain.f: Failed to allocate grid%tq2max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31054,& 'frame/module_domain.f: Failed to allocate grid%q2mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2mean' grid%tail_statevars%DataName = 'Q2MEAN' grid%tail_statevars%Description = 'MEAN WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%q2mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q2mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31104,& 'frame/module_domain.f: Failed to allocate grid%q2mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'q2std').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%q2std(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31115,& 'frame/module_domain.f: Failed to allocate grid%q2std(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2std=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'q2std' grid%tail_statevars%DataName = 'Q2STD' grid%tail_statevars%Description = 'STANDARD DEV. WATER VAPOR MIX. RAT. AT 2M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%q2std grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%q2std(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31165,& 'frame/module_domain.f: Failed to allocate grid%q2std(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'skintempmin').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%skintempmin(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31176,& 'frame/module_domain.f: Failed to allocate grid%skintempmin(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%skintempmin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'skintempmin' grid%tail_statevars%DataName = 'SKINTEMPMIN' grid%tail_statevars%Description = 'MINIMUM SKIN TEMPERATURE IN DIAGNOSTIC OUTPUT INTERVAL' 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%skintempmin grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%skintempmin(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31226,& 'frame/module_domain.f: Failed to allocate grid%skintempmin(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'skintempmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%skintempmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31237,& 'frame/module_domain.f: Failed to allocate grid%skintempmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%skintempmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'skintempmax' grid%tail_statevars%DataName = 'SKINTEMPMAX' grid%tail_statevars%Description = 'MAXIMUM SKIN TEMPERATURE IN DIAGNOSTIC OUTPUT INTERVAL' 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%skintempmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%skintempmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31287,& 'frame/module_domain.f: Failed to allocate grid%skintempmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tskintempmin').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tskintempmin(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31298,& 'frame/module_domain.f: Failed to allocate grid%tskintempmin(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tskintempmin=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tskintempmin' grid%tail_statevars%DataName = 'TSKINTEMPMIN' grid%tail_statevars%Description = 'TIME OF MINIMUM SKIN TEMPERATURE IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tskintempmin grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tskintempmin(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31348,& 'frame/module_domain.f: Failed to allocate grid%tskintempmin(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tskintempmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tskintempmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31359,& 'frame/module_domain.f: Failed to allocate grid%tskintempmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tskintempmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tskintempmax' grid%tail_statevars%DataName = 'TSKINTEMPMAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM SKIN TEMPERATURE IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tskintempmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tskintempmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31409,& 'frame/module_domain.f: Failed to allocate grid%tskintempmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'skintempmean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%skintempmean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31420,& 'frame/module_domain.f: Failed to allocate grid%skintempmean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%skintempmean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'skintempmean' grid%tail_statevars%DataName = 'SKINTEMPMEAN' grid%tail_statevars%Description = 'MEAN SKIN TEMPERATURE IN DIAGNOSTIC OUTPUT INTERVAL' 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%skintempmean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%skintempmean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31470,& 'frame/module_domain.f: Failed to allocate grid%skintempmean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'skintempstd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%skintempstd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31481,& 'frame/module_domain.f: Failed to allocate grid%skintempstd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%skintempstd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'skintempstd' grid%tail_statevars%DataName = 'SKINTEMPSTD' grid%tail_statevars%Description = 'STANDARD DEV. OF SKIN TEMPERATURE IN CLWRF HOURS' 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%skintempstd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%skintempstd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31531,& 'frame/module_domain.f: Failed to allocate grid%skintempstd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31542,& 'frame/module_domain.f: Failed to allocate grid%u10max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u10max' grid%tail_statevars%DataName = 'U10MAX' grid%tail_statevars%Description = 'MAXIMUM U AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%u10max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u10max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31592,& 'frame/module_domain.f: Failed to allocate grid%u10max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31603,& 'frame/module_domain.f: Failed to allocate grid%v10max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v10max' grid%tail_statevars%DataName = 'V10MAX' grid%tail_statevars%Description = 'MAXIMUM V AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%v10max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v10max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31653,& 'frame/module_domain.f: Failed to allocate grid%v10max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'spduv10max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%spduv10max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31664,& 'frame/module_domain.f: Failed to allocate grid%spduv10max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%spduv10max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'spduv10max' grid%tail_statevars%DataName = 'SPDUV10MAX' grid%tail_statevars%Description = 'MAXIMUM WIND SPEED AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%spduv10max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%spduv10max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31714,& 'frame/module_domain.f: Failed to allocate grid%spduv10max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'tspduv10max').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%tspduv10max(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31725,& 'frame/module_domain.f: Failed to allocate grid%tspduv10max(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tspduv10max=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'tspduv10max' grid%tail_statevars%DataName = 'TSPDUV10MAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM WIND SPEED AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%tspduv10max grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%tspduv10max(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31775,& 'frame/module_domain.f: Failed to allocate grid%tspduv10max(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31786,& 'frame/module_domain.f: Failed to allocate grid%u10mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u10mean' grid%tail_statevars%DataName = 'U10MEAN' grid%tail_statevars%Description = 'MEAN U AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%u10mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u10mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31836,& 'frame/module_domain.f: Failed to allocate grid%u10mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31847,& 'frame/module_domain.f: Failed to allocate grid%v10mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v10mean' grid%tail_statevars%DataName = 'V10MEAN' grid%tail_statevars%Description = 'MEAN V AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%v10mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v10mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31897,& 'frame/module_domain.f: Failed to allocate grid%v10mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'spduv10mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%spduv10mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31908,& 'frame/module_domain.f: Failed to allocate grid%spduv10mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%spduv10mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'spduv10mean' grid%tail_statevars%DataName = 'SPDUV10MEAN' grid%tail_statevars%Description = 'MEAN WIND SPEED AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%spduv10mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%spduv10mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31958,& 'frame/module_domain.f: Failed to allocate grid%spduv10mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u10std').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u10std(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",31969,& 'frame/module_domain.f: Failed to allocate grid%u10std(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10std=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'u10std' grid%tail_statevars%DataName = 'U10STD' grid%tail_statevars%Description = 'STANDARD DEV. U AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%u10std grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u10std(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32019,& 'frame/module_domain.f: Failed to allocate grid%u10std(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v10std').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v10std(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32030,& 'frame/module_domain.f: Failed to allocate grid%v10std(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10std=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'v10std' grid%tail_statevars%DataName = 'V10STD' grid%tail_statevars%Description = 'STANDARD DEV. V AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%v10std grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v10std(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32080,& 'frame/module_domain.f: Failed to allocate grid%v10std(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'spduv10std').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%spduv10std(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32091,& 'frame/module_domain.f: Failed to allocate grid%spduv10std(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%spduv10std=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'spduv10std' grid%tail_statevars%DataName = 'SPDUV10STD' grid%tail_statevars%Description = 'STANDARD DEV. WIND SPEED AT 10M HEIGHT IN DIAGNOSTIC OUTPUT INTERVAL' 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%spduv10std grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%spduv10std(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32141,& 'frame/module_domain.f: Failed to allocate grid%spduv10std(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincvmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincvmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32152,& 'frame/module_domain.f: Failed to allocate grid%raincvmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincvmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincvmax' grid%tail_statevars%DataName = 'RAINCVMAX' grid%tail_statevars%Description = 'MAXIMUM CUMULUS PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%raincvmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%raincvmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32202,& 'frame/module_domain.f: Failed to allocate grid%raincvmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainncvmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainncvmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32213,& 'frame/module_domain.f: Failed to allocate grid%rainncvmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainncvmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainncvmax' grid%tail_statevars%DataName = 'RAINNCVMAX' grid%tail_statevars%Description = 'MAXIMUM GRID SCALE PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%rainncvmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainncvmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32263,& 'frame/module_domain.f: Failed to allocate grid%rainncvmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'traincvmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%traincvmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32274,& 'frame/module_domain.f: Failed to allocate grid%traincvmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%traincvmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'traincvmax' grid%tail_statevars%DataName = 'TRAINCVMAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM CUMULUS PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%traincvmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%traincvmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32324,& 'frame/module_domain.f: Failed to allocate grid%traincvmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'trainncvmax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%trainncvmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32335,& 'frame/module_domain.f: Failed to allocate grid%trainncvmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trainncvmax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'trainncvmax' grid%tail_statevars%DataName = 'TRAINNCVMAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM GRID SCALE PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%trainncvmax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%trainncvmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32385,& 'frame/module_domain.f: Failed to allocate grid%trainncvmax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincvmean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincvmean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32396,& 'frame/module_domain.f: Failed to allocate grid%raincvmean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincvmean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincvmean' grid%tail_statevars%DataName = 'RAINCVMEAN' grid%tail_statevars%Description = 'MEAN CUMULUS PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%raincvmean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%raincvmean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32446,& 'frame/module_domain.f: Failed to allocate grid%raincvmean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainncvmean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainncvmean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32457,& 'frame/module_domain.f: Failed to allocate grid%rainncvmean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainncvmean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainncvmean' grid%tail_statevars%DataName = 'RAINNCVMEAN' grid%tail_statevars%Description = 'MEAN GRID SCALE PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%rainncvmean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainncvmean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32507,& 'frame/module_domain.f: Failed to allocate grid%rainncvmean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'raincvstd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%raincvstd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32518,& 'frame/module_domain.f: Failed to allocate grid%raincvstd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincvstd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'raincvstd' grid%tail_statevars%DataName = 'RAINCVSTD' grid%tail_statevars%Description = 'STANDARD DEV. CUMULUS PRECIPITATION FLUX IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%raincvstd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%raincvstd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32568,& 'frame/module_domain.f: Failed to allocate grid%raincvstd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'rainncvstd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%rainncvstd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32579,& 'frame/module_domain.f: Failed to allocate grid%rainncvstd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainncvstd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'rainncvstd' grid%tail_statevars%DataName = 'RAINNCVSTD' grid%tail_statevars%Description = 'STANDARD DEV. GRID SCALE PRECIPITATION IN FLUX DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'kg m-2 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%rainncvstd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%rainncvstd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32629,& 'frame/module_domain.f: Failed to allocate grid%rainncvstd(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' grid%tail_statevars%DataName = 'NSTEPS' grid%tail_statevars%Description = 'Time Step Counter' 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 grid%tail_statevars%streams(1) = 0 grid%tail_statevars%streams(2) = 2097152 ENDIF IF ( setinitval .EQ. 3 ) grid%nsteps=0 IF(okay_to_alloc.AND.in_use_for_config(id,'utau').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utau(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32659,& 'frame/module_domain.f: Failed to allocate grid%utau(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utau=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utau' grid%tail_statevars%DataName = 'UTAU' grid%tail_statevars%Description = 'ZONAL WIND STRESS' grid%tail_statevars%Units = 'N 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%utau 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%utau(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32709,& 'frame/module_domain.f: Failed to allocate grid%utau(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vtau').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vtau(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32720,& 'frame/module_domain.f: Failed to allocate grid%vtau(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vtau=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vtau' grid%tail_statevars%DataName = 'VTAU' grid%tail_statevars%Description = 'MERIDIONAL WIND STRESS' grid%tail_statevars%Units = 'N 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%vtau 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%vtau(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32770,& 'frame/module_domain.f: Failed to allocate grid%vtau(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taum').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taum(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32781,& 'frame/module_domain.f: Failed to allocate grid%taum(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taum=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taum' grid%tail_statevars%DataName = 'TAUM' grid%tail_statevars%Description = 'WIND STRESS MODULE' grid%tail_statevars%Units = 'N 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%taum 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%taum(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32831,& 'frame/module_domain.f: Failed to allocate grid%taum(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'utaumean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utaumean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32842,& 'frame/module_domain.f: Failed to allocate grid%utaumean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utaumean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utaumean' grid%tail_statevars%DataName = 'UTAUMEAN' grid%tail_statevars%Description = 'MEAN ZONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%utaumean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%utaumean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32892,& 'frame/module_domain.f: Failed to allocate grid%utaumean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vtaumean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vtaumean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32903,& 'frame/module_domain.f: Failed to allocate grid%vtaumean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vtaumean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vtaumean' grid%tail_statevars%DataName = 'VTAUMEAN' grid%tail_statevars%Description = 'MEAN MERIDIONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%vtaumean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vtaumean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32953,& 'frame/module_domain.f: Failed to allocate grid%vtaumean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taummean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taummean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",32964,& 'frame/module_domain.f: Failed to allocate grid%taummean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taummean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taummean' grid%tail_statevars%DataName = 'TAUMMEAN' grid%tail_statevars%Description = 'MEAN WIND STRESS MODULE IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%taummean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%taummean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33014,& 'frame/module_domain.f: Failed to allocate grid%taummean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'ttaummax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%ttaummax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33025,& 'frame/module_domain.f: Failed to allocate grid%ttaummax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ttaummax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'ttaummax' grid%tail_statevars%DataName = 'TTAUMMAX' grid%tail_statevars%Description = 'TIME OF MAXIMUM WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'minute' grid%tail_statevars%Type = 'r' grid%tail_statevars%ProcOrient = ' ' grid%tail_statevars%MemoryOrder = 'XY' grid%tail_statevars%Stagger = '' grid%tail_statevars%Ntl = 0 grid%tail_statevars%Ndim = 2 grid%tail_statevars%Restart = .TRUE. grid%tail_statevars%scalar_array = .FALSE. grid%tail_statevars%rfield_2d => grid%ttaummax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%ttaummax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33075,& 'frame/module_domain.f: Failed to allocate grid%ttaummax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'utaumax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utaumax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33086,& 'frame/module_domain.f: Failed to allocate grid%utaumax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utaumax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utaumax' grid%tail_statevars%DataName = 'UTAUMAX' grid%tail_statevars%Description = 'MAXIMUM ZONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%utaumax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%utaumax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33136,& 'frame/module_domain.f: Failed to allocate grid%utaumax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vtaumax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vtaumax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33147,& 'frame/module_domain.f: Failed to allocate grid%vtaumax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vtaumax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vtaumax' grid%tail_statevars%DataName = 'VTAUMAX' grid%tail_statevars%Description = 'MAXIMUM MERIDIONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%vtaumax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vtaumax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33197,& 'frame/module_domain.f: Failed to allocate grid%vtaumax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taummax').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taummax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33208,& 'frame/module_domain.f: Failed to allocate grid%taummax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taummax=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taummax' grid%tail_statevars%DataName = 'TAUMMAX' grid%tail_statevars%Description = 'MAXIMUM WIND STRESS MODULE IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%taummax grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%taummax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33258,& 'frame/module_domain.f: Failed to allocate grid%taummax(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'utaustd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%utaustd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33269,& 'frame/module_domain.f: Failed to allocate grid%utaustd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utaustd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'utaustd' grid%tail_statevars%DataName = 'UTAUSTD' grid%tail_statevars%Description = 'STANDARD DEV. OF ZONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%utaustd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%utaustd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33319,& 'frame/module_domain.f: Failed to allocate grid%utaustd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'vtaustd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%vtaustd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33330,& 'frame/module_domain.f: Failed to allocate grid%vtaustd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vtaustd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'vtaustd' grid%tail_statevars%DataName = 'VTAUSTD' grid%tail_statevars%Description = 'STANDARD DEV. OF MERIDIONAL WIND STRESS IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%vtaustd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%vtaustd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33380,& 'frame/module_domain.f: Failed to allocate grid%vtaustd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'taumstd').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%taumstd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33391,& 'frame/module_domain.f: Failed to allocate grid%taumstd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taumstd=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'taumstd' grid%tail_statevars%DataName = 'TAUMSTD' grid%tail_statevars%Description = 'STANDARD DEV. OF WIND STRESS MODULE IN DIAGNOSTIC OUTPUT INTERVAL' grid%tail_statevars%Units = 'N 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%taumstd grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%taumstd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33441,& 'frame/module_domain.f: Failed to allocate grid%taumstd(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_01').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_01(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33452,& 'frame/module_domain.f: Failed to allocate grid%u_01(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_01=initial_data_value IF (.NOT.grid%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_01' grid%tail_statevars%DataName = 'U_01' grid%tail_statevars%Description = 'ZONAL WIND at 1st level' 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%u_01 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%u_01(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33502,& 'frame/module_domain.f: Failed to allocate grid%u_01(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_01').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_01(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33513,& 'frame/module_domain.f: Failed to allocate grid%v_01(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_01=initial_data_value IF (.NOT.grid%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_01' grid%tail_statevars%DataName = 'V_01' grid%tail_statevars%Description = 'MERIDIONAL WIND at 1st level' 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%v_01 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%v_01(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33563,& 'frame/module_domain.f: Failed to allocate grid%v_01(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wspd_01').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wspd_01(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33574,& 'frame/module_domain.f: Failed to allocate grid%wspd_01(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wspd_01=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wspd_01' grid%tail_statevars%DataName = 'WSPD_01' grid%tail_statevars%Description = 'WIND MODULE at 1st level' 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%wspd_01 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%wspd_01(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33624,& 'frame/module_domain.f: Failed to allocate grid%wspd_01(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'u_01mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%u_01mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33635,& 'frame/module_domain.f: Failed to allocate grid%u_01mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_01mean=initial_data_value IF (.NOT.grid%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_01mean' grid%tail_statevars%DataName = 'U_01MEAN' grid%tail_statevars%Description = 'MEAN ZONAL WIND at 1st level IN DIAGNOSTIC OUTPUT INTERVAL' 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%u_01mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%u_01mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33685,& 'frame/module_domain.f: Failed to allocate grid%u_01mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'v_01mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%v_01mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33696,& 'frame/module_domain.f: Failed to allocate grid%v_01mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_01mean=initial_data_value IF (.NOT.grid%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_01mean' grid%tail_statevars%DataName = 'V_01MEAN' grid%tail_statevars%Description = 'MEAN MERIDIONAL WIND at 1st level IN DIAGNOSTIC OUTPUT INTERVAL' 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%v_01mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%v_01mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33746,& 'frame/module_domain.f: Failed to allocate grid%v_01mean(1,1). ') endif ENDIF IF(okay_to_alloc.AND.in_use_for_config(id,'wspd_01mean').AND.(.NOT.grid%is_intermediate))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 nba = & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * 4 ALLOCATE(grid%wspd_01mean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33757,& 'frame/module_domain.f: Failed to allocate grid%wspd_01mean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wspd_01mean=initial_data_value IF (.NOT.grid%is_intermediate) THEN ALLOCATE( grid%tail_statevars%next ) grid%tail_statevars => grid%tail_statevars%next NULLIFY( grid%tail_statevars%next ) grid%tail_statevars%VarName = 'wspd_01mean' grid%tail_statevars%DataName = 'WSPD_01MEAN' grid%tail_statevars%Description = 'MEAN WIND MODULE at 1st level IN DIAGNOSTIC OUTPUT INTERVAL' 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%wspd_01mean grid%tail_statevars%streams(1) = 8 grid%tail_statevars%streams(2) = 2097152 grid%tail_statevars%sd1 = ids grid%tail_statevars%ed1 = (ide-1) grid%tail_statevars%sd2 = jds grid%tail_statevars%ed2 = (jde-1) grid%tail_statevars%sd3 = 1 grid%tail_statevars%ed3 = 1 grid%tail_statevars%sm1 = ims grid%tail_statevars%em1 = ime grid%tail_statevars%sm2 = jms grid%tail_statevars%em2 = jme grid%tail_statevars%sm3 = 1 grid%tail_statevars%em3 = 1 grid%tail_statevars%sp1 = ips grid%tail_statevars%ep1 = MIN( (ide-1), ipe ) grid%tail_statevars%sp2 = jps grid%tail_statevars%ep2 = MIN( (jde-1), jpe ) grid%tail_statevars%sp3 = 1 grid%tail_statevars%ep3 = 1 grid%tail_statevars%subgrid_x = .FALSE. grid%tail_statevars%subgrid_y = .FALSE. grid%tail_statevars%dimname1 = 'west_east' grid%tail_statevars%dimname2 = 'south_north' grid%tail_statevars%dimname3 = '' ENDIF ELSE ALLOCATE(grid%wspd_01mean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal3("",33807,& 'frame/module_domain.f: Failed to allocate grid%wspd_01mean(1,1). ') endif ENDIF END SUBROUTINE alloc_space_field_core_1 END MODULE module_alloc_space_1