Changeset 4004 for palm/trunk/SOURCE
- Timestamp:
- May 24, 2019 11:32:38 AM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chemistry_model_mod.f90
r3968 r4004 27 27 ! ----------------- 28 28 ! $Id$ 29 ! in subroutine chem_parin check emiss_lod / mod_emis only 30 ! when emissions_anthropogenic is activated in namelist (E.C. Chan) 31 ! 32 ! 3968 2019-05-13 11:04:01Z suehring 29 33 ! - added "emiss_lod" which serves the same function as "mode_emis" 30 34 ! both will be synchronized with emiss_lod having pirority over … … 2282 2286 2283 2287 20 CONTINUE 2288 2289 ! 2290 !-- synchronize emiss_lod and mod_emis only if emissions_anthropogenic 2291 !-- is activated in the namelist. Otherwise their values are "don't care" 2292 IF ( emissions_anthropogenic ) THEN 2284 2293 ! 2285 2294 !-- check for emission mode for chem species 2286 2295 2287 IF ( emiss_lod < 0 ) THEN !- if LOD not defined in namelist 2288 IF ( ( mode_emis /= 'PARAMETERIZED' ) .AND. & 2289 ( mode_emis /= 'DEFAULT' ) .AND. & 2290 ( mode_emis /= 'PRE-PROCESSED' ) ) THEN 2291 message_string = 'Incorrect mode_emiss option select. Please check spelling' 2292 CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 ) 2296 IF ( emiss_lod < 0 ) THEN !- if LOD not defined in namelist 2297 IF ( ( mode_emis /= 'PARAMETERIZED' ) .AND. & 2298 ( mode_emis /= 'DEFAULT' ) .AND. & 2299 ( mode_emis /= 'PRE-PROCESSED' ) ) THEN 2300 message_string = 'Incorrect mode_emiss option select. Please check spelling' 2301 CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 ) 2302 ENDIF 2303 ELSE 2304 IF ( ( emiss_lod /= 0 ) .AND. & 2305 ( emiss_lod /= 1 ) .AND. & 2306 ( emiss_lod /= 2 ) ) THEN 2307 message_string = 'Invalid value for emiss_lod (0, 1, or 2)' 2308 CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 ) 2309 ENDIF 2293 2310 ENDIF 2294 ELSE 2295 IF ( ( emiss_lod /= 0 ) .AND. & 2296 ( emiss_lod /= 1 ) .AND. & 2297 ( emiss_lod /= 2 ) ) THEN 2298 message_string = 'Invalid value for emiss_lod (0, 1, or 2)' 2299 CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 ) 2300 ENDIF 2301 ENDIF 2302 2311 2312 ! 2303 2313 ! for reference (ecc) 2304 2314 ! IF ( (mode_emis /= 'PARAMETERIZED') .AND. ( mode_emis /= 'DEFAULT' ) .AND. ( mode_emis /= 'PRE-PROCESSED' ) ) THEN … … 2313 2323 !-- this check is in place to retain backward compatibility with salsa until the 2314 2324 !-- code is migrated completed to emiss_lod 2315 IF ( emiss_lod >= 0 ) THEN 2316 SELECT CASE ( emiss_lod ) 2317 CASE (0) !- parameterized mode 2318 mode_emis = 'PARAMETERIZED' 2319 CASE (1) !- default mode 2320 mode_emis = 'DEFAULT' 2321 CASE (2) !- preprocessed mode 2322 mode_emis = 'PRE-PROCESSED' 2323 END SELECT 2325 !-- note that 2326 2327 IF ( emiss_lod >= 0 ) THEN 2328 2329 SELECT CASE ( emiss_lod ) 2330 CASE (0) !- parameterized mode 2331 mode_emis = 'PARAMETERIZED' 2332 CASE (1) !- default mode 2333 mode_emis = 'DEFAULT' 2334 CASE (2) !- preprocessed mode 2335 mode_emis = 'PRE-PROCESSED' 2336 END SELECT 2324 2337 2325 message_string = 'Synchronizing mode_emis to defined emiss_lod' // & 2326 CHAR(10) // ' ' // & 2327 'NOTE - mode_emis will be depreciated in future releases' // & 2328 CHAR(10) // ' ' // & 2329 'please use emiss_lod to define emission mode' 2330 2331 CALL message ( 'parin_chem', 'CM0463', 0, 0, 0, 6, 0 ) 2332 ELSE ! if emiss_lod is not set 2333 SELECT CASE ( mode_emis ) 2334 CASE ('PARAMETERIZED') 2335 emiss_lod = 0 2336 CASE ('DEFAULT') 2337 emiss_lod = 1 2338 CASE ('PRE-PROCESSED') 2339 emiss_lod = 2 2340 END SELECT 2341 2342 message_string = 'emiss_lod undefined. Using existing mod_emiss setting' // & 2343 CHAR(10) // ' ' // & 2344 'NOTE - mode_emis will be depreciated in future releases' // & 2345 CHAR(10) // ' ' // & 2346 ' please use emiss_lod to define emission mode' 2347 2348 CALL message ( 'parin_chem', 'CM0464', 0, 0, 0, 6, 0 ) 2349 ENDIF 2338 message_string = 'Synchronizing mode_emis to defined emiss_lod' // & 2339 CHAR(10) // ' ' // & 2340 'NOTE - mode_emis will be depreciated in future releases' // & 2341 CHAR(10) // ' ' // & 2342 'please use emiss_lod to define emission mode' 2343 2344 CALL message ( 'parin_chem', 'CM0463', 0, 0, 0, 6, 0 ) 2345 2346 ELSE ! if emiss_lod is not set 2347 2348 SELECT CASE ( mode_emis ) 2349 CASE ('PARAMETERIZED') 2350 emiss_lod = 0 2351 CASE ('DEFAULT') 2352 emiss_lod = 1 2353 CASE ('PRE-PROCESSED') 2354 emiss_lod = 2 2355 END SELECT 2356 2357 message_string = 'emiss_lod undefined. Using existing mod_emiss setting' // & 2358 CHAR(10) // ' ' // & 2359 'NOTE - mode_emis will be depreciated in future releases' // & 2360 CHAR(10) // ' ' // & 2361 ' please use emiss_lod to define emission mode' 2362 2363 CALL message ( 'parin_chem', 'CM0464', 0, 0, 0, 6, 0 ) 2364 ENDIF 2365 2366 ENDIF ! if emissions_anthropengic 2350 2367 2351 2368 t_steps = my_steps -
palm/trunk/SOURCE/module_interface.f90
r3987 r4004 25 25 ! ----------------- 26 26 ! $Id$ 27 ! local_pf need INTENT(INOUT) attribute rather than INTENT(OUT). This is 28 ! because INTENT(OUT) sets the array to not-defined. Especially for outputs that 29 ! are not defined everywhere, e.g. land-surface outputs, this will be 30 ! problematic as NaN will be output. 31 ! 32 ! 3987 2019-05-22 09:52:13Z kanani 27 33 ! Introduce switchable DEBUG file output via debug_message routine 28 34 ! … … 1184 1190 REAL(wp), INTENT(IN) :: fill_value !< to be removed 1185 1191 1186 REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT( OUT) :: local_pf !< ToDo: can also be kind=sp1192 REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) :: local_pf !< ToDo: can also be kind=sp 1187 1193 1188 1194 … … 1267 1273 INTEGER(iwp), INTENT(IN) :: nzt_do !< vertical output index (top) (usually nz_do3d) 1268 1274 1269 REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT( OUT) :: local_pf1275 REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) :: local_pf 1270 1276 1271 1277 -
palm/trunk/SOURCE/virtual_flight_mod.f90
r3885 r4004 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Allow variable start- and end locations also in return mode 28 ! 29 ! 3885 2019-04-11 11:29:34Z kanani 27 30 ! Changes related to global restructuring of location messages and introduction 28 31 ! of additional debug messages … … 601 604 !-- Carry out horizontal reflection if required. 602 605 IF ( .NOT. cyclic_leg(l) ) THEN 603 ! 604 !-- Outward flight, i.e. from start to end 605 IF ( u_agl(l) >= 0.0_wp .AND. x_pos(l) > x_end(l) ) THEN 606 x_pos(l) = 2.0_wp * x_end(l) - x_pos(l) 607 u_agl(l) = - u_agl(l) 608 ! 609 !-- Return flight, i.e. from end to start 610 ELSEIF ( u_agl(l) < 0.0_wp .AND. x_pos(l) < x_start(l) ) THEN 611 x_pos(l) = 2.0_wp * x_start(l) - x_pos(l) 612 u_agl(l) = - u_agl(l) 606 607 IF ( x_start(l) <= x_end(l) ) THEN 608 ! 609 !-- Outward flight, i.e. from start to end 610 IF ( u_agl(l) >= 0.0_wp .AND. x_pos(l) > x_end(l) ) THEN 611 x_pos(l) = 2.0_wp * x_end(l) - x_pos(l) 612 u_agl(l) = - u_agl(l) 613 ! 614 !-- Return flight, i.e. from end to start 615 ELSEIF ( u_agl(l) < 0.0_wp .AND. x_pos(l) < x_start(l) ) THEN 616 x_pos(l) = 2.0_wp * x_start(l) - x_pos(l) 617 u_agl(l) = - u_agl(l) 618 ENDIF 619 ELSE 620 ! 621 !-- Outward flight, i.e. from start to end 622 IF ( u_agl(l) < 0.0_wp .AND. x_pos(l) < x_end(l) ) THEN 623 x_pos(l) = 2.0_wp * x_end(l) - x_pos(l) 624 u_agl(l) = - u_agl(l) 625 ! 626 !-- Return flight, i.e. from end to start 627 ELSEIF ( u_agl(l) >= 0.0_wp .AND. x_pos(l) > x_start(l) ) THEN 628 x_pos(l) = 2.0_wp * x_start(l) - x_pos(l) 629 u_agl(l) = - u_agl(l) 630 ENDIF 613 631 ENDIF 614 ! 615 !-- Outward flight, i.e. from start to end 616 IF ( v_agl(l) >= 0.0_wp .AND. y_pos(l) > y_end(l) ) THEN 617 y_pos(l) = 2.0_wp * y_end(l) - y_pos(l) 618 v_agl(l) = - v_agl(l) 619 ! 620 !-- Return flight, i.e. from end to start 621 ELSEIF ( v_agl(l) < 0.0_wp .AND. y_pos(l) < y_start(l) ) THEN 622 y_pos(l) = 2.0_wp * y_start(l) - y_pos(l) 623 v_agl(l) = - v_agl(l) 632 633 IF ( y_start(l) <= y_end(l) ) THEN 634 ! 635 !-- Outward flight, i.e. from start to end 636 IF ( v_agl(l) >= 0.0_wp .AND. y_pos(l) > y_end(l) ) THEN 637 y_pos(l) = 2.0_wp * y_end(l) - y_pos(l) 638 v_agl(l) = - v_agl(l) 639 ! 640 !-- Return flight, i.e. from end to start 641 ELSEIF ( v_agl(l) < 0.0_wp .AND. y_pos(l) < y_start(l) ) THEN 642 y_pos(l) = 2.0_wp * y_start(l) - y_pos(l) 643 v_agl(l) = - v_agl(l) 644 ENDIF 645 ELSE 646 ! 647 !-- Outward flight, i.e. from start to end 648 IF ( v_agl(l) < 0.0_wp .AND. y_pos(l) < y_end(l) ) THEN 649 y_pos(l) = 2.0_wp * y_end(l) - y_pos(l) 650 v_agl(l) = - v_agl(l) 651 ! 652 !-- Return flight, i.e. from end to start 653 ELSEIF ( v_agl(l) >= 0.0_wp .AND. y_pos(l) > y_start(l) ) THEN 654 y_pos(l) = 2.0_wp * y_start(l) - y_pos(l) 655 v_agl(l) = - v_agl(l) 656 ENDIF 624 657 ENDIF 625 658 ! … … 924 957 925 958 ENDDO 926 !927 !-- Check if start and end positions are properly set in case of return legs.928 DO l=1, num_leg929 930 IF ( x_start(l) > x_end(l) .AND. leg_mode(l) == 'return' ) THEN931 message_string = 'x_start position must be <= x_end ' // &932 'position for return legs'933 CALL message( 'flight_check_parameters', 'PA0436', 1, 2, 0, 6, 0 )934 ENDIF935 IF ( y_start(l) > y_end(l) .AND. leg_mode(l) == 'return' ) THEN936 message_string = 'y_start position must be <= y_end ' // &937 'position for return legs'938 CALL message( 'flight_check_parameters', 'PA0437', 1, 2, 0, 6, 0 )939 ENDIF940 ENDDO941 959 ! 942 960 !-- Check if given flight object remains inside model domain if a rate of
Note: See TracChangeset
for help on using the changeset viewer.