Ignore:
Timestamp:
10/31/14 14:52:01 (10 years ago)
Author:
ymipsl
Message:

Merging OpenMP parallisme mode : by subdomain and on vertical level.
This feature is actually experimental but may be retro-compatible with the last method based only on subdomain

YM

File:
1 edited

Legend:

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

    r286 r295  
    2525    USE etat0_dcmip4_mod, ONLY : etat0_dcmip4=>etat0   
    2626    USE etat0_heldsz_mod, ONLY : etat0_heldsz=>etat0   
    27     USE dynetat0_gcm_mod, ONLY : dynetat0_start=>etat0  
    28     USE dynetat0_hz_mod,  ONLY : dynetat0_hz=>etat0  
    2927    USE etat0_start_file_mod, ONLY : etat0_start_file=>etat0   
    3028 
     
    8078    CASE ('dcmip3') 
    8179       CALL etat0_dcmip3(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
    82      CASE ('dcmip4') 
     80    CASE ('dcmip4') 
    8381        IF(nqtot<2) THEN 
    8482           IF (is_mpi_root)  THEN 
     
    8785           STOP 
    8886        END IF 
    89        CALL etat0_dcmip4(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
    90      CASE ('readnf_start')  
    91           print*,"readnf_start used"     
    92        CALL dynetat0_start(f_ps,f_phis,f_theta_rhodz,f_u,f_q)  
    93         CASE ('readnf_hz')  
    94           print*,"readnf_hz used" 
    95        CALL dynetat0_hz(f_ps,f_phis,f_theta_rhodz,f_u,f_q)  
     87        CALL etat0_dcmip4(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
    9688   CASE DEFAULT 
    9789       PRINT*, 'Bad selector for variable etat0 <',etat0_type, & 
     
    114106 
    115107  SUBROUTINE etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q) 
     108    USE theta2theta_rhodz_mod 
    116109    IMPLICIT NONE 
    117110    TYPE(t_field),POINTER :: f_ps(:) 
     
    119112    TYPE(t_field),POINTER :: f_phis(:) 
    120113    TYPE(t_field),POINTER :: f_theta_rhodz(:) 
     114    TYPE(t_field),POINTER :: f_temp(:) 
    121115    TYPE(t_field),POINTER :: f_u(:) 
    122116    TYPE(t_field),POINTER :: f_q(:) 
     
    126120    REAL(rstd),POINTER :: phis(:) 
    127121    REAL(rstd),POINTER :: theta_rhodz(:,:) 
     122    REAL(rstd),POINTER :: temp(:,:) 
    128123    REAL(rstd),POINTER :: u(:,:) 
    129124    REAL(rstd),POINTER :: q(:,:,:) 
     
    138133      phis=f_phis(ind) 
    139134      theta_rhodz=f_theta_rhodz(ind) 
     135      temp=f_temp(ind) 
    140136      u=f_u(ind) 
    141137      q=f_q(ind) 
    142       CALL compute_etat0_collocated(ps,mass, phis, theta_rhodz, u, q) 
     138 
     139      IF( TRIM(etat0_type)=='williamson91.6' ) THEN  
     140       CALL compute_etat0_collocated(ps,mass, phis, theta_rhodz, u, q) 
     141      ELSE 
     142       CALL compute_etat0_collocated(ps,mass, phis, temp, u, q) 
     143      ENDIF 
    143144    ENDDO 
     145     
     146    IF( TRIM(etat0_type)/='williamson91.6' ) CALL temperature2theta_rhodz(f_ps,f_temp,f_theta_rhodz) 
     147     
     148     
    144149  END SUBROUTINE etat0_collocated 
    145150 
    146   SUBROUTINE compute_etat0_collocated(ps,mass, phis, theta_rhodz, u, q) 
    147     USE theta2theta_rhodz_mod 
     151  SUBROUTINE compute_etat0_collocated(ps,mass, phis, temp_i, u, q) 
    148152    USE wind_mod 
    149153    USE etat0_jablonowsky06_mod, ONLY : compute_jablonowsky06 => compute_etat0 
     
    154158    REAL(rstd),INTENT(INOUT) :: mass(iim*jjm,llm) 
    155159    REAL(rstd),INTENT(OUT) :: phis(iim*jjm) 
    156     REAL(rstd),INTENT(OUT) :: theta_rhodz(iim*jjm,llm) 
     160    REAL(rstd),INTENT(OUT) :: temp_i(iim*jjm,llm) 
    157161    REAL(rstd),INTENT(OUT) :: u(3*iim*jjm,llm) 
    158162    REAL(rstd),INTENT(OUT) :: q(iim*jjm,llm,nqtot) 
    159163 
    160     REAL(rstd) :: temp_i(iim*jjm,llm) 
     164    REAL(rstd) :: lon_i(iim*jjm) 
     165    REAL(rstd) :: lat_i(iim*jjm) 
    161166    REAL(rstd) :: ulon_i(iim*jjm,llm) 
    162167    REAL(rstd) :: ulat_i(iim*jjm,llm) 
    163168 
     169    REAL(rstd) :: lon_e(3*iim*jjm) 
     170    REAL(rstd) :: lat_e(3*iim*jjm) 
    164171    REAL(rstd) :: ps_e(3*iim*jjm) 
    165172    REAL(rstd) :: mass_e(3*iim*jjm,llm) 
     
    183190       CALL compute_dcmip5(3*iim*jjm,lon_e,lat_e, phis_e, ps_e, temp_e, ulon_e, ulat_e, q_e) 
    184191    CASE('williamson91.6') 
    185        CALL compute_w91_6(iim*jjm,lon_i,lat_i, phis, mass(:,1), theta_rhodz(:,1), ulon_i(:,1), ulat_i(:,1)) 
     192       CALL compute_w91_6(iim*jjm,lon_i,lat_i, phis, mass(:,1), temp_i(:,1), ulon_i(:,1), ulat_i(:,1)) 
    186193       CALL compute_w91_6(3*iim*jjm,lon_e,lat_e, phis_e, mass_e(:,1), temp_e(:,1), ulon_e(:,1), ulat_e(:,1)) 
    187194    END SELECT 
    188195 
    189     SELECT CASE (TRIM(etat0_type)) 
    190     CASE('williamson91.6') 
    191        ! Do nothing 
    192     CASE DEFAULT 
    193        CALL compute_temperature2theta_rhodz(ps,temp_i,theta_rhodz,0)     
    194     END SELECT 
    195   
    196196    CALL compute_wind_perp_from_lonlat_compound(ulon_e, ulat_e, u) 
    197197 
Note: See TracChangeset for help on using the changeset viewer.