Ignore:
Timestamp:
Jul 24, 2024, 4:23:34 PM (3 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move some unused files to obsolete/
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90

    r5116 r5117  
    99  character*80 :: fich_cas
    1010  ! Discr?tisation
    11   integer nlev_cas, nt_cas
     11  INTEGER nlev_cas, nt_cas
    1212
    1313
    1414  !profils environnementaux
    15   real, allocatable::  plev_cas(:,:),plevh_cas(:)
    16   real, allocatable::  ap_cas(:),bp_cas(:)
    17 
    18   real, allocatable::  z_cas(:,:),zh_cas(:)
    19   real, allocatable::  t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:)
    20   real, allocatable::  th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:)
    21   real, allocatable::  u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:)
     15  REAL, ALLOCATABLE::  plev_cas(:,:),plevh_cas(:)
     16  REAL, ALLOCATABLE::  ap_cas(:),bp_cas(:)
     17
     18  REAL, ALLOCATABLE::  z_cas(:,:),zh_cas(:)
     19  REAL, ALLOCATABLE::  t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:)
     20  REAL, ALLOCATABLE::  th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:)
     21  REAL, ALLOCATABLE::  u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:)
    2222
    2323  !forcing
    24   real, allocatable::  ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:)
    25   real, allocatable::  hth_cas(:,:),vth_cas(:,:),dth_cas(:,:)
    26   real, allocatable::  hq_cas(:,:),vq_cas(:,:),dq_cas(:,:)
    27   real, allocatable::  hr_cas(:,:),vr_cas(:,:),dr_cas(:,:)
    28   real, allocatable::  hu_cas(:,:),vu_cas(:,:),du_cas(:,:)
    29   real, allocatable::  hv_cas(:,:),vv_cas(:,:),dv_cas(:,:)
    30   real, allocatable::  ug_cas(:,:),vg_cas(:,:)
    31   real, allocatable::  lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:)
    32   real, allocatable::  uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke_cas(:)
     24  REAL, ALLOCATABLE::  ht_cas(:,:),vt_cas(:,:),dt_cas(:,:),dtrad_cas(:,:)
     25  REAL, ALLOCATABLE::  hth_cas(:,:),vth_cas(:,:),dth_cas(:,:)
     26  REAL, ALLOCATABLE::  hq_cas(:,:),vq_cas(:,:),dq_cas(:,:)
     27  REAL, ALLOCATABLE::  hr_cas(:,:),vr_cas(:,:),dr_cas(:,:)
     28  REAL, ALLOCATABLE::  hu_cas(:,:),vu_cas(:,:),du_cas(:,:)
     29  REAL, ALLOCATABLE::  hv_cas(:,:),vv_cas(:,:),dv_cas(:,:)
     30  REAL, ALLOCATABLE::  ug_cas(:,:),vg_cas(:,:)
     31  REAL, ALLOCATABLE::  lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:)
     32  REAL, ALLOCATABLE::  uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke_cas(:)
    3333
    3434  !champs interpoles
    35   real, allocatable::  plev_prof_cas(:)
    36   real, allocatable::  t_prof_cas(:)
    37   real, allocatable::  theta_prof_cas(:)
    38   real, allocatable::  thl_prof_cas(:)
    39   real, allocatable::  thv_prof_cas(:)
    40   real, allocatable::  q_prof_cas(:)
    41   real, allocatable::  qv_prof_cas(:)
    42   real, allocatable::  ql_prof_cas(:)
    43   real, allocatable::  qi_prof_cas(:)
    44   real, allocatable::  rh_prof_cas(:)
    45   real, allocatable::  rv_prof_cas(:)
    46   real, allocatable::  u_prof_cas(:)
    47   real, allocatable::  v_prof_cas(:)       
    48   real, allocatable::  vitw_prof_cas(:)
    49   real, allocatable::  omega_prof_cas(:)
    50   real, allocatable::  ug_prof_cas(:)
    51   real, allocatable::  vg_prof_cas(:)
    52   real, allocatable::  ht_prof_cas(:)
    53   real, allocatable::  hth_prof_cas(:)
    54   real, allocatable::  hq_prof_cas(:)
    55   real, allocatable::  vt_prof_cas(:)
    56   real, allocatable::  vth_prof_cas(:)
    57   real, allocatable::  vq_prof_cas(:)
    58   real, allocatable::  dt_prof_cas(:)
    59   real, allocatable::  dth_prof_cas(:)
    60   real, allocatable::  dtrad_prof_cas(:)
    61   real, allocatable::  dq_prof_cas(:)
    62   real, allocatable::  hu_prof_cas(:)
    63   real, allocatable::  hv_prof_cas(:)
    64   real, allocatable::  vu_prof_cas(:)
    65   real, allocatable::  vv_prof_cas(:)
    66   real, allocatable::  du_prof_cas(:)
    67   real, allocatable::  dv_prof_cas(:)
    68   real, allocatable::  uw_prof_cas(:)
    69   real, allocatable::  vw_prof_cas(:)
    70   real, allocatable::  q1_prof_cas(:)
    71   real, allocatable::  q2_prof_cas(:)
    72 
    73 
    74   real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke_prof_cas
    75   real o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas
     35  REAL, ALLOCATABLE::  plev_prof_cas(:)
     36  REAL, ALLOCATABLE::  t_prof_cas(:)
     37  REAL, ALLOCATABLE::  theta_prof_cas(:)
     38  REAL, ALLOCATABLE::  thl_prof_cas(:)
     39  REAL, ALLOCATABLE::  thv_prof_cas(:)
     40  REAL, ALLOCATABLE::  q_prof_cas(:)
     41  REAL, ALLOCATABLE::  qv_prof_cas(:)
     42  REAL, ALLOCATABLE::  ql_prof_cas(:)
     43  REAL, ALLOCATABLE::  qi_prof_cas(:)
     44  REAL, ALLOCATABLE::  rh_prof_cas(:)
     45  REAL, ALLOCATABLE::  rv_prof_cas(:)
     46  REAL, ALLOCATABLE::  u_prof_cas(:)
     47  REAL, ALLOCATABLE::  v_prof_cas(:)
     48  REAL, ALLOCATABLE::  vitw_prof_cas(:)
     49  REAL, ALLOCATABLE::  omega_prof_cas(:)
     50  REAL, ALLOCATABLE::  ug_prof_cas(:)
     51  REAL, ALLOCATABLE::  vg_prof_cas(:)
     52  REAL, ALLOCATABLE::  ht_prof_cas(:)
     53  REAL, ALLOCATABLE::  hth_prof_cas(:)
     54  REAL, ALLOCATABLE::  hq_prof_cas(:)
     55  REAL, ALLOCATABLE::  vt_prof_cas(:)
     56  REAL, ALLOCATABLE::  vth_prof_cas(:)
     57  REAL, ALLOCATABLE::  vq_prof_cas(:)
     58  REAL, ALLOCATABLE::  dt_prof_cas(:)
     59  REAL, ALLOCATABLE::  dth_prof_cas(:)
     60  REAL, ALLOCATABLE::  dtrad_prof_cas(:)
     61  REAL, ALLOCATABLE::  dq_prof_cas(:)
     62  REAL, ALLOCATABLE::  hu_prof_cas(:)
     63  REAL, ALLOCATABLE::  hv_prof_cas(:)
     64  REAL, ALLOCATABLE::  vu_prof_cas(:)
     65  REAL, ALLOCATABLE::  vv_prof_cas(:)
     66  REAL, ALLOCATABLE::  du_prof_cas(:)
     67  REAL, ALLOCATABLE::  dv_prof_cas(:)
     68  REAL, ALLOCATABLE::  uw_prof_cas(:)
     69  REAL, ALLOCATABLE::  vw_prof_cas(:)
     70  REAL, ALLOCATABLE::  q1_prof_cas(:)
     71  REAL, ALLOCATABLE::  q2_prof_cas(:)
     72
     73
     74  REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke_prof_cas
     75  REAL o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas
    7676
    7777
     
    8989    ierr = nf90_open(fich_cas,nf90_nowrite,nid)
    9090    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
    91     if (ierr/=nf90_noerr) THEN
     91    IF (ierr/=nf90_noerr) THEN
    9292       WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file '
    9393       WRITE(*,*) nf90_strerror(ierr)
     
    198198    ierr = nf90_open(fich_cas,nf90_nowrite,nid)
    199199    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
    200     if (ierr/=nf90_noerr) THEN
     200    IF (ierr/=nf90_noerr) THEN
    201201       WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file '
    202202       WRITE(*,*) nf90_strerror(ierr)
     
    326326    ierr = nf90_open(fich_cas,nf90_nowrite,nid)
    327327    PRINT*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid
    328     if (ierr/=nf90_noerr) THEN
     328    IF (ierr/=nf90_noerr) THEN
    329329       WRITE(*,*) 'ERROR: GROS Pb opening forcings nc file '
    330330       WRITE(*,*) nf90_strerror(ierr)
     
    537537  IMPLICIT NONE
    538538
    539   integer ntime,nlevel
    540 
    541   real zz(nlevel,ntime)
    542   real pp(nlevel,ntime)
    543   real temp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime)
    544   real theta(nlevel,ntime),rv(nlevel,ntime)
    545   real u(nlevel,ntime)
    546   real v(nlevel,ntime)
    547   real ug(nlevel,ntime)
    548   real vg(nlevel,ntime)
    549   real w(nlevel,ntime)
    550   real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
    551   real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
    552   real dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
    553   real dtrad(nlevel,ntime)
    554   real dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
    555   real dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime)
    556   real dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
    557   real flat(ntime),sens(ntime),ts(ntime),ustar(ntime)
    558   real uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime),resul(nlevel,ntime),resul1(ntime)
    559 
    560 
    561   integer nid, ierr, ierr1,ierr2,rid,i
    562   integer nbvar3d
     539  INTEGER ntime,nlevel
     540
     541  REAL zz(nlevel,ntime)
     542  REAL pp(nlevel,ntime)
     543  REAL temp(nlevel,ntime),qv(nlevel,ntime),rh(nlevel,ntime)
     544  REAL theta(nlevel,ntime),rv(nlevel,ntime)
     545  REAL u(nlevel,ntime)
     546  REAL v(nlevel,ntime)
     547  REAL ug(nlevel,ntime)
     548  REAL vg(nlevel,ntime)
     549  REAL w(nlevel,ntime)
     550  REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
     551  REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
     552  REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
     553  REAL dtrad(nlevel,ntime)
     554  REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
     555  REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime)
     556  REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
     557  REAL flat(ntime),sens(ntime),ts(ntime),ustar(ntime)
     558  REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime),resul(nlevel,ntime),resul1(ntime)
     559
     560
     561  INTEGER nid, ierr, ierr1,ierr2,rid,i
     562  INTEGER nbvar3d
    563563  parameter(nbvar3d=39)
    564   integer var3didin(nbvar3d)
     564  INTEGER var3didin(nbvar3d)
    565565  character*5 name_var(1:nbvar3d)
    566566  data name_var/'zz','pp','temp','qv','rh','theta','rv','u','v','ug','vg','w','advu','hu','vu',&
     
    652652  IMPLICIT NONE
    653653
    654   integer ntime,nlevel
    655 
    656   real ap(nlevel+1),bp(nlevel+1)
    657   real zz(nlevel,ntime),zzh(nlevel+1)
    658   real pp(nlevel,ntime),pph(nlevel+1)
    659   real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
    660   real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
    661   real u(nlevel,ntime),v(nlevel,ntime)
    662   real ug(nlevel,ntime),vg(nlevel,ntime)
    663   real vitw(nlevel,ntime),omega(nlevel,ntime)
    664   real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
    665   real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
    666   real dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
    667   real dtrad(nlevel,ntime)
    668   real dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
    669   real dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)
    670   real dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
    671   real flat(ntime),sens(ntime),ustar(ntime)
    672   real uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)
    673   real ts(ntime),ps(ntime),tke(ntime)
    674   real orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas
    675   real apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3
    676 
    677 
    678   integer nid, ierr,ierr1,ierr2,rid,i
    679   integer nbvar3d
     654  INTEGER ntime,nlevel
     655
     656  REAL ap(nlevel+1),bp(nlevel+1)
     657  REAL zz(nlevel,ntime),zzh(nlevel+1)
     658  REAL pp(nlevel,ntime),pph(nlevel+1)
     659  REAL temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
     660  REAL theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
     661  REAL u(nlevel,ntime),v(nlevel,ntime)
     662  REAL ug(nlevel,ntime),vg(nlevel,ntime)
     663  REAL vitw(nlevel,ntime),omega(nlevel,ntime)
     664  REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
     665  REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
     666  REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
     667  REAL dtrad(nlevel,ntime)
     668  REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
     669  REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)
     670  REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
     671  REAL flat(ntime),sens(ntime),ustar(ntime)
     672  REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)
     673  REAL ts(ntime),ps(ntime),tke(ntime)
     674  REAL orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas
     675  REAL apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3
     676
     677
     678  INTEGER nid, ierr,ierr1,ierr2,rid,i
     679  INTEGER nbvar3d
    680680  parameter(nbvar3d=62)
    681   integer var3didin(nbvar3d),missing_var(nbvar3d)
     681  INTEGER var3didin(nbvar3d),missing_var(nbvar3d)
    682682  character*12 name_var(1:nbvar3d)
    683683  data name_var/'coor_par_a','coor_par_b','height_h','pressure_h',&
     
    709709           endif
    710710           !-----------------------------------------------------------------------
    711         else IF(i>4.and.i<=45) then   ! Lecture des variables en (time,nlevel,lat,lon)
     711        else IF(i>4.AND.i<=45) then   ! Lecture des variables en (time,nlevel,lat,lon)
    712712           ierr = nf90_get_var(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime])
    713713           print *,'read2_cas(resul), on a lu ',i,name_var(i)
     
    717717           endif
    718718           !-----------------------------------------------------------------------
    719         else if (i>45.and.i<=51) then   ! Lecture des variables en (time,lat,lon)
     719        ELSE IF (i>45.AND.i<=51) then   ! Lecture des variables en (time,lat,lon)
    720720           ierr = nf90_get_var(nid,var3didin(i),resul2, count = [1, 1, ntime])
    721721           print *,'read2_cas(resul2), on a lu ',i,name_var(i)
     
    821821  IMPLICIT NONE
    822822
    823   integer ntime,nlevel,k,t
    824 
    825   real ap(nlevel+1),bp(nlevel+1)
    826   real zz(nlevel,ntime),zzh(nlevel+1)
    827   real pp(nlevel,ntime),pph(nlevel+1)
     823  INTEGER ntime,nlevel,k,t
     824
     825  REAL ap(nlevel+1),bp(nlevel+1)
     826  REAL zz(nlevel,ntime),zzh(nlevel+1)
     827  REAL pp(nlevel,ntime),pph(nlevel+1)
    828828  !profils initiaux
    829   real temp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel)
    830   real pp0(nlevel)   
    831   real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
    832   real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
    833   real u(nlevel,ntime),v(nlevel,ntime),tke(nlevel,ntime)
    834   real ug(nlevel,ntime),vg(nlevel,ntime)
    835   real vitw(nlevel,ntime),omega(nlevel,ntime)
    836   real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
    837   real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
    838   real dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
    839   real dtrad(nlevel,ntime)
    840   real dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
    841   real dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)
    842   real dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
    843   real flat(ntime),sens(ntime),ustar(ntime)
    844   real uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)
    845   real ts(ntime),ps(ntime)
    846   real orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas
    847   real apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3
    848 
    849 
    850   integer nid, ierr,ierr1,ierr2,rid,i
    851   integer nbvar3d
     829  REAL temp0(nlevel),qv0(nlevel),ql0(nlevel),qi0(nlevel),u0(nlevel),v0(nlevel),tke0(nlevel)
     830  REAL pp0(nlevel)
     831  REAL temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
     832  REAL theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
     833  REAL u(nlevel,ntime),v(nlevel,ntime),tke(nlevel,ntime)
     834  REAL ug(nlevel,ntime),vg(nlevel,ntime)
     835  REAL vitw(nlevel,ntime),omega(nlevel,ntime)
     836  REAL du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
     837  REAL dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
     838  REAL dt(nlevel,ntime),ht(nlevel,ntime),vt(nlevel,ntime)
     839  REAL dtrad(nlevel,ntime)
     840  REAL dq(nlevel,ntime),hq(nlevel,ntime),vq(nlevel,ntime)
     841  REAL dth(nlevel,ntime),hth(nlevel,ntime),vth(nlevel,ntime),hthl(nlevel,ntime)
     842  REAL dr(nlevel,ntime),hr(nlevel,ntime),vr(nlevel,ntime)
     843  REAL flat(ntime),sens(ntime),ustar(ntime)
     844  REAL uw(nlevel,ntime),vw(nlevel,ntime),q1(nlevel,ntime),q2(nlevel,ntime)
     845  REAL ts(ntime),ps(ntime)
     846  REAL orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas
     847  REAL apbp(nlevel+1),resul(nlevel,ntime),resul1(nlevel),resul2(ntime),resul3
     848
     849
     850  INTEGER nid, ierr,ierr1,ierr2,rid,i
     851  INTEGER nbvar3d
    852852  parameter(nbvar3d=70)
    853   integer var3didin(nbvar3d),missing_var(nbvar3d)
     853  INTEGER var3didin(nbvar3d),missing_var(nbvar3d)
    854854  character*13 name_var(1:nbvar3d)
    855855  data name_var/'coor_par_a','coor_par_b','height_h','pressure_h',&
     
    884884           endif
    885885           !-----------------------------------------------------------------------
    886         else IF(i>4.and.i<=12) then   ! Lecture des variables en (time,nlevel,lat,lon)
     886        else IF(i>4.AND.i<=12) then   ! Lecture des variables en (time,nlevel,lat,lon)
    887887           ierr = nf90_get_var(nid,var3didin(i),resul1)
    888888           print *,'read2_cas(resul1), on a lu ',i,name_var(i)
     
    893893           PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
    894894           !-----------------------------------------------------------------------
    895         else IF(i>12.and.i<=54) then   ! Lecture des variables en (time,nlevel,lat,lon)
     895        else IF(i>12.AND.i<=54) then   ! Lecture des variables en (time,nlevel,lat,lon)
    896896           ierr = nf90_get_var(nid,var3didin(i),resul)
    897897           print *,'read2_cas(resul), on a lu ',i,name_var(i)
     
    902902           PRINT*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
    903903           !-----------------------------------------------------------------------
    904         else if (i>54.and.i<=65) then   ! Lecture des variables en (time,lat,lon)
     904        ELSE IF (i>54.AND.i<=65) then   ! Lecture des variables en (time,lat,lon)
    905905           ierr = nf90_get_var(nid,var3didin(i),resul2)
    906906           print *,'read2_cas(resul2), on a lu ',i,name_var(i)
     
    10531053
    10541054  ! inputs:
    1055   integer annee_ref
    1056   integer nt_cas,nlev_cas
    1057   real day, day1,day_cas
    1058   real ts_cas(nt_cas),ps_cas(nt_cas)
    1059   real plev_cas(nlev_cas,nt_cas)
    1060   real t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas)
    1061   real u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)
    1062   real ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)
    1063   real vitw_cas(nlev_cas,nt_cas)
    1064   real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)
    1065   real dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)
    1066   real dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)
    1067   real dtrad_cas(nlev_cas,nt_cas)
    1068   real dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)
    1069   real lat_cas(nt_cas)
    1070   real sens_cas(nt_cas)
    1071   real ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)
    1072   real q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)
     1055  INTEGER annee_ref
     1056  INTEGER nt_cas,nlev_cas
     1057  REAL day, day1,day_cas
     1058  REAL ts_cas(nt_cas),ps_cas(nt_cas)
     1059  REAL plev_cas(nlev_cas,nt_cas)
     1060  REAL t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas)
     1061  REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)
     1062  REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)
     1063  REAL vitw_cas(nlev_cas,nt_cas)
     1064  REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)
     1065  REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)
     1066  REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)
     1067  REAL dtrad_cas(nlev_cas,nt_cas)
     1068  REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)
     1069  REAL lat_cas(nt_cas)
     1070  REAL sens_cas(nt_cas)
     1071  REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)
     1072  REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)
    10731073
    10741074  ! outputs:
    1075   real plev_prof_cas(nlev_cas)
    1076   real t_prof_cas(nlev_cas),q_prof_cas(nlev_cas)
    1077   real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
    1078   real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)
    1079   real vitw_prof_cas(nlev_cas)
    1080   real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
    1081   real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
    1082   real dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)
    1083   real dtrad_prof_cas(nlev_cas)
    1084   real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
    1085   real lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas
    1086   real uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)
     1075  REAL plev_prof_cas(nlev_cas)
     1076  REAL t_prof_cas(nlev_cas),q_prof_cas(nlev_cas)
     1077  REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
     1078  REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)
     1079  REAL vitw_prof_cas(nlev_cas)
     1080  REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
     1081  REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
     1082  REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)
     1083  REAL dtrad_prof_cas(nlev_cas)
     1084  REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
     1085  REAL lat_prof_cas,sens_prof_cas,ts_prof_cas,ustar_prof_cas
     1086  REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)
    10871087  ! local:
    1088   integer it_cas1, it_cas2,k
    1089   real timeit,time_cas1,time_cas2,frac
     1088  INTEGER it_cas1, it_cas2,k
     1089  REAL timeit,time_cas1,time_cas2,frac
    10901090
    10911091
     
    10961096  ! sont censes etre corrects.
    10971097  ! A supprimer a terme (MPL 20150623)
    1098   !     if ((forcing_type.eq.10).and.(1.eq.0)) THEN
     1098  !     if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN
    10991099  ! Check that initial day of the simulation consistent with AMMA case:
    1100   !      if (annee_ref.ne.2006) THEN
     1100  !      if (annee_ref.NE.2006) THEN
    11011101  !       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
    11021102  !       PRINT*,'Changer annee_ref dans run.def'
    11031103  !       stop
    11041104  !      endif
    1105   !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) THEN
     1105  !      if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN
    11061106  !       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
    11071107  !       PRINT*,'Changer dayref dans run.def'
    11081108  !       stop
    11091109  !      endif
    1110   !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) THEN
     1110  !      if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN
    11111111  !       PRINT*,'AMMA a fini le 11 juillet'
    11121112  !       PRINT*,'Changer dayref ou nday dans run.def'
     
    11171117  ! Determine timestep relative to the 1st day:
    11181118  !       timeit=(day-day1)*86400.
    1119   !       if (annee_ref.eq.1992) THEN
     1119  !       if (annee_ref.EQ.1992) THEN
    11201120  !        timeit=(day-day_cas)*86400.
    11211121  !       else
     
    11451145  !print *,'it_cas1,it_cas2,time_cas1,time_cas2=',it_cas1,it_cas2,time_cas1,time_cas2
    11461146
    1147   if (it_cas1 > nt_cas) THEN
     1147  IF (it_cas1 > nt_cas) THEN
    11481148     WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: '            &
    11491149          ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit
    11501150     stop
    1151   endif
     1151  ENDIF
    11521152
    11531153  ! time interpolation:
     
    12621262
    12631263  ! inputs:
    1264   integer annee_ref
    1265   integer nt_cas,nlev_cas
    1266   real day, day1,day_cas
    1267   real ts_cas(nt_cas),ps_cas(nt_cas)
    1268   real plev_cas(nlev_cas,nt_cas)
    1269   real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas)
    1270   real qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas)
    1271   real u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)
    1272   real ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)
    1273   real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)
    1274   real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)
    1275   real dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)
    1276   real dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)
    1277   real dth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas)
    1278   real dtrad_cas(nlev_cas,nt_cas)
    1279   real dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)
    1280   real lat_cas(nt_cas),sens_cas(nt_cas),tke_cas(nt_cas)
    1281   real ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)
    1282   real q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)
     1264  INTEGER annee_ref
     1265  INTEGER nt_cas,nlev_cas
     1266  REAL day, day1,day_cas
     1267  REAL ts_cas(nt_cas),ps_cas(nt_cas)
     1268  REAL plev_cas(nlev_cas,nt_cas)
     1269  REAL t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas)
     1270  REAL qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas)
     1271  REAL u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)
     1272  REAL ug_cas(nlev_cas,nt_cas),vg_cas(nlev_cas,nt_cas)
     1273  REAL vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)
     1274  REAL du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)
     1275  REAL dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)
     1276  REAL dt_cas(nlev_cas,nt_cas),ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas)
     1277  REAL dth_cas(nlev_cas,nt_cas),hth_cas(nlev_cas,nt_cas),vth_cas(nlev_cas,nt_cas)
     1278  REAL dtrad_cas(nlev_cas,nt_cas)
     1279  REAL dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)
     1280  REAL lat_cas(nt_cas),sens_cas(nt_cas),tke_cas(nt_cas)
     1281  REAL ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)
     1282  REAL q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)
    12831283
    12841284  ! outputs:
    1285   real plev_prof_cas(nlev_cas)
    1286   real t_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas)
    1287   real qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)
    1288   real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
    1289   real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)
    1290   real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)
    1291   real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
    1292   real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
    1293   real dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)
    1294   real dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)
    1295   real dtrad_prof_cas(nlev_cas)
    1296   real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
    1297   real lat_prof_cas,sens_prof_cas,tke_prof_cas,ts_prof_cas,ustar_prof_cas
    1298   real uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)
     1285  REAL plev_prof_cas(nlev_cas)
     1286  REAL t_prof_cas(nlev_cas),theta_prof_cas(nlev_cas),thl_prof_cas(nlev_cas),thv_prof_cas(nlev_cas)
     1287  REAL qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)
     1288  REAL u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
     1289  REAL ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas)
     1290  REAL vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)
     1291  REAL du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
     1292  REAL dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
     1293  REAL dt_prof_cas(nlev_cas),ht_prof_cas(nlev_cas),vt_prof_cas(nlev_cas)
     1294  REAL dth_prof_cas(nlev_cas),hth_prof_cas(nlev_cas),vth_prof_cas(nlev_cas)
     1295  REAL dtrad_prof_cas(nlev_cas)
     1296  REAL dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
     1297  REAL lat_prof_cas,sens_prof_cas,tke_prof_cas,ts_prof_cas,ustar_prof_cas
     1298  REAL uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)
    12991299  ! local:
    1300   integer it_cas1, it_cas2,k
    1301   real timeit,time_cas1,time_cas2,frac
     1300  INTEGER it_cas1, it_cas2,k
     1301  REAL timeit,time_cas1,time_cas2,frac
    13021302
    13031303
     
    13111311  ! sont censes etre corrects.
    13121312  ! A supprimer a terme (MPL 20150623)
    1313   !     if ((forcing_type.eq.10).and.(1.eq.0)) THEN
     1313  !     if ((forcing_type.EQ.10).AND.(1.EQ.0)) THEN
    13141314  ! Check that initial day of the simulation consistent with AMMA case:
    1315   !      if (annee_ref.ne.2006) THEN
     1315  !      if (annee_ref.NE.2006) THEN
    13161316  !       PRINT*,'Pour AMMA, annee_ref doit etre 2006'
    13171317  !       PRINT*,'Changer annee_ref dans run.def'
    13181318  !       stop
    13191319  !      endif
    1320   !      if (annee_ref.eq.2006 .and. day1.lt.day_cas) THEN
     1320  !      if (annee_ref.EQ.2006 .AND. day1.lt.day_cas) THEN
    13211321  !       PRINT*,'AMMA a debute le 10 juillet 2006',day1,day_cas
    13221322  !       PRINT*,'Changer dayref dans run.def'
    13231323  !       stop
    13241324  !      endif
    1325   !      if (annee_ref.eq.2006 .and. day1.gt.day_cas+1) THEN
     1325  !      if (annee_ref.EQ.2006 .AND. day1.gt.day_cas+1) THEN
    13261326  !       PRINT*,'AMMA a fini le 11 juillet'
    13271327  !       PRINT*,'Changer dayref ou nday dans run.def'
     
    13321332  ! Determine timestep relative to the 1st day:
    13331333  !       timeit=(day-day1)*86400.
    1334   !       if (annee_ref.eq.1992) THEN
     1334  !       if (annee_ref.EQ.1992) THEN
    13351335  !        timeit=(day-day_cas)*86400.
    13361336  !       else
     
    13611361  !print *,'it_cas1,it_cas2,time_cas1,time_cas2=',it_cas1,it_cas2,time_cas1,time_cas2
    13621362
    1363   if (it_cas1 > nt_cas) THEN
     1363  IF (it_cas1 > nt_cas) THEN
    13641364     WRITE(*,*) 'PB-stop: day, day_ju_ini_cas,it_cas1, it_cas2, timeit: '            &
    13651365          ,day,day_ju_ini_cas,it_cas1,it_cas2,timeit
    13661366     stop
    1367   endif
     1367  ENDIF
    13681368
    13691369  ! time interpolation:
Note: See TracChangeset for help on using the changeset viewer.