Changeset 997 for LMDZ4/trunk


Ignore:
Timestamp:
Sep 9, 2008, 4:31:22 PM (16 years ago)
Author:
lsce
Message:

Remetais/ajoutais ecriture de limit.nc en double precision pour un compilation avec le cle NC_DOUBLE.

JG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/dyn3d/limit_netcdf.F

    r995 r997  
    11771177      ENDDO
    11781178c
    1179 c Ecriture de fichier limit toujours en simple precision, NF_FLOAT
    11801179      PRINT*, 'Ecriture du fichier limit'
    11811180c
     
    11901189      dims(2) = ntim
    11911190c
     1191#ifdef NC_DOUBLE
     1192      ierr = NF_DEF_VAR (nid, "TEMPS", NF_DOUBLE, 1,ntim, id_tim)
     1193#else
    11921194      ierr = NF_DEF_VAR (nid, "TEMPS", NF_FLOAT, 1,ntim, id_tim)
     1195#endif
    11931196      ierr = NF_PUT_ATT_TEXT (nid, id_tim, "title", 17,
    11941197     .                        "Jour dans l annee")
    11951198      IF (newlmt) THEN
    11961199c
     1200#ifdef NC_DOUBLE
     1201        ierr = NF_DEF_VAR (nid, "FOCE", NF_DOUBLE, 2,dims, id_FOCE)
     1202#else
    11971203        ierr = NF_DEF_VAR (nid, "FOCE", NF_FLOAT, 2,dims, id_FOCE)
     1204#endif
    11981205        ierr = NF_PUT_ATT_TEXT (nid, id_FOCE, "title", 14,
    11991206     .                      "Fraction ocean")
    12001207c
     1208#ifdef NC_DOUBLE
     1209        ierr = NF_DEF_VAR (nid, "FSIC", NF_DOUBLE, 2,dims, id_FSIC)
     1210#else
    12011211        ierr = NF_DEF_VAR (nid, "FSIC", NF_FLOAT, 2,dims, id_FSIC)
     1212#endif
    12021213        ierr = NF_PUT_ATT_TEXT (nid, id_FSIC, "title", 21,
    12031214     .                      "Fraction glace de mer")
    12041215c
     1216#ifdef NC_DOUBLE
     1217        ierr = NF_DEF_VAR (nid, "FTER", NF_DOUBLE, 2,dims, id_FTER)
     1218#else
    12051219        ierr = NF_DEF_VAR (nid, "FTER", NF_FLOAT, 2,dims, id_FTER)
     1220#endif
    12061221        ierr = NF_PUT_ATT_TEXT (nid, id_FTER, "title", 14,
    12071222     .                      "Fraction terre")
    12081223c
     1224#ifdef NC_DOUBLE
     1225        ierr = NF_DEF_VAR (nid, "FLIC", NF_DOUBLE, 2,dims, id_FLIC)
     1226#else
    12091227        ierr = NF_DEF_VAR (nid, "FLIC", NF_FLOAT, 2,dims, id_FLIC)
     1228#endif
    12101229        ierr = NF_PUT_ATT_TEXT (nid, id_FLIC, "title", 17,
    12111230     .                      "Fraction land ice")
    12121231c
    12131232      ELSE
     1233#ifdef NC_DOUBLE
     1234        ierr = NF_DEF_VAR (nid, "NAT", NF_DOUBLE, 2,dims, id_NAT)
     1235#else
    12141236        ierr = NF_DEF_VAR (nid, "NAT", NF_FLOAT, 2,dims, id_NAT)
     1237#endif
    12151238        ierr = NF_PUT_ATT_TEXT (nid, id_NAT, "title", 23,
    12161239     .                      "Nature du sol (0,1,2,3)")
    12171240      ENDIF
     1241#ifdef NC_DOUBLE
     1242      ierr = NF_DEF_VAR (nid, "SST", NF_DOUBLE, 2,dims, id_SST)
     1243#else
    12181244      ierr = NF_DEF_VAR (nid, "SST", NF_FLOAT, 2,dims, id_SST)
     1245#endif
    12191246      ierr = NF_PUT_ATT_TEXT (nid, id_SST, "title", 35,
    12201247     .                      "Temperature superficielle de la mer")
     1248#ifdef NC_DOUBLE
     1249      ierr = NF_DEF_VAR (nid, "BILS", NF_DOUBLE, 2,dims, id_BILS)
     1250#else
    12211251      ierr = NF_DEF_VAR (nid, "BILS", NF_FLOAT, 2,dims, id_BILS)
     1252#endif
    12221253      ierr = NF_PUT_ATT_TEXT (nid, id_BILS, "title", 32,
    12231254     .                        "Reference flux de chaleur au sol")
     1255#ifdef NC_DOUBLE
     1256      ierr = NF_DEF_VAR (nid, "ALB", NF_DOUBLE, 2,dims, id_ALB)
     1257#else
    12241258      ierr = NF_DEF_VAR (nid, "ALB", NF_FLOAT, 2,dims, id_ALB)
     1259#endif
    12251260      ierr = NF_PUT_ATT_TEXT (nid, id_ALB, "title", 19,
    12261261     .                        "Albedo a la surface")
     1262#ifdef NC_DOUBLE
     1263      ierr = NF_DEF_VAR (nid, "RUG", NF_DOUBLE, 2,dims, id_RUG)
     1264#else
    12271265      ierr = NF_DEF_VAR (nid, "RUG", NF_FLOAT, 2,dims, id_RUG)
     1266#endif
    12281267      ierr = NF_PUT_ATT_TEXT (nid, id_RUG, "title", 8,
    12291268     .                        "Rugosite")
     
    12381277      epais(2) = 1
    12391278c
     1279#ifdef NC_DOUBLE
     1280      ierr = NF_PUT_VAR1_DOUBLE (nid,id_tim,k,DBLE(k))
     1281c
     1282      IF (newlmt ) THEN
     1283          ierr = NF_PUT_VARA_DOUBLE (nid,id_FOCE,debut,epais
     1284     $        ,pctsrf_t(1,is_oce,k))
     1285          ierr = NF_PUT_VARA_DOUBLE (nid,id_FSIC,debut,epais
     1286     $        ,pctsrf_t(1,is_sic,k))
     1287          ierr = NF_PUT_VARA_DOUBLE (nid,id_FTER,debut,epais
     1288     $        ,pctsrf_t(1,is_ter,k))
     1289          ierr = NF_PUT_VARA_DOUBLE (nid,id_FLIC,debut,epais
     1290     $        ,pctsrf_t(1,is_lic,k))
     1291      ELSE
     1292          ierr = NF_PUT_VARA_DOUBLE (nid,id_NAT,debut,epais
     1293     $        ,phy_nat(1,k))
     1294      ENDIF
     1295c
     1296      ierr = NF_PUT_VARA_DOUBLE (nid,id_SST,debut,epais,phy_sst(1,k))
     1297      ierr = NF_PUT_VARA_DOUBLE (nid,id_BILS,debut,epais,phy_bil(1,k))
     1298      ierr = NF_PUT_VARA_DOUBLE (nid,id_ALB,debut,epais,phy_alb(1,k))
     1299      ierr = NF_PUT_VARA_DOUBLE (nid,id_RUG,debut,epais,phy_rug(1,k))
     1300#else
    12401301      ierr = NF_PUT_VAR1_REAL (nid,id_tim,k,FLOAT(k))
    12411302      IF (newlmt ) THEN
     
    12561317      ierr = NF_PUT_VARA_REAL (nid,id_ALB,debut,epais,phy_alb(1,k))
    12571318      ierr = NF_PUT_VARA_REAL (nid,id_RUG,debut,epais,phy_rug(1,k))
     1319#endif
    12581320c
    12591321      ENDDO
Note: See TracChangeset for help on using the changeset viewer.