Ignore:
Timestamp:
Jul 19, 2024, 10:05:57 AM (4 months ago)
Author:
abarral
Message:

[continued & end] replace netcdf by lmdz_netcdf.F90 wrapper
"use netcdf" is now only used in lmdz_netcdf.F90 (except ecrad and obsolete/)
<include "netcdf.inc"> is now likewise only used in lmdz_netcdf.F90.

systematically specify explicitely <USE lmdz_netcdf, ONLY:> (probably left some missing, to correct later on)

Further replacement of nf_put_* by nf90_put_* (same for _get_)

[minor] replace deprecated boolean operators along the way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/tracco2i_mod.F90

    r4489 r5075  
    104104
    105105! Initialization of tr_seri(id_CO2) If it is not initialized
    106       IF (MAXVAL(tr_seri(:,:,id_CO2)).LT.1.e-15) THEN
     106      IF (MAXVAL(tr_seri(:,:,id_CO2))<1.e-15) THEN
    107107        tr_seri(:,:,id_CO2)=co2_ppm0*1.e-6/RMD*RMCO2 !--initialised from co2_ppm0 in rdem
    108108      ENDIF
     
    299299!--for every timestep comment out the IF ENDIF statements
    300300!--otherwise this is updated every day
    301     IF (debutphy.OR.day_cur.NE.day_pre) THEN
     301    IF (debutphy.OR.day_cur/=day_pre) THEN
    302302
    303303      CALL gather(tr_seri(:,:,id_CO2),co2_glo)
     
    351351
    352352    USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_varid, nf95_open
    353     USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite
     353    USE lmdz_netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite
    354354
    355355    USE carbon_cycle_mod, ONLY : fco2_ff, fco2_bb, fco2_land, fco2_ocean
     
    401401        CALL nf95_gw_var(ncid_in, varid, vector)
    402402        n_glo = size(vector)
    403         IF (n_glo.NE.klon_glo) THEN
     403        IF (n_glo/=klon_glo) THEN
    404404           abort_message='sflx_lmdz_co2_ff: le nombre de points n est pas egal a klon_glo'
    405405           CALL abort_physic(modname,abort_message,1)
     
    409409        CALL nf95_gw_var(ncid_in, varid, time)
    410410        n_month = size(time)
    411         IF (n_month.NE.12) THEN
     411        IF (n_month/=12) THEN
    412412           abort_message='sflx_lmdz_co2_ff: le nombre de month n est pas egal a 12'
    413413           CALL abort_physic(modname,abort_message,1)
     
    434434      CALL nf95_gw_var(ncid_in, varid, vector)
    435435      n_glo = size(vector)
    436       IF (n_glo.NE.klon_glo) THEN
     436      IF (n_glo/=klon_glo) THEN
    437437         abort_message='sflx_lmdz_co2_bb: le nombre de points n est pas egal a klon_glo'
    438438         CALL abort_physic(modname,abort_message,1)
     
    442442      CALL nf95_gw_var(ncid_in, varid, time)
    443443      n_month = size(time)
    444       IF (n_month.NE.12) THEN
     444      IF (n_month/=12) THEN
    445445         abort_message='sflx_lmdz_co2_bb: le nombre de month n est pas egal a 12'
    446446         CALL abort_physic(modname,abort_message,1)
     
    474474
    475475!---select the correct month
    476   IF (mth_cur.LT.1.OR.mth_cur.GT.12) THEN
     476  IF (mth_cur<1.OR.mth_cur>12) THEN
    477477    PRINT *,'probleme avec le mois dans co2_ini =', mth_cur
    478478  ENDIF
Note: See TracChangeset for help on using the changeset viewer.