Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/mo_simple_plumes.F90

    r3297 r3605  
    7878    !
    7979    INTEGER :: iret, ncid, DimID, VarID, xdmy
     80    CHARACTER (len = 50)     :: modname = 'mo_simple_plumes.sp_setup'
     81    CHARACTER (len = 80)     :: abort_message
     82
    8083    !
    8184    ! ----------
     
    8487       !   
    8588       iret = nf90_open("MACv2.0-SP_v1.nc", NF90_NOWRITE, ncid)
    86        IF (iret /= NF90_NOERR) STOP 'NetCDF File not opened'
     89       IF (iret /= NF90_NOERR) THEN
     90          abort_message='NetCDF File not opened'
     91          CALL abort_physic(modname,abort_message,1)
     92       ENDIF
    8793       !
    8894       ! read dimensions and make sure file conforms to expected size
     
    9096       iret = nf90_inq_dimid(ncid, "plume_number"  , DimId)
    9197       iret = nf90_inquire_dimension(ncid, DimId, len = xdmy)
    92        IF (xdmy /= nplumes) STOP 'NetCDF improperly dimensioned -- plume_number'
     98       IF (xdmy /= nplumes) THEN
     99          abort_message='NetCDF improperly dimensioned -- plume_number'
     100          CALL abort_physic(modname,abort_message,1)
     101       ENDIF
    93102       !
    94103       iret = nf90_inq_dimid(ncid, "plume_feature", DimId)
    95104       iret = nf90_inquire_dimension(ncid, DimId, len = xdmy)
    96        IF (xdmy /= nfeatures) STOP 'NetCDF improperly dimensioned -- plume_feature'
     105       IF (xdmy /= nfeatures) THEN
     106          abort_message='NetCDF improperly dimensioned -- plume_feature'
     107          CALL abort_physic(modname,abort_message,1)
     108       ENDIF
    97109       !
    98110       iret = nf90_inq_dimid(ncid, "year_fr"   , DimId)
    99111       iret = nf90_inquire_dimension(ncid, DimID, len = xdmy)
    100        IF (xdmy /= ntimes) STOP 'NetCDF improperly dimensioned -- year_fr'
     112       IF (xdmy /= ntimes) THEN
     113          abort_message='NetCDF improperly dimensioned -- year_fr'
     114          CALL abort_physic(modname,abort_message,1)
     115       ENDIF
    101116       !
    102117       iret = nf90_inq_dimid(ncid, "years"   , DimId)
    103118       iret = nf90_inquire_dimension(ncid, DimID, len = xdmy)
    104        IF (xdmy /= nyears) STOP 'NetCDF improperly dimensioned -- years'
     119       IF (xdmy /= nyears) THEN
     120          abort_message='NetCDF improperly dimensioned -- years'
     121          CALL abort_physic(modname,abort_message,1)
     122       ENDIF
    105123       !
    106124       ! read variables that define the simple plume climatology
     
    108126       iret = nf90_inq_varid(ncid, "plume_lat", VarId)
    109127       iret = nf90_get_var(ncid, VarID, plume_lat(:), start=(/1/),count=(/nplumes/))
    110        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lat'
     128       IF (iret /= NF90_NOERR) THEN
     129          abort_message='NetCDF Error reading plume_lat'
     130          CALL abort_physic(modname,abort_message,1)
     131       ENDIF
    111132       iret = nf90_inq_varid(ncid, "plume_lon", VarId)
    112133       iret = nf90_get_var(ncid, VarID, plume_lon(:), start=(/1/),count=(/nplumes/))
    113        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lon'
     134       IF (iret /= NF90_NOERR) THEN
     135          abort_message='NetCDF Error reading plume_lon'
     136          CALL abort_physic(modname,abort_message,1)
     137       ENDIF
    114138       iret = nf90_inq_varid(ncid, "beta_a"   , VarId)
    115139       iret = nf90_get_var(ncid, VarID, beta_a(:)   , start=(/1/),count=(/nplumes/))
    116        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading beta_a'
     140       IF (iret /= NF90_NOERR) THEN
     141          abort_message='NetCDF Error reading beta_a'
     142          CALL abort_physic(modname,abort_message,1)
     143       ENDIF
    117144       iret = nf90_inq_varid(ncid, "beta_b"   , VarId)
    118145       iret = nf90_get_var(ncid, VarID, beta_b(:)   , start=(/1/),count=(/nplumes/))
    119        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading beta_b'
     146       IF (iret /= NF90_NOERR) THEN
     147          abort_message='NetCDF Error reading beta_b'
     148          CALL abort_physic(modname,abort_message,1)
     149       ENDIF
    120150       iret = nf90_inq_varid(ncid, "aod_spmx" , VarId)
    121151       iret = nf90_get_var(ncid, VarID, aod_spmx(:)  , start=(/1/),count=(/nplumes/))
    122        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading aod_spmx'
     152       IF (iret /= NF90_NOERR) THEN
     153          abort_message='NetCDF Error reading aod_spmx'
     154          CALL abort_physic(modname,abort_message,1)
     155       ENDIF
    123156       iret = nf90_inq_varid(ncid, "aod_fmbg" , VarId)
    124157       iret = nf90_get_var(ncid, VarID, aod_fmbg(:)  , start=(/1/),count=(/nplumes/))
    125        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading aod_fmbg'
     158       IF (iret /= NF90_NOERR) THEN
     159          abort_message='NetCDF Error reading aod_fmbg'
     160          CALL abort_physic(modname,abort_message,1)
     161       ENDIF
    126162       iret = nf90_inq_varid(ncid, "ssa550"   , VarId)
    127163       iret = nf90_get_var(ncid, VarID, ssa550(:)  , start=(/1/),count=(/nplumes/))
    128        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading ssa550'
     164       IF (iret /= NF90_NOERR) THEN
     165          abort_message='NetCDF Error reading ssa550'
     166          CALL abort_physic(modname,abort_message,1)
     167       ENDIF
    129168       iret = nf90_inq_varid(ncid, "asy550"   , VarId)
    130169       iret = nf90_get_var(ncid, VarID, asy550(:)  , start=(/1/),count=(/nplumes/))
    131        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading asy550'
     170       IF (iret /= NF90_NOERR) THEN
     171          abort_message='NetCDF Error reading asy550'
     172          CALL abort_physic(modname,abort_message,1)
     173       ENDIF
    132174       iret = nf90_inq_varid(ncid, "angstrom" , VarId)
    133175       iret = nf90_get_var(ncid, VarID, angstrom(:), start=(/1/),count=(/nplumes/))
    134        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading angstrom'
     176       IF (iret /= NF90_NOERR) THEN
     177          abort_message='NetCDF Error reading angstrom'
     178          CALL abort_physic(modname,abort_message,1)
     179       ENDIF
    135180       !
    136181       iret = nf90_inq_varid(ncid, "sig_lat_W"     , VarId)
    137182       iret = nf90_get_var(ncid, VarID, sig_lat_W(:,:)    , start=(/1,1/),count=(/nfeatures,nplumes/))
    138        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lat_W'
     183       IF (iret /= NF90_NOERR) THEN
     184          abort_message='NetCDF Error reading sig_lat_W'
     185          CALL abort_physic(modname,abort_message,1)
     186       ENDIF
    139187       iret = nf90_inq_varid(ncid, "sig_lat_E"     , VarId)
    140188       iret = nf90_get_var(ncid, VarID, sig_lat_E(:,:)    , start=(/1,1/),count=(/nfeatures,nplumes/))
    141        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lat_E'
     189       IF (iret /= NF90_NOERR) THEN
     190          abort_message='NetCDF Error reading sig_lat_E'
     191          CALL abort_physic(modname,abort_message,1)
     192       ENDIF
    142193       iret = nf90_inq_varid(ncid, "sig_lon_E"     , VarId)
    143194       iret = nf90_get_var(ncid, VarID, sig_lon_E(:,:)    , start=(/1,1/),count=(/nfeatures,nplumes/))
    144        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lon_E'
     195       IF (iret /= NF90_NOERR) THEN
     196          abort_message='NetCDF Error reading sig_lon_E'
     197          CALL abort_physic(modname,abort_message,1)
     198       ENDIF
    145199       iret = nf90_inq_varid(ncid, "sig_lon_W"     , VarId)
    146200       iret = nf90_get_var(ncid, VarID, sig_lon_W(:,:)    , start=(/1,1/),count=(/nfeatures,nplumes/))
    147        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading sig_lon_W'
     201       IF (iret /= NF90_NOERR) THEN
     202          abort_message='NetCDF Error reading sig_lon_W'
     203          CALL abort_physic(modname,abort_message,1)
     204       ENDIF
    148205       iret = nf90_inq_varid(ncid, "theta"         , VarId)
    149206       iret = nf90_get_var(ncid, VarID, theta(:,:)        , start=(/1,1/),count=(/nfeatures,nplumes/))
    150        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading theta'
     207       IF (iret /= NF90_NOERR) THEN
     208          abort_message='NetCDF Error reading theta'
     209          CALL abort_physic(modname,abort_message,1)
     210       ENDIF
    151211       iret = nf90_inq_varid(ncid, "ftr_weight"    , VarId)
    152212       iret = nf90_get_var(ncid, VarID, ftr_weight(:,:)   , start=(/1,1/),count=(/nfeatures,nplumes/))
    153        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading plume_lat'
     213       IF (iret /= NF90_NOERR) THEN
     214          abort_message='NetCDF Error reading plume_lat'
     215          CALL abort_physic(modname,abort_message,1)
     216       ENDIF
    154217       iret = nf90_inq_varid(ncid, "year_weight"   , VarId)
    155218       iret = nf90_get_var(ncid, VarID, year_weight(:,:)  , start=(/1,1/),count=(/nyears,nplumes   /))
    156        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading year_weight'
     219       IF (iret /= NF90_NOERR) THEN
     220          abort_message='NetCDF Error reading year_weight'
     221          CALL abort_physic(modname,abort_message,1)
     222       ENDIF
    157223       iret = nf90_inq_varid(ncid, "ann_cycle"     , VarId)
    158224       iret = nf90_get_var(ncid, VarID, ann_cycle(:,:,:)  , start=(/1,1,1/),count=(/nfeatures,ntimes,nplumes/))
    159        IF (iret /= NF90_NOERR) STOP 'NetCDF Error reading ann_cycle'
     225       IF (iret /= NF90_NOERR) THEN
     226          abort_message='NetCDF Error reading ann_cycle'
     227          CALL abort_physic(modname,abort_message,1)
     228       ENDIF
    160229       !
    161230       iret = nf90_close(ncid)
Note: See TracChangeset for help on using the changeset viewer.