Changeset 716 in lmdz_wrf for trunk


Ignore:
Timestamp:
Apr 25, 2016, 7:36:22 PM (9 years ago)
Author:
lfita
Message:

Fixing smaller issues

Location:
trunk/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/module_ForInterpolate.F90

    r715 r716  
    197197END SUBROUTINE CoarselonlatFind
    198198
    199 SUBROUTINE CoarseInterpolate(dimx, dimy, projlon, projlat, Ninpts, lonvs, latvs, percen, mindiff,    &
    200   ivar, newvar, newvarin, newvarinpt, newvarindiff)
     199SUBROUTINE CoarseInterpolate(projlon, projlat, lonvs, latvs, percen, mindiff, ivar, newvar, newvarin, &
     200  newvarinpt, newvarindiff, dimx, dimy, Ninpts)
    201201! Subroutine which finds the closest grid point within a projection throughout a first guest
    202202!   approche from percentages of the whole domain
     
    270270          newvarinpt(iv) = 1
    271271          newvarindiff(iv) = mindiffLl
    272           PRINT *,'Lluis iv:', newvarin(ilonlat(1),ilonlat(2)), ' localized:', newvarinpt(iv),        &
    273             ' values:', newvar(ilonlat(1),ilonlat(2)), ' invalues:', ivar(iv), ' mindist:',           &
    274             newvarindiff(iv), ' point:',ilonlat   
     272!          PRINT *,'Lluis iv:', newvarin(ilonlat(1),ilonlat(2)), ' localized:', newvarinpt(iv),        &
     273!            ' values:', newvar(ilonlat(1),ilonlat(2)), ' invalues:', ivar(iv), ' mindist:',           &
     274!            newvarindiff(iv), ' point:',ilonlat   
    275275        ELSE
    276276          PRINT *,TRIM(ErrWarnMsg('err'))
     
    282282
    283283!        IF (MOD(iv,Ninpts1) == 0) newnc.sync()
    284       ELSE
    285         PRINT *,TRIM(ErrWarnMsg('err'))
    286         PRINT *,'  ' // TRIM(fname) // ': for point #', iv,' lon,lat in incomplet map:', lonvs(iv),   &
    287           ' ,', latvs(iv), ' there is not a set of lon,lat in the completed map closer than: ',       &
    288           mindiff, ' !!'
    289         PRINT *,'    found minimum difference:', mindiffLl
    290         STOP
     284!      ELSE
     285! Because doing boxes and Goode is not conitnuos, we should jump this error message
     286!        PRINT *,TRIM(ErrWarnMsg('err'))
     287!        PRINT *,'  ' // TRIM(fname) // ': for point #', iv,' lon,lat in incomplet map:', lonvs(iv),   &
     288!          ' ,', latvs(iv), ' there is not a set of lon,lat in the completed map closer than: ',       &
     289!          mindiff, ' !!'
     290!        PRINT *,'    found minimum difference:', mindiffLl
     291!        STOP
    291292      END IF
    292293    END IF
  • trunk/tools/nc_var.py

    r706 r716  
    3535  'maskvar',                                                                         \
    3636  'ncreplace', 'ncstepdiff', 'netcdf_concatenation', 'netcdf_fold_concatenation',    \
    37   'Partialmap_Entiremap', 'remapnn',                                                 \
     37  'Partialmap_Entiremap', 'Partialmap_EntiremapFor', 'remapnn',                      \
    3838  'seasmean', 'sellonlatbox', 'sellonlatlevbox', 'selvar', 'setvar_asciivalues',     \
    3939  'sorttimesmat', 'spacemean', 'SpatialWeightedMean', 'statcompare_files', 'submns', \
     
    210210elif oper == 'Partialmap_Entiremap':
    211211    ncvar.Partialmap_Entiremap(opts.values, opts.ncfile, opts.varname)
     212elif oper == 'Partialmap_EntiremapFor':
     213    ncvar.Partialmap_EntiremapFor(opts.values, opts.ncfile, opts.varname)
    212214elif oper == 'seasmean':
    213215    ncvar.seasmean(timename, opts.ncfile, opts.varname)
  • trunk/tools/nc_var_tools.py

    r714 r716  
    1922719227      varn= name of the variable
    1922819228    """
     19229    import module_ForInterpolate as fin
    1922919230    import numpy.ma as ma
    1923019231    import subprocess as sub
     
    1935019351        lonmap = olon[:]
    1935119352        latmap = olat[:]
    19352         projlon = olon[:]
    19353         projlat = olat[:]
     19353        projlon = olon[:].astype('float64')
     19354        projlat = olat[:].astype('float64')
    1935419355        omapvals = oproj.variables['ptid']
    1935519356        Ntotvals = omapvals.shape[0] * omapvals.shape[1]
     
    1949419495            iri = ir
    1949519496            ire = ir + fracs + 1
    19496             print iri,',',ire
     19497            percendone(iri,Ninpts,0.5,'done:')
     19498            lonvss = lonvs[iri:ire].astype('float64')
     19499            latvss = latvs[iri:ire].astype('float64')
     19500            ovars = ovar[iri:ire].astype('float64')
     19501
    1949719502            newvar,newvarin,newvarinpt,newvarindiff =                                \
    1949819503              fin.module_forinterpolate.coarseinterpolate(projlon, projlat,          \
    19499               lonvs[iri:ire], latvs[iri:ire], fracd, mindiff, ivar, Nmaplon,         \
    19500               Nmaplat, fracs)
     19504              lonvss, latvss, np.float64(fracd), np.float64(mindiff), ovars)
    1950119505            newnc.sync()
    1950219506
Note: See TracChangeset for help on using the changeset viewer.