Changeset 2572


Ignore:
Timestamp:
Oct 25, 2021, 9:57:46 AM (3 years ago)
Author:
emillour
Message:

Common dynamics:
Fixes for the picky gfortran10 compiler which identifies using a scalar
instead of a one-element array as an error.
MW+EM

Location:
trunk/LMDZ.COMMON/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3d/guide_mod.F90

    r1650 r2572  
    11501150         if (guide_modele) then
    11511151#ifdef NC_DOUBLE
    1152              status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
    1153              status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
     1152             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,[1],[nlevnc],apnc)
     1153             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,[1],[nlevnc],bpnc)
    11541154#else
    1155              status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
    1156              status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
     1155             status=NF_GET_VARA_REAL(ncidpl,varidap,[1],[nlevnc],apnc)
     1156             status=NF_GET_VARA_REAL(ncidpl,varidbp,[1],[nlevnc],bpnc)
    11571157#endif
    11581158         else
    11591159#ifdef NC_DOUBLE
    1160              status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
     1160             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,[1],[nlevnc],apnc)
    11611161#else
    1162              status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
     1162             status=NF_GET_VARA_REAL(ncidpl,varidpl,[1],[nlevnc],apnc)
    11631163#endif
    11641164             apnc=apnc*100.! conversion en Pascals
     
    13871387         if (guide_modele) then
    13881388#ifdef NC_DOUBLE
    1389              status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
    1390              status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
     1389             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,[1],[nlevnc],apnc)
     1390             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,[1],[nlevnc],bpnc)
    13911391#else
    1392              status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
    1393              status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
     1392             status=NF_GET_VARA_REAL(ncidpl,varidap,[1],[nlevnc],apnc)
     1393             status=NF_GET_VARA_REAL(ncidpl,varidbp,[1],[nlevnc],bpnc)
    13941394#endif
    13951395         else
    13961396#ifdef NC_DOUBLE
    1397              status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
     1397             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,[1],[nlevnc],apnc)
    13981398#else
    1399              status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
     1399             status=NF_GET_VARA_REAL(ncidpl,varidpl,[1],[nlevnc],apnc)
    14001400#endif
    14011401             apnc=apnc*100.! conversion en Pascals
     
    15601560
    15611561! Creation des variables dimensions
    1562         ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,id_lonu,vid_lonu)
    1563         ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,id_lonv,vid_lonv)
    1564         ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,id_latu,vid_latu)
    1565         ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,id_latv,vid_latv)
    1566         ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,id_lev,vid_lev)
     1562        ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,[id_lonu],vid_lonu)
     1563        ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,[id_lonv],vid_lonv)
     1564        ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,[id_latu],vid_latu)
     1565        ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,[id_latv],vid_latv)
     1566        ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,[id_lev],vid_lev)
    15671567        ierr=NF_DEF_VAR(nid,"cu",NF_FLOAT,2,(/id_lonu,id_latu/),vid_cu)
    15681568        ierr=NF_DEF_VAR(nid,"au",NF_FLOAT,2,(/id_lonu,id_latu/),vid_au)
  • trunk/LMDZ.COMMON/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90

    r1441 r2572  
    8585
    8686  !   Longitudes en u
    87   status=NF_DEF_VAR(ncid_out,'lonu',NF_FLOAT,1,out_lonudim, out_lonuid)
     87  status=NF_DEF_VAR(ncid_out,'lonu',NF_FLOAT,1,[out_lonudim], out_lonuid)
    8888  CALL handle_err(status)
    8989  status=NF_PUT_ATT_TEXT(ncid_out,out_lonuid,'units', 12,'degrees_east')
     
    9191
    9292  !   Longitudes en v
    93   status=NF_DEF_VAR(ncid_out,'lonv',NF_FLOAT,1,out_lonvdim, out_lonvid)
     93  status=NF_DEF_VAR(ncid_out,'lonv',NF_FLOAT,1,[out_lonvdim], out_lonvid)
    9494  CALL handle_err(status)
    9595  status=NF_PUT_ATT_TEXT(ncid_out,out_lonvid,'units', 12,'degrees_east')
     
    9797
    9898  !   Latitude en u
    99   status=NF_DEF_VAR(ncid_out,'latu',NF_FLOAT,1,out_latudim, out_latuid)
     99  status=NF_DEF_VAR(ncid_out,'latu',NF_FLOAT,1,[out_latudim], out_latuid)
    100100  CALL handle_err(status)
    101101  status=NF_PUT_ATT_TEXT(ncid_out,out_latuid,'units', 13,'degrees_north')
     
    103103
    104104  !  Latitude en v
    105   status=NF_DEF_VAR(ncid_out,'latv',NF_FLOAT,1,out_latvdim, out_latvid)
     105  status=NF_DEF_VAR(ncid_out,'latv',NF_FLOAT,1,[out_latvdim], out_latvid)
    106106  CALL handle_err(status)
    107107  status=NF_PUT_ATT_TEXT(ncid_out,out_latvid,'units', 13,'degrees_north')
     
    139139
    140140#ifdef NC_DOUBLE
    141   status=NF_PUT_VARA_DOUBLE(ncid_out,out_lonuid,1,iim+1,rlonudeg)
    142   status=NF_PUT_VARA_DOUBLE(ncid_out,out_lonvid,1,iim+1,rlonvdeg)
    143   status=NF_PUT_VARA_DOUBLE(ncid_out,out_latuid,1,jjm+1,rlatudeg)
    144   status=NF_PUT_VARA_DOUBLE(ncid_out,out_latvid,1,jjm,rlatvdeg)
     141  status=NF_PUT_VARA_DOUBLE(ncid_out,out_lonuid,[1],[iim+1],rlonudeg)
     142  status=NF_PUT_VARA_DOUBLE(ncid_out,out_lonvid,[1],[iim+1],rlonvdeg)
     143  status=NF_PUT_VARA_DOUBLE(ncid_out,out_latuid,[1],[jjm+1],rlatudeg)
     144  status=NF_PUT_VARA_DOUBLE(ncid_out,out_latvid,[1],[jjm],rlatvdeg)
    145145#else
    146   status=NF_PUT_VARA_REAL(ncid_out,out_lonuid,1,iim+1,rlonudeg)
    147   status=NF_PUT_VARA_REAL(ncid_out,out_lonvid,1,iim+1,rlonvdeg)
    148   status=NF_PUT_VARA_REAL(ncid_out,out_latuid,1,jjm+1,rlatudeg)
    149   status=NF_PUT_VARA_REAL(ncid_out,out_latvid,1,jjm,rlatvdeg)
     146  status=NF_PUT_VARA_REAL(ncid_out,out_lonuid,[1],[iim+1],rlonudeg)
     147  status=NF_PUT_VARA_REAL(ncid_out,out_lonvid,[1],[iim+1],rlonvdeg)
     148  status=NF_PUT_VARA_REAL(ncid_out,out_latuid,[1],[jjm+1],rlatudeg)
     149  status=NF_PUT_VARA_REAL(ncid_out,out_latvid,[1],[jjm],rlatvdeg)
    150150#endif
    151151
     
    196196  ! ecriture des variables
    197197#ifdef NC_DOUBLE
    198   status=NF_PUT_VARA_DOUBLE(ncid_out,out_levid,1,llm,rlevdeg)
     198  status=NF_PUT_VARA_DOUBLE(ncid_out,out_levid,[1],[llm],rlevdeg)
    199199#else
    200   status=NF_PUT_VARA_REAL(ncid_out,out_levid,1,llm,rlevdeg)
     200  status=NF_PUT_VARA_REAL(ncid_out,out_levid,[1],[llm],rlevdeg)
    201201#endif
    202202
  • trunk/LMDZ.COMMON/libf/dyn3dpar/guide_p_mod.F90

    r1650 r2572  
    14091409         IF (guide_plevs.EQ.1) THEN
    14101410#ifdef NC_DOUBLE
    1411              status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
    1412              status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
     1411             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,[1],[nlevnc],apnc)
     1412             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,[1],[nlevnc],bpnc)
    14131413#else
    1414              status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
    1415              status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
     1414             status=NF_GET_VARA_REAL(ncidpl,varidap,[1],[nlevnc],apnc)
     1415             status=NF_GET_VARA_REAL(ncidpl,varidbp,[1],[nlevnc],bpnc)
    14161416#endif
    14171417         ELSEIF (guide_plevs.EQ.0) THEN
    14181418#ifdef NC_DOUBLE
    1419              status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
     1419             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,[1],[nlevnc],apnc)
    14201420#else
    1421              status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
     1421             status=NF_GET_VARA_REAL(ncidpl,varidpl,[1],[nlevnc],apnc)
    14221422#endif
    14231423             apnc=apnc*100.! conversion en Pascals
     
    16741674         if (guide_plevs.EQ.1) then
    16751675#ifdef NC_DOUBLE
    1676              status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
    1677              status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
     1676             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,[1],[nlevnc],apnc)
     1677             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,[1],[nlevnc],bpnc)
    16781678#else
    1679              status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
    1680              status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
     1679             status=NF_GET_VARA_REAL(ncidpl,varidap,[1],[nlevnc],apnc)
     1680             status=NF_GET_VARA_REAL(ncidpl,varidbp,[1],[nlevnc],bpnc)
    16811681#endif
    16821682         elseif (guide_plevs.EQ.0) THEN
    16831683#ifdef NC_DOUBLE
    1684              status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
     1684             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,[1],[nlevnc],apnc)
    16851685#else
    1686              status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
     1686             status=NF_GET_VARA_REAL(ncidpl,varidpl,[1],[nlevnc],apnc)
    16871687#endif
    16881688             apnc=apnc*100.! conversion en Pascals
     
    18561856! Definition des dimensions
    18571857        ierr=NF_DEF_DIM(nid,"LONU",iip1,id_lonu)
    1858         print*,'id_lonu 1 ',id_lonu
    18591858        ierr=NF_DEF_DIM(nid,"LONV",iip1,id_lonv)
    18601859        ierr=NF_DEF_DIM(nid,"LATU",jjp1,id_latu)
     
    18641863
    18651864! Creation des variables dimensions
    1866         ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,id_lonu,vid_lonu)
    1867         print*,'id_lonu 2 ',id_lonu
    1868         ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,id_lonv,vid_lonv)
    1869         ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,id_latu,vid_latu)
    1870         ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,id_latv,vid_latv)
    1871         ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,id_lev,vid_lev)
     1865        ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,[id_lonu],vid_lonu)
     1866        ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,[id_lonv],vid_lonv)
     1867        ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,[id_latu],vid_latu)
     1868        ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,[id_latv],vid_latv)
     1869        ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,[id_lev],vid_lev)
    18721870        ierr=NF_DEF_VAR(nid,"cu",NF_FLOAT,2,(/id_lonu,id_latu/),vid_cu)
    18731871        ierr=NF_DEF_VAR(nid,"cv",NF_FLOAT,2,(/id_lonv,id_latv/),vid_cv)
Note: See TracChangeset for help on using the changeset viewer.