Changeset 430


Ignore:
Timestamp:
06/14/16 23:37:59 (8 years ago)
Author:
ymipsl
Message:

physiq dcmip2016 : Add column integration diagnostique for chlorines

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/physics_dcmip2016.f90

    r416 r430  
    1212  REAL(rstd),ALLOCATABLE :: precl_packed(:) 
    1313 
     14  TYPE(t_field),POINTER  :: f_Q1(:) 
     15  TYPE(t_field),POINTER  :: f_Q2(:) 
     16  TYPE(t_field),POINTER  :: f_PS(:) 
     17  TYPE(t_field),POINTER  :: f_rhodz(:) 
     18  TYPE(t_field),POINTER  :: f_Q1_col_int(:) 
     19  TYPE(t_field),POINTER  :: f_Q2_col_int(:) 
    1420  PUBLIC :: init_physics, full_physics, write_physics 
    1521 
     
    7480    ALLOCATE(precl_packed(ngrid)) 
    7581    CALL allocate_field(f_precl, field_t,type_real) 
     82    CALL allocate_field(f_Q1, field_t,type_real,llm) 
     83    CALL allocate_field(f_Q2, field_t,type_real,llm) 
     84    CALL allocate_field(f_PS, field_t,type_real) 
     85    CALL allocate_field(f_rhodz, field_t,type_real,llm) 
     86    CALL allocate_field(f_Q1_col_int, field_t,type_real) 
     87    CALL allocate_field(f_Q2_col_int, field_t,type_real) 
    7688 
    7789    PRINT *, 'init_physics_new', SIZE(physics_inout%Ai) 
     
    90102    USE output_field_mod 
    91103    USE physics_interface_mod 
     104    use disvert_mod 
     105    REAL(rstd), POINTER :: Q1(:,:) 
     106    REAL(rstd), POINTER :: Q2(:,:) 
     107    REAL(rstd), POINTER :: PS(:) 
     108    REAL(rstd), POINTER :: rhodz(:,:) 
     109    REAL(rstd), POINTER :: Q1_col_int(:) 
     110    REAL(rstd), POINTER :: Q2_col_int(:) 
     111     
     112     
    92113    CALL unpack_field(f_precl, precl_packed) 
    93114    CALL output_field("precl",f_precl) 
    94         
     115     
     116    CALL unpack_field(f_Q1,physics_inout%q(:,:,4)) 
     117    CALL unpack_field(f_Q2,physics_inout%q(:,:,5)) 
     118    CALL unpack_field(f_ps,physics_inout%p(:,1)) 
     119     
     120    DO ind=1,ndomain 
     121      IF (.NOT. assigned_domain(ind)) CYCLE 
     122        Q1=f_Q1(ind) 
     123        Q2=f_Q2(ind) 
     124        Q1_col_int=f_Q1_col_int(ind) 
     125        Q2_col_int=f_Q2_col_int(ind) 
     126        PS=f_PS(ind) 
     127        rhodz=f_rhodz(ind) 
     128        DO l=1,llm 
     129          rhodz(:,l)= ( ap(l)-ap(l+1) + (bp(l)-bp(l+1))*ps(:) )/g    
     130        ENDDO 
     131        Q1_col_int=SUM(Q1*rhodz,2)/SUM(rhodz,2) 
     132        Q2_col_int=SUM(Q2*rhodz,2)/SUM(rhodz,2) 
     133    ENDDO 
     134      
     135    CALL output_field("Q1_col_int",f_Q1_col_int) 
     136    CALL output_field("Q2_col_int",f_Q2_col_int) 
     137     
    95138  END SUBROUTINE write_physics 
    96139 
Note: See TracChangeset for help on using the changeset viewer.