Field value retrieval callback, this returns the value of a specific published field.
347 type(model_state_type),
target,
intent(inout) :: current_state
348 character(len=*),
intent(in) :: name
349 type(component_field_value_type),
intent(out) :: field_value
353 if (name .eq.
"prefn_local") then
354 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
355 do k = 1, current_state%local_grid%size(z_index)
356 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%prefn(k)
358 else if (name .eq.
"rho_local") then
359 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
360 do k = 1, current_state%local_grid%size(z_index)
361 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%rho(k)
363 else if (name .eq.
"rhon_local") then
364 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
365 do k = 1, current_state%local_grid%size(z_index)
366 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%rhon(k)
368 else if (name .eq.
"thref_local") then
369 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
370 do k = 1, current_state%local_grid%size(z_index)
371 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%thref(k)
373 else if (name .eq.
"thinit_local") then
374 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
375 do k = 1, current_state%local_grid%size(z_index)
376 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%theta_init(k)
378 elseif (name .eq.
"u_wind_total_local") then
379 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
380 do k = 1, current_state%local_grid%size(z_index)
381 field_value%real_1d_array(k)=u_wind_tot(k)
383 else if (name .eq.
"uu_total_local") then
384 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
385 do k = 1, current_state%local_grid%size(z_index)
386 field_value%real_1d_array(k)=uprime_tot(k)
388 else if (name .eq.
"v_wind_total_local") then
389 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
390 do k = 1, current_state%local_grid%size(z_index)
391 field_value%real_1d_array(k)=v_wind_tot(k)
393 else if (name .eq.
"vv_total_local") then
394 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
395 do k = 1, current_state%local_grid%size(z_index)
396 field_value%real_1d_array(k)=vprime_tot(k)
398 else if (name .eq.
"ww_total_local") then
399 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
400 do k = 1, current_state%local_grid%size(z_index)
401 field_value%real_1d_array(k)=ww_tot(k)
403 else if (name .eq.
"theta_total_local") then
404 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
405 do k = 1, current_state%local_grid%size(z_index)
406 field_value%real_1d_array(k)=theta_tot(k)
408 else if (name .eq.
"vapour_mmr_total_local") then
409 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
410 do k = 1, current_state%local_grid%size(z_index)
411 field_value%real_1d_array(k)=qv_tot(k)
413 else if (name .eq.
"liquid_mmr_total_local") then
414 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
415 do k = 1, current_state%local_grid%size(z_index)
416 field_value%real_1d_array(k)=ql_tot(k)
418 else if (name .eq.
"w_wind_total_local") then
419 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
420 do k = 1, current_state%local_grid%size(z_index)
421 field_value%real_1d_array(k)=w_wind_tot(k)
423 else if (name .eq.
"rh_total_local") then
424 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
425 do k = 1, current_state%local_grid%size(z_index)
426 field_value%real_1d_array(k)=rh_tot(k)
428 else if (name .eq.
"wq_total_local") then
429 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
430 do k = 1, current_state%local_grid%size(z_index)
431 field_value%real_1d_array(k)=wq_tot(k)
433 else if (name .eq.
"wtheta_total_local") then
434 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
435 do k = 1, current_state%local_grid%size(z_index)
436 field_value%real_1d_array(k)=wtheta_tot(k)
438 else if (name .eq.
"uw_total_local") then
439 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
440 do k = 1, current_state%local_grid%size(z_index)
441 field_value%real_1d_array(k)=uw_tot(k)
443 else if (name .eq.
"vw_total_local") then
444 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
445 do k = 1, current_state%local_grid%size(z_index)
446 field_value%real_1d_array(k)=vw_tot(k)
448 else if (name .eq.
"th2_total_local") then
449 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
450 do k = 1, current_state%local_grid%size(z_index)
451 field_value%real_1d_array(k)=th2_tot(k)
455 else if (name .eq.
"i_prefn_local") then
456 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
457 do k = 1, current_state%local_grid%size(z_index)
458 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%prefn(k)
460 else if (name .eq.
"i_rho_local") then
461 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
462 do k = 1, current_state%local_grid%size(z_index)
463 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%rho(k)
465 else if (name .eq.
"i_rhon_local") then
466 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
467 do k = 1, current_state%local_grid%size(z_index)
468 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%rhon(k)
470 else if (name .eq.
"i_thref_local") then
471 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
472 do k = 1, current_state%local_grid%size(z_index)
473 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%thref(k)
475 else if (name .eq.
"i_thinit_local") then
476 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
477 do k = 1, current_state%local_grid%size(z_index)
478 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%theta_init(k)
480 else if (name .eq.
"i_uinit_local") then
481 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
482 do k = 1, current_state%local_grid%size(z_index)
483 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%u_init(k)
485 else if (name .eq.
"i_vinit_local") then
486 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
487 do k = 1, current_state%local_grid%size(z_index)
488 field_value%real_1d_array(k)=current_state%global_grid%configuration%vertical%v_init(k)
490 elseif (name .eq.
"i_u_wind_total_local") then
491 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
492 do k = 1, current_state%local_grid%size(z_index)
493 field_value%real_1d_array(k)=u_wind_tot(k)
495 else if (name .eq.
"i_uu_total_local") then
496 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
497 do k = 1, current_state%local_grid%size(z_index)
498 field_value%real_1d_array(k)=uprime_tot(k)
500 else if (name .eq.
"i_v_wind_total_local") then
501 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
502 do k = 1, current_state%local_grid%size(z_index)
503 field_value%real_1d_array(k)=v_wind_tot(k)
505 else if (name .eq.
"i_vv_total_local") then
506 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
507 do k = 1, current_state%local_grid%size(z_index)
508 field_value%real_1d_array(k)=vprime_tot(k)
510 else if (name .eq.
"i_ww_total_local") then
511 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
512 do k = 1, current_state%local_grid%size(z_index)
513 field_value%real_1d_array(k)=ww_tot(k)
515 else if (name .eq.
"i_theta_total_local") then
516 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
517 do k = 1, current_state%local_grid%size(z_index)
518 field_value%real_1d_array(k)=theta_tot(k)
520 else if (name .eq.
"i_vapour_mmr_total_local") then
521 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
522 do k = 1, current_state%local_grid%size(z_index)
523 field_value%real_1d_array(k)=qv_tot(k)
525 else if (name .eq.
"i_liquid_mmr_total_local") then
526 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
527 do k = 1, current_state%local_grid%size(z_index)
528 field_value%real_1d_array(k)=ql_tot(k)
530 else if (name .eq.
"i_w_wind_total_local") then
531 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
532 do k = 1, current_state%local_grid%size(z_index)
533 field_value%real_1d_array(k)=w_wind_tot(k)
535 else if (name .eq.
"i_rh_total_local") then
536 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
537 do k = 1, current_state%local_grid%size(z_index)
538 field_value%real_1d_array(k)=rh_tot(k)
540 else if (name .eq.
"i_wq_total_local") then
541 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
542 do k = 1, current_state%local_grid%size(z_index)
543 field_value%real_1d_array(k)=wq_tot(k)
545 else if (name .eq.
"i_wtheta_total_local") then
546 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
547 do k = 1, current_state%local_grid%size(z_index)
548 field_value%real_1d_array(k)=wtheta_tot(k)
550 else if (name .eq.
"i_uw_total_local") then
551 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
552 do k = 1, current_state%local_grid%size(z_index)
553 field_value%real_1d_array(k)=uw_tot(k)
555 else if (name .eq.
"i_vw_total_local") then
556 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
557 do k = 1, current_state%local_grid%size(z_index)
558 field_value%real_1d_array(k)=vw_tot(k)
560 else if (name .eq.
"i_th2_total_local") then
561 allocate(field_value%real_1d_array(current_state%local_grid%size(z_index)))
562 do k = 1, current_state%local_grid%size(z_index)
563 field_value%real_1d_array(k)=th2_tot(k)