Git Product home page Git Product logo

swotsimulator's People

Contributors

jinbow avatar lgaultier avatar swot-jpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swotsimulator's Issues

'ssh_true'

Hello,
Sorry to bother. I worked on this all day and made no progress.

Error:

/!\ Error occurred while processing grid /u/GoM_4dvar/SWOT-cal-val/model/OoT/raw/SWOT_OoT/swot_output/OoT_science_grid_p584.nc
Traceback (most recent call last):

File "/home/jmdaddez/anaconda3/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/mod_parallel.py", line 153, in _operation_wrapper
operation(msg_queue, *_args, **kwargs)

File "/home/jmdaddez/anaconda3/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/run_simulator.py", line 497, in worker_method_swot
create = mod.create_SWOTlikedata(cycle, list_file, modelbox,

File "/home/jmdaddez/anaconda3/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/mod_run.py", line 325, in create_SWOTlikedata
model_step.read_var(index=model_data.model_index)

**File "/home/jmdaddez/anaconda3/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/rw_data.py", line 1166, in read_var
self.input_var['ssh_true'] = self.input_var['ssh_true']*self.SSH_factor

KeyError: 'ssh_true'**

It looks like it's going inside rw_data.py on line 1153 and trying to run the loop. No matter what I assign as my 'var' and/or 'ssh_true' in the params.py file, it skips over the loop right to line 1166 where it fails because it didn't do anything (leaving the input_var dictionary empty). It should initialize in init starting on line 1116 where it should at least have one entry for the input_var_list (ssh_true).

Not sure what is going on.

params.py file attached. Bad installation?

Joseph
params.py.pdf

data/karin_noise.nc needs an update

A new simulation of the karin_noise is available. The new data has 17 levels of surface wave height instead of the 15 in the current file. The file needs an update.

encoding problem

I downloaded the newest version and try to run it but got the following error code.

Traceback (most recent call last):
File "run.py", line 25, in
import swotsimulator.run_simulator as run_simulator
File "/home1/jwang23/projects/swot/swotsimulator/swotsimulator/run_simulator.py", line 226
SyntaxError: Non-ASCII character '\xc2' in file /home1/jwang23/projects/swot/swotsimulator/swotsimulator/run_simulator.py on line 226, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I am using python2.7

add continuous integration?

As discussed in #19, we are interested in trying swot simulator and also potentially proposing some changes to handle data that is not stored in netCDF files.

It's great that swotsimulator has a test suite! Have you considered using travis-ci to automatically run these tests on every branch and pull request? This is what most community open-source python projects do. It greatly enhances the potential for collaboration by giving everyone a clear view of whether or not a potential contribution validates against the test suite.

This and other best practices for python packages are outlined on the pangeo website.

Q:Try 250m resolution

The simulator apply high resolution(250m)to make ssh height in documentation.I reset delta_ac& al in params,it only get swotgrid data exclude swot_like output. what else should i change with code.

Bug? run over a sub-domain

I found the simulator fails with the modelbox option on and irregular grid because the model grid itself is not restricted, onyl the data. I solved the problem adding two lines:
model_data.vlon = model_data.vlon[model_data.model_index]
model_data.vlat = model_data.vlat[model_data.model_index]
around line 158 in run_simulator.py.
But I wonder why not using the selct_modelbox function?

KeyError: 'ssh_true'

Hello,

As with others before me, I am encountering this error:

/!\ Error occurred while processing grid /Volumes/PaulResearch/EDDYCOMPLETE/swotsimulator/example/swot_output/OREGON_science_grid_p0584.nc
Traceback (most recent call last):

File "/Users/Paul/opt/anaconda3/lib/python3.9/site-packages/swotsimulator-4.0-py3.9.egg/swotsimulator/mod_parallel.py", line 153, in _operation_wrapper
operation(msg_queue, *_args, **kwargs)

File "/Users/Paul/opt/anaconda3/lib/python3.9/site-packages/swotsimulator-4.0-py3.9.egg/swotsimulator/run_simulator.py", line 297, in worker_method_swot
create = mod.create_SWOTlikedata(cycle, list_file, modelbox,

File "/Users/Paul/opt/anaconda3/lib/python3.9/site-packages/swotsimulator-4.0-py3.9.egg/swotsimulator/mod_run.py", line 300, in create_SWOTlikedata
model_step.read_var(index=model_data.model_index)

File "/Users/Paul/opt/anaconda3/lib/python3.9/site-packages/swotsimulator-4.0-py3.9.egg/swotsimulator/rw_data.py", line 1174, in read_var
self.input_var['ssh_true'] = self.input_var['ssh_true']*self.SSH_factor

KeyError: 'ssh_true'

I am using all settings default with the example data provided in the swotsimulator_largedata repository; the only changed element of any part of the package is the params_example.txt file, where I have placed my working drive file path instead of the example file path. The params file is attached. I also am attempting to use the simulator with LLC4320 and I am getting the same error there too, but I figure that the error must be on some basic level if I am encountering it with the examples provided.

I appreciate any help you can provide, as I know this issue or ones very similar to it have been addressed before but the solutions were not posted publicly to my knowledge. I apologize if I am mistaken on that front.

Thank you,

Paul Ernst

params_example.txt

simulator in the cloud

Given some model data are on the cloud, we wondering on the use of the SWOT simulator being run from the cloud (@raphaeldussin @rabernat), which would be of interest for the SWOT community. The main issue we have found for now is the SWOT simulator uses netCDF as inputs and outputs. Any ideas on this? Thanks in advance!

Running the simulator without the nadir option

Hi, it looks like the simulator cannot be run without the option "nadir = False". Several variables are defined only under the "nadir=True" condition, then used even with nadir set to False. If a SWOT simulator wizard could fix that, it would be greatly appreciated.

Compatibility problem with numpy 1.14.0

It seems that the new 1.14.0 numpy version does not allow the substraction of boolean anymore. When using the simulator this error appears:

"TypeError: numpy boolean subtract, the - operator, is deprecated, use the bitwise_xor, the ^ operator, or the logical_xor function instead."

I tracked the problem to l.224 in the 'cart2spher' function of 'mod_tools.py', although it might happen elsewhere.

I think we should either advise to use an earlier version of numpy in the simulator documentation (e.g. 1.13.3) or find a different formulation of the boolean subtraction.

I stay available if need be to help in implementing either of these solutions or any other alternatives.

Simulation of noise only fails

I try to simulate only the noise ie. without input model data (file_inputs = None in the configuration), but there was the following error:
Traceback (most recent call last): File "/home/ad/robin-cls/.conda/envs/swot_simulator_light/bin/swotsimulator", line 33, in <module> sys.exit(load_entry_point('swotsimulator==3.10', 'console_scripts', 'swotsimulator')()) File "/home/ad/robin-cls/.conda/envs/swot_simulator_light/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/cli.py", line 39, in run_swot_script File "/home/ad/robin-cls/.conda/envs/swot_simulator_light/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/run_simulator.py", line 83, in run_simulator File "/home/ad/robin-cls/.conda/envs/swot_simulator_light/lib/python3.8/site-packages/swotsimulator-3.10-py3.8.egg/swotsimulator/mod_run.py", line 138, in load_coordinate_model UnboundLocalError: local variable 'model_data' referenced before assignment

I used the params_global.txt file from the examples, with modified paths for inputs and outputs.

Saving Random_coeff.nc

When the file_coeff parameter is not specified to None in the params.py file, the following error appears: (in the previous version of the simulator it worked fine and this error did not appear)

Force creation of SWOT grid
Load data from orbit file
Compute nadir coordinate in the new domain
Percent: [##############################] 100.00%,
Compute SWOT grid

[####################] 14:19:07|> pass: 387 ....... DONE
[####################] 14:19:07|> pass: 385 ....... DONE
[####################] 14:19:07|> pass: 386 ....... DONE
SWOT Grids and nadir tracks have been written in /Users/laura/src/git/swotsimulator_040418/swotsimulator/example/swot_output

Traceback (most recent call last):
File "/Users/laura/anaconda2/envs/venv_swot_3/bin/swotsimulator", line 11, in
load_entry_point('swotsimulator==3.0', 'console_scripts', 'swotsimulator')()
File "/Users/laura/src/git/swotsimulator_040418/swotsimulator/swotsimulator/cli.py", line 30, in run_swot_script
run_simulator.run_simulator(p)
File "/Users/laura/src/git/swotsimulator_040418/swotsimulator/swotsimulator/run_simulator.py", line 152, in run_simulator
err, errnad = load_error(p)
File "/Users/laura/src/git/swotsimulator_040418/swotsimulator/swotsimulator/run_simulator.py", line 495, in load_error
err.save_coeff(p, 2*nhalfswath)
File "/Users/laura/src/git/swotsimulator_040418/swotsimulator/swotsimulator/build_error.py", line 673, in save_coeff
var[:] = self.A_roll
File "netCDF4/_netCDF4.pyx", line 4430, in netCDF4._netCDF4.Variable.setitem
File "netCDF4/_netCDF4.pyx", line 4657, in netCDF4._netCDF4.Variable._put
IndexError: size of data array does not conform to slice

Thanks!

Fast-sampling orbit at the wrong place in New Caledonia region ?

I have tested the fast sampling orbit from the swot simulator and it does not seem to sample the same region as I was expected. In the following, I compare the output from the SWOT simulator and the orbit from the KML file available on AVISO: both swaths are inconsistent !

Do you have any idea why I get this result ?

SSH output from NEMO 1/12°

Contours are the SSH field from the model. The black curves denote the fast-sampling orbit, plotted from the KML file available on AVISO.
ssh_nc

SSH output from the SWOT simulator using the fast sampling orbit

Here is the result of the SWOT simulator performed on the previous snapshot.
swot_nc

Inconsistency between orbit file and reading instruction

Hi, in the build_swath file, makeorbit function, I had to modify the orbit file reading instruction because the columns are not given in appropriate order. I suggest to restablish consistency like this, so that the default configuration of the simulator runs without modification:
if p.order_orbit_col is None:
#volon, volat, votime = numpy.loadtxt(orbitfile, usecols=(1, 2, 0),
volon, volat, votime = numpy.loadtxt(orbitfile, usecols=(0, 1, 2),
unpack=True)

Problems at runing the first example

Hi Dear,

I am having problems while I am trying to running the fist example.

Aparently there isnt a OREGON file.

I´d like to know if is there any missing file?
Coud you please re-upload the Oregon file?

I appreciate!

AttributeError: 'str' object has no attribute 'shift_lon'

Hi,

I am a new user of SWOT Simulator (since yesterday). I tried to run the example and got an error (last line) as follows. Can anyone please advise? Thank you in advance.

root@heng:/home/swotsimulator# python run.py ./example/params_example.py
Traceback (most recent call last):
File "run.py", line 26, in
run_simulator.run_simulator(file_param)
File "/home/swotsimulator/swotsimulator/run_simulator.py", line 74, in run_simulator
mod_tools.initialize_parameters(p)
File "/home/swotsimulator/swotsimulator/mod_tools.py", line 40, in initialize_parameters
p.shift_lon = getattr(p, 'shift_lon', None)
AttributeError: 'str' object has no attribute 'shift_lon'

Heng
M2C, Universite de Rouen Normandie

Specific parameter for nadir along-track spacing

So far, the same delta_al is used for both Karin and nadir altimeter. It should be specified separately as the nadir posting resolution will not be the same as Karin. I would suggest to add delta_al_knadir?

Or why not defining a separate parameter file for the nadir altimeter, so the simulator in nadir mode can be used separately? But that's more work to do, if anyone is willing ...

KeyError: 'ssh_true'

While running the example an error occurs while processing the grid. Interpolated outputs are not saved. This error happens for every grid made. The traceback calls to line 1166 in rw_data:

'''
/!\ Error occurred while processing grid /Users/caggiano/swotsimulator/example/swot_output/OREGON_science_grid_p584.nc
Traceback (most recent call last):

File "/Users/caggiano/opt/anaconda3/envs/myenv/lib/python3.7/site-packages/swotsimulator-3.10-py3.7.egg/swotsimulator/mod_parallel.py", line 153, in _operation_wrapper
operation(msg_queue, *_args, **kwargs)

File "/Users/caggiano/opt/anaconda3/envs/myenv/lib/python3.7/site-packages/swotsimulator-3.10-py3.7.egg/swotsimulator/run_simulator.py", line 500, in worker_method_swot
nTeval=nTeval)

File "/Users/caggiano/opt/anaconda3/envs/myenv/lib/python3.7/site-packages/swotsimulator-3.10-py3.7.egg/swotsimulator/mod_run.py", line 325, in create_SWOTlikedata
model_step.read_var(index=model_data.model_index)

File "/Users/caggiano/opt/anaconda3/envs/myenv/lib/python3.7/site-packages/swotsimulator-3.10-py3.7.egg/swotsimulator/rw_data.py", line 1166, in read_var
self.input_var['ssh_true'] = self.input_var['ssh_true']*self.SSH_factor

KeyError: 'ssh_true'
'''

example data missing

Greetings swotsimulator developers,
I downloaded and installed the package according to the documentation, but when I tried to run the example, the ./example/input_fields directory was missing. I am checking the old sourceforge page to see if the example files are over there.
All the best,
Ed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.