Ignore:
Timestamp:
Jul 19, 2024, 10:05:57 AM (2 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/readaerosol_mod.F90

    r4627 r5075  
    22!
    33MODULE readaerosol_mod
     4
     5  USE lmdz_netcdf, ONLY: nf90_strerror,nf90_noerr,nf90_get_var,nf90_inq_varid,&
     6          nf90_inquire_dimension,nf90_inq_dimid,nf90_open,nf90_nowrite,nf90_close
    47
    58  REAL, SAVE :: not_valid=-333.
     
    8689! Read data depending on actual year and interpolate if necessary
    8790!****************************************************************************************
    88      IF (iyr_in .LT. 1850) THEN
     91     IF (iyr_in < 1850) THEN
    8992        cyear='.nat'
    9093        WRITE(lunout,*) 'get_aero 1 iyr_in=', iyr_in,'   ',cyear
     
    9396        CALL get_aero_fromfile(name_aero, cyear, filename, klev_src, pt_ap, pt_b, pt_out, psurf, load)
    9497       
    95      ELSE IF (iyr_in .GE. 2100) THEN
     98     ELSE IF (iyr_in >= 2100) THEN
    9699        cyear='2100'
    97100        WRITE(lunout,*) 'get_aero 2 iyr_in=', iyr_in,'   ',cyear
     
    103106        ! Read data from 2 decades and interpolate to actual year
    104107        ! a) from actual 10-yr-period
    105         IF (iyr_in.LT.1900) THEN
     108        IF (iyr_in<1900) THEN
    106109           iyr1 = 1850
    107110           iyr2 = 1900
    108         ELSE IF (iyr_in.GE.1900.AND.iyr_in.LT.1920) THEN
     111        ELSE IF (iyr_in>=1900.AND.iyr_in<1920) THEN
    109112           iyr1 = 1900
    110113           iyr2 = 1920
     
    174177
    175178SUBROUTINE init_aero_fromfile(flag_aerosol, aerosol_couple)
    176   USE netcdf
    177179  USE mod_phys_lmdz_para
    178180  USE mod_grid_phy_lmdz, ONLY: grid_type, unstructured
     
    265267!****************************************************************************************
    266268
    267     USE netcdf
    268269    USE dimphy
    269270    USE mod_grid_phy_lmdz, ONLY: nbp_lon_=>nbp_lon, nbp_lat_=>nbp_lat, klon_glo, &
     
    507508!****************************************************************************************
    508509          DO imth=1, 12
    509              IF (imth.EQ.1) THEN
     510             IF (imth==1) THEN
    510511                cvar=TRIM(varname)//'JAN'
    511              ELSE IF (imth.EQ.2) THEN
     512             ELSE IF (imth==2) THEN
    512513                cvar=TRIM(varname)//'FEB'
    513              ELSE IF (imth.EQ.3) THEN
     514             ELSE IF (imth==3) THEN
    514515                cvar=TRIM(varname)//'MAR'
    515              ELSE IF (imth.EQ.4) THEN
     516             ELSE IF (imth==4) THEN
    516517                cvar=TRIM(varname)//'APR'
    517              ELSE IF (imth.EQ.5) THEN
     518             ELSE IF (imth==5) THEN
    518519                cvar=TRIM(varname)//'MAY'
    519              ELSE IF (imth.EQ.6) THEN
     520             ELSE IF (imth==6) THEN
    520521                cvar=TRIM(varname)//'JUN'
    521              ELSE IF (imth.EQ.7) THEN
     522             ELSE IF (imth==7) THEN
    522523                cvar=TRIM(varname)//'JUL'
    523              ELSE IF (imth.EQ.8) THEN
     524             ELSE IF (imth==8) THEN
    524525                cvar=TRIM(varname)//'AUG'
    525              ELSE IF (imth.EQ.9) THEN
     526             ELSE IF (imth==9) THEN
    526527                cvar=TRIM(varname)//'SEP'
    527              ELSE IF (imth.EQ.10) THEN
     528             ELSE IF (imth==10) THEN
    528529                cvar=TRIM(varname)//'OCT'
    529              ELSE IF (imth.EQ.11) THEN
     530             ELSE IF (imth==11) THEN
    530531                cvar=TRIM(varname)//'NOV'
    531              ELSE IF (imth.EQ.12) THEN
     532             ELSE IF (imth==12) THEN
    532533                cvar=TRIM(varname)//'DEC'
    533534             END IF
     
    716717
    717718  SUBROUTINE check_err(status,text)
    718     USE netcdf
    719719    USE print_control_mod, ONLY: lunout
    720720    IMPLICIT NONE
Note: See TracChangeset for help on using the changeset viewer.