Ignore:
Timestamp:
Oct 25, 2021, 11:01:18 AM (3 years ago)
Author:
emillour
Message:

Mars GCM:
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.MARS/libf/dynphy_lonlat/phymars/ini_archive.F

    r1422 r2573  
    176176      ierr = NF_REDEF (nid)
    177177#ifdef NC_DOUBLE
    178       ierr = NF_DEF_VAR (nid,"controle",NF_DOUBLE,1,idim_index,nvarid)
    179 #else
    180       ierr = NF_DEF_VAR (nid,"controle",NF_FLOAT,1,idim_index,nvarid)
     178      ierr = NF_DEF_VAR (nid,"controle",NF_DOUBLE,1,[idim_index],nvarid)
     179#else
     180      ierr = NF_DEF_VAR (nid,"controle",NF_FLOAT,1,[idim_index],nvarid)
    181181#endif
    182182      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 22,
     
    195195      ierr = NF_REDEF (nid)
    196196#ifdef NC_DOUBLE
    197       ierr = NF_DEF_VAR (nid,"rlonu",NF_DOUBLE,1,idim_rlonu,nvarid)
    198 #else
    199       ierr = NF_DEF_VAR (nid,"rlonu",NF_FLOAT,1,idim_rlonu,nvarid)
     197      ierr = NF_DEF_VAR (nid,"rlonu",NF_DOUBLE,1,[idim_rlonu],nvarid)
     198#else
     199      ierr = NF_DEF_VAR (nid,"rlonu",NF_FLOAT,1,[idim_rlonu],nvarid)
    200200#endif
    201201      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 23,
     
    210210      ierr = NF_REDEF (nid)
    211211#ifdef NC_DOUBLE
    212       ierr = NF_DEF_VAR (nid,"rlatu",NF_DOUBLE,1,idim_rlatu,nvarid)
    213 #else
    214       ierr = NF_DEF_VAR (nid,"rlatu",NF_FLOAT,1,idim_rlatu,nvarid)
     212      ierr = NF_DEF_VAR (nid,"rlatu",NF_DOUBLE,1,[idim_rlatu],nvarid)
     213#else
     214      ierr = NF_DEF_VAR (nid,"rlatu",NF_FLOAT,1,[idim_rlatu],nvarid)
    215215#endif
    216216      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 22,
     
    225225      ierr = NF_REDEF (nid)
    226226#ifdef NC_DOUBLE
    227       ierr = NF_DEF_VAR (nid,"rlonv",NF_DOUBLE,1,idim_rlonv,nvarid)
    228 #else
    229       ierr = NF_DEF_VAR (nid,"rlonv",NF_FLOAT,1,idim_rlonv,nvarid)
     227      ierr = NF_DEF_VAR (nid,"rlonv",NF_DOUBLE,1,[idim_rlonv],nvarid)
     228#else
     229      ierr = NF_DEF_VAR (nid,"rlonv",NF_FLOAT,1,[idim_rlonv],nvarid)
    230230#endif
    231231      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 23,
     
    240240      ierr = NF_REDEF (nid)
    241241#ifdef NC_DOUBLE
    242       ierr = NF_DEF_VAR (nid,"rlatv",NF_DOUBLE,1,idim_rlatv,nvarid)
    243 #else
    244       ierr = NF_DEF_VAR (nid,"rlatv",NF_FLOAT,1,idim_rlatv,nvarid)
     242      ierr = NF_DEF_VAR (nid,"rlatv",NF_DOUBLE,1,[idim_rlatv],nvarid)
     243#else
     244      ierr = NF_DEF_VAR (nid,"rlatv",NF_FLOAT,1,[idim_rlatv],nvarid)
    245245#endif
    246246      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 22,
     
    260260      ierr = NF_REDEF (nid)
    261261#ifdef NC_DOUBLE
    262       ierr = NF_DEF_VAR (nid,"ap",NF_DOUBLE,1,idim_llmp1,nvarid)
    263 #else
    264       ierr = NF_DEF_VAR (nid,"ap",NF_FLOAT,1,idim_llmp1,nvarid)
     262      ierr = NF_DEF_VAR (nid,"ap",NF_DOUBLE,1,[idim_llmp1],nvarid)
     263#else
     264      ierr = NF_DEF_VAR (nid,"ap",NF_FLOAT,1,[idim_llmp1],nvarid)
    265265#endif
    266266      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 32,
     
    275275      ierr = NF_REDEF (nid)
    276276#ifdef NC_DOUBLE
    277       ierr = NF_DEF_VAR (nid,"bp",NF_DOUBLE,1,idim_llmp1,nvarid)
    278 #else
    279       ierr = NF_DEF_VAR (nid,"bp",NF_FLOAT,1,idim_llmp1,nvarid)
     277      ierr = NF_DEF_VAR (nid,"bp",NF_DOUBLE,1,[idim_llmp1],nvarid)
     278#else
     279      ierr = NF_DEF_VAR (nid,"bp",NF_FLOAT,1,[idim_llmp1],nvarid)
    280280#endif
    281281      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 35,
     
    291291      ierr = NF_REDEF (nid)
    292292#ifdef NC_DOUBLE
    293       ierr = NF_DEF_VAR (nid,"aps",NF_DOUBLE,1,idim_llm,nvarid)
    294 #else
    295       ierr = NF_DEF_VAR (nid,"aps",NF_FLOAT,1,idim_llm,nvarid)
     293      ierr = NF_DEF_VAR (nid,"aps",NF_DOUBLE,1,[idim_llm],nvarid)
     294#else
     295      ierr = NF_DEF_VAR (nid,"aps",NF_FLOAT,1,[idim_llm],nvarid)
    296296#endif
    297297      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 36,
     
    307307      ierr = NF_REDEF (nid)
    308308#ifdef NC_DOUBLE
    309       ierr = NF_DEF_VAR (nid,"bps",NF_DOUBLE,1,idim_llm,nvarid)
    310 #else
    311       ierr = NF_DEF_VAR (nid,"bps",NF_FLOAT,1,idim_llm,nvarid)
     309      ierr = NF_DEF_VAR (nid,"bps",NF_DOUBLE,1,[idim_llm],nvarid)
     310#else
     311      ierr = NF_DEF_VAR (nid,"bps",NF_FLOAT,1,[idim_llm],nvarid)
    312312#endif
    313313      ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 30,
     
    324324      ierr = NF_REDEF (nid)
    325325#ifdef NC_DOUBLE
    326       ierr = NF_DEF_VAR (nid,"presnivs",NF_DOUBLE,1,idim_llm,nvarid)
    327 #else
    328       ierr = NF_DEF_VAR (nid,"presnivs",NF_FLOAT,1,idim_llm,nvarid)
     326      ierr = NF_DEF_VAR (nid,"presnivs",NF_DOUBLE,1,[idim_llm],nvarid)
     327#else
     328      ierr = NF_DEF_VAR (nid,"presnivs",NF_FLOAT,1,[idim_llm],nvarid)
    329329#endif
    330330      ierr = NF_ENDDEF(nid)
     
    339339      ierr = NF_REDEF (nid)
    340340#ifdef NC_DOUBLE
    341       ierr = NF_DEF_VAR (nid,"latitude",NF_DOUBLE,1,idim_rlatu,nvarid)
    342 #else
    343       ierr = NF_DEF_VAR (nid,"latitude",NF_FLOAT,1,idim_rlatu,nvarid)
     341      ierr = NF_DEF_VAR (nid,"latitude",NF_DOUBLE,1,[idim_rlatu],nvarid)
     342#else
     343      ierr = NF_DEF_VAR (nid,"latitude",NF_FLOAT,1,[idim_rlatu],nvarid)
    344344#endif
    345345      ierr =NF_PUT_ATT_TEXT(nid,nvarid,'units',13,"degrees_north")
     
    355355       ierr = NF_REDEF (nid)
    356356#ifdef NC_DOUBLE
    357       ierr =NF_DEF_VAR(nid,"longitude", NF_DOUBLE, 1, idim_rlonv,nvarid)
    358 #else
    359       ierr = NF_DEF_VAR(nid,"longitude", NF_FLOAT, 1, idim_rlonv,nvarid)
     357      ierr=NF_DEF_VAR(nid,"longitude",NF_DOUBLE,1,[idim_rlonv],nvarid)
     358#else
     359      ierr=NF_DEF_VAR(nid,"longitude",NF_FLOAT,1,[idim_rlonv],nvarid)
    360360#endif
    361361      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"long_name", 14,
     
    372372#ifdef NC_DOUBLE
    373373      ierr = NF_DEF_VAR (nid, "altitude", NF_DOUBLE, 1,
    374      .       idim_llm,nvarid)
     374     .       [idim_llm],nvarid)
    375375#else
    376376      ierr = NF_DEF_VAR (nid, "altitude", NF_FLOAT, 1,
    377      .       idim_llm,nvarid)
     377     .       [idim_llm],nvarid)
    378378#endif
    379379      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"long_name",10,"pseudo-alt")
     
    394394      ! define variable
    395395#ifdef NC_DOUBLE
    396       ierr=NF_DEF_VAR(nid,"soildepth",NF_DOUBLE,1,idim_nsoilmx,nvarid)
    397 #else
    398       ierr=NF_DEF_VAR(nid,"soildepth",NF_FLOAT,1,idim_nsoilmx,nvarid)
     396      ierr=NF_DEF_VAR(nid,"soildepth",NF_DOUBLE,1,[idim_nsoilmx],nvarid)
     397#else
     398      ierr=NF_DEF_VAR(nid,"soildepth",NF_FLOAT,1,[idim_nsoilmx],nvarid)
    399399#endif
    400400      ierr=NF_PUT_ATT_TEXT (nid,nvarid,"long_name", 20,
Note: See TracChangeset for help on using the changeset viewer.