Ignore:
Timestamp:
Jan 2, 2020, 7:01:34 PM (5 years ago)
Author:
fhourdin
Message:

Corrections pour le format standard 1D.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90

    r3595 r3619  
    123123      ierr=NF_INQ_DIMLEN(nid,rid,nlev_cas)
    124124      print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas
    125       IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 1000 )) THEN
     125      IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 200000 )) THEN
    126126              print*,'Valeur de nlev_cas peu probable'
    127127              STOP
     
    315315     &     temp_nudg,qv_nudg,u_nudg,v_nudg,                                        &
    316316     &     du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq,                                    &
    317      &     dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tke,uw,vw,q1,q2,       &
     317     &     dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tket,uw,vw,q1,q2,       &
    318318     &     orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,          &
    319319     &     heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas)
     
    334334      real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
    335335      real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
    336       real u(nlevel,ntime),v(nlevel,ntime),tke(nlevel,ntime)
     336      real u(nlevel,ntime),v(nlevel,ntime),tket(ntime)
    337337      real temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime)
    338338      real ug(nlevel,ntime),vg(nlevel,ntime)
     
    366366     ! coordonnees pression + temps #42
    367367     &'w','omega','ug','vg','uadv','uadvh','uadvv','vadv','vadvh','vadvv','tadv','tadvh','tadvv',& !  #13 - #25
    368      &'qvadv','qvadvh','qvadvv','thadv','thadvh','thadvv','thladvh',                             & ! #26 - #33
    369      & 'radv','radvh','radvv','radcool','q1','q2','ustress','vstress',                           & ! #34 - #41
    370      & 'rh','temp_nudg','qv_nudg','u_nudg','v_nudg',&
    371      &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt','tket',&
     368     &'qvadv','qvadvh','qvadvv','thadv','thadvh','thadvv','thladvh',                             & ! #26 - #32
     369     & 'radv','radvh','radvv','radcool','q1','q2','ustress','vstress',                           & ! #33 - #40
     370     & 'rh','temp_nudg','qv_nudg','u_nudg','v_nudg',                                             & ! #41-45
     371     &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt',   & ! #46-58
    372372     ! coordonnees temps #12
    373      &'sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&
     373     &'tket','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&
    374374     &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',&
    375375     ! scalaires #4
    376376     &'o3','rugos','clay','sand'/
    377377
    378       do i=1,nbvar3d
    379         missing_var(i)=0.
    380       enddo
    381 
     378!-----------------------------------------------------------------------
     379! Checking availability of variable #i in the cas.nc file
     380!     missing_var=1 if the variable is missing
    382381!-----------------------------------------------------------------------
    383382
    384383       do i=1,nbvar3d
     384         missing_var(i)=0.
    385385         ierr=NF_INQ_VARID(nid,name_var(i),var3didin(i))
    386386         if(ierr/=NF_NOERR) then
     
    391391
    392392!-----------------------------------------------------------------------
    393 ! Activation de quelques cles en fonction des variables disponibles
     393! Activating keys depending on the presence of specific variables in cas.nc
    394394!-----------------------------------------------------------------------
    395395if ( 1 == 1 ) THEN
     
    403403
    404404!-----------------------------------------------------------------------
    405            if(i.LE.4) then     ! Lecture des coord pression en (nlevelp1,lat,lon)
     405! Reading variables 1D (N+1) vertical variables (nlevelp1,lat,lon)
     406!-----------------------------------------------------------------------
     407           if(i.LE.4) then
    406408#ifdef NC_DOUBLE
    407409           ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),apbp)
     
    414416              stop "getvarup"
    415417           endif
    416 !-----------------------------------------------------------------------
    417            else if(i.gt.4.and.i.LE.12) then   ! Lecture des variables en (time,nlevel,lat,lon)
     418
     419!-----------------------------------------------------------------------
     420!  Reading 1D (N) vertical varialbes    (nlevel,lat,lon)   
     421!-----------------------------------------------------------------------
     422           else if(i.gt.4.and.i.LE.12) then 
    418423#ifdef NC_DOUBLE
    419424           ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul1)
     
    427432           endif
    428433         print*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1)
    429 !-----------------------------------------------------------------------
    430            else if(i.gt.12.and.i.LE.54) then   ! Lecture des variables en (time,nlevel,lat,lon)
     434
     435!-----------------------------------------------------------------------
     436!  Reading 2D tim-vertical variables  (time,nlevel,lat,lon)
     437!  TBD : seems to be the same as above.
     438!-----------------------------------------------------------------------
     439           else if(i.gt.12.and.i.LE.57) then
    431440#ifdef NC_DOUBLE
    432441           ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul)
     
    439448              stop "getvarup"
    440449           endif
    441 
    442450         print*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul)
    443 !-----------------------------------------------------------------------
    444            else if (i.gt.54.and.i.LE.65) then   ! Lecture des variables en (time,lat,lon)
     451
     452!-----------------------------------------------------------------------
     453!  Reading 1D time variables (time,lat,lon)
     454!-----------------------------------------------------------------------
     455           else if (i.gt.57.and.i.LE.63) then
    445456#ifdef NC_DOUBLE
    446457           ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul2)
     
    454465           endif
    455466         print*,'Lecture de la variable #i  ',i,name_var(i),minval(resul2),maxval(resul2)
    456 !-----------------------------------------------------------------------
    457            else     ! Lecture des constantes (lat,lon)
     467
     468!-----------------------------------------------------------------------
     469! Reading scalar variables (lat,lon)
     470!-----------------------------------------------------------------------
     471           else
    458472#ifdef NC_DOUBLE
    459473           ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul3)
     
    469483           endif
    470484         endif
     485
     486!-----------------------------------------------------------------------
     487! Attributing variables
    471488!-----------------------------------------------------------------------
    472489         select case(i)
     
    528545           case(56) ; u=resul
    529546           case(57) ; v=resul
    530            case(58) ; tke=resul
    531            case(59) ; sens=resul2   ! donnees indexees en time
     547           case(58) ; tket=resul2   ! donnees indexees en time
     548           case(59) ; sens=resul2
    532549           case(60) ; flat=resul2
    533550           case(61) ; ts=resul2
     
    563580             u(k,t)=u0(k)
    564581             v(k,t)=v0(k)
    565              tke(k,t)=tke0(k)
     582             !tke(k,t)=tke0(k)
    566583          enddo
    567584       enddo
Note: See TracChangeset for help on using the changeset viewer.