Ignore:
Timestamp:
07/08/14 15:03:32 (10 years ago)
Author:
dubos
Message:

Simplified etat0 : isothermal, jablonowsky06

File:
1 edited

Legend:

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

    r199 r201  
    1313   
    1414  SUBROUTINE etat0(f_ps,f_mass,f_phis,f_theta_rhodz,f_u, f_q) 
    15     USE icosa 
    1615    USE mpipara, ONLY : is_mpi_root 
    1716    USE disvert_mod 
     
    5453    CASE ('isothermal') 
    5554       CALL getin_etat0_isothermal 
    56        CALL etat0_collocated(init_mass, f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q) 
     55       CALL etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q) 
    5756    CASE ('williamson91.6') 
    5857       init_mass=.FALSE. 
    5958       CALL etat0_williamson_new(f_phis,f_mass,f_theta_rhodz,f_u, f_q) 
    6059    CASE ('jablonowsky06') 
    61        CALL etat0_jablonowsky06(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
     60!       CALL etat0_jablonowsky06(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
     61       CALL etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q) 
    6262    CASE ('academic') 
    6363       CALL etat0_academic(f_ps,f_phis,f_theta_rhodz,f_u, f_q) 
     
    106106  END SUBROUTINE etat0 
    107107 
    108   SUBROUTINE etat0_collocated(init_mass, f_ps,f_mass,f_phis,f_theta_rhodz,f_u, f_q) 
     108  SUBROUTINE etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q) 
     109    USE mpipara 
    109110    IMPLICIT NONE 
    110     LOGICAL, INTENT(IN) :: init_mass 
    111111    TYPE(t_field),POINTER :: f_ps(:) 
    112112    TYPE(t_field),POINTER :: f_mass(:) 
     
    134134      u=f_u(ind) 
    135135      q=f_q(ind) 
    136       CALL compute_etat0_collocated(init_mass, ps,mass, phis, theta_rhodz, u, q) 
     136      CALL compute_etat0_collocated(ps,mass, phis, theta_rhodz, u, q) 
     137 
    137138    ENDDO 
    138139  END SUBROUTINE etat0_collocated 
    139140 
    140   SUBROUTINE compute_etat0_collocated(init_mass, ps,mass, phis, theta_rhodz, u, q) 
    141     USE icosa 
     141  SUBROUTINE compute_etat0_collocated(ps,mass, phis, theta_rhodz, u, q) 
    142142    USE disvert_mod 
    143143    USE theta2theta_rhodz_mod 
    144144    USE wind_mod 
     145    USE etat0_jablonowsky06_mod, ONLY : compute_jablonowsky06 => compute_etat0_new 
    145146    IMPLICIT NONE 
    146     LOGICAL, INTENT(IN) :: init_mass 
    147147    REAL(rstd),INTENT(INOUT) :: ps(iim*jjm) 
    148148    REAL(rstd),INTENT(INOUT) :: mass(iim*jjm,llm) 
     
    182182    END DO 
    183183 
    184     CALL compute_etat0_ngrid(iim*jjm,lon_i,lat_i, phis, ps, mass, temp_i, ulon_i, ulat_i, q) 
    185     IF(init_mass) THEN 
    186        CALL compute_rhodz(.TRUE., ps, mass) 
    187     END IF 
    188     CALL compute_temperature2theta_rhodz(ps,temp_i,theta_rhodz,0) ! FIXME - works with shallow-water ? 
    189  
    190     CALL compute_etat0_ngrid(3*iim*jjm,lon_e,lat_e, phis_e,ps_e,mass_e, temp_e, ulon_e, ulat_e, q_e) 
    191     CALL compute_wind_from_lonlat_compound(ulon_e, ulat_e, u) 
    192  
    193   END SUBROUTINE compute_etat0_collocated 
    194  
    195   SUBROUTINE compute_etat0_ngrid(ngrid,lon,lat, phis, ps, mass, temp, ulon, ulat, q) 
    196     IMPLICIT NONE   
    197     INTEGER, INTENT(IN)    :: ngrid 
    198     REAL(rstd),INTENT(IN)  :: lon(ngrid) 
    199     REAL(rstd),INTENT(IN)  :: lat(ngrid) 
    200     REAL(rstd),INTENT(OUT) :: phis(ngrid) 
    201     REAL(rstd),INTENT(INOUT) :: ps(ngrid) 
    202     REAL(rstd),INTENT(INOUT) :: mass(ngrid,llm) 
    203     REAL(rstd),INTENT(OUT) :: temp(ngrid,llm) 
    204     REAL(rstd),INTENT(OUT) :: ulon(ngrid,llm) 
    205     REAL(rstd),INTENT(OUT) :: ulat(ngrid,llm) 
    206     REAL(rstd),INTENT(OUT) :: q(ngrid,llm,nqtot) 
    207  
    208184    SELECT CASE (TRIM(etat0_type)) 
    209185    CASE ('isothermal') 
    210        CALL compute_etat0_isothermal(ngrid, phis, ps, temp, ulon, ulat, q) 
     186       CALL compute_etat0_isothermal(iim*jjm, phis, ps, temp_i, ulon_i, ulat_i, q) 
     187       CALL compute_etat0_isothermal(3*iim*jjm, phis_e, ps_e, temp_e, ulon_e, ulat_e, q_e) 
     188    CASE('jablonowsky06') 
     189       CALL compute_jablonowsky06(iim*jjm,lon_i,lat_i, phis, ps, temp_i, ulon_i, ulat_i) 
     190       CALL compute_jablonowsky06(3*iim*jjm,lon_e,lat_e, phis_e, ps_e, temp_e, ulon_e, ulat_e) 
    211191    END SELECT 
    212192 
    213   END SUBROUTINE compute_etat0_ngrid 
     193    CALL compute_temperature2theta_rhodz(ps,temp_i,theta_rhodz,0)        
     194    CALL compute_wind_perp_from_lonlat_compound(ulon_e, ulat_e, u) 
     195 
     196  END SUBROUTINE compute_etat0_collocated 
    214197 
    215198!----------------------------- Resting isothermal state -------------------------------- 
    216199 
    217200  SUBROUTINE getin_etat0_isothermal 
    218     etat0_temp=300; 
    219     CALL getin("etat0_temp",etat0_temp) 
     201    etat0_temp=300 
     202    CALL getin("etat0_isothermal_temp",etat0_temp) 
    220203  END SUBROUTINE getin_etat0_isothermal 
    221204 
Note: See TracChangeset for help on using the changeset viewer.