Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.hluresfile not work in NCL ver6.6.2 #142

Open
gaomin0006 opened this issue Oct 13, 2020 · 0 comments
Open

.hluresfile not work in NCL ver6.6.2 #142

gaomin0006 opened this issue Oct 13, 2020 · 0 comments

Comments

@gaomin0006
Copy link

gaomin0006 commented Oct 13, 2020

Describe the bug
I used NCL to draw weather maps of different levels and accuracy. When the level was very high, the size of the image easily
exceeded 100M of the original setting of wsMaximumSize. Then I checked the official website instructions, and put the.hluresfile
in the home directory, the content was as follows: "*wsMaximumSize: 300000000000", but it did not work, I checked the source
code, found the default directory is "~/", so I put the.hluresfile in the ~ directory, it still does not work. I checked the instructions
again and modified the NCARG_USRRESFILE parameter, but it still didn't work.

Provide the following:

  • The contents of my NCL script:
    begin
    ti = addfile("./icon_RELHUM_2M_0125.nc", "r")
    t = ti->2r(0,0,:,:)
    res = True
    res@gsnDraw = False
    res@gsnFrame = False
    res@gsnAddCyclic = True
    res@gsnRightString = ""
    res@gsnLeftString = ""
    res@cnFillOn = False
    res@cnLinesOn = True
    res@cnLineLabelsOn = False
    res@cnConstFLabelBackgroundColor = -1
    res@cnLineLabelBackgroundColor = -1
    res@cnConstFLabelOn = False
    res@cnMonoLineColor = False
    res@cnLineColors = (/(/0.,0.,0.,0./),(/0.,0.,1.,1./)/)
    res@cnFillColors = (/(/0.,0.,0.,0./),(/0.,0.,1.,1./)/)
    res@cnLevelSelectionMode = "ManualLevels"
    res@cnLevelSpacingF = 5
    res@lbLabelBarOn = False
    res@vpXF = 0
    res@vpWidthF = 1
    res@vpYF = 1
    res@vpHeightF = 1
    res@tmXBBorderOn = False
    res@tmYLBorderOn = False
    res@tmYRBorderOn = False
    res@tmXTBorderOn = False
    res@tmYLLabelsOn = False
    res@tmXBLabelsOn = False
    res@tmYROn = False
    res@tmYLOn = False
    res@tmXTOn = False
    res@tmXBOn = False
    res@mpFillOn = False
    res@mpOutlineOn = False
    res@mpProjection = "Mercator"
    do zoom=1,16
    ; when zoom in 1 to 7, the resulting image size is less than 100M, it worked and get the png file.
    ; but when zoom in 8 to 16, the resulting image size is greater than 100M, it failed.
    ; the error print 'cairo driver error: error opening output file'. Then comes the problem of hluresFile not working.
    times = 2^zoom
    wtype = "png"
    wtype@wkWidth = 256 * times
    wtype@wkHeight = 256 * times
    wtype@wkBackgroundOpacityF = 0
    wks = gsn_open_wks(wtype, "icon_T_2M_level_" + zoom)
    plot = gsn_csm_contour_map(wks, t, res)
    draw(plot)
    frame(wks)
    end do
    delete(plot)
    delete(res)
    end

Computing environment

  • OS: CentOS Linux release 7.8.2003 (Core)
  • NCL Version: 6.6.2
  • Installation method:
    tar -zxvf ncl_ncarg-6.6.2-CentOS7.6_64bit_gnu485.tar.gz -C /usr/local/ncl-6.6.2
    vim /etc/profile
    export NCARG_ROOT=/usr/local/ncl-6.6.2
    export NCARG_USRRESFILE=~/.hluresfile
    export DISPLAY=:0.0
    PATH=$PATH:$NCARG_ROOT/bin
    export PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant