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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.